gnome-applets r11043 - trunk/stickynotes
- From: callum svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-applets r11043 - trunk/stickynotes
- Date: Wed, 8 Oct 2008 23:46:35 +0000 (UTC)
Author: callum
Date: Wed Oct 8 23:46:34 2008
New Revision: 11043
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11043&view=rev
Log:
Make a click on the stickynotes applet with all notes shown hide the notes. Bug 505475.
Modified:
trunk/stickynotes/ChangeLog
trunk/stickynotes/stickynotes.c
trunk/stickynotes/stickynotes_applet.c
trunk/stickynotes/stickynotes_applet.h
trunk/stickynotes/stickynotes_applet_callbacks.c
Modified: trunk/stickynotes/stickynotes.c
==============================================================================
--- trunk/stickynotes/stickynotes.c (original)
+++ trunk/stickynotes/stickynotes.c Wed Oct 8 23:46:34 2008
@@ -1003,7 +1003,7 @@
{
StickyNote *note = tmp1->data;
- stickynote_set_visible (note, TRUE);
+ stickynote_set_visible (note, stickynotes->visible);
tmp1 = tmp1->next;
}
Modified: trunk/stickynotes/stickynotes_applet.c
==============================================================================
--- trunk/stickynotes/stickynotes_applet.c (original)
+++ trunk/stickynotes/stickynotes_applet.c Wed Oct 8 23:46:34 2008
@@ -153,6 +153,7 @@
stickynotes_make_prelight_icon (stickynotes->icon_prelight,
stickynotes->icon_normal, 30);
stickynotes->gconf = gconf_client_get_default();
+ stickynotes->visible = TRUE;
stickynotes_applet_init_icons();
stickynotes_applet_init_prefs();
@@ -387,8 +388,6 @@
/* Connect all signals for applet management */
g_signal_connect(G_OBJECT(applet->w_applet), "button-press-event",
G_CALLBACK(applet_button_cb), applet);
- g_signal_connect(G_OBJECT(applet->w_applet), "button-release-event",
- G_CALLBACK(applet_button_cb), applet);
g_signal_connect(G_OBJECT(applet->w_applet), "key-press-event",
G_CALLBACK(applet_key_cb), applet);
g_signal_connect(G_OBJECT(applet->w_applet), "focus-in-event",
Modified: trunk/stickynotes/stickynotes_applet.h
==============================================================================
--- trunk/stickynotes/stickynotes_applet.h (original)
+++ trunk/stickynotes/stickynotes_applet.h Wed Oct 8 23:46:34 2008
@@ -65,6 +65,8 @@
GConfClient *gconf; /* GConf Client */
guint last_timeout_data;
+
+ gboolean visible; /* Toggle show/hide notes */
} StickyNotes;
/* Sticky Notes Icons */
Modified: trunk/stickynotes/stickynotes_applet_callbacks.c
==============================================================================
--- trunk/stickynotes/stickynotes_applet_callbacks.c (original)
+++ trunk/stickynotes/stickynotes_applet_callbacks.c Wed Oct 8 23:46:34 2008
@@ -67,6 +67,9 @@
StickyNote *note;
GList *l;
+ if (stickynotes->visible == visible) return;
+ stickynotes->visible = visible;
+
for (l = stickynotes->notes; l; l = l->next)
{
note = l->data;
@@ -74,6 +77,12 @@
}
}
+static void
+stickynote_toggle_notes_visible ()
+{
+ stickynote_show_notes(!stickynotes->visible);
+}
+
/* Applet Callback : Mouse button press on the applet. */
gboolean
applet_button_cb (GtkWidget *widget,
@@ -87,7 +96,7 @@
}
else if (event->button == 1)
{
- stickynote_show_notes (TRUE);
+ stickynote_toggle_notes_visible ();
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]