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 612476 - Does not compile with -DGSEAL_ENABLED
Does not compile with -DGSEAL_ENABLED
Status: RESOLVED FIXED
Product: gnome-netstatus
Classification: Deprecated
Component: general
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: Mark McLoughlin
Mark McLoughlin
Depends on:
Blocks: 585391
 
 
Reported: 2010-03-10 20:26 UTC by André Klapper
Modified: 2010-06-20 02:45 UTC
See Also:
GNOME target: 3.0
GNOME version: 2.29/2.30


Attachments
Patch fixing all but one issue (5.08 KB, patch)
2010-04-18 21:10 UTC, André Klapper
committed Details | Review

Description André Klapper 2010-03-10 20:26:08 UTC
This module does not build with -DGSEAL_ENABLED.
See http://live.gnome.org/GnomeGoals/UseGseal .

Note that maybe this report cannot be fixed yet, as GTK+ still misses some accessor functions (see bug 588389, bug 597610) needed for sealing.
Also see http://live.gnome.org/GTK%2B/3.0/PendingSealings for current status.

The jhbuild output posted here of course only lists the very first error when trying to compile.

netstatus-applet.c: In function ‘netstatus_applet_background_changed’:
netstatus-applet.c:344: error: ‘GtkWidget’ has no member named ‘style’
make[3]: *** [netstatus-applet.o] Error 1
make[3]: Leaving directory `/home/andre/svn-gnome/gnome-netstatus/src'
make[2]: *** [all] Error 2
Comment 1 André Klapper 2010-03-10 23:36:35 UTC
Adding dependency to bug 69872 because of GTK_WIDGET_SET_FLAGS
Comment 2 Javier Jardón (IRC: jjardon) 2010-03-11 04:59:57 UTC
src/netstatus-icon.c:  GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
src/netstatus-icon.c:  GTK_WIDGET_UNSET_FLAGS (icon, GTK_NO_WINDOW);

You can use:

gtk_widget_set_realized (widget, TRUE);
gtk_widget_set_has_window (widget, TRUE);
Comment 3 André Klapper 2010-04-18 21:10:30 UTC
Created attachment 159038 [details] [review]
Patch fixing all but one issue

Patch that fixes everything except for
  GTK_WIDGET_UNSET_FLAGS (icon, GTK_NO_WINDOW);
as I have no idea what to do with that as "icon" is of type NetstatusIcon.

Probably also makes sense to catch some query results that are triggered more than once. Feel free to change/commit/change&commit/... my patch.
Comment 4 Javier Jardón (IRC: jjardon) 2010-04-18 22:48:44 UTC
Review of attachment 159038 [details] [review]:

Hey Andre!

I'm not the module mantainer but I have some comments. Hope they help.

Also, you can use

gtk_widget_set_has_window (GTK_WIDGET (icon), TRUE);

for the remaining function

::: src/netstatus-icon.c
@@ +630,3 @@
+                              MAX (allocation->width - gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2, 0),
+                              allocation->x + gtk_container_get_border_width (GTK_CONTAINER (widget)),
+      gdk_window_move_resize (gtk_widget_get_window (widget),

You can store the border_width var and then use it instead calling the function several times

@@ +638,3 @@
   child_allocation.x = 0;
+  child_allocation.height = MAX (allocation->height - gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2, 0);
+  child_allocation.width  = MAX (allocation->width  - gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2, 0);

same here

@@ +699,3 @@
   widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
+  gdk_window_set_user_data (gtk_widget_get_window (widget), widget);
+#endif

You can store the widget->window variable here

@@ +703,1 @@
+  gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget), gtk_widget_get_window (widget)));

You should use gtk_widget_style_attach (GtkWidget *style); here
Comment 5 André Klapper 2010-05-29 01:35:31 UTC
Anybody feel free to rework my patch (not much time).
Comment 6 Javier Jardón (IRC: jjardon) 2010-06-20 02:45:15 UTC
Comment on attachment 159038 [details] [review]
Patch fixing all but one issue

committed a reworked patch in commit 597ff7e437b29f7e0f59159d40104f2b08989f3d
Comment 7 Javier Jardón (IRC: jjardon) 2010-06-20 02:45:30 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.