Re: how to create tray icon using gtk 2.8.20 version
On Wed, 2008-03-19 at 15:30 +0530, praveenya kumar wrote: Hai! I want to create a tray icon with a popup menu on click. I wrote a program using GtkStatusIcon which worked well. The same program is giving compilation error saying GtkStatusIcon undeclared. I found that Gtk 2.10 (fc 8) supports GtkStatusIcon, but not Gtk 2.8.20 (fc 5). My system has Gtk 2.8.20. I do not want to change my Gtk for this reason. So I need a work around solution for creating tray icon using Gtk 2.8.20version. Look for eggtrayicon. Chrius ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
sliding panel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'd like to create a panel that slides out of the way, little animation kinda thing and I had something working but gtk really didn't slide it out of the way it just showing the first and then the last. Now I understand that due to performance that not every panel change should be drawn but any idea how I can do this... what I have is this An hbox that contains a fixed and then a vbox.. and I want to be able to shrink the vbox away.. so I put in a loop code that set the size of the vbox smaller until it got to 1. I was able to see the first state and the state where the vbox was down to 1 but I didn't see any of the steps in between. I even tried put a g_usleep in there to see it and I wasn't able to see the box shrinking. I had something like this gdk_window_get_geometry(controls_box-window, x, y, width, height, NULL); rect.x = x; rect.y = y; rect.width = width; for (i = height ; i 0; i--) { rect.height = i; gtk_widget_set_size_request(controls_box,width,i); gdk_window_invalidate_rect(controls_box-window,rect,TRUE); g_usleep(1000); } Thanks, Kevin - -- Get my public GnuPG key from http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x7D0BD5D1 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkfnzagACgkQ6w2kMH0L1dEwgQCdHigKEknXHYrEXNyXwXgmauTw 4l4AoIPHBIbCiZrXFN6vkMymthDX9pFz =f16u -END PGP SIGNATURE- ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GtkStatusIcon bad default size when used with GtkIconFactory
Hi! I'm trying to use the GtkIconFactory system to set the icon used by GtkStatusIcon. Once I've created the GtkIconSet for my icons (I have SVg and PNG versions of the same icon), I use gtk_status_icon_set_from_stock. Everything goes right, except that the created icon is 20x20 px by default (i.e. when the GNOME panel is set to a size of 24 px), when it should be (like every app does) 22x22. Normally, the status icons measure: (height of the panel) - 2 px. But this is not true in my case until the panel is = 26 px. The strange point is, if I set the GtkStatus Icon directly from an icon file, the size is 22x22. Is that a bug in GNOME or am I doing something wrong? I guess this would be the prefferred way of setting up a status icon, since with a custom sotck icon it can be risized without problems - but still I may have missed something. Thanks in advance! Here's for reference a part of the code that I use, if you like (it's in gnunet-gtk from the GNUnet project): char *instDir; char *iconPath; GtkStatusIcon *trayIcon; GtkIconSet *iconSet; GtkIconSource *iconSource; (...) iconSet = gtk_icon_set_new (); iconSource = gtk_icon_source_new (); iconPath = g_build_filename (instDir, .., gnunet-gtk, gnunet-gtk-status-connected.svg, NULL); gtk_icon_source_set_filename (iconSource, iconPath); g_free (iconPath); gtk_icon_set_add_source (iconSet, iconSource); iconPath = g_build_filename (instDir, .., gnunet-gtk, gnunet-gtk-status-connected.png, NULL); gtk_icon_source_set_filename (iconSource, iconPath); g_free (iconPath); gtk_icon_source_set_size_wildcarded (iconSource, FALSE); gtk_icon_set_add_source (iconSet, iconSource); gtk_icon_factory_add (GNUNET_GTK_get_iconFactory(), gnunet-gtk-status-connected, iconSet); gtk_icon_set_unref (iconSet); gtk_icon_source_free (iconSource); gtk_status_icon_set_from_stock (trayIcon, gnunet-gtk-status-connected); ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: sliding panel
I think the problem is that no events are handled as long as you stay in your loop, i.e., the GTK loop is not visited. Change the usleep line with while (gtk_events_pending ()) gtk_main_iteration (); and see what happens. Regards, Bastiaan. Kevin DeKorte wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'd like to create a panel that slides out of the way, little animation kinda thing and I had something working but gtk really didn't slide it out of the way it just showing the first and then the last. Now I understand that due to performance that not every panel change should be drawn but any idea how I can do this... what I have is this An hbox that contains a fixed and then a vbox.. and I want to be able to shrink the vbox away.. so I put in a loop code that set the size of the vbox smaller until it got to 1. I was able to see the first state and the state where the vbox was down to 1 but I didn't see any of the steps in between. I even tried put a g_usleep in there to see it and I wasn't able to see the box shrinking. I had something like this gdk_window_get_geometry(controls_box-window, x, y, width, height, NULL); rect.x = x; rect.y = y; rect.width = width; for (i = height ; i 0; i--) { rect.height = i; gtk_widget_set_size_request(controls_box,width,i); gdk_window_invalidate_rect(controls_box-window,rect,TRUE); g_usleep(1000); } Thanks, Kevin - -- Get my public GnuPG key from http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x7D0BD5D1 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkfnzagACgkQ6w2kMH0L1dEwgQCdHigKEknXHYrEXNyXwXgmauTw 4l4AoIPHBIbCiZrXFN6vkMymthDX9pFz =f16u -END PGP SIGNATURE- ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
TreeView indent-expanders style property
Does anyone know what the indent-expanders style property does? I currently see | Line 1 | Line 2 |Line 3 | Line 4 What I would like is | Line 1 | Line 2 | Line 3 | Line 4 Can I use indent-expanders to achieve this effect? Is there a way to achieve it? The point is to avoid wasting space on lines that don't require an expander arrow. -- Jeffrey Barish ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: TreeView indent-expanders style property
I looked into that a few weeks ago. I think the style property only worked when you hid the expanders. Applicatins like pidgin then create custom cellrendeners with expanders to make up for that. On Mon, 2008-03-24 at 15:50 -0600, Jeffrey Barish wrote: Does anyone know what the indent-expanders style property does? I currently see | Line 1 | Line 2 |Line 3 | Line 4 What I would like is | Line 1 | Line 2 | Line 3 | Line 4 Can I use indent-expanders to achieve this effect? Is there a way to achieve it? The point is to avoid wasting space on lines that don't require an expander arrow. -- Best Regards, Med Venlig Hilsen, Thomas ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GTK+ application on dual head
hello to all, i'm rona. i have a problem with my gtk+ application. i use xmlrpc to send command and data to this application, which should display on second monitor on dual head system. it works well on first monitor, but it wouldn't display when running on second monitor. i have tried to output some trace. i use GtkLabel, set the text, and get back the text to see if it has been updated. from the trace it looks ok. but it still wouldn't display the update. This is what i use in my xorg.conf: Section ServerLayout Identifier defaultLayout Screen 0 Screen0 0 0 Screen 1 Screen1 0 0 InputDeviceMouse0 CorePointer InputDeviceKeyboard0 CoreKeyboard Option Xinerama off Option Clone off EndSection This is the command i use to run on second display: DISPLAY=:0.1 myapp How can i fix this? Why it wouldn't update the display correctly on second monitor? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list