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 612712 - Does not compile with -DGSEAL_ENABLE
Does not compile with -DGSEAL_ENABLE
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: gnome-2-32
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on: 328069
Blocks: 585391
 
 
Reported: 2010-03-12 16:01 UTC by André Klapper
Modified: 2010-07-19 07:30 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
Remove use of deprecated GTK+ functions, and bumps GTK_REQUIRED to 2.18 (2.53 KB, patch)
2010-04-16 00:25 UTC, Stéphane Maniaci
none Details | Review
Partial patch to enable GSeal compilation. (15.09 KB, patch)
2010-04-16 00:34 UTC, Stéphane Maniaci
none Details | Review
Use accessor functions instead of direct access. (22.92 KB, patch)
2010-05-02 20:19 UTC, Stéphane Maniaci
committed Details | Review

Description André Klapper 2010-03-12 16:01:33 UTC
This module does not build with -DGSEAL_ENABLE.
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.

terminal-screen.c: In function ‘parent_parent_set_cb’:
terminal-screen.c:261: error: ‘GtkWidget’ has no member named ‘parent’
terminal-screen.c:263: error: ‘GtkWidget’ has no member named ‘parent’
terminal-screen.c: In function ‘parent_set_callback’:
terminal-screen.c:285: error: ‘GtkWidget’ has no member named ‘parent’
terminal-screen.c:286: error: ‘GtkWidget’ has no member named ‘parent’
terminal-screen.c: In function ‘terminal_screen_style_set’:
terminal-screen.c:353: error: ‘GtkObject’ has no member named ‘flags’
terminal-screen.c: In function ‘terminal_screen_profile_notify_cb’:
terminal-screen.c:967: error: ‘GtkObject’ has no member named ‘flags’
terminal-screen.c: In function ‘terminal_screen_system_font_notify_cb’:
terminal-screen.c:1169: error: ‘GtkObject’ has no member named ‘flags’
terminal-screen.c: In function ‘get_child_environment’:
terminal-screen.c:1439: error: ‘GtkWidget’ has no member named ‘window’
terminal-screen.c: In function ‘terminal_screen_set_font_scale’:
terminal-screen.c:1814: error: ‘GtkObject’ has no member named ‘flags’
terminal-screen.c: In function ‘terminal_screen_drag_data_received’:
terminal-screen.c:1928: error: ‘GtkSelectionData’ has no member named ‘target’
terminal-screen.c:1946: error: ‘GtkSelectionData’ has no member named ‘target’
terminal-screen.c:1959: error: ‘GtkSelectionData’ has no member named ‘data’
terminal-screen.c:1965: error: ‘GtkSelectionData’ has no member named ‘length’
terminal-screen.c:1992: error: ‘GtkSelectionData’ has no member named ‘format’
terminal-screen.c:1993: error: ‘GtkSelectionData’ has no member named ‘length’
terminal-screen.c:1994: error: ‘GtkSelectionData’ has no member named ‘length’
terminal-screen.c:1997: error: ‘GtkSelectionData’ has no member named ‘data’
terminal-screen.c:1998: error: ‘GtkSelectionData’ has no member named ‘length’
terminal-screen.c:2027: error: ‘GtkSelectionData’ has no member named ‘length’
terminal-screen.c:2027: error: ‘GtkSelectionData’ has no member named ‘format’
terminal-screen.c:2030: error: ‘GtkSelectionData’ has no member named ‘data’
terminal-screen.c:2030: error: ‘GtkSelectionData’ has no member named ‘length’
terminal-screen.c:2051: error: ‘GtkSelectionData’ has no member named ‘length’
terminal-screen.c:2051: error: ‘GtkSelectionData’ has no member named ‘format’
terminal-screen.c:2054: error: ‘GtkSelectionData’ has no member named ‘data’
terminal-screen.c:2054: error: ‘GtkSelectionData’ has no member named ‘length’
terminal-screen.c:2095: error: ‘GtkSelectionData’ has no member named ‘data’
terminal-screen.c: In function ‘_terminal_screen_update_scrollbar’:
terminal-screen.c:2128: error: ‘GtkWidget’ has no member named ‘parent’
make[4]: *** [gnome_terminal-terminal-screen.o] Error 1
make[4]: Leaving directory `/home/andre/svn-gnome/gnome-terminal/src'
make[3]: *** [all-recursive] Error 1
Comment 1 Stéphane Maniaci 2010-04-16 00:25:07 UTC
Created attachment 158862 [details] [review]
Remove use of deprecated GTK+ functions, and bumps GTK_REQUIRED to 2.18
Comment 2 Stéphane Maniaci 2010-04-16 00:34:23 UTC
Created attachment 158863 [details] [review]
Partial patch to enable GSeal compilation.

Sorry for the previous patch, it was targeted at bug #615556 (remove GTK+ deprecated functions), although this one also fixes the problem (it includes the previous one).

So this patch addresses most of the GSeal problem, but I couldn't find a good solution for :
 
label = GTK_MESSAGE_DIALOG (dialog)->label; 
(see http://git.gnome.org/browse/gnome-terminal/tree/src/terminal-window.c#n3499)

and 

if (GTK_NOTEBOOK (notebook)->first_tab == NULL)
(see http://git.gnome.org/browse/gnome-terminal/tree/src/terminal-window.c#n303)

Thanks for your help!
Comment 3 Christian Persch 2010-04-16 11:49:16 UTC
+  monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window [..]
+  gdk_window_get_origin (gtk_widget_get_window (widget), x, y);

Since you're using gtk_widget_get_window() twice in the same func, let's introduce a local var holding result, to save one of these calls. 
Same for other places where this occurs.

You'll also need to add compat defines to terminal-gtk-compat.h which you probably can copy from gnome-games/libgames-support/games-gtk-compat.h .

Asfor the first_tab issue, I think you can just remove that bit of code.

For the message dialogue's label, we either need a new accessor for it, or, preferably, fix gtk+ bug 328069, since what we use the label for is just to get hold of the content box. 
That shouldn't hold up getting the other parts of the patch in, however.
Comment 4 André Klapper 2010-05-02 14:55:55 UTC
Stéphane: Any plans to update your patch as per last comment?
Comment 5 Stéphane Maniaci 2010-05-02 20:19:10 UTC
Created attachment 160166 [details] [review]
Use accessor functions instead of direct access.

Here it is, please review.

The last standing issue is that gtk_message_dialog->label. I'll try to add the gtk-compat files later (have some homework left for the moment...).
Comment 6 Christian Persch 2010-05-07 16:37:05 UTC
I fixed some small problems and code style issues in the patch, and pushed it to master. Thanks!

I will probably move g-t to requiring gtk 2.20, so only accessors new in 2.21 will need to be ifdef'd.
Comment 7 André Klapper 2010-05-27 12:02:26 UTC
Still to do (also to fix bug 615556):
./src/terminal-screen.c:  if (!GTK_WIDGET_TOPLEVEL (toplevel))
./src/terminal-screen.c:  g_assert (GTK_WIDGET_TOPLEVEL (window));
./src/terminal-window.c:  if (!GTK_WIDGET_TOPLEVEL (toplevel))
./src/terminal-window.c:  if (GTK_WIDGET_TOPLEVEL (old_window) &&
Comment 8 André Klapper 2010-05-28 19:18:31 UTC
gtk_widget_get_allocation in the patch committed requires 2.18, but configure.ac still says GTK_REQUIRED=2.14.0.
Comment 9 André Klapper 2010-06-06 16:14:50 UTC
Looks like there is now exactly one issue left to fix:
/src/terminal-window.c: In function ‘terminal_set_title_callback’:
terminal-window.c:3666: error: ‘GtkMessageDialog’ has no member named ‘label’
Comment 10 André Klapper 2010-06-16 09:43:09 UTC
(In reply to comment #9)
> terminal-window.c:3666: error: ‘GtkMessageDialog’ has no member named ‘label’

Epiphany used this workaround:
http://git.gnome.org/browse/epiphany/commit/?id=864d20152054e684a5cbb0b2dbde8f6bdf63f698
Comment 11 Christian Persch 2010-06-16 09:57:13 UTC
I'd rather have a real fix, aka the proposal in bug 328069.
Comment 12 André Klapper 2010-07-02 17:28:55 UTC
bug 328069 is fixed now - any plans to fix this one too soonish?
Comment 13 André Klapper 2010-07-19 07:07:05 UTC
chpe: There is still
   label = GTK_MESSAGE_DIALOG (dialog)->label;
in line 3672 and nothing in the commit log. Sure you've pushed this?
Comment 14 Christian Persch 2010-07-19 07:30:06 UTC
Fixed.