diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-01-03 01:11:07 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-01-03 01:11:07 +0000 |
| commit | 1c82ead814a66075e98fffdf152652452b4dda34 (patch) | |
| tree | 3869812f527dc30a4ece6d43f8fc1feed7cd152d /src | |
| parent | Cleanup GSEAL issues and deprecated GtkTooltips (diff) | |
| download | inkscape-1c82ead814a66075e98fffdf152652452b4dda34.tar.gz inkscape-1c82ead814a66075e98fffdf152652452b4dda34.zip | |
More deprecated GtkTooltips
(bzr r10827)
Diffstat (limited to 'src')
34 files changed, 123 insertions, 239 deletions
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp index 755cc92ad..373d1bd97 100644 --- a/src/extension/param/enum.cpp +++ b/src/extension/param/enum.cpp @@ -19,10 +19,7 @@ #endif -#include <gtkmm/box.h> -#include <gtkmm/comboboxtext.h> -#include <gtkmm/tooltips.h> -#include <gtkmm/label.h> +#include <gtkmm.h> #include <glibmm/i18n.h> #include "xml/node.h" diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp index a9fcbfd6c..92f36c813 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -19,12 +19,7 @@ #endif -#include <gtkmm/box.h> -#include <gtkmm/comboboxtext.h> -#include <gtkmm/radiobutton.h> -#include <gtkmm/radiobuttongroup.h> -#include <gtkmm/tooltips.h> -#include <gtkmm/label.h> +#include <gtkmm.h> #include <glibmm/i18n.h> #include "xml/node.h" diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index 708013b5d..2647cd569 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -60,7 +60,6 @@ public : const Glib::ustring &tiptext, guint row, guint column, Gtk::Table &parent, - Gtk::Tooltips &tooltips, AlignAndDistribute &dialog): _dialog(dialog), _id(id), @@ -75,7 +74,7 @@ public : pButton->signal_clicked() .connect(sigc::mem_fun(*this, &Action::on_button_click)); - tooltips.set_tip(*pButton, tiptext); + pButton->set_tooltip_text(tiptext); parent.attach(*pButton, column, column+1, row, row+1, Gtk::FILL, Gtk::FILL); } virtual ~Action(){} @@ -102,7 +101,7 @@ public : AlignAndDistribute &dialog, guint coeffIndex): Action(id, tiptext, row, column, - dialog.align_table(), dialog.tooltips(), dialog), + dialog.align_table(), dialog), _index(coeffIndex), _dialog(dialog) {} @@ -292,7 +291,7 @@ public : double kBegin, double kEnd ): Action(id, tiptext, row, column, - dialog.distribute_table(), dialog.tooltips(), dialog), + dialog.distribute_table(), dialog), _dialog(dialog), _onInterSpace(onInterSpace), _orientation(orientation), @@ -419,7 +418,7 @@ public : AlignAndDistribute &dialog, Geom::Dim2 orientation, bool distribute): Action(id, tiptext, 0, column, - dialog.nodes_table(), dialog.tooltips(), dialog), + dialog.nodes_table(), dialog), _orientation(orientation), _distribute(distribute) {} @@ -457,7 +456,7 @@ public: guint column, AlignAndDistribute &dialog) : Action(id, tiptext, row, column + 4, - dialog.removeOverlap_table(), dialog.tooltips(), dialog) + dialog.removeOverlap_table(), dialog) { dialog.removeOverlap_table().set_col_spacings(3); @@ -466,8 +465,7 @@ public: removeOverlapXGap.set_increments(1.0, 0); removeOverlapXGap.set_range(-1000.0, 1000.0); removeOverlapXGap.set_value(0); - dialog.tooltips().set_tip(removeOverlapXGap, - _("Minimum horizontal gap (in px units) between bounding boxes")); + removeOverlapXGap.set_tooltip_text(_("Minimum horizontal gap (in px units) between bounding boxes")); //TRANSLATORS: "H:" stands for horizontal gap removeOverlapXGapLabel.set_text_with_mnemonic(C_("Gap", "_H:")); removeOverlapXGapLabel.set_mnemonic_widget(removeOverlapXGap); @@ -477,8 +475,7 @@ public: removeOverlapYGap.set_increments(1.0, 0); removeOverlapYGap.set_range(-1000.0, 1000.0); removeOverlapYGap.set_value(0); - dialog.tooltips().set_tip(removeOverlapYGap, - _("Minimum vertical gap (in px units) between bounding boxes")); + removeOverlapYGap.set_tooltip_text(_("Minimum vertical gap (in px units) between bounding boxes")); /* TRANSLATORS: Vertical gap */ removeOverlapYGapLabel.set_text_with_mnemonic(C_("Gap", "_V:")); removeOverlapYGapLabel.set_mnemonic_widget(removeOverlapYGap); @@ -522,7 +519,7 @@ public: guint column, AlignAndDistribute &dialog) : Action(id, tiptext, row, column, - dialog.rearrange_table(), dialog.tooltips(), dialog) + dialog.rearrange_table(), dialog) {} private : @@ -559,7 +556,7 @@ public: guint column, AlignAndDistribute &dialog, SortOrder order = None) : Action(id, tiptext, row, column, - dialog.rearrange_table(), dialog.tooltips(), dialog), + dialog.rearrange_table(), dialog), sortOrder(order) {}; @@ -649,7 +646,7 @@ public : guint column, AlignAndDistribute &dialog): Action(id, tiptext, row, column, - dialog.rearrange_table(), dialog.tooltips(), dialog) + dialog.rearrange_table(), dialog) {} private : @@ -680,7 +677,7 @@ public : guint column, AlignAndDistribute &dialog): Action(id, tiptext, row, column, - dialog.rearrange_table(), dialog.tooltips(), dialog) + dialog.rearrange_table(), dialog) {} private : @@ -770,7 +767,7 @@ public : Gtk::Table &table, Geom::Dim2 orientation, bool distribute): Action(id, tiptext, row, column, - table, dialog.tooltips(), dialog), + table, dialog), _orientation(orientation), _distribute(distribute) {} diff --git a/src/ui/dialog/align-and-distribute.h b/src/ui/dialog/align-and-distribute.h index 88d934f87..4fdb448a9 100644 --- a/src/ui/dialog/align-and-distribute.h +++ b/src/ui/dialog/align-and-distribute.h @@ -20,7 +20,6 @@ #include <list> #include <gtkmm/frame.h> -#include <gtkmm/tooltips.h> #include <gtkmm/comboboxtext.h> #include <gtkmm/table.h> #include <gtkmm/buttonbox.h> @@ -55,7 +54,6 @@ public: Gtk::Table &rearrange_table(){return _rearrangeTable;} Gtk::Table &removeOverlap_table(){return _removeOverlapTable;} Gtk::Table &nodes_table(){return _nodesTable;} - Gtk::Tooltips &tooltips(){return _tooltips;} std::list<SPItem *>::iterator find_master(std::list <SPItem *> &list, bool horizontal); void setMode(bool nodeEdit); @@ -105,7 +103,6 @@ protected: Gtk::Label _selgrpLabel; Gtk::CheckButton _selgrp; Gtk::ComboBoxText _combo; - Gtk::Tooltips _tooltips; private: AlignAndDistribute(AlignAndDistribute const &d); diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp index f245cec37..ccab8c9e1 100644 --- a/src/ui/dialog/color-item.cpp +++ b/src/ui/dialog/color-item.cpp @@ -584,7 +584,7 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS Gtk::Widget* newBlot = btn; */ - tips.set_tip((*newBlot), def.descr); + newBlot->set_tooltip_text(def.descr); /* newBlot->signal_clicked().connect( sigc::mem_fun(*this, &ColorItem::buttonClicked) ); diff --git a/src/ui/dialog/color-item.h b/src/ui/dialog/color-item.h index d06082f2e..e6f5c7b76 100644 --- a/src/ui/dialog/color-item.h +++ b/src/ui/dialog/color-item.h @@ -13,7 +13,6 @@ #define SEEN_DIALOGS_COLOR_ITEM_H #include <boost/ptr_container/ptr_vector.hpp> -#include <gtkmm/tooltips.h> #include "widgets/ege-paint-def.h" #include "ui/previewable.h" @@ -93,7 +92,6 @@ private: void _linkTint( ColorItem& other, int percent ); void _linkTone( ColorItem& other, int percent, int grayLevel ); - Gtk::Tooltips tips; std::vector<Gtk::Widget*> _previews; bool _isFill; diff --git a/src/ui/dialog/dialog.h b/src/ui/dialog/dialog.h index 92de83187..0afd5ee72 100644 --- a/src/ui/dialog/dialog.h +++ b/src/ui/dialog/dialog.h @@ -13,8 +13,7 @@ #ifndef INKSCAPE_DIALOG_H #define INKSCAPE_DIALOG_H -#include <gtkmm/dialog.h> -#include <gtkmm/tooltips.h> +#include <gtkmm.h> #include "dock-behavior.h" #include "floating-behavior.h" diff --git a/src/ui/dialog/document-metadata.cpp b/src/ui/dialog/document-metadata.cpp index 2aebef997..2b2661bfe 100644 --- a/src/ui/dialog/document-metadata.cpp +++ b/src/ui/dialog/document-metadata.cpp @@ -67,7 +67,6 @@ DocumentMetadata::DocumentMetadata() _page_metadata1(1, 1), _page_metadata2(1, 1) { hide(); - _tt.enable(); _getContents()->set_spacing (4); _getContents()->pack_start(_notebook, true, true); @@ -161,7 +160,7 @@ DocumentMetadata::build_metadata() int row = 1; for (entity = rdf_work_entities; entity && entity->name; entity++, row++) { if ( entity->editable == RDF_EDIT_GENERIC ) { - EntityEntry *w = EntityEntry::create (entity, _tt, _wr); + EntityEntry *w = EntityEntry::create (entity, _wr); _rdflist.push_back (w); Gtk::HBox *space = manage (new Gtk::HBox); space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); @@ -180,7 +179,7 @@ DocumentMetadata::build_metadata() _page_metadata2.table().attach (*llabel, 0,3, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0); /* add license selector pull-down and URI */ ++row; - _licensor.init (_tt, _wr); + _licensor.init (_wr); Gtk::HBox *space = manage (new Gtk::HBox); space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); _page_metadata2.table().attach (*space, 0,1, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0); diff --git a/src/ui/dialog/document-metadata.h b/src/ui/dialog/document-metadata.h index 8194b9920..e9e1789af 100644 --- a/src/ui/dialog/document-metadata.h +++ b/src/ui/dialog/document-metadata.h @@ -52,7 +52,6 @@ protected: void _handleActivateDesktop(Inkscape::Application *application, SPDesktop *desktop); void _handleDeactivateDesktop(Inkscape::Application *application, SPDesktop *desktop); - Gtk::Tooltips _tt; Gtk::Notebook _notebook; UI::Widget::NotebookPage _page_metadata1; diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 3c70674fd..8a0808bd8 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -19,15 +19,8 @@ #endif #include <gtk/gtk.h> -#include <gtkmm/cellrenderertext.h> -#include <gtkmm/colorbutton.h> -#include <gtkmm/messagedialog.h> -#include <gtkmm/paned.h> -#include <gtkmm/scale.h> -#include <gtkmm/scrolledwindow.h> +#include <gtkmm.h> #include "ui/widget/spinbutton.h" -#include <gtkmm/stock.h> -#include <gtkmm/tooltips.h> #include <glibmm/i18n.h> #include "desktop.h" diff --git a/src/ui/dialog/filter-effects-dialog.h b/src/ui/dialog/filter-effects-dialog.h index 61bb93415..22c765631 100644 --- a/src/ui/dialog/filter-effects-dialog.h +++ b/src/ui/dialog/filter-effects-dialog.h @@ -15,18 +15,7 @@ #include <memory> -#include <gtkmm/adjustment.h> -#include <gtkmm/alignment.h> -#include <gtkmm/box.h> -#include <gtkmm/buttonbox.h> -#include <gtkmm/comboboxtext.h> -#include <gtkmm/drawingarea.h> -#include <gtkmm/frame.h> -#include <gtkmm/liststore.h> -#include <gtkmm/menu.h> -#include <gtkmm/notebook.h> -#include <gtkmm/sizegroup.h> -#include <gtkmm/treeview.h> +#include <gtkmm.h> #include "attributes.h" #include "ui/widget/panel.h" diff --git a/src/ui/dialog/tile.cpp b/src/ui/dialog/tile.cpp index 9d1e314f7..50b63f701 100644 --- a/src/ui/dialog/tile.cpp +++ b/src/ui/dialog/tile.cpp @@ -668,7 +668,7 @@ TileDialog::TileDialog() NoOfRowsSpinner.set_range(1.0, 10000.0); NoOfRowsSpinner.set_value(PerCol); NoOfRowsSpinner.signal_changed().connect(sigc::mem_fun(*this, &TileDialog::on_col_spinbutton_changed)); - tips.set_tip(NoOfRowsSpinner, _("Number of rows")); + NoOfRowsSpinner.set_tooltip_text(_("Number of rows")); NoOfRowsBox.pack_start(NoOfRowsSpinner, false, false, MARGIN); gtk_size_group_add_widget(_col1, (GtkWidget *) NoOfRowsBox.gobj()); @@ -683,7 +683,7 @@ TileDialog::TileDialog() NoOfRowsBox.pack_start(RowHeightButton, false, false, MARGIN); - tips.set_tip(RowHeightButton, _("If not set, each row has the height of the tallest object in it")); + RowHeightButton.set_tooltip_text(_("If not set, each row has the height of the tallest object in it")); RowHeightButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::on_RowSize_checkbutton_changed)); { @@ -740,7 +740,7 @@ TileDialog::TileDialog() NoOfColsSpinner.set_range(1.0, 10000.0); NoOfColsSpinner.set_value(PerRow); NoOfColsSpinner.signal_changed().connect(sigc::mem_fun(*this, &TileDialog::on_row_spinbutton_changed)); - tips.set_tip(NoOfColsSpinner, _("Number of columns")); + NoOfColsSpinner.set_tooltip_text(_("Number of columns")); NoOfColsBox.pack_start(NoOfColsSpinner, false, false, MARGIN); gtk_size_group_add_widget(_col3, (GtkWidget *) NoOfColsBox.gobj()); @@ -754,7 +754,7 @@ TileDialog::TileDialog() ColumnWidthButton.set_active(AutoColSize); NoOfColsBox.pack_start(ColumnWidthButton, false, false, MARGIN); - tips.set_tip(ColumnWidthButton, _("If not set, each column has the width of the widest object in it")); + ColumnWidthButton.set_tooltip_text(_("If not set, each column has the width of the widest object in it")); ColumnWidthButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::on_ColSize_checkbutton_changed)); @@ -853,7 +853,7 @@ TileDialog::TileDialog() //## The OK button TileOkButton = addResponseButton(C_("Rows and columns dialog","_Arrange"), GTK_RESPONSE_APPLY); TileOkButton->set_use_underline(true); - tips.set_tip((*TileOkButton), _("Arrange selected objects")); + TileOkButton->set_tooltip_text(_("Arrange selected objects")); show_all_children(); } diff --git a/src/ui/dialog/tile.h b/src/ui/dialog/tile.h index fe77a9098..650239232 100644 --- a/src/ui/dialog/tile.h +++ b/src/ui/dialog/tile.h @@ -17,7 +17,6 @@ #include <gtkmm/box.h> #include <gtkmm/notebook.h> -#include <gtkmm/tooltips.h> #include <gtkmm/button.h> #include <gtkmm/spinbutton.h> #include <gtkmm/checkbutton.h> @@ -78,7 +77,6 @@ private: bool updating; Gtk::Notebook notebook; - Gtk::Tooltips tips; Gtk::VBox TileBox; Gtk::Button *TileOkButton; diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp index 597c9a217..920ff0d2c 100644 --- a/src/ui/dialog/tracedialog.cpp +++ b/src/ui/dialog/tracedialog.cpp @@ -85,7 +85,6 @@ class TraceDialogImpl : public TraceDialog //############ General items Gtk::HBox mainHBox; - Gtk::Tooltips tips; Gtk::Button *mainOkButton; Gtk::Button *mainCancelButton; @@ -408,16 +407,14 @@ TraceDialogImpl::TraceDialogImpl() : modeGroup = modeBrightnessRadioButton.get_group(); modeBrightnessRadioButton.set_use_underline(true); modeBrightnessBox.pack_start(modeBrightnessRadioButton, false, false, MARGIN); - tips.set_tip(modeBrightnessRadioButton, - _("Trace by a given brightness level")); + modeBrightnessRadioButton.set_tooltip_text(_("Trace by a given brightness level")); modeBrightnessSpinner.set_digits(3); modeBrightnessSpinner.set_increments(0.01, 0); modeBrightnessSpinner.set_range(0.0, 1.0); modeBrightnessSpinner.set_value(0.45); modeBrightnessBox.pack_end(modeBrightnessSpinner, false, false, MARGIN); - tips.set_tip(modeBrightnessSpinner, - _("Brightness cutoff for black/white")); + modeBrightnessSpinner.set_tooltip_text(_("Brightness cutoff for black/white")); modeBrightnessSpinnerLabel.set_label(_("_Threshold:")); modeBrightnessSpinnerLabel.set_use_underline(true); @@ -435,8 +432,7 @@ TraceDialogImpl::TraceDialogImpl() : modeCannyRadioButton.set_group(modeGroup); modeCannyRadioButton.set_use_underline(true); modeCannyBox.pack_start(modeCannyRadioButton, false, false, MARGIN); - tips.set_tip(modeCannyRadioButton, - _("Trace with optimal edge detection by J. Canny's algorithm")); + modeCannyRadioButton.set_tooltip_text(_("Trace with optimal edge detection by J. Canny's algorithm")); /* modeCannyBox.pack_start(modeCannySeparator); modeCannyLoSpinnerLabel.set_label(_("Low")); @@ -452,8 +448,7 @@ TraceDialogImpl::TraceDialogImpl() : modeCannyHiSpinner.set_range(0.0, 1.0); modeCannyHiSpinner.set_value(0.65); modeCannyBox.pack_end(modeCannyHiSpinner, false, false, MARGIN); - tips.set_tip(modeCannyHiSpinner, - _("Brightness cutoff for adjacent pixels (determines edge thickness)")); + modeCannyHiSpinner.set_tooltip_text(_("Brightness cutoff for adjacent pixels (determines edge thickness)")); modeCannyHiSpinnerLabel.set_label(_("T_hreshold:")); modeCannyHiSpinnerLabel.set_use_underline(true); @@ -471,16 +466,14 @@ TraceDialogImpl::TraceDialogImpl() : modeQuantRadioButton.set_group(modeGroup); modeQuantRadioButton.set_use_underline(true); modeQuantBox.pack_start(modeQuantRadioButton, false, false, MARGIN); - tips.set_tip(modeQuantRadioButton, - _("Trace along the boundaries of reduced colors")); + modeQuantRadioButton.set_tooltip_text(_("Trace along the boundaries of reduced colors")); modeQuantNrColorSpinner.set_digits(0); modeQuantNrColorSpinner.set_increments(1.0, 0); modeQuantNrColorSpinner.set_range(2.0, 64.0); modeQuantNrColorSpinner.set_value(8.0); modeQuantBox.pack_end(modeQuantNrColorSpinner, false, false, MARGIN); - tips.set_tip(modeQuantNrColorSpinner, - _("The number of reduced colors")); + modeQuantNrColorSpinner.set_tooltip_text(_("The number of reduced colors")); modeQuantNrColorLabel.set_label(_("_Colors:")); modeQuantNrColorLabel.set_mnemonic_widget(modeQuantNrColorSpinner); @@ -495,8 +488,7 @@ TraceDialogImpl::TraceDialogImpl() : modeInvertButton.set_use_underline(true); modeInvertBox.pack_start(modeInvertButton, false, false, MARGIN); modeBrightnessVBox.pack_start(modeInvertBox, false, false, MARGIN); - tips.set_tip(modeInvertButton, - _("Invert black and white regions")); + modeInvertButton.set_tooltip_text(_("Invert black and white regions")); modeBrightnessFrame.add(modeBrightnessVBox); modePageBox.pack_start(modeBrightnessFrame, false, false, 0); @@ -509,8 +501,7 @@ TraceDialogImpl::TraceDialogImpl() : modeMultiScanBrightnessRadioButton.set_group(modeGroup); modeMultiScanBrightnessRadioButton.set_use_underline(true); modeMultiScanHBox1.pack_start(modeMultiScanBrightnessRadioButton, false, false, MARGIN); - tips.set_tip(modeMultiScanBrightnessRadioButton, - _("Trace the given number of brightness levels")); + modeMultiScanBrightnessRadioButton.set_tooltip_text(_("Trace the given number of brightness levels")); modeMultiScanNrColorSpinner.set_digits(0); modeMultiScanNrColorSpinner.set_increments(1.0, 0); @@ -521,8 +512,7 @@ TraceDialogImpl::TraceDialogImpl() : modeMultiScanNrColorLabel.set_use_underline(true); modeMultiScanNrColorLabel.set_mnemonic_widget(modeMultiScanNrColorSpinner); modeMultiScanHBox1.pack_end(modeMultiScanNrColorLabel, false, false, MARGIN); - tips.set_tip(modeMultiScanNrColorSpinner, - _("The desired number of scans")); + modeMultiScanNrColorSpinner.set_tooltip_text(_("The desired number of scans")); modeMultiScanVBox.pack_start(modeMultiScanHBox1, false, false, MARGIN); @@ -530,8 +520,7 @@ TraceDialogImpl::TraceDialogImpl() : modeMultiScanColorRadioButton.set_group(modeGroup); modeMultiScanColorRadioButton.set_use_underline(true); modeMultiScanHBox2.pack_start(modeMultiScanColorRadioButton, false, false, MARGIN); - tips.set_tip(modeMultiScanColorRadioButton, - _("Trace the given number of reduced colors")); + modeMultiScanColorRadioButton.set_tooltip_text(_("Trace the given number of reduced colors")); modeMultiScanVBox.pack_start(modeMultiScanHBox2, false, false, MARGIN); @@ -539,8 +528,7 @@ TraceDialogImpl::TraceDialogImpl() : modeMultiScanMonoRadioButton.set_group(modeGroup); modeMultiScanMonoRadioButton.set_use_underline(true); modeMultiScanHBox3.pack_start(modeMultiScanMonoRadioButton, false, false, MARGIN); - tips.set_tip(modeMultiScanMonoRadioButton, - _("Same as Colors, but the result is converted to grayscale")); + modeMultiScanMonoRadioButton.set_tooltip_text(_("Same as Colors, but the result is converted to grayscale")); modeMultiScanVBox.pack_start(modeMultiScanHBox3, false, false, MARGIN); @@ -549,15 +537,14 @@ TraceDialogImpl::TraceDialogImpl() : modeMultiScanSmoothButton.set_use_underline(true); modeMultiScanSmoothButton.set_active(true); modeMultiScanHBox4.pack_start(modeMultiScanSmoothButton, false, false, MARGIN); - tips.set_tip(modeMultiScanSmoothButton, - _("Apply Gaussian blur to the bitmap before tracing")); + modeMultiScanSmoothButton.set_tooltip_text(_("Apply Gaussian blur to the bitmap before tracing")); // TRANSLATORS: "Stack" is a verb here modeMultiScanStackButton.set_label(_("Stac_k scans")); modeMultiScanStackButton.set_use_underline(true); modeMultiScanStackButton.set_active(true); modeMultiScanHBox4.pack_start(modeMultiScanStackButton, false, false, MARGIN); - tips.set_tip(modeMultiScanStackButton, _("Stack scans on top of one another (no gaps) instead of tiling (usually with gaps)")); + modeMultiScanStackButton.set_tooltip_text(_("Stack scans on top of one another (no gaps) instead of tiling (usually with gaps)")); modeMultiScanBackgroundButton.set_label(_("Remo_ve background")); @@ -565,8 +552,7 @@ TraceDialogImpl::TraceDialogImpl() : modeMultiScanBackgroundButton.set_active(false); modeMultiScanHBox4.pack_start(modeMultiScanBackgroundButton, false, false, MARGIN); // TRANSLATORS: "Layer" refers to one of the stacked paths in the multiscan - tips.set_tip(modeMultiScanBackgroundButton, - _("Remove bottom (background) layer when done")); + modeMultiScanBackgroundButton.set_tooltip_text(_("Remove bottom (background) layer when done")); modeMultiScanVBox.pack_start(modeMultiScanHBox4, false, false, MARGIN); @@ -587,16 +573,14 @@ TraceDialogImpl::TraceDialogImpl() : optionsSpecklesButton.set_label(_("Suppress _speckles")); optionsSpecklesButton.set_use_underline(true); - tips.set_tip(optionsSpecklesButton, - _("Ignore small spots (speckles) in the bitmap")); + optionsSpecklesButton.set_tooltip_text(_("Ignore small spots (speckles) in the bitmap")); optionsSpecklesButton.set_active(true); optionsSpecklesBox.pack_start(optionsSpecklesButton, false, false, MARGIN); optionsSpecklesSizeSpinner.set_digits(0); optionsSpecklesSizeSpinner.set_increments(1, 0); optionsSpecklesSizeSpinner.set_range(0, 1000); optionsSpecklesSizeSpinner.set_value(2); - tips.set_tip(optionsSpecklesSizeSpinner, - _("Speckles of up to this many pixels will be suppressed")); + optionsSpecklesSizeSpinner.set_tooltip_text(_("Speckles of up to this many pixels will be suppressed")); optionsSpecklesBox.pack_end(optionsSpecklesSizeSpinner, false, false, MARGIN); optionsSpecklesSizeLabel.set_label(_("S_ize:")); optionsSpecklesSizeLabel.set_use_underline(true); @@ -605,8 +589,7 @@ TraceDialogImpl::TraceDialogImpl() : optionsCornersButton.set_label(_("Smooth _corners")); optionsCornersButton.set_use_underline(true); - tips.set_tip(optionsCornersButton, - _("Smooth out sharp corners of the trace")); + optionsCornersButton.set_tooltip_text(_("Smooth out sharp corners of the trace")); optionsCornersButton.set_active(true); optionsCornersBox.pack_start(optionsCornersButton, false, false, MARGIN); optionsCornersThresholdSpinner.set_digits(2); @@ -614,8 +597,7 @@ TraceDialogImpl::TraceDialogImpl() : optionsCornersThresholdSpinner.set_range(0.0, 1.34); optionsCornersThresholdSpinner.set_value(1.0); optionsCornersBox.pack_end(optionsCornersThresholdSpinner, false, false, MARGIN); - tips.set_tip(optionsCornersThresholdSpinner, - _("Increase this to smooth corners more")); + optionsCornersThresholdSpinner.set_tooltip_text(_("Increase this to smooth corners more")); optionsCornersThresholdLabel.set_label(_("_Threshold:")); optionsCornersThresholdLabel.set_use_underline(true); optionsCornersThresholdLabel.set_mnemonic_widget(optionsCornersThresholdSpinner); @@ -624,16 +606,14 @@ TraceDialogImpl::TraceDialogImpl() : optionsOptimButton.set_label(_("Optimize p_aths")); optionsOptimButton.set_use_underline(true); optionsOptimButton.set_active(true); - tips.set_tip(optionsOptimButton, - _("Try to optimize paths by joining adjacent Bezier curve segments")); + optionsOptimButton.set_tooltip_text(_("Try to optimize paths by joining adjacent Bezier curve segments")); optionsOptimBox.pack_start(optionsOptimButton, false, false, MARGIN); optionsOptimToleranceSpinner.set_digits(2); optionsOptimToleranceSpinner.set_increments(0.05, 0); optionsOptimToleranceSpinner.set_range(0.0, 5.0); optionsOptimToleranceSpinner.set_value(0.2); optionsOptimBox.pack_end(optionsOptimToleranceSpinner, false, false, MARGIN); - tips.set_tip(optionsOptimToleranceSpinner, - _("Increase this to reduce the number of nodes in the trace by more aggressive optimization")); + optionsOptimToleranceSpinner.set_tooltip_text(_("Increase this to reduce the number of nodes in the trace by more aggressive optimization")); optionsOptimToleranceLabel.set_label(_("To_lerance:")); optionsOptimToleranceLabel.set_use_underline(true); optionsOptimToleranceLabel.set_mnemonic_widget(optionsOptimToleranceSpinner); @@ -672,8 +652,7 @@ TraceDialogImpl::TraceDialogImpl() : sioxButton.set_label(_("SIOX _foreground selection")); sioxButton.set_use_underline(true); sioxBox.pack_start(sioxButton, false, false, MARGIN); - tips.set_tip(sioxButton, - _("Cover the area you want to select as the foreground")); + sioxButton.set_tooltip_text(_("Cover the area you want to select as the foreground")); rightVBox.pack_start(sioxBox, false, false, 0); //## preview @@ -684,8 +663,7 @@ TraceDialogImpl::TraceDialogImpl() : sigc::mem_fun(*this, &TraceDialogImpl::previewCallback) ); previewVBox.pack_end(previewButton, false, false, 0); // I guess it's correct to call the "intermediate bitmap" a preview of the trace - tips.set_tip(previewButton, - _("Preview the intermediate bitmap with the current settings, without actual tracing")); + previewButton.set_tooltip_text(_("Preview the intermediate bitmap with the current settings, without actual tracing")); previewImage.set_size_request(200,200); //previewImage.set_alignment (Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); previewVBox.pack_start(previewImage, true, true, 0); @@ -706,11 +684,11 @@ TraceDialogImpl::TraceDialogImpl() : //## The OK button mainCancelButton = addResponseButton(Gtk::Stock::STOP, GTK_RESPONSE_CANCEL); if (mainCancelButton) { - tips.set_tip((*mainCancelButton), _("Abort a trace in progress")); + mainCancelButton->set_tooltip_text(_("Abort a trace in progress")); mainCancelButton->set_sensitive(false); } mainOkButton = addResponseButton(Gtk::Stock::OK, GTK_RESPONSE_OK); - tips.set_tip((*mainOkButton), _("Execute the trace")); + mainOkButton->set_tooltip_text(_("Execute the trace")); show_all_children(); diff --git a/src/ui/widget/attr-widget.h b/src/ui/widget/attr-widget.h index e874f4d52..7c7235386 100644 --- a/src/ui/widget/attr-widget.h +++ b/src/ui/widget/attr-widget.h @@ -14,7 +14,6 @@ #include "attributes.h" #include "sp-object.h" #include "xml/node.h" -#include <gtkmm/tooltips.h> namespace Inkscape { namespace UI { diff --git a/src/ui/widget/button.h b/src/ui/widget/button.h index 8dc9d73cb..a7d7dfb95 100644 --- a/src/ui/widget/button.h +++ b/src/ui/widget/button.h @@ -10,9 +10,7 @@ #ifndef INKSCAPE_UI_WIDGET_BUTTON_H #define INKSCAPE_UI_WIDGET_BUTTON_H -#include <gtkmm/button.h> -#include <gtkmm/checkbutton.h> -#include <gtkmm/tooltips.h> +#include <gtkmm.h> namespace Inkscape { namespace UI { diff --git a/src/ui/widget/color-picker.h b/src/ui/widget/color-picker.h index 7559dcae0..f2d67c341 100644 --- a/src/ui/widget/color-picker.h +++ b/src/ui/widget/color-picker.h @@ -15,9 +15,7 @@ #include <stddef.h> #include <sigc++/sigc++.h> -#include <gtkmm/button.h> -#include <gtkmm/dialog.h> -#include <gtkmm/tooltips.h> +#include <gtkmm.h> #include "widgets/sp-color-selector.h" #include "ui/widget/color-preview.h" //#include "ui/dialog/dialog.h" diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp index aaf67a7a2..9605571d1 100644 --- a/src/ui/widget/entity-entry.cpp +++ b/src/ui/widget/entity-entry.cpp @@ -37,17 +37,17 @@ namespace Widget { //--------------------------------------------------- EntityEntry* -EntityEntry::create (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr) +EntityEntry::create (rdf_work_entity_t* ent, Registry& wr) { g_assert (ent); EntityEntry* obj = 0; switch (ent->format) { case RDF_FORMAT_LINE: - obj = new EntityLineEntry (ent, tt, wr); + obj = new EntityLineEntry (ent, wr); break; case RDF_FORMAT_MULTILINE: - obj = new EntityMultiLineEntry (ent, tt, wr); + obj = new EntityMultiLineEntry (ent, wr); break; default: g_warning ("An unknown RDF format was requested."); @@ -58,9 +58,9 @@ EntityEntry::create (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr) return obj; } -EntityEntry::EntityEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr) +EntityEntry::EntityEntry (rdf_work_entity_t* ent, Registry& wr) : _label(Glib::ustring(_(ent->title)), 1.0, 0.5), _packable(0), - _entity(ent), _tt(&tt), _wr(&wr) + _entity(ent), _wr(&wr) { } @@ -69,11 +69,11 @@ EntityEntry::~EntityEntry() _changed_connection.disconnect(); } -EntityLineEntry::EntityLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr) -: EntityEntry (ent, tt, wr) +EntityLineEntry::EntityLineEntry (rdf_work_entity_t* ent, Registry& wr) +: EntityEntry (ent, wr) { Gtk::Entry *e = new Gtk::Entry; - tt.set_tip (*e, _(ent->tip)); + e->set_tooltip_text (_(ent->tip)); _packable = e; _changed_connection = e->signal_changed().connect (sigc::mem_fun (*this, &EntityLineEntry::on_changed)); } @@ -109,8 +109,8 @@ EntityLineEntry::on_changed() _wr->setUpdating (false); } -EntityMultiLineEntry::EntityMultiLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr) -: EntityEntry (ent, tt, wr) +EntityMultiLineEntry::EntityMultiLineEntry (rdf_work_entity_t* ent, Registry& wr) +: EntityEntry (ent, wr) { Gtk::ScrolledWindow *s = new Gtk::ScrolledWindow; s->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); @@ -120,7 +120,7 @@ EntityMultiLineEntry::EntityMultiLineEntry (rdf_work_entity_t* ent, Gtk::Tooltip _v.set_wrap_mode (Gtk::WRAP_WORD); _v.set_accepts_tab (false); s->add (_v); - tt.set_tip (_v, _(ent->tip)); + _v.set_tooltip_text (_(ent->tip)); _changed_connection = _v.get_buffer()->signal_changed().connect (sigc::mem_fun (*this, &EntityMultiLineEntry::on_changed)); } diff --git a/src/ui/widget/entity-entry.h b/src/ui/widget/entity-entry.h index c96f3351d..0e031bb0a 100644 --- a/src/ui/widget/entity-entry.h +++ b/src/ui/widget/entity-entry.h @@ -11,7 +11,6 @@ #define INKSCAPE_UI_WIDGET_ENTITY_ENTRY__H #include <gtkmm/textview.h> -#include <gtkmm/tooltips.h> struct rdf_work_entity_t; class SPDocument; @@ -28,7 +27,7 @@ class Registry; class EntityEntry { public: - static EntityEntry* create (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr); + static EntityEntry* create (rdf_work_entity_t* ent, Registry& wr); virtual ~EntityEntry() = 0; virtual void update (SPDocument *doc) = 0; virtual void on_changed() = 0; @@ -36,16 +35,15 @@ public: Gtk::Widget *_packable; protected: - EntityEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr); + EntityEntry (rdf_work_entity_t* ent, Registry& wr); sigc::connection _changed_connection; rdf_work_entity_t *_entity; - Gtk::Tooltips *_tt; Registry *_wr; }; class EntityLineEntry : public EntityEntry { public: - EntityLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr); + EntityLineEntry (rdf_work_entity_t* ent, Registry& wr); ~EntityLineEntry(); void update (SPDocument *doc); @@ -55,7 +53,7 @@ protected: class EntityMultiLineEntry : public EntityEntry { public: - EntityMultiLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr); + EntityMultiLineEntry (rdf_work_entity_t* ent, Registry& wr); ~EntityMultiLineEntry(); void update (SPDocument *doc); diff --git a/src/ui/widget/entry.h b/src/ui/widget/entry.h index 3338f0888..98c861272 100644 --- a/src/ui/widget/entry.h +++ b/src/ui/widget/entry.h @@ -10,10 +10,7 @@ #ifndef INKSCAPE_UI_WIDGET_ENTRY__H #define INKSCAPE_UI_WIDGET_ENTRY__H -#include <gtkmm/entry.h> -#include <gtkmm/tooltips.h> -#include <gtkmm/label.h> -#include <gtkmm/box.h> +#include <gtkmm.h> #include "labelled.h" namespace Inkscape { diff --git a/src/ui/widget/labelled.h b/src/ui/widget/labelled.h index 0232129bd..b0e6b6d4d 100644 --- a/src/ui/widget/labelled.h +++ b/src/ui/widget/labelled.h @@ -11,10 +11,7 @@ #ifndef INKSCAPE_UI_WIDGET_LABELLED_H #define INKSCAPE_UI_WIDGET_LABELLED_H -#include <gtkmm/box.h> -#include <gtkmm/label.h> -#include <gtkmm/image.h> -#include <gtkmm/tooltips.h> +#include <gtkmm.h> namespace Inkscape { namespace UI { diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp index de482fb74..08534059b 100644 --- a/src/ui/widget/layer-selector.cpp +++ b/src/ui/widget/layer-selector.cpp @@ -112,7 +112,7 @@ LayerSelector::LayerSelector(SPDesktop *desktop) _visibility_toggle.set_relief(Gtk::RELIEF_NONE); shrink_wrap_button(_visibility_toggle); - _tooltips.set_tip(_visibility_toggle, _("Toggle current layer visibility")); + _visibility_toggle.set_tooltip_text(_("Toggle current layer visibility")); pack_start(_visibility_toggle, Gtk::PACK_EXPAND_PADDING); label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION, @@ -133,10 +133,10 @@ LayerSelector::LayerSelector(SPDesktop *desktop) _lock_toggle.set_relief(Gtk::RELIEF_NONE); shrink_wrap_button(_lock_toggle); - _tooltips.set_tip(_lock_toggle, _("Lock or unlock current layer")); + _lock_toggle.set_tooltip_text(_("Lock or unlock current layer")); pack_start(_lock_toggle, Gtk::PACK_EXPAND_PADDING); - _tooltips.set_tip(_selector, _("Current layer")); + _selector.set_tooltip_text(_("Current layer")); pack_start(_selector, Gtk::PACK_EXPAND_WIDGET); _layer_model = Gtk::ListStore::create(_model_columns); diff --git a/src/ui/widget/layer-selector.h b/src/ui/widget/layer-selector.h index 8bfa52ad7..6fbdc9857 100644 --- a/src/ui/widget/layer-selector.h +++ b/src/ui/widget/layer-selector.h @@ -15,7 +15,6 @@ #include <gtkmm/box.h> #include <gtkmm/combobox.h> #include <gtkmm/togglebutton.h> -#include <gtkmm/tooltips.h> #include <gtkmm/cellrenderertext.h> #include <gtkmm/treemodel.h> #include <gtkmm/liststore.h> @@ -60,7 +59,6 @@ private: SPDesktop *_desktop; - Gtk::Tooltips _tooltips; Gtk::ComboBox _selector; Gtk::ToggleButton _visibility_toggle; Gtk::ToggleButton _lock_toggle; diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp index 7caf732a4..28b140036 100644 --- a/src/ui/widget/licensor.cpp +++ b/src/ui/widget/licensor.cpp @@ -82,11 +82,11 @@ Licensor::~Licensor() if (_eentry) delete _eentry; } -void Licensor::init (Gtk::Tooltips& tt, Registry& wr) +void Licensor::init (Registry& wr) { /* add license-specific metadata entry areas */ rdf_work_entity_t* entity = rdf_find_entity ( "license_uri" ); - _eentry = EntityEntry::create (entity, tt, wr); + _eentry = EntityEntry::create (entity, wr); LicenseItem *i; wr.setUpdating (true); diff --git a/src/ui/widget/licensor.h b/src/ui/widget/licensor.h index 3c503b5ba..ab6abd0a4 100644 --- a/src/ui/widget/licensor.h +++ b/src/ui/widget/licensor.h @@ -14,10 +14,6 @@ class SPDocument; -namespace Gtk { - class Tooltips; -} - namespace Inkscape { namespace UI { namespace Widget { @@ -34,7 +30,7 @@ class Licensor : public Gtk::VBox { public: Licensor(); virtual ~Licensor(); - void init (Gtk::Tooltips&, Registry&); + void init (Registry&); void update (SPDocument *doc); protected: diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h index 1ed693037..7f0f7ff3d 100644 --- a/src/ui/widget/panel.h +++ b/src/ui/widget/panel.h @@ -13,17 +13,7 @@ #define SEEN_INKSCAPE_UI_WIDGET_PANEL_H #include <vector> -#include <gtkmm/arrow.h> -#include <gtkmm/box.h> -#include <gtkmm/button.h> -#include <gtkmm/buttonbox.h> -#include <gtkmm/eventbox.h> -#include <gtkmm/frame.h> -#include <gtkmm/label.h> -#include <gtkmm/menu.h> -#include <gtkmm/optionmenu.h> -#include <gtkmm/table.h> -#include <gtkmm/tooltips.h> +#include <gtkmm.h> #include "inkscape.h" #include "ui/previewfillable.h" diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h index b6542e574..8ddf8b596 100644 --- a/src/ui/widget/preferences-widget.h +++ b/src/ui/widget/preferences-widget.h @@ -17,17 +17,8 @@ #include <iostream> #include <vector> -#include <gtkmm/table.h> -#include <gtkmm/comboboxtext.h> +#include <gtkmm.h> #include "ui/widget/spinbutton.h" -#include <gtkmm/tooltips.h> -#include <gtkmm/treeview.h> -#include <gtkmm/radiobutton.h> -#include <gtkmm/box.h> -#include <gtkmm/scale.h> -#include <gtkmm/drawingarea.h> -#include <gtkmm/frame.h> -#include <gtkmm/filechooserbutton.h> #include <stddef.h> #include <sigc++/sigc++.h> #include <glibmm/i18n.h> diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h index 67cb8549c..c9d37d037 100644 --- a/src/ui/widget/registered-widget.h +++ b/src/ui/widget/registered-widget.h @@ -12,10 +12,7 @@ #ifndef INKSCAPE_UI_WIDGET_REGISTERED_WIDGET__H_ #define INKSCAPE_UI_WIDGET_REGISTERED_WIDGET__H_ -#include <gtkmm/box.h> -#include <gtkmm/adjustment.h> -#include <gtkmm/tooltips.h> -#include <gtkmm/togglebutton.h> +#include <gtkmm.h> #include <2geom/affine.h> #include "xml/node.h" #include "registry.h" diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index b6722f4cf..35d92db7b 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -132,10 +132,7 @@ SelectedStyle::SelectedStyle(bool /*layout*/) _popup_pt(_sw_group), _popup_mm(_sw_group), - _sw_unit(NULL), - - _tooltips () - + _sw_unit(NULL) { _drop[0] = _drop[1] = 0; _dropEnabled[0] = _dropEnabled[1] = false; @@ -326,10 +323,10 @@ SelectedStyle::SelectedStyle(bool /*layout*/) _opacity_sb.signal_value_changed().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_changed)); _fill_place.add(_na[SS_FILL]); - _tooltips.set_tip(_fill_place, __na[SS_FILL]); + _fill_place.set_tooltip_text(__na[SS_FILL]); _stroke_place.add(_na[SS_STROKE]); - _tooltips.set_tip(_stroke_place, __na[SS_STROKE]); + _stroke_place.set_tooltip_text(__na[SS_STROKE]); _stroke.pack_start(_stroke_place); _stroke_width_place.add(_stroke_width); @@ -907,8 +904,8 @@ SelectedStyle::update() place->remove(); flag_place->remove(); - _tooltips.unset_tip(*place); - _tooltips.unset_tip(*flag_place); + place->set_tooltip_text(0); + flag_place->set_tooltip_text(0); _mode[i] = SS_NA; _paintserver_id[i].clear(); @@ -921,7 +918,7 @@ SelectedStyle::update() switch (result) { case QUERY_STYLE_NOTHING: place->add(_na[i]); - _tooltips.set_tip(*place, __na[i]); + place->set_tooltip_text(__na[i]); _mode[i] = SS_NA; if ( _dropEnabled[i] ) { gtk_drag_dest_unset( GTK_WIDGET((i==SS_FILL) ? _fill_place.gobj():_stroke_place.gobj()) ); @@ -957,17 +954,17 @@ SelectedStyle::update() SPGradient *vector = SP_GRADIENT(server)->getVector(); sp_gradient_image_set_gradient ((SPGradientImage *) _gradient_preview_l[i], vector); place->add(_gradient_box_l[i]); - _tooltips.set_tip(*place, __lgradient[i]); + place->set_tooltip_text(__lgradient[i]); _mode[i] = SS_LGRADIENT; } else if (SP_IS_RADIALGRADIENT (server)) { SPGradient *vector = SP_GRADIENT(server)->getVector(); sp_gradient_image_set_gradient ((SPGradientImage *) _gradient_preview_r[i], vector); place->add(_gradient_box_r[i]); - _tooltips.set_tip(*place, __rgradient[i]); + place->set_tooltip_text(__rgradient[i]); _mode[i] = SS_RGRADIENT; } else if (SP_IS_PATTERN (server)) { place->add(_pattern[i]); - _tooltips.set_tip(*place, __pattern[i]); + place->set_tooltip_text(__pattern[i]); _mode[i] = SS_PATTERN; } } else { @@ -983,30 +980,30 @@ SelectedStyle::update() place->add(*_color_preview[i]); gchar c_string[64]; g_snprintf (c_string, 64, "%06x/%.3g", color >> 8, SP_RGBA32_A_F(color)); - _tooltips.set_tip(*place, __color[i] + ": " + c_string + _(", drag to adjust")); + place->set_tooltip_text(__color[i] + ": " + c_string + _(", drag to adjust")); _mode[i] = SS_COLOR; _popup_copy[i].set_sensitive(true); } else if (paint->set && paint->isNone()) { place->add(_none[i]); - _tooltips.set_tip(*place, __none[i]); + place->set_tooltip_text(__none[i]); _mode[i] = SS_NONE; } else if (!paint->set) { place->add(_unset[i]); - _tooltips.set_tip(*place, __unset[i]); + place->set_tooltip_text(__unset[i]); _mode[i] = SS_UNSET; } if (result == QUERY_STYLE_MULTIPLE_AVERAGED) { flag_place->add(_averaged[i]); - _tooltips.set_tip(*flag_place, __averaged[i]); + flag_place->set_tooltip_text(__averaged[i]); } else if (result == QUERY_STYLE_MULTIPLE_SAME) { flag_place->add(_multiple[i]); - _tooltips.set_tip(*flag_place, __multiple[i]); + flag_place->set_tooltip_text(__multiple[i]); } break; case QUERY_STYLE_MULTIPLE_DIFFERENT: place->add(_many[i]); - _tooltips.set_tip(*place, __many[i]); + place->set_tooltip_text(__many[i]); _mode[i] = SS_MANY; break; default: @@ -1015,22 +1012,22 @@ SelectedStyle::update() } // Now query opacity - _tooltips.unset_tip(_opacity_place); - _tooltips.unset_tip(_opacity_sb); + _opacity_place.set_tooltip_text(0); + _opacity_sb.set_tooltip_text(0); int result = sp_desktop_query_style (_desktop, query, QUERY_STYLE_PROPERTY_MASTEROPACITY); switch (result) { case QUERY_STYLE_NOTHING: - _tooltips.set_tip(_opacity_place, _("Nothing selected")); - _tooltips.set_tip(_opacity_sb, _("Nothing selected")); + _opacity_place.set_tooltip_text(_("Nothing selected")); + _opacity_sb.set_tooltip_text(_("Nothing selected")); _opacity_sb.set_sensitive(false); break; case QUERY_STYLE_SINGLE: case QUERY_STYLE_MULTIPLE_AVERAGED: case QUERY_STYLE_MULTIPLE_SAME: - _tooltips.set_tip(_opacity_place, _("Opacity (%)")); - _tooltips.set_tip(_opacity_sb, _("Opacity (%)")); + _opacity_place.set_tooltip_text(_("Opacity (%)")); + _opacity_sb.set_tooltip_text(_("Opacity (%)")); if (_opacity_blocked) break; _opacity_blocked = true; _opacity_sb.set_sensitive(true); @@ -1069,7 +1066,7 @@ SelectedStyle::update() _sw_unit? sp_unit_get_abbreviation(_sw_unit) : "px", (result_sw == QUERY_STYLE_MULTIPLE_AVERAGED)? _(" (averaged)") : ""); - _tooltips.set_tip(_stroke_width_place, str); + _stroke_width_place.set_tooltip_text(str); g_free (str); } break; diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h index 916cbe6d1..07f457e9d 100644 --- a/src/ui/widget/selected-style.h +++ b/src/ui/widget/selected-style.h @@ -259,8 +259,6 @@ protected: SPUnit *_sw_unit; - Gtk::Tooltips _tooltips; - void *_drop[2]; bool _dropEnabled[2]; }; diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp index 41366f749..1fdeb39df 100644 --- a/src/ui/widget/style-swatch.cpp +++ b/src/ui/widget/style-swatch.cpp @@ -112,8 +112,7 @@ StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip) _tool_obs(NULL), _style_obs(NULL), _table(2, 6), - _sw_unit(NULL), - _tooltips () + _sw_unit(NULL) { _label[SS_FILL].set_markup(_("Fill:")); _label[SS_STROKE].set_markup(_("Stroke:")); @@ -161,7 +160,7 @@ StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip) _swatch.signal_button_press_event().connect(sigc::mem_fun(*this, &StyleSwatch::on_click)); - _tooltips.set_tip(_swatch, main_tip); + _swatch.set_tooltip_text(main_tip); } void StyleSwatch::setClickVerb(sp_verb_t verb_t) { @@ -269,15 +268,15 @@ StyleSwatch::setStyle(SPStyle *query) if (SP_IS_LINEARGRADIENT (server)) { _value[i].set_markup(_("L Gradient")); place->add(_value[i]); - _tooltips.set_tip(*place, (i == SS_FILL)? (_("Linear gradient fill")) : (_("Linear gradient stroke"))); + place->set_tooltip_text((i == SS_FILL)? (_("Linear gradient fill")) : (_("Linear gradient stroke"))); } else if (SP_IS_RADIALGRADIENT (server)) { _value[i].set_markup(_("R Gradient")); place->add(_value[i]); - _tooltips.set_tip(*place, (i == SS_FILL)? (_("Radial gradient fill")) : (_("Radial gradient stroke"))); + place->set_tooltip_text((i == SS_FILL)? (_("Radial gradient fill")) : (_("Radial gradient stroke"))); } else if (SP_IS_PATTERN (server)) { _value[i].set_markup(_("Pattern")); place->add(_value[i]); - _tooltips.set_tip(*place, (i == SS_FILL)? (_("Pattern fill")) : (_("Pattern stroke"))); + place->set_tooltip_text((i == SS_FILL)? (_("Pattern fill")) : (_("Pattern stroke"))); } } else if (paint->set && paint->isColor()) { @@ -291,17 +290,17 @@ StyleSwatch::setStyle(SPStyle *query) } else { tip = g_strdup_printf (_("Stroke: %06x/%.3g"), color >> 8, SP_RGBA32_A_F(color)); } - _tooltips.set_tip(*place, tip); + place->set_tooltip_text(tip); g_free (tip); } else if (paint->set && paint->isNone()) { _value[i].set_markup(_("<i>None</i>")); place->add(_value[i]); - _tooltips.set_tip(*place, (i == SS_FILL)? (_("No fill")) : (_("No stroke"))); + place->set_tooltip_text((i == SS_FILL)? (_("No fill")) : (_("No stroke"))); if (i == SS_STROKE) has_stroke = false; } else if (!paint->set) { _value[i].set_markup(_("<b>Unset</b>")); place->add(_value[i]); - _tooltips.set_tip(*place, (i == SS_FILL)? (_("Unset fill")) : (_("Unset stroke"))); + place->set_tooltip_text((i == SS_FILL)? (_("Unset fill")) : (_("Unset stroke"))); if (i == SS_STROKE) has_stroke = false; } } @@ -324,11 +323,11 @@ StyleSwatch::setStyle(SPStyle *query) gchar *str = g_strdup_printf(_("Stroke width: %.5g%s"), w, _sw_unit? sp_unit_get_abbreviation(_sw_unit) : "px"); - _tooltips.set_tip(_stroke_width_place, str); + _stroke_width_place.set_tooltip_text(str); g_free (str); } } else { - _tooltips.unset_tip(_stroke_width_place); + _stroke_width_place.set_tooltip_text(0); _stroke_width.set_markup (""); } @@ -345,11 +344,11 @@ StyleSwatch::setStyle(SPStyle *query) } { gchar *str = g_strdup_printf(_("Opacity: %.3g"), op); - _tooltips.set_tip(_opacity_place, str); + _opacity_place.set_tooltip_text(str); g_free (str); } } else { - _tooltips.unset_tip(_opacity_place); + _opacity_place.set_tooltip_text(0); _opacity_value.set_markup (""); } diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h index dfbbe13d3..a3c115c19 100644 --- a/src/ui/widget/style-swatch.h +++ b/src/ui/widget/style-swatch.h @@ -77,8 +77,6 @@ private: SPUnit *_sw_unit; - Gtk::Tooltips _tooltips; - friend class ToolObserver; }; diff --git a/src/ui/widget/tolerance-slider.h b/src/ui/widget/tolerance-slider.h index 59e63bd25..e3bd385cc 100644 --- a/src/ui/widget/tolerance-slider.h +++ b/src/ui/widget/tolerance-slider.h @@ -10,11 +10,7 @@ #ifndef INKSCAPE_UI_WIDGET_TOLERANCE_SLIDER__H_ #define INKSCAPE_UI_WIDGET_TOLERANCE_SLIDER__H_ -#include <gtkmm/box.h> -#include <gtkmm/tooltips.h> -#include <gtkmm/checkbutton.h> -#include <gtkmm/radiobutton.h> -#include <gtkmm/scale.h> +#include <gtkmm.h> namespace Inkscape { namespace UI { diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 23c02ea35..eeba1ab61 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -650,8 +650,6 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) Gtk::RadioButton *tb; Gtk::HBox *f, *hb; - Gtk::Tooltips *tt = new Gtk::Tooltips(); - spw_old = sp_widget_new_global(INKSCAPE); spw = dynamic_cast<Gtk::Container *>(manage(Glib::wrap(spw_old))); @@ -682,7 +680,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) a = new Gtk::Adjustment(1.0, 0.0, 1000.0, 0.1, 10.0, 0.0); spw->set_data("width", a); sb = new Inkscape::UI::Widget::SpinButton(*a, 0.1, 3); - tt->set_tip(*sb, _("Stroke width")); + sb->set_tooltip_text(_("Stroke width")); sb->show(); spw_label(t, C_("Stroke width", "_Width:"), 0, i, sb); @@ -719,7 +717,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) // TRANSLATORS: Miter join: joining lines with a sharp (pointed) corner. // For an example, draw a triangle with a large stroke width and modify the // "Join" option (in the Fill and Stroke dialog). - tt->set_tip(*tb, _("Miter join")); + tb->set_tooltip_text(_("Miter join")); spw->set_data("miter join", tb); tb = sp_stroke_radio_button(tb, INKSCAPE_ICON("stroke-join-round"), @@ -729,7 +727,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) // TRANSLATORS: Round join: joining lines with a rounded corner. // For an example, draw a triangle with a large stroke width and modify the // "Join" option (in the Fill and Stroke dialog). - tt->set_tip(*tb, _("Round join")); + tb->set_tooltip_text(_("Round join")); spw->set_data("round join", tb); tb = sp_stroke_radio_button(tb, INKSCAPE_ICON("stroke-join-bevel"), @@ -739,7 +737,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) // TRANSLATORS: Bevel join: joining lines with a blunted (flattened) corner. // For an example, draw a triangle with a large stroke width and modify the // "Join" option (in the Fill and Stroke dialog). - tt->set_tip(*tb, _("Bevel join")); + tb->set_tooltip_text(_("Bevel join")); spw->set_data("bevel join", tb); i++; @@ -759,7 +757,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) spw->set_data("miterlimit", a); sb = new Inkscape::UI::Widget::SpinButton(*a, 0.1, 2); - tt->set_tip(*sb, _("Maximum length of the miter (in units of stroke width)")); + sb->set_tooltip_text(_("Maximum length of the miter (in units of stroke width)")); sb->show(); spw_label(t, _("Miter _limit:"), 0, i, sb); spw->set_data("miterlimit_sb", sb); @@ -785,7 +783,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) // TRANSLATORS: Butt cap: the line shape does not extend beyond the end point // of the line; the ends of the line are square - tt->set_tip(*tb, _("Butt cap")); + tb->set_tooltip_text(_("Butt cap")); tb = sp_stroke_radio_button(tb, INKSCAPE_ICON("stroke-cap-round"), hb, spw, "cap", "round"); @@ -793,7 +791,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) // TRANSLATORS: Round cap: the line shape extends beyond the end point of the // line; the ends of the line are rounded - tt->set_tip(*tb, _("Round cap")); + tb->set_tooltip_text(_("Round cap")); tb = sp_stroke_radio_button(tb, INKSCAPE_ICON("stroke-cap-square"), hb, spw, "cap", "square"); @@ -801,7 +799,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) // TRANSLATORS: Square cap: the line shape extends beyond the end point of the // line; the ends of the line are square - tt->set_tip(*tb, _("Square cap")); + tb->set_tooltip_text(_("Square cap")); i++; @@ -831,7 +829,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) //spw_label(t, _("_Start Markers:"), 0, i); marker_start_menu = ink_marker_menu(spw ,"marker-start", sandbox); spw_label(t, _("_Start Markers:"), 0, i, marker_start_menu); - tt->set_tip(*marker_start_menu, _("Start Markers are drawn on the first node of a path or shape")); + marker_start_menu->set_tooltip_text(_("Start Markers are drawn on the first node of a path or shape")); marker_start_menu_connection = marker_start_menu->signal_changed().connect( sigc::bind<Gtk::OptionMenu *, Gtk::Container *, SPMarkerLoc>( sigc::ptr_fun(&sp_marker_select), marker_start_menu, spw, SP_MARKER_LOC_START)); @@ -843,7 +841,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) //spw_label(t, _("_Mid Markers:"), 0, i); marker_mid_menu = ink_marker_menu(spw ,"marker-mid", sandbox); spw_label(t, _("_Mid Markers:"), 0, i, marker_mid_menu); - tt->set_tip(*marker_mid_menu, _("Mid Markers are drawn on every node of a path or shape except the first and last nodes")); + marker_mid_menu->set_tooltip_text(_("Mid Markers are drawn on every node of a path or shape except the first and last nodes")); marker_mid_menu_connection = marker_mid_menu->signal_changed().connect( sigc::bind<Gtk::OptionMenu *, Gtk::Container *, SPMarkerLoc>( sigc::ptr_fun(&sp_marker_select), marker_mid_menu,spw, SP_MARKER_LOC_MID)); @@ -855,7 +853,7 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) //spw_label(t, _("_End Markers:"), 0, i); marker_end_menu = ink_marker_menu(spw ,"marker-end", sandbox); spw_label(t, _("_End Markers:"), 0, i, marker_end_menu); - tt->set_tip(*marker_end_menu, _("End Markers are drawn on the last node of a path or shape")); + marker_end_menu->set_tooltip_text(_("End Markers are drawn on the last node of a path or shape")); marker_end_menu_connection = marker_end_menu->signal_changed().connect( sigc::bind<Gtk::OptionMenu *, Gtk::Container *, SPMarkerLoc>( sigc::ptr_fun(&sp_marker_select), marker_end_menu, spw, SP_MARKER_LOC_END)); |
