summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/tally.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/tally.vala b/core/tally.vala
index 1fdc65df..a5f70aeb 100644
--- a/core/tally.vala
+++ b/core/tally.vala
@@ -145,6 +145,21 @@ namespace Midori {
browser.add (new Tab (null, tab.web_context, uri));
});
group.add_action (action);
+ action = new SimpleAction ("close-other", null);
+ action.activate.connect (() => {
+ var browser = (Browser)tab.get_ancestor (typeof (Browser));
+ foreach (var widget in browser.tabs.get_children ()) {
+ if (widget != tab) {
+ ((Tab)widget).try_close ();
+ }
+ }
+ });
+ group.add_action (action);
+ action = new SimpleAction ("close-tab", null);
+ action.activate.connect (() => {
+ tab.try_close ();
+ });
+ group.add_action (action);
insert_action_group ("tally", group);
}