Bug 612481 - Does not compile with -DGSEAL_ENABLED
Does not compile with -DGSEAL_ENABLED
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
:
Depends on: 597895 611724 622186 622581
Blocks: 585391
  Show dependency tree
 
Reported: 2010-03-10 20:29 UTC by André Klapper
Modified: 2011-01-11 07:08 UTC (History)
4 users (show)

See Also:
GNOME target: 3.0
GNOME version: 2.29/2.30


Attachments
Partial patch (8.02 KB, patch)
2010-05-27 13:18 UTC, André Klapper
committed Details | Diff | Review
Partial Patch (76.31 KB, patch)
2010-05-29 01:25 UTC, André Klapper
committed Details | Diff | Review
Another partial patch (2.07 KB, patch)
2010-06-23 03:13 UTC, Javier Jardón (IRC: jjardon)
reviewed Details | Diff | Review
Fix sealed field children (1.29 KB, patch)
2011-01-06 06:40 UTC, Germán Poo-Caamaño
reviewed Details | Diff | Review
Fix build with -DGSEAL_ENABLED (3.15 KB, patch)
2011-01-11 07:02 UTC, Germán Poo-Caamaño
committed Details | Diff | Review

Description André Klapper 2010-03-10 20:29:34 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.

nothing.cP: In function ‘goat_timeout_func’:
nothing.cP:92: error: ‘GtkWidget’ has no member named ‘window’
nothing.cP:110: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:112: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:119: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:121: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP: In function ‘goat_expose’:
nothing.cP:173: error: ‘GtkWidget’ has no member named ‘window’
nothing.cP: In function ‘goat_realize’:
nothing.cP:216: error: ‘GtkWidget’ has no member named ‘window’
nothing.cP:223: error: ‘GtkWidget’ has no member named ‘window’
In file included from main.c:38:
nothing.cP: In function ‘inv_draw’:
nothing.cP:662: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP:682: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP:695: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP:714: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP:718: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP:722: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP:730: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP:732: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP:735: error: ‘GtkWidget’ has no member named ‘window’
nothing.cP:736: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP: In function ‘inv_draw_explosion’:
nothing.cP:771: error: ‘GtkWidget’ has no member named ‘window’
nothing.cP:775: error: ‘GtkWidget’ has no member named ‘window’
nothing.cP:780: error: ‘GtkWidget’ has no member named ‘window’
nothing.cP:793: error: ‘GtkWidget’ has no member named ‘window’
nothing.cP:794: error: ‘GtkWidget’ has no member named ‘style’
nothing.cP: In function ‘geginv_realized’:
nothing.cP:1318: error: ‘GtkWidget’ has no member named ‘window’
In file included from main.c:38:
nothing.cP: In function ‘move_window_handler’:
nothing.cP:1451: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1452: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1454: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1455: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1458: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1458: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1458: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1458: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1478: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1479: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1480: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1481: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1484: error: ‘GtkWidget’ has no member named ‘allocation’
nothing.cP:1485: error: ‘GtkWidget’ has no member named ‘allocation’
make[4]: *** [main.o] Error 1
make[4]: Leaving directory `/home/andre/svn-gnome/gnome-panel/gnome-panel'
Comment 1 Vincent Untz 2010-03-11 00:10:27 UTC
Note: please do not work on this before we merge the dbus branch; this would create conflicts.
Comment 2 André Klapper 2010-05-27 13:18:52 UTC
Created attachment 162093 [details] [review]
Partial patch
Comment 3 Vincent Untz 2010-05-28 15:37:47 UTC
Review of attachment 162093 [details] [review]:

Thanks, please commit after the two tweaks below.

::: gnome-panel/panel-widget.c
@@ +1552,3 @@
 panel_widget_style_set (GtkWidget *widget,
 			GtkStyle  *previous_style)
+{	

Do not add a tab here :-)

@@ +1587,1 @@
 	PanelWidget *panel = (PanelWidget *) widget;

Should be:
GdkWindow  *window;
(two spaces to align the name of the variables)
Comment 5 André Klapper 2010-05-29 01:25:25 UTC
Created attachment 162249 [details] [review]
Partial Patch

Unsure about the change in nothing.cP.
Comment 6 André Klapper 2010-06-20 09:25:46 UTC
PING.
Comment 7 Vincent Untz 2010-06-22 17:19:08 UTC
Comment on attachment 162249 [details] [review]
Partial Patch

I committed and fixed various mistakes. Still quite some work to do, though :/
Comment 8 Vincent Untz 2010-06-22 23:48:07 UTC
I committed a few more things. What's left seems less easy, though. We either lack accessors, or some code needs to be rewritten...

Here's what's left:

button-widget.c: In function ‘button_widget_realize’:
button-widget.c:148:8: error: ‘GtkButton’ has no member named ‘event_window’
button-widget.c:151:34: error: ‘GtkButton’ has no member named ‘event_window’
button-widget.c:153:8: error: ‘GtkWidget’ has no member named ‘style’
button-widget.c:153:42: error: ‘GtkWidget’ has no member named ‘style’
button-widget.c: In function ‘button_widget_unrealize’:
button-widget.c:175:12: error: ‘GtkButton’ has no member named ‘event_window’
button-widget.c:176:35: error: ‘GtkButton’ has no member named ‘event_window’
button-widget.c:177:29: error: ‘GtkButton’ has no member named ‘event_window’
button-widget.c:178:9: error: ‘GtkButton’ has no member named ‘event_window’
button-widget.c: In function ‘button_widget_expose’:
button-widget.c:398:15: error: ‘GtkButton’ has no member named ‘in_button’
button-widget.c:398:36: error: ‘GtkButton’ has no member named ‘button_down’
button-widget.c:408:13: error: ‘GtkButton’ has no member named ‘in_button’
button-widget.c: In function ‘button_widget_size_allocate’:
button-widget.c:542:33: error: ‘GtkButton’ has no member named ‘event_window’
button-widget.c: In function ‘button_widget_enter_notify’:
button-widget.c:584:33: error: ‘GtkButton’ has no member named ‘in_button’
button-widget.c:586:38: error: ‘GtkButton’ has no member named ‘in_button’
button-widget.c: In function ‘button_widget_leave_notify’:
button-widget.c:600:33: error: ‘GtkButton’ has no member named ‘in_button’
button-widget.c:602:38: error: ‘GtkButton’ has no member named ‘in_button’


menu.c: In function ‘restore_grabs’:
menu.c:840:35: error: ‘GtkMenuShell’ has no member named ‘parent_menu_shell’
menu.c:844:50: error: ‘GtkMenuShell’ has no member named ‘have_xgrab’
menu.c:857:33: error: ‘GtkMenuShell’ has no member named ‘have_xgrab’
menu.c: In function ‘drag_end_menu_cb’:
menu.c:1055:39: error: ‘GtkMenuShell’ has no member named ‘parent_menu_shell’
menu.c:1071:34: error: ‘GtkMenuShell’ has no member named ‘have_xgrab’
menu.c: In function ‘handle_gmenu_tree_changed’:
menu.c:1593:30: error: ‘GtkMenuShell’ has no member named ‘children’
menu.c:1594:58: error: ‘GtkMenuShell’ has no member named ‘children’
menu.c: In function ‘panel_menu_key_press_handler’:
menu.c:1912:17: error: ‘GtkMenuShell’ has no member named ‘active_menu_item’
menu.c:1913:7: error: ‘GtkMenuShell’ has no member named ‘active_menu_item’
menu.c:1918:39: error: ‘GtkMenuShell’ has no member named ‘active_menu_item’


panel-menu-bar.c: In function ‘panel_menu_bar_popup_menu’:
panel-menu-bar.c:443:17: error: ‘GtkMenuShell’ has no member named ‘active’
panel-menu-bar.c:445:13: error: ‘GtkMenuShell’ has no member named ‘have_grab’
panel-menu-bar.c:446:13: error: ‘GtkMenuShell’ has no member named ‘active’


panel-menu-button.c: In function ‘panel_menu_button_menu_deactivated’:
panel-menu-button.c:352:21: error: ‘GtkButton’ has no member named ‘in_button’


window-menu.c: In function ‘window_menu_key_press_event’:
window-menu.c:211:18: error: ‘GtkMenuShell’ has no member named ‘active’
window-menu.c:213:14: error: ‘GtkMenuShell’ has no member named ‘have_grab’
window-menu.c:214:14: error: ‘GtkMenuShell’ has no member named ‘active’


workspace-switcher.c: In function ‘num_workspaces_value_changed’:
workspace-switcher.c:742:8: error: ‘GtkSpinButton’ has no member named ‘timer_step’
workspace-switcher.c: In function ‘close_dialog’:
workspace-switcher.c:841:9: error: ‘GtkTreeViewColumn’ has no member named ‘editable_widget’
workspace-switcher.c:841:38: error: ‘GtkTreeViewColumn’ has no member named ‘editable_widget’
workspace-switcher.c:842:40: error: ‘GtkTreeViewColumn’ has no member named ‘editable_widget’
Comment 9 Vincent Untz 2010-06-22 23:53:09 UTC
Oh, and I forgot: there's all the bonobo directory too. Should be easy, though.
Comment 10 Javier Jardón (IRC: jjardon) 2010-06-23 03:13:54 UTC
Created attachment 164371 [details] [review]
Another partial patch

Use gtk_widget_style_attach() and gtk_container_get_children()
Comment 11 Javier Jardón (IRC: jjardon) 2010-06-23 03:15:17 UTC
The rest of the cases are not inmediate, a possible solution for:

- GtkMenuShell->have_xgrab would be gtk_widget_get_visible() , see https://bugzilla.gnome.org/show_bug.cgi?id=612472#c11

- GtkMenuShell->have_grab and GtkMenuShell->active , see federico comments in GDM bug: https://bugzilla.gnome.org/show_bug.cgi?id=612472#c11
Comment 12 Vincent Untz 2010-06-26 22:30:47 UTC
Review of attachment 164371 [details] [review]:

::: gnome-panel/menu.c
@@ +1595,3 @@
+	while (children)
+                gtk_widget_destroy (children->data);
+	g_list_free (children);

I doubt this will work fine: the GList is copied, so the loop will not work like it used to be. You probably need to use ->next. (And, well, test it :-))
Comment 13 André Klapper 2010-06-27 08:18:21 UTC
(In reply to comment #8)
> button-widget.c: In function ‘button_widget_expose’:
> button-widget.c:398:15: error: ‘GtkButton’ has no member named ‘in_button’
> button-widget.c:408:13: error: ‘GtkButton’ has no member named ‘in_button’
> button-widget.c:584:33: error: ‘GtkButton’ has no member named ‘in_button’
> button-widget.c:586:38: error: ‘GtkButton’ has no member named ‘in_button’
> button-widget.c:600:33: error: ‘GtkButton’ has no member named ‘in_button’
> button-widget.c:602:38: error: ‘GtkButton’ has no member named ‘in_button’
> panel-menu-button.c:352:21: error: ‘GtkButton’ has no member named ‘in_button’

See http://git.gnome.org/browse/gdl/commit/?id=871caa26dad9c58a14c6e89bc3687db827ed6302
Comment 14 Christian Persch 2010-11-11 21:39:03 UTC
This is fixed on the gtk3 branch (still some missing accessors though (e.g. comment 11)).
Comment 15 Germán Poo-Caamaño 2011-01-06 06:40:30 UTC
Created attachment 177631 [details] [review]
Fix sealed field children
Comment 16 Javier Jardón (IRC: jjardon) 2011-01-06 15:44:51 UTC
Review of attachment 177631 [details] [review]:

looks good
Comment 17 Germán Poo-Caamaño 2011-01-11 07:02:40 UTC
Created attachment 178007 [details] [review]
Fix build with -DGSEAL_ENABLED

Wanda: don't forget to port me.

https://bugzilla.gnome.org/show_bug.cgi?id=612481

Signed-off-by: Germán Póo-Caamaño <gpoo@gnome.org>
Comment 18 Germán Poo-Caamaño 2011-01-11 07:08:34 UTC
Now gnome-panel compiles with -DGSEAL_ENABLED.  Closing this bug.

Still we need to figure out how to grab properly the focus when
working with the menu.  But the build is fixed.

Note You need to log in before you can comment on or make changes to this bug.