aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-09-29 16:43:39 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-09-29 16:43:39 -0400
commit31bf779fb487a859ff21910a652faeae2f116b63 (patch)
tree3d1cfc3904bb3e0e7a2a92c1a28520c3a1301e15
parent95fcdc5a0e1e2d4184149e2354f0cb33d6755d48 (diff)
parente569f3e9744146d5e9d3bfee21092def7350043b (diff)
downloadayatana-indicator-datetime-31bf779fb487a859ff21910a652faeae2f116b63.tar.gz
ayatana-indicator-datetime-31bf779fb487a859ff21910a652faeae2f116b63.tar.bz2
ayatana-indicator-datetime-31bf779fb487a859ff21910a652faeae2f116b63.zip
* New upstream release.
* Fix corrupt environment when LANGUAGE not set (LP: #861123) * Measure string size with GLib (LP: #730476) * Free ECals when they have errors (LP: #774071) * Fix untranslated string (LP: #853130)
-rw-r--r--AUTHORS3
-rw-r--r--ChangeLog32
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--debian/changelog12
-rw-r--r--src/datetime-prefs-locations.c3
-rw-r--r--src/datetime-service.c27
-rw-r--r--src/indicator-datetime.c12
-rw-r--r--src/utils.c6
9 files changed, 89 insertions, 28 deletions
diff --git a/AUTHORS b/AUTHORS
index 3b070a9..0a09219 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,6 @@
# Generated by Makefile. Do not edit.
+ Antti Kaijanmäki
David Barth
David Planella
Dylan McCall
@@ -8,12 +9,14 @@
Gabor Kelemen
Javier Jardón
Jeremy Bicha
+ Jörn Horstmann
karl-qdh
Ken VanDine
Kyle Nitzsche
Luke Yelavich
Marco Trevisan (Treviño)
Michael Terry
+ Robert Ancell
Rodrigo Moya
Sebastien Bacher
Ted Gould
diff --git a/ChangeLog b/ChangeLog
index b060c28..ccbfabe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,37 @@
# Generated by Makefile. Do not edit.
+2011-09-29 Ted Gould <ted@gould.cx>
+
+ 0.3.0
+
+2011-09-29 Ted Gould <ted@gould.cx>
+
+ Unref Cals in error situations
+
+2011-09-29 Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
+
+ Fix 100% CPU usage (LP: #774071)
+
+2011-09-29 Ted Gould <ted@gould.cx>
+
+ Protect setting or unseting the env if we don't have it already.
+
+2011-09-28 Robert Ancell <robert.ancell@canonical.com>
+
+ Don't call setenv when value is NULL
+
+2011-09-21 Jörn Horstmann <launchpad@planetxml.de>
+
+ Use g_datetime() to measure string (6 LOC)
+
+2011-09-21 Ted Gould <ted@gould.cx>
+
+ Moving setting the translation domain for builder to earlier
+
+2011-09-18 Gabor Kelemen <kelemeng@gnome.hu>
+
+ Set translation domain before gtk_builder_add_from_file, in the other file too. LP: #853130
+
2011-09-15 Ted Gould <ted@gould.cx>
0.2.95
diff --git a/configure b/configure
index fd0b7cc..0f368a9 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for indicator-datetime 0.2.95.
+# Generated by GNU Autoconf 2.68 for indicator-datetime 0.3.0.
#
# Report bugs to <http://bugs.launchpad.net/indicator-datetime>.
#
@@ -572,8 +572,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='indicator-datetime'
PACKAGE_TARNAME='indicator-datetime'
-PACKAGE_VERSION='0.2.95'
-PACKAGE_STRING='indicator-datetime 0.2.95'
+PACKAGE_VERSION='0.3.0'
+PACKAGE_STRING='indicator-datetime 0.3.0'
PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-datetime'
PACKAGE_URL='http://launchpad.net/indicator-datetime'
@@ -1375,7 +1375,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures indicator-datetime 0.2.95 to adapt to many kinds of systems.
+\`configure' configures indicator-datetime 0.3.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1446,7 +1446,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of indicator-datetime 0.2.95:";;
+ short | recursive ) echo "Configuration of indicator-datetime 0.3.0:";;
esac
cat <<\_ACEOF
@@ -1578,7 +1578,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-indicator-datetime configure 0.2.95
+indicator-datetime configure 0.3.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1949,7 +1949,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by indicator-datetime $as_me 0.2.95, which was
+It was created by indicator-datetime $as_me 0.3.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2773,7 +2773,7 @@ fi
# Define the identity of the package.
PACKAGE='indicator-datetime'
- VERSION='0.2.95'
+ VERSION='0.3.0'
cat >>confdefs.h <<_ACEOF
@@ -14654,7 +14654,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by indicator-datetime $as_me 0.2.95, which was
+This file was extended by indicator-datetime $as_me 0.3.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14721,7 +14721,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-indicator-datetime config.status 0.2.95
+indicator-datetime config.status 0.3.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index fd87af8..144672f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_INIT([indicator-datetime],
- [0.2.95],
+ [0.3.0],
[http://bugs.launchpad.net/indicator-datetime],
[indicator-datetime],
[http://launchpad.net/indicator-datetime])
diff --git a/debian/changelog b/debian/changelog
index 61c09be..237b7d9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,17 @@
-indicator-datetime (0.2.95-0ubuntu2) UNRELEASED; urgency=low
+indicator-datetime (0.3.0-0ubuntu1~ppa1) oneiric; urgency=low
+ [ Ken VanDine ]
* debian/control
- Added recommends for e-d-s
- -- Ken VanDine <ken.vandine@canonical.com> Thu, 29 Sep 2011 16:28:52 -0400
+ [ Ted Gould ]
+ * New upstream release.
+ * Fix corrupt environment when LANGUAGE not set (LP: #861123)
+ * Measure string size with GLib (LP: #730476)
+ * Free ECals when they have errors (LP: #774071)
+ * Fix untranslated string (LP: #853130)
+
+ -- Ted Gould <ted@ubuntu.com> Thu, 29 Sep 2011 15:39:41 -0500
indicator-datetime (0.2.95-0ubuntu1) oneiric; urgency=low
diff --git a/src/datetime-prefs-locations.c b/src/datetime-prefs-locations.c
index af0e10d..d865efe 100644
--- a/src/datetime-prefs-locations.c
+++ b/src/datetime-prefs-locations.c
@@ -421,6 +421,7 @@ datetime_setup_locations_dialog (CcTimezoneMap * map)
{
GError * error = NULL;
GtkBuilder * builder = gtk_builder_new ();
+ gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
gtk_builder_add_from_file (builder, DATETIME_DIALOG_UI_FILE, &error);
if (error != NULL) {
/* We have to abort, we can't continue without the ui file */
@@ -429,8 +430,6 @@ datetime_setup_locations_dialog (CcTimezoneMap * map)
return NULL;
}
- gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
-
GSettings * conf = g_settings_new (SETTINGS_INTERFACE);
#define WIG(name) GTK_WIDGET (gtk_builder_get_object (builder, name))
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 80c0b57..25572ee 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -1,3 +1,4 @@
+/*-*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
An indicator to time and date related information in the menubar.
@@ -430,7 +431,10 @@ static guint ecaltimer = 0;
static void
start_ecal_timer(void)
{
- if (ecaltimer != 0) g_source_remove(ecaltimer);
+ if (ecaltimer != 0) {
+ g_source_remove(ecaltimer);
+ ecaltimer = 0;
+ }
if (update_appointment_menu_items(NULL))
ecaltimer = g_timeout_add_seconds(60*5, update_appointment_menu_items, NULL);
}
@@ -438,7 +442,10 @@ start_ecal_timer(void)
static void
stop_ecal_timer(void)
{
- if (ecaltimer != 0) g_source_remove(ecaltimer);
+ if (ecaltimer != 0) {
+ g_source_remove(ecaltimer);
+ ecaltimer = 0;
+ }
}
static gboolean
idle_start_ecal_timer (gpointer data)
@@ -748,9 +755,10 @@ update_appointment_menu_items (gpointer user_data)
for (l = comp_instances; l; l = l->next) {
const struct comp_instance *ci = l->data;
g_object_unref(ci->comp);
- g_list_free(comp_instances);
- comp_instances = NULL;
}
+ g_list_free(comp_instances);
+ comp_instances = NULL;
+
}
GSList *cal_list = gconf_client_get_list(gconf, "/apps/evolution/calendar/display/selected_calendars", GCONF_VALUE_STRING, &gerror);
if (gerror) {
@@ -759,6 +767,7 @@ update_appointment_menu_items (gpointer user_data)
gerror = NULL;
cal_list = NULL;
}
+
// Generate instances for all sources
for (g = e_source_list_peek_groups (sources); g; g = g->next) {
ESourceGroup *group = E_SOURCE_GROUP (g->data);
@@ -779,6 +788,7 @@ update_appointment_menu_items (gpointer user_data)
g_debug("Failed to set ecal default timezone %s", gerror->message);
g_error_free(gerror);
gerror = NULL;
+ g_object_unref(ecal);
continue;
}
@@ -786,8 +796,9 @@ update_appointment_menu_items (gpointer user_data)
g_debug("Failed to get ecal sources %s", gerror->message);
g_error_free(gerror);
gerror = NULL;
+ g_object_unref(ecal);
continue;
- }
+ }
const gchar *ecal_uid = e_source_peek_uid(source);
gboolean match = FALSE;
g_debug("Checking ecal_uid is enabled: %s", ecal_uid);
@@ -798,10 +809,14 @@ update_appointment_menu_items (gpointer user_data)
break;
}
}
- if (!match) continue;
+ if (!match) {
+ g_object_unref(ecal);
+ continue;
+ }
g_debug("ecal_uid is enabled, generating instances");
e_cal_generate_instances (ecal, t1, t2, (ECalRecurInstanceFn) populate_appointment_instances, (gpointer) source);
+ g_object_unref(ecal);
}
}
g_debug("Number of ECalComponents returned: %d", g_list_length(comp_instances));
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 339ea2f..8e5f421 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -1092,12 +1092,14 @@ guess_label_size (IndicatorDatetime * self)
g_debug("Checking against %d possible times", timevals->len);
gint check_time;
for (check_time = 0; check_time < timevals->len; check_time++) {
- gchar longstr[256];
- strftime(longstr, 256, self->priv->time_string, &(g_array_index(timevals, struct tm, check_time)));
+ struct tm * timeval = &g_array_index(timevals, struct tm, check_time);
+ GDateTime * dt = g_date_time_new_local(timeval->tm_year, timeval->tm_mon, timeval->tm_mday, timeval->tm_hour, timeval->tm_min, timeval->tm_sec);
+ gchar * timestr = g_date_time_format(dt, self->priv->time_string);
- gchar * utf8 = g_locale_to_utf8(longstr, -1, NULL, NULL, NULL);
- gint length = measure_string(style, context, utf8);
- g_free(utf8);
+ gint length = measure_string(style, context, timestr);
+
+ g_free(timestr);
+ g_date_time_unref(dt);
if (length > *max_width) {
*max_width = length;
diff --git a/src/utils.c b/src/utils.c
index 73c8ab2..e6de92a 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -161,7 +161,8 @@ T_(const char *msg)
char *time_locale = g_strdup(setlocale(LC_TIME, NULL));
char *language = g_strdup(g_getenv("LANGUAGE"));
char *rv;
- g_unsetenv("LANGUAGE");
+ if (language)
+ g_unsetenv("LANGUAGE");
setlocale(LC_MESSAGES, time_locale);
/* Get the LC_TIME version */
@@ -169,7 +170,8 @@ T_(const char *msg)
/* Put everything back the way it was */
setlocale(LC_MESSAGES, message_locale);
- g_setenv("LANGUAGE", language, TRUE);
+ if (language)
+ g_setenv("LANGUAGE", language, TRUE);
g_free(message_locale);
g_free(time_locale);
g_free(language);