SF.net SVN: geany-plugins:[277] trunk/geanyvc/geanyvc.c
frlan at users.sourceforge.net
frlan at xxxxx
Sun Nov 2 21:59:59 UTC 2008
Revision: 277
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=277&view=rev
Author: frlan
Date: 2008-11-02 21:59:59 +0000 (Sun, 02 Nov 2008)
Log Message:
-----------
geanyVC: Make usage of Geany API v104 by using of Geany's plugin locale_init() function.
Modified Paths:
--------------
trunk/geanyvc/geanyvc.c
Modified: trunk/geanyvc/geanyvc.c
===================================================================
--- trunk/geanyvc/geanyvc.c 2008-11-02 21:59:43 UTC (rev 276)
+++ trunk/geanyvc/geanyvc.c 2008-11-02 21:59:59 UTC (rev 277)
@@ -59,7 +59,7 @@
GeanyFunctions *geany_functions;
-PLUGIN_VERSION_CHECK(89);
+PLUGIN_VERSION_CHECK(104);
PLUGIN_SET_INFO(_("VC"), _("Interface to different Version Control systems."), VERSION,
_("Yura Siamashka <yurand2 at gmail.com>,\nFrank Lanitz <frank at frank.uvena.de>"));
@@ -1838,32 +1838,6 @@
REGISTER_VC(HG, enable_hg);
}
-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("geany", 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
-}
-
/* Called by Geany to initialize the plugin */
void
plugin_init(G_GNUC_UNUSED GeanyData * data)
@@ -1872,6 +1846,8 @@
GtkWidget *menu_vc_menu = NULL;
GtkTooltips *tooltips = NULL;
+ p_main->locale_init(LOCALEDIR, GETTEXT_PACKAGE);
+
config_file =
g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S,
"VC", G_DIR_SEPARATOR_S, "VC.conf", NULL);
@@ -1879,8 +1855,6 @@
load_config();
registrate();
- locale_init();
-
tooltips = gtk_tooltips_new();
menu_vc = gtk_image_menu_item_new_with_mnemonic(_("_VC"));
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