After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 632046 - Removing GtkObject uses in Ekiga
Removing GtkObject uses in Ekiga
Status: RESOLVED FIXED
Product: ekiga
Classification: Applications
Component: general
GIT master
Other All
: Normal normal
: ---
Assigned To: Ekiga maintainers
Ekiga maintainers
Depends on:
Blocks: 630874
 
 
Reported: 2010-10-13 11:14 UTC by Marin Moulinier
Modified: 2010-11-16 18:35 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
Patch removing GtkObject uses in Ekiga (8.29 KB, patch)
2010-10-13 11:14 UTC, Marin Moulinier
needs-work Details | Review
Patch removing GtkObject uses in Ekiga, updated (1.99 KB, patch)
2010-11-11 16:31 UTC, Marin Moulinier
needs-work Details | Review

Description Marin Moulinier 2010-10-13 11:14:10 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.
Comment 1 Javier Jardón (IRC: jjardon) 2010-10-13 15:07:27 UTC
Review of attachment 172247 [details] [review]:

g_object_connect* () do not need a cast in the first parameter, could you rework the patch?
Comment 2 Snark 2010-10-13 15:35:20 UTC
You meant g_signal_connect ?

If so, I very recently committed guilty code :-/
Comment 3 Javier Jardón (IRC: jjardon) 2010-10-22 00:28:10 UTC
(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(
Comment 4 Eugen Dedu 2010-11-06 17:13:26 UTC
> 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?
Comment 5 Snark 2010-11-06 20:15:39 UTC
I did fix the guilty code -- and all such code in ekiga.
Comment 6 Marin Moulinier 2010-11-11 14:24:19 UTC
- 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.
Comment 7 Eugen Dedu 2010-11-11 14:41:15 UTC
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?
Comment 8 Snark 2010-11-11 15:00:07 UTC
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...
Comment 9 Eugen Dedu 2010-11-11 15:18:37 UTC
I will commit myself that patch, even if modifications are necessary.
Comment 10 Marin Moulinier 2010-11-11 16:31:21 UTC
Created attachment 174263 [details] [review]
Patch removing GtkObject uses in Ekiga, updated
Comment 11 Marin Moulinier 2010-11-11 16:39:26 UTC
↑ I updated the patch. I think that it works with Gtk+ 2.*.
Comment 12 Javier Jardón (IRC: jjardon) 2010-11-12 19:39:00 UTC
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
Comment 13 Eugen Dedu 2010-11-16 17:26:04 UTC
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?
Comment 14 Javier Jardón (IRC: jjardon) 2010-11-16 17:38:38 UTC
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
Comment 15 Eugen Dedu 2010-11-16 18:35:24 UTC
Fixed in http://git.gnome.org/browse/ekiga/commit/?id=fe4bf0ec525, thank you.