Move RSSyl plugin name to a macro.
authorAndrej Kacian <ticho@claws-mail.org>
Sat, 2 Apr 2016 13:57:50 +0000 (15:57 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Sat, 2 Apr 2016 15:01:44 +0000 (17:01 +0200)
src/plugins/rssyl/plugin.c
src/plugins/rssyl/rssyl.c
src/plugins/rssyl/rssyl.h
src/plugins/rssyl/rssyl_gtk.c
src/plugins/rssyl/rssyl_prefs.c

index 7ade914..3dd6436 100644 (file)
@@ -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)
index ecb01dd..b60bffe 100644 (file)
@@ -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;
index 6ded099..5b890bd 100644 (file)
@@ -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"
index dc6e72a..7ed6692 100644 (file)
@@ -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);
index 181a65f..16d41a4 100644 (file)
@@ -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);