diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2013-01-03 06:36:30 -0800 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2013-01-19 16:02:28 -0800 |
commit | ef700194f913d189b6338efd30b26327cb30f9c2 (patch) | |
tree | fca8a2b6bdcc29f4c54967eab139202311d8833f | |
parent | efe57f92a26b165e96a7acb8f6d32ff4418b7e87 (diff) |
Add Evince major version to description string
-rw-r--r-- | src/evbp.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 */ |