summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/button.cpp3
-rw-r--r--src/widgets/desktop-widget.cpp6
-rw-r--r--src/widgets/gradient-selector.cpp3
-rw-r--r--src/widgets/lpe-toolbar.cpp4
-rw-r--r--src/widgets/select-toolbar.cpp4
-rw-r--r--src/widgets/toolbox.cpp14
6 files changed, 22 insertions, 12 deletions
diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp
index 467f0d70e..a1bd9b792 100644
--- a/src/widgets/button.cpp
+++ b/src/widgets/button.cpp
@@ -20,6 +20,7 @@
#include "icon.h"
#include "shortcuts.h"
#include "interface.h"
+#include "helper/action-context.h"
#include <gdk/gdkkeysyms.h>
@@ -309,7 +310,7 @@ sp_button_new_from_data( Inkscape::IconSize size,
const gchar *tip )
{
GtkWidget *button;
- SPAction *action=sp_action_new(view, name, name, tip, name, 0);
+ SPAction *action=sp_action_new(Inkscape::ActionContext(view), name, name, tip, name, 0);
button = sp_button_new (size, type, action, NULL);
g_object_unref(action);
return button;
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index f1e4458ff..fbef9bbce 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -41,6 +41,8 @@
#include "ege-select-one-action.h"
#include <extension/db.h>
#include "file.h"
+#include "helper/action.h"
+#include "helper/action-context.h"
#include "helper/units.h"
#include "helper/unit-tracker.h"
#include "inkscape-private.h"
@@ -485,7 +487,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
gchar const* tip = "";
Inkscape::Verb* verb = Inkscape::Verb::get( SP_VERB_VIEW_CMS_TOGGLE );
if ( verb ) {
- SPAction *act = verb->get_action( dtw->viewwidget.view );
+ SPAction *act = verb->get_action( Inkscape::ActionContext( dtw->viewwidget.view ) );
if ( act && act->tip ) {
tip = act->tip;
}
@@ -1060,7 +1062,7 @@ void cms_adjust_set_sensitive( SPDesktopWidget *dtw, bool enabled )
{
Inkscape::Verb* verb = Inkscape::Verb::get( SP_VERB_VIEW_CMS_TOGGLE );
if ( verb ) {
- SPAction *act = verb->get_action( dtw->viewwidget.view );
+ SPAction *act = verb->get_action( Inkscape::ActionContext( dtw->viewwidget.view ) );
if ( act ) {
sp_action_set_sensitive( act, enabled );
}
diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp
index 7a7f0d8ff..5ac994509 100644
--- a/src/widgets/gradient-selector.cpp
+++ b/src/widgets/gradient-selector.cpp
@@ -26,6 +26,7 @@
#include "inkscape.h"
#include "verbs.h"
#include "helper/action.h"
+#include "helper/action-context.h"
#include "preferences.h"
#include <glibmm/i18n.h>
@@ -535,7 +536,7 @@ sp_gradient_selector_edit_vector_clicked (GtkWidget */*w*/, SPGradientSelector *
// Invoke the gradient tool
Inkscape::Verb *verb = Inkscape::Verb::get( SP_VERB_CONTEXT_GRADIENT );
if ( verb ) {
- SPAction *action = verb->get_action( ( Inkscape::UI::View::View * ) SP_ACTIVE_DESKTOP);
+ SPAction *action = verb->get_action( Inkscape::ActionContext( ( Inkscape::UI::View::View * ) SP_ACTIVE_DESKTOP ) );
if ( action ) {
sp_action_perform( action, NULL );
}
diff --git a/src/widgets/lpe-toolbar.cpp b/src/widgets/lpe-toolbar.cpp
index 8c481d2f1..65bb46e32 100644
--- a/src/widgets/lpe-toolbar.cpp
+++ b/src/widgets/lpe-toolbar.cpp
@@ -55,6 +55,8 @@
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
+#include "../helper/action.h"
+#include "../helper/action-context.h"
#include "../helper/unit-menu.h"
#include "../helper/units.h"
#include "../helper/unit-tracker.h"
@@ -286,7 +288,7 @@ static void lpetool_open_lpe_dialog(GtkToggleAction *act, gpointer data)
SPDesktop *desktop = static_cast<SPDesktop *>(data);
if (tools_isactive(desktop, TOOLS_LPETOOL)) {
- sp_action_perform(Inkscape::Verb::get(SP_VERB_DIALOG_LIVE_PATH_EFFECT)->get_action(desktop), NULL);
+ sp_action_perform(Inkscape::Verb::get(SP_VERB_DIALOG_LIVE_PATH_EFFECT)->get_action(Inkscape::ActionContext(desktop)), NULL);
}
gtk_toggle_action_set_active(act, false);
}
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index 693fc870b..c0018751c 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -37,6 +37,8 @@
#include "sp-namedview.h"
#include "toolbox.h"
#include <glibmm/i18n.h>
+#include "helper/action.h"
+#include "helper/action-context.h"
#include "helper/unit-menu.h"
#include "helper/units.h"
#include "inkscape.h"
@@ -413,7 +415,7 @@ static GtkAction* create_action_for_verb( Inkscape::Verb* verb, Inkscape::UI::Vi
{
GtkAction* act = 0;
- SPAction* targetAction = verb->get_action(view);
+ SPAction* targetAction = verb->get_action(Inkscape::ActionContext(view));
InkAction* inky = ink_action_new( verb->get_id(), verb->get_name(), verb->get_tip(), verb->get_image(), size );
act = GTK_ACTION(inky);
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 0fdf36d5f..ca593976f 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -47,6 +47,8 @@
#include "../ege-output-action.h"
#include "../ege-select-one-action.h"
#include "../graphlayout.h"
+#include "../helper/action.h"
+#include "../helper/action-context.h"
#include "../helper/unit-menu.h"
#include "../helper/units.h"
#include "../helper/unit-tracker.h"
@@ -591,9 +593,9 @@ private:
Glib::RefPtr<VerbAction> VerbAction::create(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view)
{
Glib::RefPtr<VerbAction> result;
- SPAction *action = verb->get_action(view);
+ SPAction *action = verb->get_action(Inkscape::ActionContext(view));
if ( action ) {
- //SPAction* action2 = verb2 ? verb2->get_action(view) : 0;
+ //SPAction* action2 = verb2 ? verb2->get_action(Inkscape::ActionContext(view)) : 0;
result = Glib::RefPtr<VerbAction>(new VerbAction(verb, verb2, view));
}
@@ -680,7 +682,7 @@ void VerbAction::set_active(bool active)
void VerbAction::on_activate()
{
if ( verb ) {
- SPAction *action = verb->get_action(view);
+ SPAction *action = verb->get_action(Inkscape::ActionContext(view));
if ( action ) {
sp_action_perform(action, 0);
}
@@ -770,14 +772,14 @@ GtkToolItem * sp_toolbox_button_item_new_from_verb_with_doubleclick(GtkWidget *t
Inkscape::Verb *verb, Inkscape::Verb *doubleclick_verb,
Inkscape::UI::View::View *view)
{
- SPAction *action = verb->get_action(view);
+ SPAction *action = verb->get_action(Inkscape::ActionContext(view));
if (!action) {
return NULL;
}
SPAction *doubleclick_action;
if (doubleclick_verb) {
- doubleclick_action = doubleclick_verb->get_action(view);
+ doubleclick_action = doubleclick_verb->get_action(Inkscape::ActionContext(view));
} else {
doubleclick_action = NULL;
}
@@ -822,7 +824,7 @@ static GtkAction* create_action_for_verb( Inkscape::Verb* verb, Inkscape::UI::Vi
{
GtkAction* act = 0;
- SPAction* targetAction = verb->get_action(view);
+ SPAction* targetAction = verb->get_action(Inkscape::ActionContext(view));
InkAction* inky = ink_action_new( verb->get_id(), _(verb->get_name()), verb->get_tip(), verb->get_image(), size );
act = GTK_ACTION(inky);
gtk_action_set_sensitive( act, targetAction->sensitive );