From: dforsi <df...@us...> - 2012-07-13 20:51:47
|
commit f8be71f0a51fa8c8ada982286a3ff5d502a8d46c Author: Daniele Forsi <da...@fo...> Date: Fri Jul 13 21:26:10 2012 +0200 Fix multiple icons appearing when toggling plugins in preferences window The anjuta_preferences_dialog_add_page() was using the translated string while anjuta_preferences_remove_page() was using the untranslated string. Make the code similar to most plugins. Fixes: libanjuta-WARNING **: Could not find page to remove Program received signal SIGTRAP, Trace/breakpoint trap. 0xb74a9f81 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0 (gdb) bt [...] #2 0xb7ef4b40 in anjuta_preferences_dialog_remove_page () from /usr/lib/libanjuta-3.so.0 #3 0xb7ef5c3b in anjuta_preferences_remove_page () from /usr/lib/libanjuta-3.so.0 #4 0xa61abc45 in ipreferences_unmerge (ipref=0x855f650, prefs=0x83b0a60, e=0x0) at plugin.c:446 [...] plugins/external_player/plugin.c | 4 ++-- plugins/playlist_display/plugin.c | 4 ++-- plugins/sjcd/plugin.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) --- diff --git a/plugins/external_player/plugin.c b/plugins/external_player/plugin.c index 55c44fe..334f3b8 100644 --- a/plugins/external_player/plugin.c +++ b/plugins/external_player/plugin.c @@ -38,7 +38,7 @@ #include "plugin.h" #include "external_player.h" -#define TAB_NAME "External Media Player" +#define TAB_NAME _("External Media Player") /* Parent class. Part of standard class definition */ static gpointer parent_class; @@ -137,7 +137,7 @@ static void ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* pre scaled = gdk_pixbuf_scale_simple(pixbuf, 48, 48, GDK_INTERP_BILINEAR); - anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), "gtkpod-external-player-settings", _(TAB_NAME), scaled, plugin->prefs); + anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), "gtkpod-external-player-settings", TAB_NAME, scaled, plugin->prefs); g_object_unref(scaled); g_object_unref(pixbuf); } diff --git a/plugins/playlist_display/plugin.c b/plugins/playlist_display/plugin.c index 9ef7016..03d506f 100644 --- a/plugins/playlist_display/plugin.c +++ b/plugins/playlist_display/plugin.c @@ -47,7 +47,7 @@ #define PREFERENCE_ICON "playlist_display-playlist-category" #define PREFERENCE_ICON_STOCK_ID "playlist_display-preference-icon" -#define TAB_NAME N_("Playlist Display") +#define TAB_NAME _("Playlist Display") /* Parent class. Part of standard class definition */ static gpointer parent_class; @@ -438,7 +438,7 @@ static void ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* pre g_error_free(error); } - anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), "gtkpod-track-display-settings", _(TAB_NAME), pixbuf, plugin->prefs); + anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), "gtkpod-track-display-settings", TAB_NAME, pixbuf, plugin->prefs); g_object_unref(pixbuf); } diff --git a/plugins/sjcd/plugin.c b/plugins/sjcd/plugin.c index 41bcb31..590cced 100644 --- a/plugins/sjcd/plugin.c +++ b/plugins/sjcd/plugin.c @@ -41,7 +41,7 @@ #define PREFERENCE_ICON "sjcd-category" #define PREFERENCE_ICON_STOCK_ID "sjcd-preference-icon" -#define TAB_NAME N_("Sound Juicer") +#define TAB_NAME _("Sound Juicer") /* Parent class. Part of standard class definition */ static gpointer parent_class; @@ -125,7 +125,7 @@ static void ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* pre g_error_free(error); } - anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), "gtkpod-track-display-settings", _(TAB_NAME), pixbuf, plugin->prefs); + anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), "gtkpod-track-display-settings", TAB_NAME, pixbuf, plugin->prefs); g_object_unref(pixbuf); } |