summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2012-03-21 05:28:29 +0000
committerJazzyNico <nicoduf@yahoo.fr>2012-03-21 05:28:29 +0000
commitf7a9eca2fe33abfed02f36aa46959b46b0b5755f (patch)
tree4ae98e77a4167d73df0f16f26369f0f7edec15f3 /src
parentFix for 903676 : Replace GtkCList with GtkTreeView in XML Tree (diff)
downloadinkscape-f7a9eca2fe33abfed02f36aa46959b46b0b5755f.tar.gz
inkscape-f7a9eca2fe33abfed02f36aa46959b46b0b5755f.zip
UI. Adding extension check in the context menu (see Bug #171842).
(bzr r11106)
Diffstat (limited to 'src')
-rw-r--r--src/ui/context-menu.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/ui/context-menu.cpp b/src/ui/context-menu.cpp
index 4bb8b4803..bf116f5fb 100644
--- a/src/ui/context-menu.cpp
+++ b/src/ui/context-menu.cpp
@@ -414,23 +414,27 @@ static void sp_image_menu(SPObject *object, SPDesktop *desktop, GtkMenu *m)
}
/* Embed image */
- w = gtk_menu_item_new_with_mnemonic(C_("Context menu", "Embed Image"));
- g_object_set_data(G_OBJECT(w), "desktop", desktop);
- g_signal_connect(G_OBJECT(w), "activate", G_CALLBACK(sp_image_image_embed), item);
- gtk_widget_show(w);
- gtk_menu_shell_append(GTK_MENU_SHELL(m), w);
- if ( (!href) || ((strncmp(href, "data:", 5) == 0)) ) {
- gtk_widget_set_sensitive( w, FALSE );
+ if (Inkscape::Verb::getbyid( "org.ekips.filter.embedselectedimages" )) {
+ w = gtk_menu_item_new_with_mnemonic(C_("Context menu", "Embed Image"));
+ g_object_set_data(G_OBJECT(w), "desktop", desktop);
+ g_signal_connect(G_OBJECT(w), "activate", G_CALLBACK(sp_image_image_embed), item);
+ gtk_widget_show(w);
+ gtk_menu_shell_append(GTK_MENU_SHELL(m), w);
+ if ( (!href) || ((strncmp(href, "data:", 5) == 0)) ) {
+ gtk_widget_set_sensitive( w, FALSE );
+ }
}
/* Extract image */
- w = gtk_menu_item_new_with_mnemonic(C_("Context menu", "Extract Image"));
- g_object_set_data(G_OBJECT(w), "desktop", desktop);
- g_signal_connect(G_OBJECT(w), "activate", G_CALLBACK(sp_image_image_extract), item);
- gtk_widget_show(w);
- gtk_menu_shell_append(GTK_MENU_SHELL(m), w);
- if ( (!href) || ((strncmp(href, "data:", 5) != 0)) ) {
- gtk_widget_set_sensitive( w, FALSE );
+ if (Inkscape::Verb::getbyid( "org.ekips.filter.extractimage" )) {
+ w = gtk_menu_item_new_with_mnemonic(C_("Context menu", "Extract Image"));
+ g_object_set_data(G_OBJECT(w), "desktop", desktop);
+ g_signal_connect(G_OBJECT(w), "activate", G_CALLBACK(sp_image_image_extract), item);
+ gtk_widget_show(w);
+ gtk_menu_shell_append(GTK_MENU_SHELL(m), w);
+ if ( (!href) || ((strncmp(href, "data:", 5) != 0)) ) {
+ gtk_widget_set_sensitive( w, FALSE );
+ }
}
}