2007-04-04 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Wed, 4 Apr 2007 08:14:01 +0000 (08:14 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Wed, 4 Apr 2007 08:14:01 +0000 (08:14 +0000)
* Makefile.am:
        * configure.ac:
        * src/modest-runtime.c: (init_i18n): Restored the translation
        infrastructure, so that GETTEXT_PACKAGE and MODEST_LOCALE_DIR
        are defined in config.h, and the translations are installed.

        * src/maemo/easysetup/: Include config.h so that GETTEXT_PACKAGE
        is defined for translation.

pmo-trunk-r1499

14 files changed:
ChangeLog2
Makefile.am
configure.ac
src/maemo/easysetup/main.c
src/maemo/easysetup/modest-easysetup-country-combo-box.c
src/maemo/easysetup/modest-easysetup-provider-combo-box.c
src/maemo/easysetup/modest-easysetup-secureauth-combo-box.c
src/maemo/easysetup/modest-easysetup-serversecurity-combo-box.c
src/maemo/easysetup/modest-easysetup-servertype-combo-box.c
src/maemo/easysetup/modest-easysetup-wizard.c
src/maemo/easysetup/modest-presets.c
src/maemo/easysetup/modest-validating-entry.c
src/modest-runtime.c
src/modest-ui-actions.c

index c34ad7d..5ddeb72 100644 (file)
@@ -1,3 +1,14 @@
+2007-04-04  Murray Cumming  <murrayc@murrayc.com>
+
+       * Makefile.am:
+       * configure.ac:
+       * src/modest-runtime.c: (init_i18n): Restored the translation 
+       infrastructure, so that GETTEXT_PACKAGE and MODEST_LOCALE_DIR 
+       are defined in config.h, and the translations are installed.
+       
+       * src/maemo/easysetup/: Include config.h so that GETTEXT_PACKAGE 
+       is defined for translation.
+
 2007-04-03  Murray Cumming  <murrayc@murrayc.com>
 
        * src/maemo/easysetup/modest-easysetup-country-combo-box.c:
index d6d1734..226e15b 100644 (file)
@@ -26,8 +26,7 @@
 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.b
 
-SUBDIRS= src man
-#po
+SUBDIRS= src man po
 
 if BUILD_TESTS
 SUBDIRS += tests
index f4a01a3..4327723 100644 (file)
@@ -33,16 +33,17 @@ AC_CONFIG_SRCDIR(src/modest-main.c)
 AM_INIT_AUTOMAKE([dist-bzip2])
 
 # Check for gettext support
-QGETTEXT_PACKAGE=modest
+GETTEXT_PACKAGE=modest
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", ["Description"])
 
 ALL_LINGUAS="en_GB gl nl"
-#AM_GLIB_DEFINE_LOCALEDIR([MODEST_LOCALE_DIR])
+
+MODEST_LOCALE_DIR='$prefix/${DATADIRNAME}/locale'
+AM_GLIB_DEFINE_LOCALEDIR([MODEST_LOCALE_DIR])
 AM_GLIB_GNU_GETTEXT
 
-modestlocaledir='$prefix/${DATADIRNAME}/locale'
-AC_SUBST(modestlocaledir)
+
 
 if test x$prefix = xNONE; then
    prefix=/usr/local
index 3cd0d74..b1aa7dd 100644 (file)
@@ -27,7 +27,7 @@ static gboolean modest_easysetup_init(int argc, char *argv[])
 {
         /* Setup gettext, to use our .po files: */
         /* GETTEXT_PACKAGE is defined in config.h */
-        /* OSSO_MODEST_EASYSETUP_LOCALEDIR is defined in the Makefile.am */
+        /* OSSO_MODEST_EASYSETUP_LOCALEDIR is defined in config.h */
        bindtextdomain (GETTEXT_PACKAGE, OSSO_MODEST_EASYSETUP_LOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
        textdomain (GETTEXT_PACKAGE);
index 3b69935..511d8d9 100644 (file)
 
 #include <libintl.h> /* For dgettext(). */
 
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 G_DEFINE_TYPE (EasysetupCountryComboBox, easysetup_country_combo_box, GTK_TYPE_COMBO_BOX);
 
 #define COUNTRY_COMBO_BOX_GET_PRIVATE(o) \
index c68b662..3caded6 100644 (file)
@@ -3,9 +3,6 @@
  *
  */
 
-#define _GNU_SOURCE /* So we can use the getline() function, which is a convenient GNU extension. */
-#include <stdio.h>
-
 #include "modest-easysetup-provider-combo-box.h"
 #include <gtk/gtkliststore.h>
 #include <gtk/gtkcelllayout.h>
 #include <stdlib.h>
 #include <string.h> /* For memcpy() */
 
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 G_DEFINE_TYPE (EasysetupProviderComboBox, easysetup_provider_combo_box, GTK_TYPE_COMBO_BOX);
 
 #define PROVIDER_COMBO_BOX_GET_PRIVATE(o) \
index 01c8453..240280a 100644 (file)
@@ -3,9 +3,6 @@
  *
  */
 
-#define _GNU_SOURCE /* So we can use the getline() function, which is a convenient GNU extension. */
-#include <stdio.h>
-
 #include "modest-easysetup-secureauth-combo-box.h"
 #include <gtk/gtkliststore.h>
 #include <gtk/gtkcelllayout.h>
 #include <stdlib.h>
 #include <string.h> /* For memcpy() */
 
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 G_DEFINE_TYPE (EasysetupSecureauthComboBox, easysetup_secureauth_combo_box, GTK_TYPE_COMBO_BOX);
 
 #define SECUREAUTH_COMBO_BOX_GET_PRIVATE(o) \
index 5486e12..f2ce3ee 100644 (file)
@@ -3,9 +3,6 @@
  *
  */
 
-#define _GNU_SOURCE /* So we can use the getline() function, which is a convenient GNU extension. */
-#include <stdio.h>
-
 #include "modest-easysetup-serversecurity-combo-box.h"
 #include <gtk/gtkliststore.h>
 #include <gtk/gtkcelllayout.h>
 #include <stdlib.h>
 #include <string.h> /* For memcpy() */
 
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 G_DEFINE_TYPE (EasysetupServersecurityComboBox, easysetup_serversecurity_combo_box, GTK_TYPE_COMBO_BOX);
 
 #define SERVERSECURITY_COMBO_BOX_GET_PRIVATE(o) \
index 7e87ecb..f7ea654 100644 (file)
@@ -3,9 +3,6 @@
  *
  */
 
-#define _GNU_SOURCE /* So we can use the getline() function, which is a convenient GNU extension. */
-#include <stdio.h>
-
 #include "modest-easysetup-servertype-combo-box.h"
 #include <gtk/gtkliststore.h>
 #include <gtk/gtkcelllayout.h>
 #include <stdlib.h>
 #include <string.h> /* For memcpy() */
 
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 G_DEFINE_TYPE (EasysetupServertypeComboBox, easysetup_servertype_combo_box, GTK_TYPE_COMBO_BOX);
 
 #define SERVERTYPE_COMBO_BOX_GET_PRIVATE(o) \
index 3b4d499..820b5b8 100644 (file)
 #include "modest-validating-entry.h"
 #include "modest-text-utils.h"
 #include "modest-account-mgr.h"
+#include "modest-runtime.h" /* For modest_runtime_get_account_mgr(). */
 #include <gconf/gconf-client.h>
 #include <string.h> /* For strlen(). */
 
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #define EXAMPLE_EMAIL_ADDRESS "first.last@provider.com"
 
 G_DEFINE_TYPE (ModestEasysetupWizardDialog, modest_easysetup_wizard_dialog, MODEST_TYPE_WIZARD_DIALOG);
@@ -685,12 +691,11 @@ modest_easysetup_wizard_dialog_init (ModestEasysetupWizardDialog *self)
        g_assert(priv->presets);
        
        
-       /* Create the account manager object, 
+       /* Get the account manager object, 
         * so we can check for existing accounts,
         * and create new accounts: */
-       ModestConf *conf = modest_conf_new (); /* Just a thin wrapper around GConfClient. */
-       self->account_manager = modest_account_mgr_new (conf);
-       g_object_unref (conf);
+       self->account_manager = modest_runtime_get_account_mgr ();
+       g_assert (self->account_manager);
        
     /* Create the common pages, 
      */
index bea2069..051d284 100644 (file)
 #include <string.h> /* for strcmp */
 #include "modest-presets.h"
 
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #define MODEST_PRESETS_KEY_NAME              "Name"
 #define MODEST_PRESETS_KEY_DOMAIN            "Domain"
 #define MODEST_PRESETS_KEY_MCC               "MCC"
index 79f2ea3..b1d1191 100644 (file)
@@ -7,6 +7,11 @@
 #include <gtk/gtksignal.h> /* For the gtk_signal_stop_emit_by_name() convenience function. */
 #include <string.h> /* For strlen(). */
 
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 G_DEFINE_TYPE (EasysetupValidatingEntry, easysetup_validating_entry, GTK_TYPE_ENTRY);
 
 #define VALIDATING_ENTRY_GET_PRIVATE(o) \
index 5ed7526..5c67519 100644 (file)
@@ -524,10 +524,11 @@ init_debug_logging (void)
 static void
 init_i18n (void)
 {
-       bindtextdomain (GETTEXT_PACKAGE, MODEST_LOCALEDIR);
+       /* Setup gettext, to use our .po files: */
+       /* GETTEXT_PACKAGE and MODEST_LOCALE_DIR are defined in config.h */
+       bindtextdomain (GETTEXT_PACKAGE, MODEST_LOCALE_DIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
        textdomain (GETTEXT_PACKAGE);
-
 }
 
 
index f979316..3315b50 100644 (file)
@@ -238,11 +238,11 @@ modest_ui_actions_on_accounts (GtkAction *action, ModestWindow *win)
 
 void
 modest_ui_actions_on_new_account (GtkAction *action, ModestWindow *win)
-{
+{      
        ModestEasysetupWizardDialog *wizard = modest_easysetup_wizard_dialog_new ();
-       gtk_window_set_transient_for (GTK_WINDOW (wizard), win);
+       gtk_window_set_transient_for (GTK_WINDOW (wizard), GTK_WINDOW (win));
        gtk_dialog_run (GTK_DIALOG (wizard));
-       gtk_widget_destroy (wizard);
+       gtk_widget_destroy (GTK_WIDGET (wizard));
 }
 
 void