commit 7789c3acba0430b06d39e1d0d002318477d98855
parent a1bb5a00040354c00c73384de6b389096c8391dc
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Sat, 2 Apr 2016 15:57:50 +0200
Move RSSyl plugin name to a macro.
Diffstat:
5 files changed, 11 insertions(+), 9 deletions(-)
diff --git 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
@@ -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
@@ -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
@@ -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
@@ -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);