[Goodies-commits] r7396 - in xfce4-notes-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Sat May 23 16:34:14 CEST 2009
Author: mmassonnet
Date: 2009-05-23 14:34:14 +0000 (Sat, 23 May 2009)
New Revision: 7396
Modified:
xfce4-notes-plugin/trunk/ChangeLog
xfce4-notes-plugin/trunk/panel-plugin/window.vala
Log:
Unique property name on Window
Modified: xfce4-notes-plugin/trunk/ChangeLog
===================================================================
--- xfce4-notes-plugin/trunk/ChangeLog 2009-05-23 12:54:03 UTC (rev 7395)
+++ xfce4-notes-plugin/trunk/ChangeLog 2009-05-23 14:34:14 UTC (rev 7396)
@@ -1,3 +1,13 @@
+2009-05-23 Mike Massonnet <mmassonnet at xfce.org>
+
+Unique property "name" on Window
+ * panel-plugin/window.vala:
+ - New private method update_title to set the window title to
+ "window.name - note.name"
+ - New public property "name" that contains the name of the window
+ shown in the window title that can also be reused as a unique
+ identifier for the window
+
2009-05-22 Mike Massonnet <mmassonnet at xfce.org>
Update automake script for Vala 0.7
Modified: xfce4-notes-plugin/trunk/panel-plugin/window.vala
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/window.vala 2009-05-23 12:54:03 UTC (rev 7395)
+++ xfce4-notes-plugin/trunk/panel-plugin/window.vala 2009-05-23 14:34:14 UTC (rev 7396)
@@ -50,6 +50,8 @@
private Gdk.Cursor CURSOR_BOTTOM = new Gdk.Cursor (Gdk.CursorType.BOTTOM_SIDE);
private Gdk.Cursor CURSOR_BOTTOM_LC = new Gdk.Cursor (Gdk.CursorType.BOTTOM_LEFT_CORNER);
+ public new string name { default = "Notes"; get; set; }
+
private bool _above;
public bool above {
get {
@@ -76,7 +78,7 @@
}
construct {
- this.name = "xfce4-notes-plugin";
+ base.name = "xfce4-notes-plugin";
this.title = "Notes";
this.deletable = false;
this.skip_taskbar_hint = true;
@@ -232,7 +234,7 @@
};
this.notebook.switch_page += (n, c, p) => {
var note = (Xnp.Note)(notebook.get_nth_page ((int)p));
- title = note.name;
+ update_title (note.name);
update_navigation_sensitivity ((int)p);
};
notify += (o, p) => {
@@ -477,9 +479,8 @@
var note = (Xnp.Note)object;
int page = this.notebook.get_current_page ();
var current_note = (Xnp.Note)(this.notebook.get_nth_page (page));
- if (note == current_note) {
- title = note.name;
- }
+ if (note == current_note)
+ this.update_title (note.name);
}
}
@@ -633,6 +634,15 @@
}
/**
+ * update_title:
+ *
+ * Updates the window title.
+ */
+ private void update_title (string note_name) {
+ title = this.name + " - " + note_name;
+ }
+
+ /**
* update_navigation_sensitivity:
*
* Update the goleft/right sensitivities.
More information about the Goodies-commits
mailing list