diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-01-03 00:07:54 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-01-03 00:07:54 +0000 |
| commit | c0ae0bee37a04c6e79dbe0de00f173c80917ffbe (patch) | |
| tree | 175bfaf44d18be4d17ebd3803cb0ec7314c2e37e /src/ui/widget | |
| parent | add buttons for node adding at extrema (diff) | |
| download | inkscape-c0ae0bee37a04c6e79dbe0de00f173c80917ffbe.tar.gz inkscape-c0ae0bee37a04c6e79dbe0de00f173c80917ffbe.zip | |
Cleanup GSEAL issues and deprecated GtkTooltips
(bzr r10826)
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/attr-widget.h | 3 | ||||
| -rw-r--r-- | src/ui/widget/button.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/button.h | 4 | ||||
| -rw-r--r-- | src/ui/widget/color-picker.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/color-picker.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/labelled.cpp | 5 | ||||
| -rw-r--r-- | src/ui/widget/labelled.h | 1 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/panel.h | 3 | ||||
| -rw-r--r-- | src/ui/widget/preferences-widget.cpp | 4 | ||||
| -rw-r--r-- | src/ui/widget/preferences-widget.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/random.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/registered-widget.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/registered-widget.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/rendering-options.cpp | 4 | ||||
| -rw-r--r-- | src/ui/widget/rendering-options.h | 3 | ||||
| -rw-r--r-- | src/ui/widget/spin-slider.cpp | 4 | ||||
| -rw-r--r-- | src/ui/widget/tolerance-slider.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/tolerance-slider.h | 1 |
20 files changed, 19 insertions, 45 deletions
diff --git a/src/ui/widget/attr-widget.h b/src/ui/widget/attr-widget.h index 94906c8e8..e874f4d52 100644 --- a/src/ui/widget/attr-widget.h +++ b/src/ui/widget/attr-widget.h @@ -156,9 +156,6 @@ protected: return 0; } -protected: - Gtk::Tooltips _tt; - private: const SPAttributeEnum _attr; DefaultValueHolder _default; diff --git a/src/ui/widget/button.cpp b/src/ui/widget/button.cpp index ae1dbbe98..1ba531ddf 100644 --- a/src/ui/widget/button.cpp +++ b/src/ui/widget/button.cpp @@ -18,19 +18,17 @@ namespace UI { namespace Widget { Button::Button(Glib::ustring const &label, Glib::ustring const &tooltip) - : _tooltips() { set_use_underline (true); set_label (label); - _tooltips.set_tip(*this, tooltip); + set_tooltip_text(tooltip); } CheckButton::CheckButton(Glib::ustring const &label, Glib::ustring const &tooltip) - : _tooltips() { set_use_underline (true); set_label (label); - _tooltips.set_tip(*this, tooltip); + set_tooltip_text(tooltip); } } // namespace Widget diff --git a/src/ui/widget/button.h b/src/ui/widget/button.h index 1ed88a2da..8dc9d73cb 100644 --- a/src/ui/widget/button.h +++ b/src/ui/widget/button.h @@ -26,8 +26,6 @@ class Button : public Gtk::Button public: Button(); Button(Glib::ustring const &label, Glib::ustring const &tooltip); -protected: - Gtk::Tooltips _tooltips; }; /** @@ -38,8 +36,6 @@ class CheckButton : public Gtk::CheckButton public: CheckButton(); CheckButton(Glib::ustring const &label, Glib::ustring const &tooltip); -protected: - Gtk::Tooltips _tooltips; }; } // namespace Widget diff --git a/src/ui/widget/color-picker.cpp b/src/ui/widget/color-picker.cpp index f32e25885..429aba6e8 100644 --- a/src/ui/widget/color-picker.cpp +++ b/src/ui/widget/color-picker.cpp @@ -36,7 +36,7 @@ ColorPicker::ColorPicker (const Glib::ustring& title, const Glib::ustring& tip, set_relief (Gtk::RELIEF_NONE); _preview.show(); add (_preview); - _tt.set_tip (*this, tip); + set_tooltip_text (tip); } ColorPicker::~ColorPicker() diff --git a/src/ui/widget/color-picker.h b/src/ui/widget/color-picker.h index 346ce5121..7559dcae0 100644 --- a/src/ui/widget/color-picker.h +++ b/src/ui/widget/color-picker.h @@ -56,7 +56,6 @@ protected: virtual void on_changed (guint32); ColorPreview _preview; - Gtk::Tooltips _tt; /*const*/ Glib::ustring _title; sigc::signal<void,guint32> _changed_signal; @@ -69,7 +68,6 @@ protected: //Inkscape::UI::Dialog::Dialog _colorSelectorDialog; Gtk::Dialog _colorSelectorDialog; SPColorSelector *_colorSelector; - }; }//namespace Widget diff --git a/src/ui/widget/labelled.cpp b/src/ui/widget/labelled.cpp index 0a13d6347..ae3a4c744 100644 --- a/src/ui/widget/labelled.cpp +++ b/src/ui/widget/labelled.cpp @@ -28,8 +28,7 @@ Labelled::Labelled(Glib::ustring const &label, Glib::ustring const &tooltip, bool mnemonic) : _widget(widget), _label(new Gtk::Label(label, 1.0, 0.5, mnemonic)), - _suffix(new Gtk::Label(suffix, 0.0, 0.5)), - _tooltips() + _suffix(new Gtk::Label(suffix, 0.0, 0.5)) { g_assert(g_utf8_validate(icon.c_str(), -1, NULL)); if (icon != "") { @@ -41,7 +40,7 @@ Labelled::Labelled(Glib::ustring const &label, Glib::ustring const &tooltip, if (mnemonic) { _label->set_mnemonic_widget(*_widget); } - _tooltips.set_tip(*_widget, tooltip); + widget->set_tooltip_text(tooltip); } diff --git a/src/ui/widget/labelled.h b/src/ui/widget/labelled.h index 8c2ec8939..0232129bd 100644 --- a/src/ui/widget/labelled.h +++ b/src/ui/widget/labelled.h @@ -59,7 +59,6 @@ protected: Gtk::Label *_label; Gtk::Label *_suffix; Gtk::Widget *_icon; - Gtk::Tooltips _tooltips; }; } // namespace Widget diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 0b18f1039..e3dbddd43 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -369,7 +369,7 @@ PageSizer::PageSizer(Registry & _wr) _fitPageButtonAlign.add(_fitPageButton); _fitPageButton.set_use_underline(); _fitPageButton.set_label(_("_Resize page to drawing or selection")); - _tips.set_tip(_fitPageButton, _("Resize the page to fit the current selection, or the entire drawing if there is no selection")); + _fitPageButton.set_tooltip_text(_("Resize the page to fit the current selection, or the entire drawing if there is no selection")); } diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h index 7f165266c..61fb425bc 100644 --- a/src/ui/widget/page-sizer.h +++ b/src/ui/widget/page-sizer.h @@ -162,8 +162,6 @@ protected: void fire_fit_canvas_to_selection_or_drawing(); - Gtk::Tooltips _tips; - //### The Paper Size selection list Gtk::HBox _paperSizeListBox; Gtk::Label _paperSizeListLabel; diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h index d51d942dd..1ed693037 100644 --- a/src/ui/widget/panel.h +++ b/src/ui/widget/panel.h @@ -94,9 +94,6 @@ protected: void _addResponseButton(Gtk::Button *button, int response_id); Inkscape::Selection *_getSelection(); - /** Tooltips object for all descendants to use */ - Gtk::Tooltips _tooltips; - Glib::ustring const _prefs_path; bool _menu_desired; diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index 001d2277d..fd68247cf 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -110,7 +110,7 @@ void DialogPage::add_line(bool indent, Glib::ustring const &label, Gtk::Widget & if (tip != "") { - _tooltips.set_tip (widget, tip); + widget.set_tooltip_text (tip); } } @@ -131,7 +131,7 @@ void DialogPage::add_group_header(Glib::ustring name) void DialogPage::set_tip(Gtk::Widget& widget, Glib::ustring const &tip) { - _tooltips.set_tip (widget, tip); + widget.set_tooltip_text (tip); } void PrefCheckButton::init(Glib::ustring const &label, Glib::ustring const &prefs_path, diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h index ea5c377a3..b6542e574 100644 --- a/src/ui/widget/preferences-widget.h +++ b/src/ui/widget/preferences-widget.h @@ -254,8 +254,6 @@ public: void add_line(bool indent, Glib::ustring const &label, Gtk::Widget& widget, Glib::ustring const &suffix, Glib::ustring const &tip, bool expand = true); void add_group_header(Glib::ustring name); void set_tip(Gtk::Widget &widget, Glib::ustring const &tip); -protected: - Gtk::Tooltips _tooltips; }; diff --git a/src/ui/widget/random.cpp b/src/ui/widget/random.cpp index 03cea7d5a..e8c84a780 100644 --- a/src/ui/widget/random.cpp +++ b/src/ui/widget/random.cpp @@ -77,7 +77,7 @@ void Random::addReseedButton() pButton->add(*pIcon); pButton->show(); pButton->signal_clicked().connect(sigc::mem_fun(*this, &Random::onReseedButtonClick)); - _tooltips.set_tip(*pButton, _("Reseed the random number generator; this creates a different sequence of random numbers.")); + pButton->set_tooltip_text(_("Reseed the random number generator; this creates a different sequence of random numbers.")); pack_start(*pButton, Gtk::PACK_SHRINK, 0); } diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index f923a7c9c..747de4681 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -56,7 +56,7 @@ RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const setProgrammatically = false; - _tt.set_tip (*this, tip); + set_tooltip_text (tip); Gtk::Label *l = new Gtk::Label (label); l->set_use_underline (true); add (*manage (l)); @@ -434,8 +434,8 @@ RegisteredRadioButtonPair::RegisteredRadioButtonPair (const Glib::ustring& label _rb2 = manage (new Gtk::RadioButton (group, label2, true)); add (*_rb2); _rb2->set_active(); - _tt.set_tip (*_rb1, tip1); - _tt.set_tip (*_rb2, tip2); + _rb1->set_tooltip_text(tip1); + _rb2->set_tooltip_text(tip2); _changed_connection = _rb1->signal_toggled().connect (sigc::mem_fun (*this, &RegisteredRadioButtonPair::on_value_changed)); } diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h index df2377464..67cb8549c 100644 --- a/src/ui/widget/registered-widget.h +++ b/src/ui/widget/registered-widget.h @@ -154,7 +154,6 @@ public: // if a callback checks it, it must reset it back to false protected: - Gtk::Tooltips _tt; sigc::connection _toggled_connection; void on_toggled(); }; @@ -286,7 +285,6 @@ public: // if a callback checks it, it must reset it back to false protected: Gtk::RadioButton *_rb1, *_rb2; - Gtk::Tooltips _tt; sigc::connection _changed_connection; void on_value_changed(); }; diff --git a/src/ui/widget/rendering-options.cpp b/src/ui/widget/rendering-options.cpp index bbc0a0039..a8c321d7d 100644 --- a/src/ui/widget/rendering-options.cpp +++ b/src/ui/widget/rendering-options.cpp @@ -40,12 +40,12 @@ RenderingOptions::RenderingOptions () : false) { // set up tooltips - _tt.set_tip (_radio_vector, Glib::ustring( + _radio_vector.set_tooltip_text (Glib::ustring( _("Render using Cairo vector operations. " "The resulting image is usually smaller in file " "size and can be arbitrarily scaled, but some " "filter effects will not be correctly rendered."))); - _tt.set_tip (_radio_bitmap, Glib::ustring( + _radio_bitmap.set_tooltip_text (Glib::ustring( _("Render everything as bitmap. The resulting image " "is usually larger in file size and cannot be " "arbitrarily scaled without quality loss, but all " diff --git a/src/ui/widget/rendering-options.h b/src/ui/widget/rendering-options.h index 241683fe6..b29c4bfae 100644 --- a/src/ui/widget/rendering-options.h +++ b/src/ui/widget/rendering-options.h @@ -43,9 +43,6 @@ protected: Gtk::Frame _frame_bitmap; Scalar _dpi; // DPI of bitmap to render - // Tooltip manager - Gtk::Tooltips _tt; - // callback for bitmap button void _toggled(); }; diff --git a/src/ui/widget/spin-slider.cpp b/src/ui/widget/spin-slider.cpp index d159ecc15..9490ac8d9 100644 --- a/src/ui/widget/spin-slider.cpp +++ b/src/ui/widget/spin-slider.cpp @@ -27,8 +27,8 @@ SpinSlider::SpinSlider(double value, double lower, double upper, double step_inc pack_start(_scale); pack_start(_spin, false, false); if (tip_text){ - _tt.set_tip(_scale, tip_text); - _tt.set_tip(_spin, tip_text); + _scale.set_tooltip_text(tip_text); + _spin.set_tooltip_text(tip_text); } _scale.set_draw_value(false); diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp index aa749fb39..5846a0c64 100644 --- a/src/ui/widget/tolerance-slider.cpp +++ b/src/ui/widget/tolerance-slider.cpp @@ -79,7 +79,7 @@ void ToleranceSlider::init (const Glib::ustring& label1, const Glib::ustring& la _hscale->set_size_request (100, -1); _old_val = 10; _hscale->set_value (_old_val); - _tt.set_tip (*_hscale, tip1); + _hscale->set_tooltip_text (tip1); _hbox->add (*_hscale); @@ -91,8 +91,8 @@ void ToleranceSlider::init (const Glib::ustring& label1, const Glib::ustring& la _radio_button_group = _button1->get_group(); _button2 = manage (new Gtk::RadioButton); _button2->set_group(_radio_button_group); - _tt.set_tip (*_button1, tip2); - _tt.set_tip (*_button2, tip3); + _button1->set_tooltip_text (tip2); + _button2->set_tooltip_text (tip3); _button1->add (*theLabel3); _button1->set_alignment (0.0, 0.5); _button2->add (*theLabel2); diff --git a/src/ui/widget/tolerance-slider.h b/src/ui/widget/tolerance-slider.h index 6865ec769..59e63bd25 100644 --- a/src/ui/widget/tolerance-slider.h +++ b/src/ui/widget/tolerance-slider.h @@ -59,7 +59,6 @@ protected: Gtk::RadioButtonGroup _radio_button_group; Gtk::RadioButton *_button1; Gtk::RadioButton *_button2; - Gtk::Tooltips _tt; Registry *_wr; Glib::ustring _key; sigc::connection _scale_changed_connection; |
