Close client tab with mouse middle click
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Close tab with mouse middle click
|
||||
* Support language suffix in CSV import
|
||||
|
||||
Version 7.2.0 - 2024-04-29
|
||||
|
||||
@@ -438,6 +438,11 @@
|
||||
}).on('show.bs.tab', function() {
|
||||
Sao.set_url(tab.get_url(), tab.name_long.split(' / ').pop());
|
||||
Sao.Tab.set_view_type(tab.current_view_type);
|
||||
}).on('mousedown', function(evt) {
|
||||
if (evt.which === 2) {
|
||||
evt.preventDefault();
|
||||
tab.close();
|
||||
}
|
||||
})
|
||||
.append(jQuery('<button/>', {
|
||||
'class': 'close',
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
* Close tab with mouse middle click
|
||||
* Support language suffix in CSV import
|
||||
|
||||
Version 7.2.0 - 2024-04-29
|
||||
|
||||
@@ -864,7 +864,14 @@ class Main(Gtk.Application):
|
||||
halign=Gtk.Align.START)
|
||||
self.tooltips.set_tip(label, page.name)
|
||||
self.tooltips.enable()
|
||||
hbox.pack_start(label, expand=True, fill=True, padding=0)
|
||||
|
||||
def remove_book_middle_click(widget, event):
|
||||
if event.button == 2:
|
||||
return self._sig_remove_book(widget, page.widget)
|
||||
eventbox = Gtk.EventBox()
|
||||
eventbox.connect('button-press-event', remove_book_middle_click)
|
||||
eventbox.add(label)
|
||||
hbox.pack_start(eventbox, expand=True, fill=True, padding=0)
|
||||
|
||||
button = Gtk.Button()
|
||||
button.set_relief(Gtk.ReliefStyle.NONE)
|
||||
|
||||
Reference in New Issue
Block a user