diff -Nru almanah-0.8.0/debian/changelog almanah-0.8.0/debian/changelog --- almanah-0.8.0/debian/changelog 2012-01-12 14:24:33.000000000 +0000 +++ almanah-0.8.0/debian/changelog 2012-02-12 20:09:22.000000000 +0000 @@ -1,8 +1,9 @@ -almanah (0.8.0-5build1) precise; urgency=low +almanah (0.8.0-6) unstable; urgency=low - * Rebuild for latest evolution-data-server + * debian/patches/02_gtkspell-3.0.patch: + - Refresh with upstream patch - -- Angel Abad Thu, 12 Jan 2012 15:24:08 +0100 + -- Angel Abad Sun, 12 Feb 2012 21:08:27 +0100 almanah (0.8.0-5) unstable; urgency=low diff -Nru almanah-0.8.0/debian/patches/02_gtkspell-3.0.patch almanah-0.8.0/debian/patches/02_gtkspell-3.0.patch --- almanah-0.8.0/debian/patches/02_gtkspell-3.0.patch 2012-01-04 15:17:49.000000000 +0000 +++ almanah-0.8.0/debian/patches/02_gtkspell-3.0.patch 2012-02-12 20:09:22.000000000 +0000 @@ -1,22 +1,22 @@ Description: Add support for gtkspell-3.0 in configure -Author: Angel Abad +Author: Philip Withnall Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=667263 --- a/configure.ac +++ b/configure.ac -@@ -70,11 +70,6 @@ +@@ -68,10 +68,9 @@ + yes) spell_checking=true ;; + no) spell_checking=false ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-spell-checking]) ;; - esac],[spell_checking=false]) +- esac],[spell_checking=false]) ++ esac],[spell_checking=true]) --if test $spell_checking = "true"; then + if test $spell_checking = "true"; then - AC_ERROR([Building with spell checking enabled is not possible, as gtkspell-2.0 does not support GTK+ 3. Use --disable-spell-checking]) -- AC_DEFINE([ENABLE_SPELL_CHECKING],[1],[Define if you want spell checking support]) --fi -- - AM_CONDITIONAL([SPELL_CHECKING], [test x$spell_checking = xtrue]) + AC_DEFINE([ENABLE_SPELL_CHECKING],[1],[Define if you want spell checking support]) + fi - dnl *************************************************************************** -@@ -99,7 +94,7 @@ +@@ -99,7 +98,7 @@ dnl Spell checking if test $spell_checking = "true"; then @@ -25,3 +25,103 @@ AC_SUBST(SPELL_CHECKING_CFLAGS) AC_SUBST(SPELL_CHECKING_LIBS) fi +--- a/src/main-window.c ++++ b/src/main-window.c +@@ -45,7 +45,9 @@ + + static void almanah_main_window_dispose (GObject *object); + #ifdef ENABLE_SPELL_CHECKING +-static void almanah_main_window_finalize (GObject *object); ++static void spell_checking_enabled_changed_cb (GSettings *settings, gchar *key, AlmanahMainWindow *self); ++static gboolean enable_spell_checking (AlmanahMainWindow *self, GError **error); ++static void disable_spell_checking (AlmanahMainWindow *self); + #endif /* ENABLE_SPELL_CHECKING */ + static void set_current_entry (AlmanahMainWindow *self, AlmanahEntry *entry); + static void save_window_state (AlmanahMainWindow *self); +@@ -131,9 +133,6 @@ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + g_type_class_add_private (klass, sizeof (AlmanahMainWindowPrivate)); + gobject_class->dispose = almanah_main_window_dispose; +-#ifdef ENABLE_SPELL_CHECKING +- gobject_class->finalize = almanah_main_window_finalize; +-#endif /* ENABLE_SPELL_CHECKING */ + } + + static void +@@ -143,35 +142,27 @@ + + gtk_window_set_title (GTK_WINDOW (self), _("Almanah Diary")); + g_signal_connect (self, "delete-event", G_CALLBACK (mw_delete_event_cb), NULL); +- +-#ifdef ENABLE_SPELL_CHECKING +- /* We don't use g_settings_bind() because enabling spell checking could fail, and we need to show an error dialogue */ +- self->priv->spell_checking_enabled_changed_id = g_signal_connect (almanah->settings, "changed::spell-checking-enabled", +- (GCallback) spell_checking_enabled_changed_cb, self); +-#endif /* ENABLE_SPELL_CHECKING */ + } + + static void + almanah_main_window_dispose (GObject *object) + { +- set_current_entry (ALMANAH_MAIN_WINDOW (object), NULL); +- +- /* Chain up to the parent class */ +- G_OBJECT_CLASS (almanah_main_window_parent_class)->dispose (object); +-} +- + #ifdef ENABLE_SPELL_CHECKING +-static void +-almanah_main_window_finalize (GObject *object) +-{ + AlmanahMainWindowPrivate *priv = ALMANAH_MAIN_WINDOW (object)->priv; ++#endif /* ENABLE_SPELL_CHECKING */ ++ ++ set_current_entry (ALMANAH_MAIN_WINDOW (object), NULL); + +- g_signal_handler_disconnect (object, priv->spell_checking_enabled_changed_id); ++#ifdef ENABLE_SPELL_CHECKING ++ if (priv->spell_checking_enabled_changed_id != 0) { ++ g_signal_handler_disconnect (almanah->settings, priv->spell_checking_enabled_changed_id); ++ priv->spell_checking_enabled_changed_id = 0; ++ } ++#endif /* ENABLE_SPELL_CHECKING */ + + /* Chain up to the parent class */ +- G_OBJECT_CLASS (almanah_main_window_parent_class)->finalize (object); ++ G_OBJECT_CLASS (almanah_main_window_parent_class)->dispose (object); + } +-#endif /* ENABLE_SPELL_CHECKING */ + + AlmanahMainWindow * + almanah_main_window_new (void) +@@ -241,8 +232,13 @@ + + #ifdef ENABLE_SPELL_CHECKING + /* Set up spell checking, if it's enabled */ +- if (g_settings_get_boolean (almanah->settings, "spell-checking-enabled") == TRUE) ++ if (g_settings_get_boolean (almanah->settings, "spell-checking-enabled") == TRUE) { + enable_spell_checking (main_window, NULL); ++ } ++ ++ /* We don't use g_settings_bind() because enabling spell checking could fail, and we need to show an error dialogue */ ++ priv->spell_checking_enabled_changed_id = g_signal_connect (almanah->settings, "changed::spell-checking-enabled", ++ (GCallback) spell_checking_enabled_changed_cb, main_window); + #endif /* ENABLE_SPELL_CHECKING */ + + /* Set up text formatting. It's important this is done after setting up GtkSpell, so that we know whether to +@@ -995,13 +991,13 @@ + void + mw_preferences_activate_cb (GtkAction *action, AlmanahMainWindow *main_window) + { +-#ifdef ENABLE_ENCRYPTION ++#if defined(ENABLE_ENCRYPTION) || defined(ENABLE_SPELL_CHECKING) + if (almanah->preferences_dialog == NULL) + almanah->preferences_dialog = GTK_WIDGET (almanah_preferences_dialog_new ()); + + gtk_widget_show_all (almanah->preferences_dialog); + gtk_dialog_run (GTK_DIALOG (almanah->preferences_dialog)); +-#endif /* ENABLE_ENCRYPTION */ ++#endif /* ENABLE_ENCRYPTION || ENABLE_SPELL_CHECKING */ + } + + static void