summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2019-02-04 23:17:44 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2019-02-04 23:17:44 +0000
commita04d9b7aa050920b7d98beac013e94e54fc2414a (patch)
tree1f871112bc6ac0b179c0a0fa4447907b0da67414 /src/widgets
parentrm unused InkRadioAction (diff)
downloadinkscape-a04d9b7aa050920b7d98beac013e94e54fc2414a.tar.gz
inkscape-a04d9b7aa050920b7d98beac013e94e54fc2414a.zip
NodeToolbar: GtkAction migration
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/CMakeLists.txt2
-rw-r--r--src/widgets/ink-tool-menu-action.cpp58
-rw-r--r--src/widgets/ink-tool-menu-action.h61
-rw-r--r--src/widgets/toolbox.cpp2
4 files changed, 1 insertions, 122 deletions
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index 2bdc67485..c6dad3f1a 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -12,7 +12,6 @@ set(widgets_SRC
ink-action.cpp
ink-comboboxentry-action.cpp
ink-toggle-action.cpp
- ink-tool-menu-action.cpp
paint-selector.cpp
sp-attribute-widget.cpp
sp-color-selector.cpp
@@ -37,7 +36,6 @@ set(widgets_SRC
ink-action.h
ink-comboboxentry-action.h
ink-toggle-action.h
- ink-tool-menu-action.h
paint-selector.h
sp-attribute-widget.h
sp-color-selector.h
diff --git a/src/widgets/ink-tool-menu-action.cpp b/src/widgets/ink-tool-menu-action.cpp
deleted file mode 100644
index 667f074cc..000000000
--- a/src/widgets/ink-tool-menu-action.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/** @file
- * TODO: insert short description here
- *//*
- * Authors: see git history
- *
- * Copyright (C) 2018 Authors
- * Released under GNU GPL v2+, read the file 'COPYING' for more information.
- */
-#include "ink-tool-menu-action.h"
-
-// ToolMenu Action is happily derived from http://www.gtkforums.com/viewtopic.php?t=4215
-
-G_DEFINE_TYPE(InkToolMenuAction, ink_tool_menu_action, INK_ACTION_TYPE);
-
-static void
-ink_tool_menu_action_class_init (InkToolMenuActionClass *klass)
-{
- GtkActionClass *action_class = GTK_ACTION_CLASS (klass);
- action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
-}
-
-static void
-ink_tool_menu_action_init (InkToolMenuAction* /*tma*/)
-{
-}
-
-InkToolMenuAction *
-ink_tool_menu_action_new (const gchar *name,
- const gchar *label,
- const gchar *tooltip,
- const gchar *inkId,
- GtkIconSize size )
-{
- g_return_val_if_fail (name != nullptr, NULL);
-
- GObject* obj = (GObject*)g_object_new( INK_TOOL_MENU_ACTION_TYPE,
- "name", name,
- "label", label,
- "tooltip", tooltip,
- "iconId", inkId,
- "iconSize", size,
- NULL );
-
- InkToolMenuAction* action = INK_TOOL_MENU_ACTION( obj );
-
- return action;
-}
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/ink-tool-menu-action.h b/src/widgets/ink-tool-menu-action.h
deleted file mode 100644
index 58e1974d1..000000000
--- a/src/widgets/ink-tool-menu-action.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/** @file
- * TODO: insert short description here
- *//*
- * Authors: see git history
- *
- * Copyright (C) 2017 Authors
- * Released under GNU GPL v2+, read the file 'COPYING' for more information.
- */
-#ifndef INK_TOOL_MENU_ACTION_H
-#define INK_TOOL_MENU_ACTION_H
-
-#include "ink-action.h"
-
-// ToolMenu Action is happily derived from http://www.gtkforums.com/viewtopic.php?t=4215
-
-G_BEGIN_DECLS
-
-#define INK_TOOL_MENU_ACTION_TYPE ( ink_tool_menu_action_get_type() )
-#define INK_TOOL_MENU_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuAction) )
-#define INK_TOOL_MENU_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuActionClass) )
-#define IS_INK_TOOL_MENU_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_TOOL_MENU_ACTION_TYPE) )
-#define IS_INK_TOOL_MENU_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_TOOL_MENU_ACTION_TYPE) )
-#define INK_TOOL_MENU_ACTION_GET_CLASS( obj ) ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuActionClass) )
-
-typedef struct _InkToolMenuAction InkToolMenuAction;
-typedef struct _InkToolMenuActionClass InkToolMenuActionClass;
-typedef struct _InkToolMenuActionPrivate InkToolMenuActionPrivate;
-
-struct _InkToolMenuAction
-{
- InkAction action;
-};
-
-struct _InkToolMenuActionClass
-{
- InkActionClass parent_class;
-};
-
-GType ink_tool_menu_action_get_type( void );
-
-InkToolMenuAction* ink_tool_menu_action_new( const gchar *name,
- const gchar *label,
- const gchar *tooltip,
- const gchar *inkId,
- GtkIconSize size );
-
-G_END_DECLS
-
-#endif // INK_TOOL_MENU_ACTION_H
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index f4ffbbaf0..2de668561 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -191,7 +191,7 @@ static struct {
} const aux_toolboxes[] = {
{ "/tools/select", "select_toolbox", Inkscape::UI::Toolbar::SelectToolbar::create, nullptr, "SelectToolbar",
SP_VERB_INVALID, nullptr, nullptr},
- { "/tools/nodes", "node_toolbox", nullptr, Inkscape::UI::Toolbar::NodeToolbar::prep, "NodeToolbar",
+ { "/tools/nodes", "node_toolbox", Inkscape::UI::Toolbar::NodeToolbar::create, nullptr, "NodeToolbar",
SP_VERB_INVALID, nullptr, nullptr},
{ "/tools/tweak", "tweak_toolbox", Inkscape::UI::Toolbar::TweakToolbar::create, nullptr, "TweakToolbar",
SP_VERB_CONTEXT_TWEAK_PREFS, "/tools/tweak", N_("Color/opacity used for color tweaking")},