Updating branch refs/heads/master
         to 553e6ab9cc7d87cd1a09151b02ad22b8d25a28e5 (commit)
       from b103762d27effbf902405d168e4518b99818f500 (commit)

commit 553e6ab9cc7d87cd1a09151b02ad22b8d25a28e5
Author: Mike Massonnet <mmasson...@xfce.org>
Date:   Sun Dec 20 12:38:34 2009 +0100

    Woohoo! A build without warnings

 ChangeLog                |    8 +++++++
 panel-plugin/window.vala |   53 ++++++++++++++++++---------------------------
 2 files changed, 29 insertions(+), 32 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b0d07b2..f0cc8d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-12-20  Mike Massonnet <mmasson...@xfce.org>
+
+Woohoo! A build without warnings
+
+I sent Vala binding bugs to bgo and changed the notify signal against notify
+with details e.g. notify::detail. Also changed the signature of the signals
+for motion and pressed callbacks. All warnings are gone :-)
+
 2009-12-19  Mike Massonnet <mmasson...@xfce.org>
 
 === Release 1.7.2 ===
diff --git a/panel-plugin/window.vala b/panel-plugin/window.vala
index e801f7b..a06aa3f 100644
--- a/panel-plugin/window.vala
+++ b/panel-plugin/window.vala
@@ -344,17 +344,15 @@ namespace Xnp {
                                update_title (note.name);
                                update_navigation_sensitivity ((int)p);
                        };
-                       notify += (o, p) => {
-                               if (p.name == "name") {
-                                       int page = 
this.notebook.get_current_page ();
-                                       if (page == -1)
-                                               return;
-                                       var current_note = 
(Xnp.Note)(this.notebook.get_nth_page (page));
-                                       update_title (current_note.name);
-                               }
-                               else if (p.name == "title") {
-                                       title_label.set_markup 
("<b>"+title+"</b>");
-                               }
+                       notify["name"] += () => {
+                               int page = this.notebook.get_current_page ();
+                               if (page == -1)
+                                       return;
+                               var current_note = 
(Xnp.Note)(this.notebook.get_nth_page (page));
+                               update_title (current_note.name);
+                       };
+                       notify["title"] += () => {
+                               title_label.set_markup ("<b>"+title+"</b>");
                        };
                }
 
@@ -438,7 +436,7 @@ namespace Xnp {
                 *
                 * Update mouse cursor.
                 */
-               private bool window_motion_cb (Gtk.Widget widget, 
Gdk.EventMotion event) {
+               private bool window_motion_cb (Gdk.EventMotion event) {
                        if (event.x > 4 && event.y > 4
                                && event.x < allocation.width - 4
                                && event.y < allocation.height - 4) {
@@ -480,7 +478,7 @@ namespace Xnp {
                 *
                 * Start a window resize depending on mouse pointer location.
                 */
-               private bool window_pressed_cb (Gtk.Widget widget, 
Gdk.EventButton event) {
+               private bool window_pressed_cb (Gdk.EventButton event) {
                        Gdk.WindowEdge edge;
                        if (event.x > 4 && event.y > 4
                                && event.x < allocation.width - 4
@@ -524,7 +522,7 @@ namespace Xnp {
                 * Watch window manager actions always on top and sticky
                 * window.
                 */
-               private bool window_state_cb (Gtk.Widget widget, 
Gdk.EventWindowState event) {
+               private bool window_state_cb (Gdk.EventWindowState event) {
                        if ((bool)(event.changed_mask & Gdk.WindowState.ABOVE)) 
{
                                /* FIXME above state is never notified despit
                                 * of xfwm4 switching the state */
@@ -588,23 +586,6 @@ namespace Xnp {
                        return false;
                }
 
-               /**
-                * note_notify:
-                *
-                * Update the window title on note name changes.
-                */
-               private void note_notify (GLib.Object object, GLib.ParamSpec 
pspec) {
-                       if (pspec.name == "name") {
-                               /* Update the window title and notebook tab 
label */
-                               var note = (Xnp.Note)object;
-                               this.notebook.set_tab_label_text (note, 
note.name);
-                               int page = this.notebook.get_current_page ();
-                               var current_note = 
(Xnp.Note)(this.notebook.get_nth_page (page));
-                               if (note == current_note)
-                                       this.update_title (note.name);
-                       }
-               }
-
                /*
                 * Action callbacks
                 */
@@ -968,7 +949,15 @@ namespace Xnp {
                        int page = this.notebook.get_current_page () + 1;
                        var note = new Xnp.Note (name);
 
-                       note.notify += note_notify;
+                       note.notify["name"] += (o) => {
+                               /* Update the window title and notebook tab 
label */
+                               var _note = (Xnp.Note)o;
+                               this.notebook.set_tab_label_text (_note, 
_note.name);
+                               int _page = this.notebook.get_current_page ();
+                               var current_note = 
(Xnp.Note)(this.notebook.get_nth_page (_page));
+                               if (_note == current_note)
+                                       this.update_title (_note.name);
+            };
                        note.save_data += (note) => { save_data (note); };
 
                        note.show ();
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to