gnome-panel r11474 - trunk/applets/clock
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11474 - trunk/applets/clock
- Date: Tue, 27 Jan 2009 03:20:23 +0000 (UTC)
Author: vuntz
Date: Tue Jan 27 03:20:23 2009
New Revision: 11474
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11474&view=rev
Log:
2009-01-27 Vincent Untz <vuntz gnome org>
Properly initialize the eds part handling passwords.
This fixes some issues with the clock hanging.
https://bugzilla.novell.com/show_bug.cgi?id=440866 for example
Thanks to Simon Brys <sbrys novell com> for debugging and finding the
fix.
* clock.c: (create_clock_widget): call e_passwords_init()
(destroy_clock): call e_passwords_shutdown() when the last clock is
destroyed.
Modified:
trunk/applets/clock/ChangeLog
trunk/applets/clock/clock.c
Modified: trunk/applets/clock/clock.c
==============================================================================
--- trunk/applets/clock/clock.c (original)
+++ trunk/applets/clock/clock.c Tue Jan 27 03:20:23 2009
@@ -57,6 +57,10 @@
#include <libgweather/location-entry.h>
#include <libgweather/timezone-menu.h>
+#ifdef HAVE_LIBECAL
+#include <libedataserverui/e-passwords.h>
+#endif
+
#include "clock.h"
#include "calendar-window.h"
@@ -210,6 +214,10 @@
guint listeners [N_GCONF_PREFS];
};
+/* Used to count the number of clock instances. It's there to know when we
+ * should free resources that are shared. */
+static int clock_numbers = 0;
+
static void update_clock (ClockData * cd);
static void update_tooltip (ClockData * cd);
static void update_panel_weather (ClockData *cd);
@@ -770,6 +778,13 @@
}
g_free (cd);
+
+#ifdef HAVE_LIBECAL
+ if (clock_numbers > 0) {
+ e_passwords_shutdown ();
+ clock_numbers--;
+ }
+#endif
}
static gboolean
@@ -1344,6 +1359,11 @@
static void
create_clock_widget (ClockData *cd)
{
+#ifdef HAVE_LIBECAL
+ clock_numbers++;
+ e_passwords_init ();
+#endif
+
/* Main toggle button */
cd->panel_button = create_main_clock_button ();
g_signal_connect (cd->panel_button, "button_press_event",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]