GNOME Bugzilla – Bug 170096
Double click to change title of tab
Last modified: 2008-08-26 20:53:27 UTC
I have made a small patch for gnome-terminal 2.10. It enables to set the tab title by double clicking on it. The hack still has a bug with selecting the tabs. So any help would be welcome. The patch can be found at: http://freeweb.siol.net/lukan12/gnome-terminal-2.10-ln1_patch.tar Greets, Luka Other information: I packed the tab label into a GtkEventBox. Then I make a signal for double clicking the event box. If there's a single click, a function(code from Galeon) gets the tab number and shows the selected tab. If it's a double click, the Change title dialog appears, usually available from the menu choice.
Created attachment 38605 [details] [review] terminal_window.c.diff
Created attachment 38606 [details] [review] terminal_window.h.diff
Created attachment 38607 [details] [review] Changelog
I've put the files into Bugzilla so these are always available. This is actually the same as bug 109778, but since this bug has a patch, I'm duplicating that bug to this one. Note: The maintainer is either on a vacation or very busy... it may take awhile before anyone looks at the patch. Anyway thanks for making it.
*** Bug 109778 has been marked as a duplicate of this bug. ***
I found out why the strange behaviour when selecting tabs. The couse is the packing settings for the notebook. If I change the expand and fill for the notebook packing, then the tab selection works perfect. From: gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (window->priv->notebook), hbox, TRUE, TRUE, GTK_PACK_START); To: gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (window->priv->notebook), hbox, FALSE, FALSE, GTK_PACK_START); But then the tabs are radically placed to the left side and the tab title doesn't get pretty becose the ellipsize of the labe needs to get bigger.
No I was wrong, the bug is still there. There's something wring when doing x, y calculations to get the page number of the notebook.
Perhaps this feature is the cause of the failure of focus-follows-mouse that I reported into RedHat's Bugzilla? https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=149327 Assuming its actually a good idea to have editable tab labels (I'm not so sure myself) I suggest that focus should be dropped as soon as the mouse leaves the tab area so that focus-follows-mouse to the main text areas of the terminals.
I think it's a good idea to be able to quickly set the titles of tabs ... a double click might be it, though, in my case, my intuition made me try first to Ctrl-click on the tab :) Either that, or adding a key combo (Ctrl-T?) to avoid having to use the mouse to go to the menu and select the corresponging action ... [I was thinking about submitting to bugzilla as a feature request and going over the list of already filed issues I've found this one. I don't know if it's appropriate to comment here since I'm not reviewing patches or fixing the issue thats been discussed with the douclbe click .... let me know if I should clone this or open a separate bug]
I would suggest this feature request be added to bug #72101 or http://live.gnome.org/TabImplementation, as it sounds like the sort of thing that should be consistent across any apps that require it.
Setting patch status base on comment 6 & following.
Using double click to set the tab title is WONTFIX. Bug 153521 asks for this to be available from the tab context menu.
*** Bug 549500 has been marked as a duplicate of this bug. ***