[Goodies-commits] r7467 - in xfce4-notes-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Sat Jun 6 13:08:27 CEST 2009
Author: mmassonnet
Date: 2009-06-06 11:08:27 +0000 (Sat, 06 Jun 2009)
New Revision: 7467
Modified:
xfce4-notes-plugin/trunk/ChangeLog
xfce4-notes-plugin/trunk/panel-plugin/application.vala
xfce4-notes-plugin/trunk/panel-plugin/window.vala
Log:
Window name sort function
Modified: xfce4-notes-plugin/trunk/ChangeLog
===================================================================
--- xfce4-notes-plugin/trunk/ChangeLog 2009-06-06 10:26:16 UTC (rev 7466)
+++ xfce4-notes-plugin/trunk/ChangeLog 2009-06-06 11:08:27 UTC (rev 7467)
@@ -1,5 +1,13 @@
2009-06-06 Mike Massonnet <mmassonnet at xfce.org>
+Window name sort function
+ * panel-plugin/window.vala:
+ - Add a CompareFunc on the window name.
+ * panel-plugin/application.vala:
+ - Use insert_sorted method from SList instead of append.
+
+2009-06-06 Mike Massonnet <mmassonnet at xfce.org>
+
Fix broken "open link" code
* panel-plugin/hypertextview.vala:
- The code to launch a brower was missusing the try catches.
Modified: xfce4-notes-plugin/trunk/panel-plugin/application.vala
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/application.vala 2009-06-06 10:26:16 UTC (rev 7466)
+++ xfce4-notes-plugin/trunk/panel-plugin/application.vala 2009-06-06 11:08:27 UTC (rev 7467)
@@ -114,7 +114,7 @@
}
/* Add to window_list */
- this.window_list.append (window);
+ this.window_list.insert_sorted (window, (GLib.CompareFunc)window.compare_func);
foreach (var win in this.window_list) {
win.set_window_list (this.window_list);
}
Modified: xfce4-notes-plugin/trunk/panel-plugin/window.vala
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/window.vala 2009-06-06 10:26:16 UTC (rev 7466)
+++ xfce4-notes-plugin/trunk/panel-plugin/window.vala 2009-06-06 11:08:27 UTC (rev 7467)
@@ -804,6 +804,15 @@
}
/**
+ * compare_func:
+ *
+ * Compare function for the window name to use with GLib.CompareFunc delegates.
+ */
+ public int compare_func (Xnp.Window win2) {
+ return name.collate (win2.name);
+ }
+
+ /**
* get_current_page:
*
* Get the current page in the notebook.
More information about the Goodies-commits
mailing list