[Xfce4-commits] <xfce4-notes-plugin:master> Add submenu item "Add new group" in the panel/status icon
Mike Massonnet
noreply at xfce.org
Mon Dec 28 22:56:01 CET 2009
Updating branch refs/heads/master
to 93d46ec5880ac67dc1b957a6821a0887dad58a02 (commit)
from a845b70a25345d7107f4364d1a8a8267efa54f92 (commit)
commit 93d46ec5880ac67dc1b957a6821a0887dad58a02
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Mon Dec 28 22:54:23 2009 +0100
Add submenu item "Add new group" in the panel/status icon
ChangeLog | 4 ++++
lib/application.vala | 16 +++++++++++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 05b4f8f..16d9213 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-12-28 Mike Massonnet <mmassonnet at xfce.org>
+Add submenu item "Add new group" in the panel/status icon
+
+2009-12-28 Mike Massonnet <mmassonnet at xfce.org>
+
Quit configure script with an error on bad Vala Bindings version
When the Xfce Panel 4.6 is installed, we have to make sure the Xfce Vala
diff --git a/lib/application.vala b/lib/application.vala
index 693205e..6de492d 100644
--- a/lib/application.vala
+++ b/lib/application.vala
@@ -566,7 +566,6 @@ namespace Xnp {
foreach (var win in this.window_list) {
var mi = new Gtk.MenuItem.with_label (win.name);
mi.set_data ("window", (void*)win);
- mi.show ();
mi.activate += (i) => {
// Jump to win
var w = (Xnp.Window)i.get_data ("window");
@@ -574,6 +573,21 @@ namespace Xnp {
};
menu.append (mi);
}
+
+ // New group menu item
+ var mi_sep = new Gtk.SeparatorMenuItem ();
+ menu.append (mi_sep);
+ var mi_add = new Gtk.ImageMenuItem.with_mnemonic (_("_Add a new group"));
+ mi_add.activate += () => {
+ var new_win = create_window ();
+ new_win.show ();
+ };
+ var image = new Gtk.Image.from_stock (Gtk.STOCK_ADD, Gtk.IconSize.MENU);
+ mi_add.set_image (image);
+ menu.append (mi_add);
+
+ // Show all items
+ menu.show_all ();
};
return menu;
More information about the Xfce4-commits
mailing list