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 353775 - Use GtkNotebook instead of TerminalNotebook
Use GtkNotebook instead of TerminalNotebook
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: future
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 340962 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-01 04:47 UTC by Mariano Suárez-Alvarez
Modified: 2007-11-27 10:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Preliminary patch, so that people can stress test it... (31.94 KB, patch)
2006-09-01 04:53 UTC, Mariano Suárez-Alvarez
none Details | Review
Update to HEAD, and add two missing things (39.09 KB, patch)
2006-09-05 01:46 UTC, Mariano Suárez-Alvarez
none Details | Review
updated to svn trunk (45.14 KB, patch)
2007-11-23 19:59 UTC, Christian Persch
committed Details | Review

Description Mariano Suárez-Alvarez 2006-09-01 04:47:08 UTC
Here comes a patch which uses GtkNotebook and its new magic instead of TerminalNotebook.

This is preliminary, has some tracing turned on. Who knows how this interacts with our 713 sizing bugs...

Some comments:

* note the parent-set listener on screens, which nicely replaces our previous handling of having to set the parent on realizing to get things right. In any case, when/if this stabilizes, terminal-screen.c:parent_set_callback can become a little less paranoid.

* I removed the destroy method override in terminal window, and do most of the stuff in the dispose method. The rationale is «follow the gobject tutorial»: in dispose, references to the window being destroyed are removed, and in finalize, everything is killed/freed/put out to pasture.

* The only regression (up to bugs and dire dumbness in the patch) is that when dragging a tab, you need to drop _on_tabs_. Currently we can drop tabs on the vte widget and things work nicely. This can be fixed easily, by making the vte widgets drop destinations, and essentially copying the code that handles that from gtk+/gtk/gtknotebook.c. I wish GtkNotebook allows to set the whole page as 
a drop destination. Oh well.

* I think the terminal_window_adopt_screen and the corresponding use in terminal_app_new_terminal are no longer required, as all that should be handled by the notebook now.

Did I mention that I am quite impressed at the new GtkNotebook API?
Comment 1 Mariano Suárez-Alvarez 2006-09-01 04:53:10 UTC
Created attachment 72006 [details] [review]
Preliminary patch, so that people can stress test it...
Comment 2 Mariano Suárez-Alvarez 2006-09-01 04:56:35 UTC
Btw, using GtkNotebook buys us the following: now you can start a drag of a
tab, decide you want to drag to a terminal window which is covered by other
windows, hold the pointer a bit on the panel window list and see how the
obscured window comes up.
Comment 3 Mariano Suárez-Alvarez 2006-09-01 05:22:33 UTC
Also missing is dropping a tab to the desktop.  gtk_notebook_set_window_creation_hook shoudl fix that easily.
Comment 4 Mariano Suárez-Alvarez 2006-09-05 01:46:09 UTC
Created attachment 72227 [details] [review]
Update to HEAD, and add two missing things

This is the previous patch updated to HEAD, without debugging thingies, and now allows you to drag a tab and drop it in the terminal widget and on the desktop; you can't drop it on other windows, because GtkWindow does not yet allow that.

I changed the priv->terms member to a plain int, instead of a list of the terms, because it is much much much much easier to keep the invariant that it actually matches the tab count on a window. 

I do not see that this patch adds /more/ sizing problems. I do not see that it reduces the sizing problems, either...
Comment 5 Mariano Suárez-Alvarez 2006-09-09 16:26:34 UTC
*** Bug 340962 has been marked as a duplicate of this bug. ***
Comment 6 Christian Persch 2007-11-23 19:59:28 UTC
Created attachment 99553 [details] [review]
updated to svn trunk
Comment 7 Behdad Esfahbod 2007-11-27 03:38:25 UTC
Went ahead and committed that.  Thanks!  Do we need to bump required gtk+ version?

2007-11-26  Behdad Esfahbod  <behdad@gnome.org>

        Bug 353775 – Use GtkNotebook instead of TerminalNotebook
        Patch from Christian Persch and Mariano Suárez-Alvarez

        * src/Makefile.am:
        * src/terminal-screen.c:
        * src/terminal-window.h:
        * src/terminal.c:
        * src/terminal.h:
        Do that.

Comment 8 Christian Persch 2007-11-27 10:55:56 UTC
It's already requiring 2.10.0, which is sufficient for the notebook tab reordering stuff.