[baobab/import-export: 4/7] Add "New Window" action and app menu entry.
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/import-export: 4/7] Add "New Window" action and app menu entry.
- Date: Sun, 9 Sep 2012 13:02:43 +0000 (UTC)
commit 3c189a1f90cb1e40e5d94b9c10da3f32b1080b77
Author: Stefano Facchini <stefano facchini gmail com>
Date: Fri Sep 7 17:55:58 2012 +0200
Add "New Window" action and app menu entry.
src/baobab-application.vala | 5 +++++
src/baobab-menu.ui | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/baobab-application.vala b/src/baobab-application.vala
index 66f83f9..5332fc1 100644
--- a/src/baobab-application.vala
+++ b/src/baobab-application.vala
@@ -32,6 +32,7 @@ namespace Baobab {
};
const GLib.ActionEntry[] action_entries = {
+ { "new-window", on_new_window_activate },
{ "quit", on_quit_activate }
};
@@ -146,6 +147,10 @@ namespace Baobab {
return app.ui_settings;
}
+ void on_new_window_activate () {
+ activate ();
+ }
+
void on_quit_activate () {
quit ();
}
diff --git a/src/baobab-menu.ui b/src/baobab-menu.ui
index d6db89f..8f29710 100644
--- a/src/baobab-menu.ui
+++ b/src/baobab-menu.ui
@@ -4,6 +4,11 @@
<menu id="appmenu">
<section>
<item>
+ <attribute name="label" translatable="yes">_New Window</attribute>
+ <attribute name="action">app.new-window</attribute>
+ <attribute name="accel"><Primary>n</attribute>
+ </item>
+ <item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action">win.help</attribute>
<attribute name="accel">F1</attribute>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]