diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2018-07-29 13:56:29 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2018-07-29 13:56:29 +0000 |
| commit | aa6dde633662cf5fecea6425b7367eb2b93d53fb (patch) | |
| tree | 947bc444bd17b5ff424e3efcaa17f788e4b1b880 /src/widgets | |
| parent | change header string (diff) | |
| download | inkscape-aa6dde633662cf5fecea6425b7367eb2b93d53fb.tar.gz inkscape-aa6dde633662cf5fecea6425b7367eb2b93d53fb.zip | |
DropperToolbar: GtkAction migration
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/ege-output-action.h | 4 | ||||
| -rw-r--r-- | src/widgets/ink-toggle-action.cpp | 14 | ||||
| -rw-r--r-- | src/widgets/toolbox.cpp | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/src/widgets/ege-output-action.h b/src/widgets/ege-output-action.h index 0f4e21805..f61493db7 100644 --- a/src/widgets/ege-output-action.h +++ b/src/widgets/ege-output-action.h @@ -93,6 +93,10 @@ GType ege_output_action_get_type( void ); * @param label Display label for the action. * @param tooltip Tooltip for the action. * @param stock_id Icon id to use. + * + * @deprecated GtkActions are deprecated. Use a GtkLabel inside a GtkToolItem instead. + * The Inkscape::UI::Toolbar::Toolbar base class provides an add_label function + * to simplify this. */ EgeOutputAction* ege_output_action_new( const gchar *name, const gchar *label, diff --git a/src/widgets/ink-toggle-action.cpp b/src/widgets/ink-toggle-action.cpp index 77dc39c3d..7a29b95d5 100644 --- a/src/widgets/ink-toggle-action.cpp +++ b/src/widgets/ink-toggle-action.cpp @@ -77,6 +77,20 @@ static void ink_toggle_action_finalize( GObject* obj ) } +/** + * \brief Create a new toggle action + * + * \param[in] name The name of the Action + * \param[in] label The label text to display on the Action's tool item + * \param[in] tooltip The tooltip text for the Action's tool item + * \param[in] inkId + * \param[in] size The size of the tool item to display + * + * \detail The name is used by the UI Manager to look up the action when specified in a UI XML + * file. + * + * \deprecated GtkActions are deprecated. Use a Gtk::ToggleToolButton instead. + */ InkToggleAction* ink_toggle_action_new( const gchar *name, const gchar *label, const gchar *tooltip, diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 1b051f6cd..07ff69dc9 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -219,7 +219,7 @@ static struct { // If you change TextToolbar here, change it also in desktop-widget.cpp { "/tools/text", "text_toolbox", nullptr, sp_text_toolbox_prep, "TextToolbar", SP_VERB_INVALID, nullptr, nullptr}, - { "/tools/dropper", "dropper_toolbox", nullptr, sp_dropper_toolbox_prep, "DropperToolbar", + { "/tools/dropper", "dropper_toolbox", Inkscape::UI::Toolbar::DropperToolbar::create, nullptr, "DropperToolbar", SP_VERB_INVALID, nullptr, nullptr}, { "/tools/connector", "connector_toolbox", nullptr, sp_connector_toolbox_prep, "ConnectorToolbar", SP_VERB_INVALID, nullptr, nullptr}, |
