SF.net SVN: geany-plugins:[476] trunk/spellcheck

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Feb 15 15:51:14 UTC 2009


Revision: 476
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=476&view=rev
Author:   eht16
Date:     2009-02-15 15:50:57 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Use Geany's main_locale_init() to init the localisation system.

Modified Paths:
--------------
    trunk/spellcheck/ChangeLog
    trunk/spellcheck/src/scplugin.c

Modified: trunk/spellcheck/ChangeLog
===================================================================
--- trunk/spellcheck/ChangeLog	2009-02-14 16:41:11 UTC (rev 475)
+++ trunk/spellcheck/ChangeLog	2009-02-15 15:50:57 UTC (rev 476)
@@ -1,3 +1,9 @@
+2009-02-15  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/sc_plugin.c:
+   Use Geany's main_locale_init() to init the localisation system.
+
+
 2009-02-14  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * src/speller.c:

Modified: trunk/spellcheck/src/scplugin.c
===================================================================
--- trunk/spellcheck/src/scplugin.c	2009-02-14 16:41:11 UTC (rev 475)
+++ trunk/spellcheck/src/scplugin.c	2009-02-15 15:50:57 UTC (rev 476)
@@ -105,32 +105,6 @@
 #endif
 
 
-static void locale_init(void)
-{
-#ifdef ENABLE_NLS
-	gchar *locale_dir = NULL;
-
-#ifdef HAVE_LOCALE_H
-	setlocale(LC_ALL, "");
-#endif
-
-#ifdef G_OS_WIN32
-	gchar *install_dir = g_win32_get_package_installation_directory(NULL, NULL);
-	/* e.g. C:\Program Files\geany\lib\locale */
-	locale_dir = g_strconcat(install_dir, "\\share\\locale", NULL);
-	g_free(install_dir);
-#else
-	locale_dir = g_strdup(LOCALEDIR);
-#endif
-
-	bindtextdomain(GETTEXT_PACKAGE, locale_dir);
-	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-	textdomain(GETTEXT_PACKAGE);
-	g_free(locale_dir);
-#endif
-}
-
-
 static void configure_response_cb(GtkDialog *dialog, gint response, gpointer user_data)
 {
 	if (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_APPLY)
@@ -202,7 +176,7 @@
 	g_key_file_free(config);
 	g_free(default_lang);
 
-	locale_init();
+	main_locale_init(LOCALEDIR, GETTEXT_PACKAGE);
 
 	sc->menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_SPELL_CHECK, NULL);
 	ui_add_document_sensitive(sc->menu_item);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list