Setting the font for Gtk::Button

2010-05-06 Thread John Emmas
Using gtkmm, I've written a small test app whose GUI contains three widgets. The first is a Gtk::Button, the second is a Gtk::FontButton and the third is a Gtk::ProgressBar. The font button itself has the style 'set_use_font()' (i.e. it always displays its button text in whatever font I

Re: Setting the font for Gtk::Button

2010-05-06 Thread Murray Cumming
On Thu, 2010-05-06 at 09:04 +, John Emmas wrote: You can probably see that the progress bar's font gets successfully changed, whereas the button's font doesn't You have to set the font of the label in the button, not the font of the button. I generally think this is far too difficult.

Re: Setting the font for Gtk::Button

2010-05-06 Thread John Emmas
On 6 May 2010, at 10:07, Murray Cumming wrote: You have to set the font of the label in the button, not the font of the button. I generally think this is far too difficult. I have to admit, I would never have guessed that! Thanks for the tip, Murray. I'll try it out, later.

Re: Setting the font for Gtk::Button

2010-05-06 Thread John Emmas
On 6 May 2010, at 10:07, Murray Cumming wrote: You have to set the font of the label in the button, not the font of the button. I generally think this is far too difficult. I have to admit, I would never have guessed that! Thanks for the tip, Murray. I'll try it out, later. Hmmm

Re: Setting the font for Gtk::Button

2010-05-06 Thread Lance Dillon
- Original Message From: John Emmas john...@tiscali.co.uk To: gtk-app-devel-list@gnome.org Sent: Thu, May 6, 2010 7:23:16 AM Subject: Re: Setting the font for Gtk::Button On 6 May 2010, at 10:07, Murray Cumming wrote: You have to set the font of the label in the

Re: Setting the font for Gtk::Button

2010-05-06 Thread Tadej Borovšak
Hi. I would try gtk_bin_get_child(), since it is a subclass of GtkBin. http://library.gnome.org/devel/gtk/stable/GtkBin.html#gtk-bin-get-child What is packed into button depends on how the button was constructed. If you only set it's label, then GtkLabel will indeed be the child; in any other

Re: Setting the font for Gtk::Button

2010-05-06 Thread John Emmas
- Original Message - From: Tadej Borovšak tadeb...@gmail.com My advice to you would be to create label manually and then simply pack it into empty GtkButton using gtk_container_add(). I created a derived class that uses an explicit label but strangely, it didn't work. Here's my

Re: Setting the font for Gtk::Button

2010-05-06 Thread John Emmas
- Original Message - From: John Emmas And that's it. The button works exactly like it did before. The correct text gets displayed. FontableTextButton::modify_font() gets called at the appropriate time. But the label's font remains the stubbornly the same :-( Correction

Re: Setting the font for Gtk::Button

2010-05-06 Thread John Emmas
- Original Message - From: John Emmas It's possible that these might be 'C runtime' issues - although it'd be strange for it to work with some widgets but not others. However, I'll try compiling with VC++6 and see if that makes any difference. Because of template issues with VC++6 it

Re: Setting the font for Gtk::Button

2010-05-06 Thread John Emmas
- Original Message - From: John Emmas The outcome is that the VC++6 build seems to work exactly as expected, so it looks like this could well be a C runtime issue after all :-( I guess it might be worth asking this question here My understanding is that gtk-win32 and its

Re: Is there a GTK version preprocessor symbol

2010-05-06 Thread Ian Liu Rodrigues
#if GTK_CHECK_VERSION(2,12,0) ... #endif ;-) On Thu, May 6, 2010 at 9:18 AM, Lothar Scholz llot...@web.de wrote: r ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: is popen thread safe?

2010-05-06 Thread Max Kellermann
On 2010/05/06 21:51, frederico schardong frede@gmail.com wrote: I'm trying to add the popen in a thread (using g_thread_create()) but it keep frozen my application. So, is popen thread safe? there is another simple alternative if it isn't? popen() is not thread safe, unless you use the GNU

GTK clipboard notification

2010-05-06 Thread Andreas Falkenhahn
Hi, is there a way to get notified by GTK when the flavor type in the clipboard changes? I have an image app here and I'd like to disable my toolbar's paste button whenever there is something other than an image in the clipboard. So I'm wondering if there is any way to get notified when the

Re: GTK clipboard notification

2010-05-06 Thread Lucas Hermann Negri
On Thu, May 6, 2010 at 6:09 PM, Andreas Falkenhahn andr...@airsoftsoftwair.de wrote: Hi, is there a way to get notified by GTK when the flavor type in the clipboard changes? I have an image app here and I'd like to disable my toolbar's paste button whenever there is something other than

There seems to be a race condition with gdk_window_get_frame_extents?

2010-05-06 Thread Lothar Scholz
Hello gtk-list, On X11 when when i call gtk_widget_realize(GTK_WIDGET(my_toplevel)); gdk_display_sync(gdk_display_get_default()); gdk_window_get_frame_extents(gtk_widget_get_window(GTK_WIDGET(my_toplevel)), rect); after creating a toplevel window the frame is not calculated correctly, i have

Re: is popen thread safe?

2010-05-06 Thread frederico schardong
Do you have a example of this? 2010/5/6 Max Kellermann m...@duempel.org: On 2010/05/06 21:51, frederico schardong frede@gmail.com wrote: I'm trying to add the popen in a thread (using g_thread_create()) but it keep frozen my application. So, is popen thread safe? there is another simple

Re:

2010-05-06 Thread Peter Dennis
Hi Yukiyo, Thank you for the help. But in all other programs (notepad, firefox etc.) it appears as the correct kanji. It is only in my gtk application that the kanji changes to something else. Any idea why this may be the case? Do I need to install Japanese fonts for Gtk? Many thanks,

multiple handlers binded to one signal don't work

2010-05-06 Thread Xi Yang
The second handler just won't work. # my $grp = Goo::Canvas::Rect-new( $root,100,100,50,70, 'fill-color-rgba' = 0x7f7fff7f, ); $grp-signal_connect('button_press_event',\on_press_1); $grp-signal_connect('button_press_event',\on_press_2); sub

Re: multiple handlers binded to one signal don't work

2010-05-06 Thread Emmanuel Rodriguez
2010/5/7 Xi Yang jianding...@msn.com The second handler just won't work. The C documentation [1] tells that you have to return TRUE to stop the signal emission. That's what you are doing and you're doing :) Return FALSE and you will have your expected behavior. [1]