GNOME Bugzilla – Bug 615653
nm-applet fails to build using -DGSEAL_ENABLE
Last modified: 2010-08-02 20:28:00 UTC
see http://live.gnome.org/GnomeGoals/UseGseal
Created attachment 158606 [details] [review] Fix compilation using -DGSEAL_ENABLE This patch substitutes all direct access to Gtk+ object fields with accessor functions in order to fulfill the UseGseal goal as described at http://live.gnome.org/GnomeGoals/UseGseal It also requires to bump the required Gtk+ version to 2.18
The patch mixes spaces with tabs...
Ah, right, I'm not used to tabs for indentation, let me fix this.
Created attachment 158608 [details] [review] Fix compilation using -DGSEAL_ENABLE (revised patch with more consistant indentation) This patch substitutes all direct access to Gtk+ object fields with accessor functions in order to fulfill the UseGseal goal as described at http://live.gnome.org/GnomeGoals/UseGseal It also requires to bump the required Gtk+ version to 2.18
Review of attachment 158608 [details] [review]: ::: src/applet-device-gsm.c @@ +734,2 @@ w = gtk_alignment_new (0.5, 0.5, 0, 1.0); + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)), w, TRUE, TRUE, 0); Looks like you call this four times in this function. Makes more sense to cache it in a variable first, to save some time. ::: src/applet-dialogs.c @@ +747,2 @@ w = gtk_alignment_new (0.5, 0.5, 0, 1.0); + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)), Same here.
Created attachment 159449 [details] [review] Revised patch avoiding unnecessary function call overhead Thanks a lot for your review, André !
Review of attachment 159449 [details] [review]: Some comments (I'n not the module maintainer) ::: src/applet.c @@ +2893,1 @@ + if (applet->menu && (window = gtk_widget_get_window (applet->menu))) { I think It's better window = gtk_widget_get_window (applet->menu); if (window) { screen = gdk_drawable_get_screen (window); @@ +2910,3 @@ + if (applet->context_menu && (window = gtk_widget_get_window (applet->context_menu))) { + screen = gdk_drawable_get_screen (window); Same here
Created attachment 162884 [details] [review] Revised patch following Javier's review Thanks :)
*** Bug 625593 has been marked as a duplicate of this bug. ***
33bdfe50e95f5bc628f8cb55a53ef9fbe2eb4596 (master) f7d629b6bd1ddcddcc449db83a999e3e65084fd2 (0.8.x) are the bits that are compatible with GTK-2.14+. The pieces that require GTK 2.18 are in separate commits: 0e85376c5e7512225023918461881cb13aea22f3 (master) a55917cad258da5688d23db6fedfc2e24afdc819 (0.8.x) I've updated the 0.8.x commit to work with GTK 2.14+ through GTK_CHECK_VERSION. Thanks!