summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-01-03 06:36:30 -0800
committerDan Nicholson <dbn.lists@gmail.com>2013-01-19 16:02:28 -0800
commitef700194f913d189b6338efd30b26327cb30f9c2 (patch)
treefca8a2b6bdcc29f4c54967eab139202311d8833f
parentefe57f92a26b165e96a7acb8f6d32ff4418b7e87 (diff)
Add Evince major version to description string
-rw-r--r--src/evbp.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/evbp.c b/src/evbp.c
index d72dfac..ca7e834 100644
--- a/src/evbp.c
+++ b/src/evbp.c
@@ -38,7 +38,6 @@
#define EVBP_VERSION PACKAGE_VERSION
#define EVBP_NAME "Evince Plugin"
-#define EVBP_DESCRIPTION "Evince Browser Plugin " EVBP_VERSION
typedef struct evbp_priv {
NPP npp;
@@ -48,6 +47,7 @@ typedef struct evbp_priv {
} evbp_priv_t;
static char *evbp_mime_string = NULL;
+static char *evbp_description = NULL;
static const NPNetscapeFuncs *npn_funcs = NULL;
static gboolean ev_is_initialized = FALSE;
@@ -106,6 +106,12 @@ evbp_initialize(void)
textdomain(GETTEXT_PACKAGE);
#endif
+ /* Create the description string */
+ evbp_description = g_strdup_printf("Evince Broswer Plugin %s"
+ " (using Evince %u)",
+ EVBP_VERSION,
+ EV_MAJOR_VERSION);
+
/* Initialize gtk and evince icons */
gtk_init(NULL, NULL);
ev_stock_icons_init();
@@ -121,6 +127,7 @@ evbp_shutdown(void)
if (!ev_is_initialized)
return;
+ g_free(evbp_description);
ev_shutdown();
ev_stock_icons_shutdown();
@@ -296,7 +303,7 @@ evbp_get_value(NPP instance, NPPVariable variable, void *value)
*((char **)value) = EVBP_NAME;
break;
case NPPVpluginDescriptionString:
- *((char **)value) = EVBP_DESCRIPTION;
+ *((char **)value) = evbp_description;
break;
case NPPVpluginNeedsXEmbed:
/* Require XEmbed */