From: Andrej Kacian Date: Sat, 2 Apr 2016 13:57:50 +0000 (+0200) Subject: Move RSSyl plugin name to a macro. X-Git-Tag: 3.14.0~126 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=7789c3acba0430b06d39e1d0d002318477d98855 Move RSSyl plugin name to a macro. --- diff --git a/src/plugins/rssyl/plugin.c b/src/plugins/rssyl/plugin.c index 7ade91479..3dd643639 100644 --- a/src/plugins/rssyl/plugin.c +++ b/src/plugins/rssyl/plugin.c @@ -40,7 +40,7 @@ gint plugin_init(gchar **error) { if( !check_plugin_version(MAKE_NUMERIC_VERSION(3, 7, 8, 31), - VERSION_NUMERIC, "RSSyl", error) ) + VERSION_NUMERIC, PLUGIN_NAME, error) ) return -1; curl_global_init(CURL_GLOBAL_DEFAULT); @@ -57,7 +57,7 @@ gboolean plugin_done(void) const gchar *plugin_name(void) { - return "RSSyl"; + return PLUGIN_NAME; } const gchar *plugin_desc(void) diff --git a/src/plugins/rssyl/rssyl.c b/src/plugins/rssyl/rssyl.c index ecb01dd3e..b60bffe17 100644 --- a/src/plugins/rssyl/rssyl.c +++ b/src/plugins/rssyl/rssyl.c @@ -152,7 +152,7 @@ void rssyl_init(void) else rssyl_update_format(); - prefs_toolbar_register_plugin_item(TOOLBAR_MAIN, "RSSyl", _("Refresh all feeds"), rssyl_toolbar_cb_refresh_all_feeds, NULL); + prefs_toolbar_register_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Refresh all feeds"), rssyl_toolbar_cb_refresh_all_feeds, NULL); if( rssyl_prefs_get()->refresh_on_startup && claws_is_starting() ) @@ -163,7 +163,7 @@ void rssyl_done(void) { rssyl_opml_export(); - prefs_toolbar_unregister_plugin_item(TOOLBAR_MAIN, "RSSyl", _("Refresh all feeds")); + prefs_toolbar_unregister_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Refresh all feeds")); rssyl_prefs_done(); rssyl_gtk_done(); @@ -945,7 +945,7 @@ FolderClass *rssyl_folder_get_class() if( rssyl_class.idstr == NULL ) { rssyl_class.type = F_UNKNOWN; rssyl_class.idstr = "rssyl"; - rssyl_class.uistr = "RSSyl"; + rssyl_class.uistr = PLUGIN_NAME; /* Folder functions */ rssyl_class.new_folder = rssyl_new_folder; diff --git a/src/plugins/rssyl/rssyl.h b/src/plugins/rssyl/rssyl.h index 6ded09977..5b890bd6c 100644 --- a/src/plugins/rssyl/rssyl.h +++ b/src/plugins/rssyl/rssyl.h @@ -7,8 +7,10 @@ #include "libfeed/feed.h" +#define PLUGIN_NAME "RSSyl" + /* Name of directory in rcdir where RSSyl will store its data. */ -#define RSSYL_DIR "RSSyl" +#define RSSYL_DIR PLUGIN_NAME /* Folder name for a new feed, before it is parsed for the first time. */ #define RSSYL_NEW_FOLDER_NAME "NewFeed" diff --git a/src/plugins/rssyl/rssyl_gtk.c b/src/plugins/rssyl/rssyl_gtk.c index dc6e72a0a..7ed6692b3 100644 --- a/src/plugins/rssyl/rssyl_gtk.c +++ b/src/plugins/rssyl/rssyl_gtk.c @@ -174,8 +174,8 @@ void rssyl_gtk_init(void) MainWindow *mainwin = mainwindow_get_mainwindow(); gtk_action_group_add_actions(mainwin->action_group, mainwindow_add_mailbox, 1, (gpointer)mainwin); - MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/File/AddMailbox", "RSSyl", - "File/AddMailbox/RSSyl", GTK_UI_MANAGER_MENUITEM, + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/File/AddMailbox", PLUGIN_NAME, + "File/AddMailbox/"PLUGIN_NAME, GTK_UI_MANAGER_MENUITEM, main_menu_id); rssyl_fill_popup_menu_labels(); folderview_register_popup(&rssyl_popup); diff --git a/src/plugins/rssyl/rssyl_prefs.c b/src/plugins/rssyl/rssyl_prefs.c index 181a65f25..16d41a4ba 100644 --- a/src/plugins/rssyl/rssyl_prefs.c +++ b/src/plugins/rssyl/rssyl_prefs.c @@ -68,7 +68,7 @@ void rssyl_prefs_init(void) gchar *rcpath; path[0] = _("Plugins"); - path[1] = "RSSyl"; /* We don't need this translated */ + path[1] = PLUGIN_NAME; /* We don't need this translated */ path[2] = NULL; prefs_set_default(param);