diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-01-19 19:45:06 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-01-19 19:45:06 +0000 |
| commit | 28dcdf10f9fef7f4c7d7bf7664040aa3c26126fe (patch) | |
| tree | 446c523f5a28f31ce6423086a293cdfff81f2b8f /src/ui/context-menu.cpp | |
| parent | Update and documentation of sp-attribute-widget (diff) | |
| download | inkscape-28dcdf10f9fef7f4c7d7bf7664040aa3c26126fe.tar.gz inkscape-28dcdf10f9fef7f4c7d7bf7664040aa3c26126fe.zip | |
Gtkmmification of object attributes dialog: image and link attributes now editable in dockable dialog (Bug #592323)
(bzr r10910)
Diffstat (limited to 'src/ui/context-menu.cpp')
| -rw-r--r-- | src/ui/context-menu.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/ui/context-menu.cpp b/src/ui/context-menu.cpp index f8ec1eed1..e99a19e11 100644 --- a/src/ui/context-menu.cpp +++ b/src/ui/context-menu.cpp @@ -42,24 +42,22 @@ void sp_object_menu(SPObject *object, SPDesktop *desktop, GtkMenu *menu) /* Implementation */ #include <gtk/gtk.h> - #include <glibmm/i18n.h> +#include "selection.h" +#include "selection-chemistry.h" #include "sp-anchor.h" +#include "sp-clippath.h" #include "sp-image.h" +#include "sp-mask.h" +#include "sp-path.h" #include "sp-text.h" - #include "desktop-handles.h" -#include "selection.h" -#include "selection-chemistry.h" -#include "dialogs/object-attributes.h" #include "dialogs/text-edit.h" #include "dialogs/spellcheck.h" +#include "ui/dialog/object-attributes.h" #include "ui/dialog/object-properties.h" -#include "sp-path.h" -#include "sp-clippath.h" -#include "sp-mask.h" static void sp_item_menu(SPObject *object, SPDesktop *desktop, GtkMenu *menu); @@ -284,9 +282,8 @@ static void sp_item_create_link(GtkMenuItem *menuitem, SPItem *item) DocumentUndo::done(object->document, SP_VERB_NONE, _("Create link")); - sp_object_attributes_dialog(object, "SPAnchor"); - sp_desktop_selection(desktop)->set(SP_ITEM(object)); + desktop->_dlg_mgr->showDialog("ObjectAttributes"); } /* SPGroup */ @@ -355,9 +352,11 @@ static void sp_anchor_menu(SPObject *object, SPDesktop *desktop, GtkMenu *m) gtk_menu_shell_append(GTK_MENU_SHELL(m), w); } -static void sp_anchor_link_properties(GtkMenuItem */*menuitem*/, SPAnchor *anchor) +static void sp_anchor_link_properties(GtkMenuItem *menuitem, SPAnchor */*anchor*/) { - sp_object_attributes_dialog(anchor, "Link"); + SPDesktop *desktop = (SPDesktop*)g_object_get_data(G_OBJECT(menuitem), "desktop"); + g_return_if_fail(desktop != NULL); + desktop->_dlg_mgr->showDialog("ObjectAttributes"); } static void sp_anchor_link_follow(GtkMenuItem */*menuitem*/, SPAnchor *anchor) @@ -410,9 +409,11 @@ static void sp_image_menu(SPObject *object, SPDesktop *desktop, GtkMenu *m) } } -static void sp_image_image_properties(GtkMenuItem */*menuitem*/, SPAnchor *anchor) +static void sp_image_image_properties(GtkMenuItem *menuitem, SPAnchor */*anchor*/) { - sp_object_attributes_dialog(anchor, "Image"); + SPDesktop *desktop = (SPDesktop*)g_object_get_data(G_OBJECT(menuitem), "desktop"); + g_return_if_fail(desktop != NULL); + desktop->_dlg_mgr->showDialog("ObjectAttributes"); } static gchar* getImageEditorName() { |
