summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2011-06-12 15:29:03 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2011-06-12 15:29:03 +0000
commit51a9217db249738eb584d8884f75f3bd48cf38a5 (patch)
tree8a249f5fdc7f6a2a4c39c73f1fcc1555742e1059 /src/widgets/toolbox.cpp
parentcmake: (diff)
parentReplace use of deprecated GtkTooltips API (diff)
downloadinkscape-51a9217db249738eb584d8884f75f3bd48cf38a5.tar.gz
inkscape-51a9217db249738eb584d8884f75f3bd48cf38a5.zip
Replace deprecated GtkTooltips
Fixed bugs: - https://launchpad.net/bugs/793086 (bzr r10277)
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 9c3a8346e..7f1548df4 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -555,11 +555,11 @@ static void update_commands_toolbox(SPDesktop *desktop, SPEventContext *eventcon
static GtkWidget * sp_toolbox_button_new_from_verb_with_doubleclick( GtkWidget *t, Inkscape::IconSize size, SPButtonType type,
Inkscape::Verb *verb, Inkscape::Verb *doubleclick_verb,
- Inkscape::UI::View::View *view, GtkTooltips *tt);
+ Inkscape::UI::View::View *view);
class VerbAction : public Gtk::Action {
public:
- static Glib::RefPtr<VerbAction> create(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view, GtkTooltips *tooltips);
+ static Glib::RefPtr<VerbAction> create(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view);
virtual ~VerbAction();
virtual void set_active(bool active = true);
@@ -577,31 +577,29 @@ private:
Inkscape::Verb* verb;
Inkscape::Verb* verb2;
Inkscape::UI::View::View *view;
- GtkTooltips *tooltips;
bool active;
- VerbAction(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view, GtkTooltips *tooltips);
+ VerbAction(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view);
};
-Glib::RefPtr<VerbAction> VerbAction::create(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view, GtkTooltips *tooltips)
+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);
if ( action ) {
//SPAction* action2 = verb2 ? verb2->get_action(view) : 0;
- result = Glib::RefPtr<VerbAction>(new VerbAction(verb, verb2, view, tooltips));
+ result = Glib::RefPtr<VerbAction>(new VerbAction(verb, verb2, view));
}
return result;
}
-VerbAction::VerbAction(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view, GtkTooltips *tooltips) :
+VerbAction::VerbAction(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view) :
Gtk::Action(Glib::ustring(verb->get_id()), Gtk::StockID(verb->get_image()), Glib::ustring(_(verb->get_name())), Glib::ustring(_(verb->get_tip()))),
verb(verb),
verb2(verb2),
view(view),
- tooltips(tooltips),
active(false)
{
}
@@ -631,8 +629,7 @@ Gtk::Widget* VerbAction::create_tool_item_vfunc()
SP_BUTTON_TYPE_TOGGLE,
verb,
verb2,
- view,
- tooltips );
+ view );
if ( active ) {
sp_button_toggle_set_down( SP_BUTTON(button), active);
}
@@ -815,7 +812,7 @@ static void delete_prefspusher(GtkObject * /*obj*/, PrefPusher *watcher )
GtkWidget * sp_toolbox_button_new_from_verb_with_doubleclick(GtkWidget *t, Inkscape::IconSize size, SPButtonType type,
Inkscape::Verb *verb, Inkscape::Verb *doubleclick_verb,
- Inkscape::UI::View::View *view, GtkTooltips *tt)
+ Inkscape::UI::View::View *view)
{
SPAction *action = verb->get_action(view);
if (!action) {
@@ -831,7 +828,7 @@ GtkWidget * sp_toolbox_button_new_from_verb_with_doubleclick(GtkWidget *t, Inksc
/* fixme: Handle sensitive/unsensitive */
/* fixme: Implement sp_button_new_from_action */
- GtkWidget *b = sp_button_new(size, type, action, doubleclick_action, tt);
+ GtkWidget *b = sp_button_new(size, type, action, doubleclick_action);
gtk_widget_show(b);
@@ -966,9 +963,8 @@ static Glib::RefPtr<Gtk::ActionGroup> create_or_fetch_actions( SPDesktop* deskto
}
if ( !mainActions->get_action("ToolZoom") ) {
- GtkTooltips *tt = gtk_tooltips_new();
for ( guint i = 0; i < G_N_ELEMENTS(tools) && tools[i].type_name; i++ ) {
- Glib::RefPtr<VerbAction> va = VerbAction::create(Inkscape::Verb::get(tools[i].verb), Inkscape::Verb::get(tools[i].doubleclick_verb), view, tt);
+ Glib::RefPtr<VerbAction> va = VerbAction::create(Inkscape::Verb::get(tools[i].verb), Inkscape::Verb::get(tools[i].doubleclick_verb), view);
if ( va ) {
mainActions->add(va);
if ( i == 0 ) {