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 687267 - middle mouse button click should close tab clicked
middle mouse button click should close tab clicked
Status: RESOLVED OBSOLETE
Product: gedit
Classification: Applications
Component: general
3.4.x
Other Linux
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 751526 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-10-31 14:00 UTC by Peter Butkovic
Modified: 2020-11-24 09:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
button-press-event() added. (1.35 KB, patch)
2014-01-14 09:14 UTC, Sagar Ghuge
none Details | Review
tab-spaces aligned. (1.59 KB, patch)
2014-01-14 09:43 UTC, Sagar Ghuge
none Details | Review
tab-spaces aligned. (hope so this time did correct) (1.22 KB, patch)
2014-01-14 10:06 UTC, Sagar Ghuge
none Details | Review
changes made according to spaces nd tabs. (1.43 KB, patch)
2014-01-14 10:40 UTC, Sagar Ghuge
needs-work Details | Review
GDK_BUTTON_MIDDLE added. and aligned properly. (1.44 KB, patch)
2014-01-14 11:15 UTC, Sagar Ghuge
none Details | Review
squashed the commits. (1.53 KB, patch)
2014-01-14 11:34 UTC, Sagar Ghuge
needs-work Details | Review
tabs replaced by the spaces (1.59 KB, patch)
2014-01-14 12:55 UTC, Sagar Ghuge
none Details | Review
Done with the changes. (1.37 KB, patch)
2014-01-17 06:43 UTC, Sagar Ghuge
none Details | Review

Description Peter Butkovic 2012-10-31 14:00:09 UTC
As I'm used to from other apps with tabs support, I'd expect clicking with the middle mouse button on a tab should close it.

This works for firefox, eclipse,...

It would be great if gedit would support the same behavior.
Comment 1 Sagar Ghuge 2014-01-14 09:14:32 UTC
Created attachment 266238 [details] [review]
button-press-event() added.
Comment 2 Ignacio Casal Quinteiro (nacho) 2014-01-14 09:21:07 UTC
This is something that has been requested several times. If somewhere should be requested or fixed is in gtk+ and afaik they are not interested in such feature. I am closing this as WONTFIX but feel free to open a bug report in gtk+ itself.
Comment 3 Paolo Borelli 2014-01-14 09:27:24 UTC
to clarify, after some discussion we reopened the bug.

We need to check with the design team if middle-click-to-close is something we want. If yes, the patch looks fine to me (except tabs-vs-spaces)
Comment 4 Sagar Ghuge 2014-01-14 09:43:38 UTC
Created attachment 266239 [details] [review]
tab-spaces aligned.
Comment 5 Sagar Ghuge 2014-01-14 10:06:51 UTC
Created attachment 266240 [details] [review]
tab-spaces aligned. (hope so this time did correct)
Comment 6 Sagar Ghuge 2014-01-14 10:40:24 UTC
Created attachment 266242 [details] [review]
changes made according to spaces nd tabs.
Comment 7 Ignacio Casal Quinteiro (nacho) 2014-01-14 10:45:58 UTC
Review of attachment 266242 [details] [review]:

See the comments inline.

::: gedit/gedit-tab-label.c
@@ +120,3 @@
+		        GeditTabLabel  *tab_label)
+{
+	if (event->button == 2)

this 2 has a define in Gdk that should be used.

@@ +301,3 @@
 			  tab_label);
+	g_signal_connect_after (ebox,
+			        "button-press-event",

here there should be only one tab and the rest should be spaces to align
Comment 8 Sagar Ghuge 2014-01-14 11:15:54 UTC
Created attachment 266243 [details] [review]
GDK_BUTTON_MIDDLE added. and aligned properly.
Comment 9 Jakub Steiner 2014-01-14 11:17:04 UTC
As a convenience shortcut I like this, especially when it's established in popular applications. 

One possible problem area is when/if we start using tabs in the headerbar[1] putting two behaviors against each other, one being destructive. So far no such app exists.

[1] https://github.com/gnome-design-team/gnome-mockups/blob/master/web/experiments/headerbar-only/06-two-pages.png
Comment 10 Sagar Ghuge 2014-01-14 11:34:25 UTC
Created attachment 266245 [details] [review]
squashed the commits.
Comment 11 Ignacio Casal Quinteiro (nacho) 2014-01-14 11:35:42 UTC
Review of attachment 266245 [details] [review]:

Almost there.

::: gedit/gedit-tab-label.c
@@ +117,3 @@
 static void
+tab_button_press_event (GtkWidget      *widget,
+	                GdkEventButton *event,

here the alignment is wrong, they should be all spaces
Comment 12 Sagar Ghuge 2014-01-14 12:55:37 UTC
Created attachment 266250 [details] [review]
tabs replaced by the spaces
Comment 13 jessevdk@gmail.com 2014-01-16 07:21:02 UTC
Review of attachment 266250 [details] [review]:

Looks good to me. Please fix the commit subject and message. As it is now, it's not informative. You can cleanup this message by using git --amend. Just delete everything there was before and write a new, clean message as to what this patch does.
Comment 14 Sagar Ghuge 2014-01-17 06:43:23 UTC
Created attachment 266523 [details] [review]
Done with the changes.
Comment 15 asterix 2014-02-08 15:20:54 UTC
This is an issue that should be dealt with in nautilus and epiphany as well.
Comment 16 Sébastien Wilmet 2015-06-26 07:38:25 UTC
*** Bug 751526 has been marked as a duplicate of this bug. ***
Comment 17 António Fernandes 2018-05-26 16:24:17 UTC
Fixed in commit c01dda948340c8cec20a7fb0d41ab47e5f52839c

*** This bug has been marked as a duplicate of bug 780799 ***
Comment 18 António Fernandes 2018-05-26 16:27:03 UTC
Whoops, this is gedit, I've misread it. I'm sorry for the noise.
Comment 19 Sébastien Wilmet 2020-11-24 09:58:38 UTC
Mass-closing of all gedit bugzilla tickets.

Special "code" to find again all those gedit bugzilla tickets that were open before the mass-closing:

2bfe1b0590a78457e1f1a6a90fb975f5878cb60064ccfe1d7db76ca0da52f0f3

By searching the above sha256sum in bugzilla, the gedit contributors can find again the tickets. We may be interested to do so when we work on a specific area of the code, to at least know the known problems and possible enhancements.

We do this mass-closing because bugzilla.gnome.org is being replaced by gitlab.gnome.org.