Updating branch refs/heads/master
         to 66940725dd00c90265a16d1c1b11f42d192f4267 (commit)
       from 37457916364e64889071eb565ab740bf5b16a8f0 (commit)

commit 66940725dd00c90265a16d1c1b11f42d192f4267
Author: Mike Massonnet <[email protected]>
Date:   Tue Mar 9 00:03:28 2010 +0100

    Highlight the menu button when the mouse is over

 ChangeLog                                          |    4 ++++
 configure.ac.in                                    |    1 +
 data/Makefile.am                                   |    3 ++-
 data/pixmaps/Makefile.am                           |    4 ++++
 data/pixmaps/notes-menu-active.png                 |  Bin 0 -> 660 bytes
 .../notes-menu.png}                                |  Bin 667 -> 667 bytes
 lib/window.vala                                    |   13 +++++++++++--
 7 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 118936e..feadf1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-09  Mike Massonnet <[email protected]>
+
+Highlight the menu button when the mouse is over
+
 2010-03-08  Mike Massonnet <[email protected]>
 
 Moves icons source directory inside data
diff --git a/configure.ac.in b/configure.ac.in
index c461a58..5e88aa3 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -89,6 +89,7 @@ data/icons/22x22/Makefile
 data/icons/24x24/Makefile
 data/icons/32x32/Makefile
 data/icons/scalable/Makefile
+data/pixmaps/Makefile
 lib/Makefile
 src/Makefile
 po/Makefile.in
diff --git a/data/Makefile.am b/data/Makefile.am
index 5083083..613438d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,3 +1,4 @@
 SUBDIRS =                                                              \
        gtk-2.0                                                         \
-       icons
+       icons                                                           \
+       pixmaps
diff --git a/data/pixmaps/Makefile.am b/data/pixmaps/Makefile.am
new file mode 100644
index 0000000..7c770c1
--- /dev/null
+++ b/data/pixmaps/Makefile.am
@@ -0,0 +1,4 @@
+pixmapsdir = $(pkgdatadir)/pixmaps
+dist_pixmaps_DATA =                                                    \
+       notes-menu-active.png                                           \
+       notes-menu.png
diff --git a/data/pixmaps/notes-menu-active.png 
b/data/pixmaps/notes-menu-active.png
new file mode 100644
index 0000000..bcc097c
Binary files /dev/null and b/data/pixmaps/notes-menu-active.png differ
diff --git a/data/icons/16x16/xfce4-notes-plugin.png 
b/data/pixmaps/notes-menu.png
similarity index 100%
copy from data/icons/16x16/xfce4-notes-plugin.png
copy to data/pixmaps/notes-menu.png
diff --git a/lib/window.vala b/lib/window.vala
index 6a2cec3..7d81c80 100644
--- a/lib/window.vala
+++ b/lib/window.vala
@@ -32,6 +32,7 @@ namespace Xnp {
                private Gtk.Menu menu;
                private Gtk.CheckMenuItem mi_above;
                private Gtk.CheckMenuItem mi_sticky;
+               private Gtk.Image menu_image;
                private Gtk.Label title_label;
                private Gtk.VBox content_box;
                private Gtk.Notebook notebook;
@@ -218,8 +219,16 @@ namespace Xnp {
                        var title_box = new Gtk.HBox (false, 0);
                        var menu_evbox = new Gtk.EventBox ();
                        menu_evbox.set_visible_window (false);
-                       var menu_image = new Gtk.Image.from_icon_name 
("xfce4-notes-plugin", Gtk.IconSize.MENU);
-                       menu_evbox.add (menu_image);
+                       this.menu_image = new Gtk.Image.from_file 
("%s/pixmaps/notes-menu.png".printf (Config.PKGDATADIR));
+                       menu_evbox.add (this.menu_image);
+                       menu_evbox.enter_notify_event.connect (() => {
+                               this.menu_image.set_from_file 
("%s/pixmaps/notes-menu-active.png".printf (Config.PKGDATADIR));
+                               return false;
+                       });
+                       menu_evbox.leave_notify_event.connect (() => {
+                               this.menu_image.set_from_file 
("%s/pixmaps/notes-menu.png".printf (Config.PKGDATADIR));
+                               return false;
+                       });
                        title_box.pack_start (menu_evbox, false, false, 2);
                        var title_evbox = new Gtk.EventBox ();
                        title_evbox.set_visible_window (false);
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to