diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-04-04 09:54:17 +0000 |
|---|---|---|
| committer | John Smith <removethis.john.q.public@bigmail.com> | 2012-04-04 09:54:17 +0000 |
| commit | 4d44c257559a9cea38f69eb340fad84688aca3e8 (patch) | |
| tree | 92666bbd1b6a0d3c5ca11b2ed18f32921fe12a23 /src/ui | |
| parent | Fix build with gtk < 2.24 (diff) | |
| download | inkscape-4d44c257559a9cea38f69eb340fad84688aca3e8.tar.gz inkscape-4d44c257559a9cea38f69eb340fad84688aca3e8.zip | |
Fix for 170378 : Select same objects by fill or stroke : Added stroke style
(bzr r11146)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/context-menu.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui/context-menu.cpp b/src/ui/context-menu.cpp index 672ac440d..ad47da68b 100644 --- a/src/ui/context-menu.cpp +++ b/src/ui/context-menu.cpp @@ -129,8 +129,12 @@ static void sp_item_menu(SPObject *object, SPDesktop *desktop, GtkMenu *m) gtk_menu_shell_append(GTK_MENU_SHELL(m), w); /* Select same fill and stroke */ w = gtk_menu_item_new_with_mnemonic(_("_Select Same Fill and Stroke")); - g_object_set_data(G_OBJECT(w), "desktop", desktop); - g_signal_connect(G_OBJECT(w), "activate", G_CALLBACK(sp_item_select_same_fill_stroke), item); + if (sp_desktop_selection(desktop)->isEmpty()) { + gtk_widget_set_sensitive(w, FALSE); + } else { + g_object_set_data(G_OBJECT(w), "desktop", desktop); + g_signal_connect(G_OBJECT(w), "activate", G_CALLBACK(sp_item_select_same_fill_stroke), item); + } gtk_widget_show(w); gtk_menu_shell_append(GTK_MENU_SHELL(m), w); /* Create link */ @@ -272,7 +276,7 @@ static void sp_item_select_same_fill_stroke(GtkMenuItem *menuitem, SPItem * /*it SPDesktop *desktop = static_cast<SPDesktop*>(g_object_get_data(G_OBJECT(menuitem), "desktop")); g_return_if_fail(desktop != NULL); - sp_select_same_fill_stroke(desktop, true, true); + sp_select_same_fill_stroke_style(desktop, true, true, true); } |
