GNOME Bugzilla – Bug 632046
Removing GtkObject uses in Ekiga
Last modified: 2010-11-16 18:35:24 UTC
Created attachment 172247 [details] [review] Patch removing GtkObject uses in Ekiga Hello, As part of this GNOME Goal : http://live.gnome.org/GnomeGoals/GtkObjectRemoval , I created a patch to remove GtkObject uses, because it will be removed in GTK+ 3.
Review of attachment 172247 [details] [review]: g_object_connect* () do not need a cast in the first parameter, could you rework the patch?
You meant g_signal_connect ? If so, I very recently committed guilty code :-/
(In reply to comment #2) > You meant g_signal_connect ? > > If so, I very recently committed guilty code :-/ It's not a strong problem, but the cast is not needed(
> You meant g_signal_connect ? > > If so, I very recently committed guilty code :-/ Snark, have you fixed your "guilty code" since then? Marin, any news? Could you do it?
I did fix the guilty code -- and all such code in ekiga.
- I see that you haven't removed the cast in lib/gui/gmdialog.c. Is there a reason? - Can I also remove the casts in g_signal_connect_data() and g_signal_connect_swapped()? Thanks in advance.
Marin, as you know better than us about this bug: does your patch work on a system with gtk 2.20? Or you should use #ifdef GTK_VERSION (or something like this) ? Otherwise said, should your patch be applied as is, and it will work on gtk 2.20 too?
I removed the casts in lib/gui/gmdialog.c ; indeed they were forgotten. Notice that I'm not sure your patch hasn't been obsoleted by my recent cleanings of the GObject code in ekiga...
I will commit myself that patch, even if modifications are necessary.
Created attachment 174263 [details] [review] Patch removing GtkObject uses in Ekiga, updated
↑ I updated the patch. I think that it works with Gtk+ 2.*.
Review of attachment 174263 [details] [review]: Thanks for the patch, some comments: ::: src/gui/main_window.cpp @@ +178,3 @@ GtkWidget *output_signal; + GtkWidget *adj_input_volume; + GtkWidget *adj_output_volume; Use GtkAdjustment* instead GtkWidget*, as gtk_adjustment_new() returns a GtkAdjustment* now. @@ +187,3 @@ + GtkWidget *adj_brightness; + GtkWidget *adj_colour; + GtkWidget *adj_contrast; Same here
Even with these fixes, I receive with gtk 2.20: CXX main_window.o gui/main_window.cpp: In function ‘GtkWidget* gm_mw_video_settings_window_new(EkigaMainWindow*)’: gui/main_window.cpp:1590: error: cannot convert ‘GtkObject*’ to ‘GtkAdjustment*’ in assignment gui/main_window.cpp:1611: error: cannot convert ‘GtkObject*’ to ‘GtkWidget*’ in assignment gui/main_window.cpp:1632: error: cannot convert ‘GtkObject*’ to ‘GtkAdjustment*’ in assignment gui/main_window.cpp:1653: error: cannot convert ‘GtkObject*’ to ‘GtkAdjustment*’ in assignment gui/main_window.cpp: In function ‘GtkWidget* gm_mw_audio_settings_window_new(EkigaMainWindow*)’: gui/main_window.cpp:1727: error: cannot convert ‘GtkObject*’ to ‘GtkAdjustment*’ in assignment gui/main_window.cpp:1763: error: cannot convert ‘GtkObject*’ to ‘GtkAdjustment*’ in assignment I suppose I have to use #define with GTK version, do you know from what gtk version the new code works?
I'm sorry, I think that ekiga has been switched to GTK+3. gtk_adjustment_new() returns a GtkAdjustment* only in GTK+3, so you have to use conditional code or switch to GTK+3
Fixed in http://git.gnome.org/browse/ekiga/commit/?id=fe4bf0ec525, thank you.