diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2011-06-05 13:22:18 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2011-06-05 13:22:18 +0000 |
| commit | f2510631aadaae48e040a1dd0f9bc8b4de6f2054 (patch) | |
| tree | fe65c502ae9e1b5d20187273c5baa67062ca20fd /src | |
| parent | Possible Win32 compile fix. (diff) | |
| download | inkscape-f2510631aadaae48e040a1dd0f9bc8b4de6f2054.tar.gz inkscape-f2510631aadaae48e040a1dd0f9bc8b4de6f2054.zip | |
Replace use of deprecated GtkTooltips API
Fixed bugs:
- https://launchpad.net/bugs/793086
(bzr r10256.1.1)
Diffstat (limited to 'src')
29 files changed, 252 insertions, 392 deletions
diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index 7ad0eaa14..2f78e4742 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -1517,12 +1517,12 @@ static void clonetiler_checkbox_toggled(GtkToggleButton *tb, gpointer *data) prefs->setBool(prefs_path + attr, gtk_toggle_button_get_active(tb)); } -static GtkWidget * clonetiler_checkbox(GtkTooltips *tt, const char *tip, const char *attr) +static GtkWidget * clonetiler_checkbox(const char *tip, const char *attr) { GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN); GtkWidget *b = gtk_check_button_new (); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, tip, NULL); + gtk_widget_set_tooltip_text (b, tip); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool value = prefs->getBool(prefs_path + attr); @@ -1544,7 +1544,7 @@ static void clonetiler_value_changed(GtkAdjustment *adj, gpointer data) prefs->setDouble(prefs_path + pref, adj->value); } -static GtkWidget * clonetiler_spinbox(GtkTooltips *tt, const char *tip, const char *attr, double lower, double upper, const gchar *suffix, bool exponent = false) +static GtkWidget * clonetiler_spinbox(const char *tip, const char *attr, double lower, double upper, const gchar *suffix, bool exponent = false) { GtkWidget *hb = gtk_hbox_new(FALSE, 0); @@ -1563,7 +1563,7 @@ static GtkWidget * clonetiler_spinbox(GtkTooltips *tt, const char *tip, const ch sb = gtk_spin_button_new (GTK_ADJUSTMENT (a), 0.1, 1); } - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), sb, tip, NULL); + gtk_widget_set_tooltip_text (sb, tip); gtk_entry_set_width_chars (GTK_ENTRY (sb), 4); gtk_box_pack_start (GTK_BOX (hb), sb, FALSE, FALSE, SB_MARGIN); @@ -1834,8 +1834,6 @@ void clonetiler_dialog(void) g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_unhide", G_CALLBACK (sp_dialog_unhide), dlg); g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (sp_transientize_callback), &wd); - GtkTooltips *tt = gtk_tooltips_new(); - GtkWidget *mainbox = gtk_vbox_new(FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (mainbox), 6); gtk_container_add (GTK_CONTAINER (dlg), mainbox); @@ -1854,7 +1852,7 @@ void clonetiler_dialog(void) * http://www.clarku.edu/~djoyce/wallpaper/seventeen.html (English vocabulary); or * http://membres.lycos.fr/villemingerard/Geometri/Sym1D.htm (French vocabulary). */ - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), om, _("Select one of the 17 symmetry groups for the tiling"), NULL); + gtk_widget_set_tooltip_text (om, _("Select one of the 17 symmetry groups for the tiling")); gtk_box_pack_start (GTK_BOX (vb), om, FALSE, FALSE, SB_MARGIN); GtkWidget *m = gtk_menu_new (); @@ -1927,7 +1925,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Horizontal shift per row (in % of tile width)"), "shiftx_per_j", -10000, 10000, "%"); @@ -1935,7 +1933,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Horizontal shift per column (in % of tile width)"), "shiftx_per_i", -10000, 10000, "%"); @@ -1943,8 +1941,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the horizontal shift by this percentage"), "shiftx_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the horizontal shift by this percentage"), "shiftx_rand", 0, 1000, "%"); clonetiler_table_attach (table, l, 0, 2, 4); } @@ -1960,7 +1957,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Vertical shift per row (in % of tile height)"), "shifty_per_j", -10000, 10000, "%"); @@ -1968,7 +1965,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Vertical shift per column (in % of tile height)"), "shifty_per_i", -10000, 10000, "%"); @@ -1976,7 +1973,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( _("Randomize the vertical shift by this percentage"), "shifty_rand", 0, 1000, "%"); clonetiler_table_attach (table, l, 0, 3, 4); @@ -1991,14 +1988,14 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( _("Whether rows are spaced evenly (1), converge (<1) or diverge (>1)"), "shifty_exp", 0, 10, "", true); clonetiler_table_attach (table, l, 0, 4, 2); } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( _("Whether columns are spaced evenly (1), converge (<1) or diverge (>1)"), "shiftx_exp", 0, 10, "", true); clonetiler_table_attach (table, l, 0, 4, 3); @@ -2013,12 +2010,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of shifts for each row"), "shifty_alternate"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of shifts for each row"), "shifty_alternate"); clonetiler_table_attach (table, l, 0, 5, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of shifts for each column"), "shiftx_alternate"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of shifts for each column"), "shiftx_alternate"); clonetiler_table_attach (table, l, 0, 5, 3); } @@ -2031,12 +2028,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Cumulate the shifts for each row"), "shifty_cumulate"); + GtkWidget *l = clonetiler_checkbox (_("Cumulate the shifts for each row"), "shifty_cumulate"); clonetiler_table_attach (table, l, 0, 6, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Cumulate the shifts for each column"), "shiftx_cumulate"); + GtkWidget *l = clonetiler_checkbox (_("Cumulate the shifts for each column"), "shiftx_cumulate"); clonetiler_table_attach (table, l, 0, 6, 3); } @@ -2049,12 +2046,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Exclude tile height in shift"), "shifty_excludeh"); + GtkWidget *l = clonetiler_checkbox (_("Exclude tile height in shift"), "shifty_excludeh"); clonetiler_table_attach (table, l, 0, 7, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Exclude tile width in shift"), "shiftx_excludew"); + GtkWidget *l = clonetiler_checkbox (_("Exclude tile width in shift"), "shiftx_excludew"); clonetiler_table_attach (table, l, 0, 7, 3); } @@ -2077,7 +2074,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Horizontal scale per row (in % of tile width)"), "scalex_per_j", -100, 1000, "%"); @@ -2085,7 +2082,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Horizontal scale per column (in % of tile width)"), "scalex_per_i", -100, 1000, "%"); @@ -2093,8 +2090,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the horizontal scale by this percentage"), "scalex_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the horizontal scale by this percentage"), "scalex_rand", 0, 1000, "%"); clonetiler_table_attach (table, l, 0, 2, 4); } @@ -2108,7 +2104,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Vertical scale per row (in % of tile height)"), "scaley_per_j", -100, 1000, "%"); @@ -2116,7 +2112,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Vertical scale per column (in % of tile height)"), "scaley_per_i", -100, 1000, "%"); @@ -2124,8 +2120,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the vertical scale by this percentage"), "scaley_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the vertical scale by this percentage"), "scaley_rand", 0, 1000, "%"); clonetiler_table_attach (table, l, 0, 3, 4); } @@ -2139,15 +2134,13 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Whether row scaling is uniform (1), converge (<1) or diverge (>1)"), "scaley_exp", + GtkWidget *l = clonetiler_spinbox (_("Whether row scaling is uniform (1), converge (<1) or diverge (>1)"), "scaley_exp", 0, 10, "", true); clonetiler_table_attach (table, l, 0, 4, 2); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Whether column scaling is uniform (1), converge (<1) or diverge (>1)"), "scalex_exp", + GtkWidget *l = clonetiler_spinbox (_("Whether column scaling is uniform (1), converge (<1) or diverge (>1)"), "scalex_exp", 0, 10, "", true); clonetiler_table_attach (table, l, 0, 4, 3); } @@ -2161,15 +2154,13 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Base for a logarithmic spiral: not used (0), converge (<1), or diverge (>1)"), "scaley_log", + GtkWidget *l = clonetiler_spinbox (_("Base for a logarithmic spiral: not used (0), converge (<1), or diverge (>1)"), "scaley_log", 0, 10, "", false); clonetiler_table_attach (table, l, 0, 5, 2); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Base for a logarithmic spiral: not used (0), converge (<1), or diverge (>1)"), "scalex_log", + GtkWidget *l = clonetiler_spinbox (_("Base for a logarithmic spiral: not used (0), converge (<1), or diverge (>1)"), "scalex_log", 0, 10, "", false); clonetiler_table_attach (table, l, 0, 5, 3); } @@ -2183,12 +2174,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of scales for each row"), "scaley_alternate"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of scales for each row"), "scaley_alternate"); clonetiler_table_attach (table, l, 0, 6, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of scales for each column"), "scalex_alternate"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of scales for each column"), "scalex_alternate"); clonetiler_table_attach (table, l, 0, 6, 3); } @@ -2201,12 +2192,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Cumulate the scales for each row"), "scaley_cumulate"); + GtkWidget *l = clonetiler_checkbox (_("Cumulate the scales for each row"), "scaley_cumulate"); clonetiler_table_attach (table, l, 0, 7, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Cumulate the scales for each column"), "scalex_cumulate"); + GtkWidget *l = clonetiler_checkbox (_("Cumulate the scales for each column"), "scalex_cumulate"); clonetiler_table_attach (table, l, 0, 7, 3); } @@ -2229,7 +2220,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Rotate tiles by this angle for each row"), "rotate_per_j", -180, 180, "°"); @@ -2237,7 +2228,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, + GtkWidget *l = clonetiler_spinbox ( // xgettext:no-c-format _("Rotate tiles by this angle for each column"), "rotate_per_i", -180, 180, "°"); @@ -2245,8 +2236,7 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the rotation angle by this percentage"), "rotate_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the rotation angle by this percentage"), "rotate_rand", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 2, 4); } @@ -2260,12 +2250,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the rotation direction for each row"), "rotate_alternatej"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the rotation direction for each row"), "rotate_alternatej"); clonetiler_table_attach (table, l, 0, 3, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the rotation direction for each column"), "rotate_alternatei"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the rotation direction for each column"), "rotate_alternatei"); clonetiler_table_attach (table, l, 0, 3, 3); } @@ -2278,12 +2268,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Cumulate the rotation for each row"), "rotate_cumulatej"); + GtkWidget *l = clonetiler_checkbox (_("Cumulate the rotation for each row"), "rotate_cumulatej"); clonetiler_table_attach (table, l, 0, 4, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Cumulate the rotation for each column"), "rotate_cumulatei"); + GtkWidget *l = clonetiler_checkbox (_("Cumulate the rotation for each column"), "rotate_cumulatei"); clonetiler_table_attach (table, l, 0, 4, 3); } @@ -2307,22 +2297,19 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Blur tiles by this percentage for each row"), "blur_per_j", + GtkWidget *l = clonetiler_spinbox (_("Blur tiles by this percentage for each row"), "blur_per_j", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 2, 2); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Blur tiles by this percentage for each column"), "blur_per_i", + GtkWidget *l = clonetiler_spinbox (_("Blur tiles by this percentage for each column"), "blur_per_i", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 2, 3); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the tile blur by this percentage"), "blur_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the tile blur by this percentage"), "blur_rand", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 2, 4); } @@ -2336,12 +2323,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of blur change for each row"), "blur_alternatej"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of blur change for each row"), "blur_alternatej"); clonetiler_table_attach (table, l, 0, 3, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of blur change for each column"), "blur_alternatei"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of blur change for each column"), "blur_alternatei"); clonetiler_table_attach (table, l, 0, 3, 3); } @@ -2356,22 +2343,19 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Decrease tile opacity by this percentage for each row"), "opacity_per_j", + GtkWidget *l = clonetiler_spinbox (_("Decrease tile opacity by this percentage for each row"), "opacity_per_j", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 4, 2); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Decrease tile opacity by this percentage for each column"), "opacity_per_i", + GtkWidget *l = clonetiler_spinbox (_("Decrease tile opacity by this percentage for each column"), "opacity_per_i", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 4, 3); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the tile opacity by this percentage"), "opacity_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the tile opacity by this percentage"), "opacity_rand", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 4, 4); } @@ -2385,12 +2369,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of opacity change for each row"), "opacity_alternatej"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of opacity change for each row"), "opacity_alternatej"); clonetiler_table_attach (table, l, 0, 5, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of opacity change for each column"), "opacity_alternatei"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of opacity change for each column"), "opacity_alternatei"); clonetiler_table_attach (table, l, 0, 5, 3); } } @@ -2428,22 +2412,19 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Change the tile hue by this percentage for each row"), "hue_per_j", + GtkWidget *l = clonetiler_spinbox (_("Change the tile hue by this percentage for each row"), "hue_per_j", -100, 100, "%"); clonetiler_table_attach (table, l, 0, 2, 2); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Change the tile hue by this percentage for each column"), "hue_per_i", + GtkWidget *l = clonetiler_spinbox (_("Change the tile hue by this percentage for each column"), "hue_per_i", -100, 100, "%"); clonetiler_table_attach (table, l, 0, 2, 3); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the tile hue by this percentage"), "hue_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the tile hue by this percentage"), "hue_rand", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 2, 4); } @@ -2458,22 +2439,19 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Change the color saturation by this percentage for each row"), "saturation_per_j", + GtkWidget *l = clonetiler_spinbox (_("Change the color saturation by this percentage for each row"), "saturation_per_j", -100, 100, "%"); clonetiler_table_attach (table, l, 0, 3, 2); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Change the color saturation by this percentage for each column"), "saturation_per_i", + GtkWidget *l = clonetiler_spinbox (_("Change the color saturation by this percentage for each column"), "saturation_per_i", -100, 100, "%"); clonetiler_table_attach (table, l, 0, 3, 3); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the color saturation by this percentage"), "saturation_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the color saturation by this percentage"), "saturation_rand", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 3, 4); } @@ -2487,22 +2465,19 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Change the color lightness by this percentage for each row"), "lightness_per_j", + GtkWidget *l = clonetiler_spinbox (_("Change the color lightness by this percentage for each row"), "lightness_per_j", -100, 100, "%"); clonetiler_table_attach (table, l, 0, 4, 2); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Change the color lightness by this percentage for each column"), "lightness_per_i", + GtkWidget *l = clonetiler_spinbox (_("Change the color lightness by this percentage for each column"), "lightness_per_i", -100, 100, "%"); clonetiler_table_attach (table, l, 0, 4, 3); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the color lightness by this percentage"), "lightness_rand", + GtkWidget *l = clonetiler_spinbox (_("Randomize the color lightness by this percentage"), "lightness_rand", 0, 100, "%"); clonetiler_table_attach (table, l, 0, 4, 4); } @@ -2516,12 +2491,12 @@ void clonetiler_dialog(void) } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of color changes for each row"), "color_alternatej"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of color changes for each row"), "color_alternatej"); clonetiler_table_attach (table, l, 0, 5, 2); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Alternate the sign of color changes for each column"), "color_alternatei"); + GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of color changes for each column"), "color_alternatei"); clonetiler_table_attach (table, l, 0, 5, 3); } @@ -2540,7 +2515,7 @@ void clonetiler_dialog(void) g_object_set_data (G_OBJECT(b), "uncheckable", GINT_TO_POINTER(TRUE)); bool old = prefs->getBool(prefs_path + "dotrace"); gtk_toggle_button_set_active ((GtkToggleButton *) b, old); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("For each clone, pick a value from the drawing in that clone's location and apply it to the clone"), NULL); + gtk_widget_set_tooltip_text (b, _("For each clone, pick a value from the drawing in that clone's location and apply it to the clone")); gtk_box_pack_start (GTK_BOX (hb), b, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(b), "toggled", @@ -2566,7 +2541,7 @@ void clonetiler_dialog(void) GtkWidget* radio; { radio = gtk_radio_button_new_with_label (NULL, _("Color")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the visible color and opacity"), NULL); + gtk_widget_set_tooltip_text (radio, _("Pick the visible color and opacity")); clonetiler_table_attach (table, radio, 0.0, 1, 1); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_pick_switched), GINT_TO_POINTER(PICK_COLOR)); @@ -2574,7 +2549,7 @@ void clonetiler_dialog(void) } { radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), _("Opacity")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the total accumulated opacity"), NULL); + gtk_widget_set_tooltip_text (radio, _("Pick the total accumulated opacity")); clonetiler_table_attach (table, radio, 0.0, 2, 1); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_pick_switched), GINT_TO_POINTER(PICK_OPACITY)); @@ -2582,7 +2557,7 @@ void clonetiler_dialog(void) } { radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), _("R")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the Red component of the color"), NULL); + gtk_widget_set_tooltip_text (radio, _("Pick the Red component of the color")); clonetiler_table_attach (table, radio, 0.0, 1, 2); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_pick_switched), GINT_TO_POINTER(PICK_R)); @@ -2590,7 +2565,7 @@ void clonetiler_dialog(void) } { radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), _("G")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the Green component of the color"), NULL); + gtk_widget_set_tooltip_text (radio, _("Pick the Green component of the color")); clonetiler_table_attach (table, radio, 0.0, 2, 2); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_pick_switched), GINT_TO_POINTER(PICK_G)); @@ -2598,7 +2573,7 @@ void clonetiler_dialog(void) } { radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), _("B")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the Blue component of the color"), NULL); + gtk_widget_set_tooltip_text (radio, _("Pick the Blue component of the color")); clonetiler_table_attach (table, radio, 0.0, 3, 2); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_pick_switched), GINT_TO_POINTER(PICK_B)); @@ -2606,7 +2581,7 @@ void clonetiler_dialog(void) } { radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), C_("Clonetiler color hue", "H")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the hue of the color"), NULL); + gtk_widget_set_tooltip_text (radio, _("Pick the hue of the color")); clonetiler_table_attach (table, radio, 0.0, 1, 3); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_pick_switched), GINT_TO_POINTER(PICK_H)); @@ -2614,7 +2589,7 @@ void clonetiler_dialog(void) } { radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), C_("Clonetiler color saturation", "S")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the saturation of the color"), NULL); + gtk_widget_set_tooltip_text (radio, _("Pick the saturation of the color")); clonetiler_table_attach (table, radio, 0.0, 2, 3); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_pick_switched), GINT_TO_POINTER(PICK_S)); @@ -2622,7 +2597,7 @@ void clonetiler_dialog(void) } { radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), C_("Clonetiler color lightness", "L")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the lightness of the color"), NULL); + gtk_widget_set_tooltip_text (radio, _("Pick the lightness of the color")); clonetiler_table_attach (table, radio, 0.0, 3, 3); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_pick_switched), GINT_TO_POINTER(PICK_L)); @@ -2646,8 +2621,7 @@ void clonetiler_dialog(void) clonetiler_table_attach (table, l, 1.0, 1, 1); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Shift the mid-range of the picked value upwards (>0) or downwards (<0)"), "gamma_picked", + GtkWidget *l = clonetiler_spinbox (_("Shift the mid-range of the picked value upwards (>0) or downwards (<0)"), "gamma_picked", -10, 10, ""); clonetiler_table_attach (table, l, 0.0, 1, 2); } @@ -2658,8 +2632,7 @@ void clonetiler_dialog(void) clonetiler_table_attach (table, l, 1.0, 1, 3); } { - GtkWidget *l = clonetiler_spinbox (tt, - _("Randomize the picked value by this percentage"), "rand_picked", + GtkWidget *l = clonetiler_spinbox (_("Randomize the picked value by this percentage"), "rand_picked", 0, 100, "%"); clonetiler_table_attach (table, l, 0.0, 1, 4); } @@ -2670,7 +2643,7 @@ void clonetiler_dialog(void) clonetiler_table_attach (table, l, 1.0, 2, 1); } { - GtkWidget *l = clonetiler_checkbox (tt, _("Invert the picked value"), "invert_picked"); + GtkWidget *l = clonetiler_checkbox (_("Invert the picked value"), "invert_picked"); clonetiler_table_attach (table, l, 0.0, 2, 2); } } @@ -2689,7 +2662,7 @@ void clonetiler_dialog(void) GtkWidget *b = gtk_check_button_new_with_label (_("Presence")); bool old = prefs->getBool(prefs_path + "pick_to_presence", true); gtk_toggle_button_set_active ((GtkToggleButton *) b, old); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Each clone is created with the probability determined by the picked value in that point"), NULL); + gtk_widget_set_tooltip_text (b, _("Each clone is created with the probability determined by the picked value in that point")); clonetiler_table_attach (table, b, 0.0, 1, 1); gtk_signal_connect(GTK_OBJECT(b), "toggled", GTK_SIGNAL_FUNC(clonetiler_pick_to), (gpointer) "pick_to_presence"); @@ -2699,7 +2672,7 @@ void clonetiler_dialog(void) GtkWidget *b = gtk_check_button_new_with_label (_("Size")); bool old = prefs->getBool(prefs_path + "pick_to_size"); gtk_toggle_button_set_active ((GtkToggleButton *) b, old); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Each clone's size is determined by the picked value in that point"), NULL); + gtk_widget_set_tooltip_text (b, _("Each clone's size is determined by the picked value in that point")); clonetiler_table_attach (table, b, 0.0, 2, 1); gtk_signal_connect(GTK_OBJECT(b), "toggled", GTK_SIGNAL_FUNC(clonetiler_pick_to), (gpointer) "pick_to_size"); @@ -2709,7 +2682,7 @@ void clonetiler_dialog(void) GtkWidget *b = gtk_check_button_new_with_label (_("Color")); bool old = prefs->getBool(prefs_path + "pick_to_color", 0); gtk_toggle_button_set_active ((GtkToggleButton *) b, old); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Each clone is painted by the picked color (the original must have unset fill or stroke)"), NULL); + gtk_widget_set_tooltip_text (b, _("Each clone is painted by the picked color (the original must have unset fill or stroke)")); clonetiler_table_attach (table, b, 0.0, 1, 2); gtk_signal_connect(GTK_OBJECT(b), "toggled", GTK_SIGNAL_FUNC(clonetiler_pick_to), (gpointer) "pick_to_color"); @@ -2719,7 +2692,7 @@ void clonetiler_dialog(void) GtkWidget *b = gtk_check_button_new_with_label (_("Opacity")); bool old = prefs->getBool(prefs_path + "pick_to_opacity", 0); gtk_toggle_button_set_active ((GtkToggleButton *) b, old); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Each clone's opacity is determined by the picked value in that point"), NULL); + gtk_widget_set_tooltip_text (b, _("Each clone's opacity is determined by the picked value in that point")); clonetiler_table_attach (table, b, 0.0, 2, 2); gtk_signal_connect(GTK_OBJECT(b), "toggled", GTK_SIGNAL_FUNC(clonetiler_pick_to), (gpointer) "pick_to_opacity"); @@ -2746,7 +2719,7 @@ void clonetiler_dialog(void) int value = prefs->getInt(prefs_path + "jmax", 2); gtk_adjustment_set_value (GTK_ADJUSTMENT (a), value); GtkWidget *sb = gtk_spin_button_new (GTK_ADJUSTMENT (a), 1.0, 0); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), sb, _("How many rows in the tiling"), NULL); + gtk_widget_set_tooltip_text (sb, _("How many rows in the tiling")); gtk_entry_set_width_chars (GTK_ENTRY (sb), 5); gtk_box_pack_start (GTK_BOX (hb), sb, TRUE, TRUE, 0); @@ -2766,7 +2739,7 @@ void clonetiler_dialog(void) int value = prefs->getInt(prefs_path + "imax", 2); gtk_adjustment_set_value (GTK_ADJUSTMENT (a), value); GtkWidget *sb = gtk_spin_button_new (GTK_ADJUSTMENT (a), 1.0, 0); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), sb, _("How many columns in the tiling"), NULL); + gtk_widget_set_tooltip_text (sb, _("How many columns in the tiling")); gtk_entry_set_width_chars (GTK_ENTRY (sb), 5); gtk_box_pack_start (GTK_BOX (hb), sb, TRUE, TRUE, 0); @@ -2796,7 +2769,7 @@ void clonetiler_dialog(void) gtk_adjustment_set_value (GTK_ADJUSTMENT (a), units); GtkWidget *e = gtk_spin_button_new (GTK_ADJUSTMENT (a), 1.0 , 2); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), e, _("Width of the rectangle to be filled"), NULL); + gtk_widget_set_tooltip_text (e, _("Width of the rectangle to be filled")); gtk_entry_set_width_chars (GTK_ENTRY (e), 5); gtk_box_pack_start (GTK_BOX (hb), e, TRUE, TRUE, 0); gtk_signal_connect(GTK_OBJECT(a), "value_changed", @@ -2821,7 +2794,7 @@ void clonetiler_dialog(void) GtkWidget *e = gtk_spin_button_new (GTK_ADJUSTMENT (a), 1.0 , 2); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), e, _("Height of the rectangle to be filled"), NULL); + gtk_widget_set_tooltip_text (e, _("Height of the rectangle to be filled")); gtk_entry_set_width_chars (GTK_ENTRY (e), 5); gtk_box_pack_start (GTK_BOX (hb), e, TRUE, TRUE, 0); gtk_signal_connect(GTK_OBJECT(a), "value_changed", @@ -2837,7 +2810,7 @@ void clonetiler_dialog(void) GtkWidget* radio; { radio = gtk_radio_button_new_with_label (NULL, _("Rows, columns: ")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Create the specified number of rows and columns"), NULL); + gtk_widget_set_tooltip_text (radio, _("Create the specified number of rows and columns")); clonetiler_table_attach (table, radio, 0.0, 1, 1); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_switch_to_create), (gpointer) dlg); } @@ -2847,7 +2820,7 @@ void clonetiler_dialog(void) } { radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), _("Width, height: ")); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Fill the specified width and height with the tiling"), NULL); + gtk_widget_set_tooltip_text (radio, _("Fill the specified width and height with the tiling")); clonetiler_table_attach (table, radio, 0.0, 2, 1); gtk_signal_connect (GTK_OBJECT (radio), "toggled", GTK_SIGNAL_FUNC (clonetiler_switch_to_fill), (gpointer) dlg); } @@ -2866,7 +2839,7 @@ void clonetiler_dialog(void) GtkWidget *b = gtk_check_button_new_with_label (_("Use saved size and position of the tile")); bool keepbbox = prefs->getBool(prefs_path + "keepbbox", true); gtk_toggle_button_set_active ((GtkToggleButton *) b, keepbbox); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Pretend that the size and position of the tile are the same as the last time you tiled it (if any), instead of using the current size"), NULL); + gtk_widget_set_tooltip_text (b, _("Pretend that the size and position of the tile are the same as the last time you tiled it (if any), instead of using the current size")); gtk_box_pack_start (GTK_BOX (hb), b, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(b), "toggled", @@ -2892,7 +2865,7 @@ void clonetiler_dialog(void) GtkWidget *l = gtk_label_new (""); gtk_label_set_markup_with_mnemonic (GTK_LABEL(l), _(" <b>_Create</b> ")); gtk_container_add (GTK_CONTAINER(b), l); - gtk_tooltips_set_tip (tt, b, _("Create and tile the clones of the selection"), NULL); + gtk_widget_set_tooltip_text (b, _("Create and tile the clones of the selection")); gtk_signal_connect (GTK_OBJECT (b), "clicked", GTK_SIGNAL_FUNC (clonetiler_apply), NULL); gtk_box_pack_end (GTK_BOX (hb), b, FALSE, FALSE, 0); } @@ -2908,14 +2881,14 @@ void clonetiler_dialog(void) // http://www.inkscape.org/screenshots/gallery/inkscape-0.42-CVS-tiles-unclump.png // So unclumping is the process of spreading a number of objects out more evenly. GtkWidget *b = gtk_button_new_with_mnemonic (_(" _Unclump ")); - gtk_tooltips_set_tip (tt, b, _("Spread out clones to reduce clumping; can be applied repeatedly"), NULL); + gtk_widget_set_tooltip_text (b, _("Spread out clones to reduce clumping; can be applied repeatedly")); gtk_signal_connect (GTK_OBJECT (b), "clicked", GTK_SIGNAL_FUNC (clonetiler_unclump), NULL); gtk_box_pack_end (GTK_BOX (sb), b, FALSE, FALSE, 0); } { GtkWidget *b = gtk_button_new_with_mnemonic (_(" Re_move ")); - gtk_tooltips_set_tip (tt, b, _("Remove existing tiled clones of the selected object (siblings only)"), NULL); + gtk_widget_set_tooltip_text (b, _("Remove existing tiled clones of the selected object (siblings only)")); gtk_signal_connect (GTK_OBJECT (b), "clicked", GTK_SIGNAL_FUNC (clonetiler_remove), NULL); gtk_box_pack_end (GTK_BOX (sb), b, FALSE, FALSE, 0); } @@ -2933,7 +2906,7 @@ void clonetiler_dialog(void) { GtkWidget *b = gtk_button_new_with_mnemonic (_(" R_eset ")); // TRANSLATORS: "change" is a noun here - gtk_tooltips_set_tip (tt, b, _("Reset all shifts, scales, rotates, opacity and color changes in the dialog to zero"), NULL); + gtk_widget_set_tooltip_text (b, _("Reset all shifts, scales, rotates, opacity and color changes in the dialog to zero")); gtk_signal_connect (GTK_OBJECT (b), "clicked", GTK_SIGNAL_FUNC (clonetiler_reset), NULL); gtk_box_pack_start (GTK_BOX (hb), b, FALSE, FALSE, 0); } diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index 4c1ad4af1..2f1299190 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -450,8 +450,6 @@ sp_export_dialog (void) g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_unhide", G_CALLBACK (sp_dialog_unhide), dlg); - GtkTooltips *tt = gtk_tooltips_new(); - Gtk::VBox *vb = new Gtk::VBox(false, 3); vb->set_border_width(3); gtk_container_add (GTK_CONTAINER (dlg), GTK_WIDGET(vb->gobj())); @@ -625,7 +623,7 @@ sp_export_dialog (void) gtk_widget_set_sensitive(GTK_WIDGET(be), TRUE); gtk_object_set_data(GTK_OBJECT(dlg), "batch_checkbox", be); batch_box->pack_start(*Glib::wrap(be), false, false); - gtk_tooltips_set_tip(tt, be, _("Export each selected object into its own PNG file, using export hints if any (caution, overwrites without asking!)"), NULL); + gtk_widget_set_tooltip_text(be, _("Export each selected object into its own PNG file, using export hints if any (caution, overwrites without asking!)")); batch_box->show_all(); g_signal_connect(G_OBJECT(be), "toggled", GTK_SIGNAL_FUNC(batch_export_clicked), dlg); vb->pack_start(*batch_box); @@ -637,7 +635,7 @@ sp_export_dialog (void) gtk_widget_set_sensitive(GTK_WIDGET(he), TRUE); gtk_object_set_data(GTK_OBJECT(dlg), "hide_checkbox", he); hide_box->pack_start(*Glib::wrap(he), false, false); - gtk_tooltips_set_tip(tt, he, _("In the exported image, hide all objects except those that are selected"), NULL); + gtk_widget_set_tooltip_text(he, _("In the exported image, hide all objects except those that are selected")); hide_box->show_all(); vb->pack_start(*hide_box); } @@ -658,7 +656,7 @@ sp_export_dialog (void) image_label->pack_start(*l); b->add(*image_label); - gtk_tooltips_set_tip (tt, GTK_WIDGET(b->gobj()), _("Export the bitmap file with these settings"), NULL); + gtk_widget_set_tooltip_text (GTK_WIDGET(b->gobj()), _("Export the bitmap file with these settings")); gtk_signal_connect ( GTK_OBJECT (b->gobj()), "clicked", GTK_SIGNAL_FUNC (sp_export_export_clicked), dlg ); bb->pack_end(*b, false, false, 0); diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp index 4d392a316..d07772406 100644 --- a/src/dialogs/find.cpp +++ b/src/dialogs/find.cpp @@ -412,7 +412,7 @@ sp_find_dialog_reset (GObject *, GObject *dlg) #define FIND_LABELWIDTH 80 void -sp_find_new_searchfield (GtkWidget *dlg, GtkWidget *vb, const gchar *label, const gchar *id, GtkTooltips *tt, const gchar *tip) +sp_find_new_searchfield (GtkWidget *dlg, GtkWidget *vb, const gchar *label, const gchar *id, const gchar *tip) { GtkWidget *hb = gtk_hbox_new (FALSE, 0); GtkWidget *l = gtk_label_new_with_mnemonic (label); @@ -424,7 +424,7 @@ sp_find_new_searchfield (GtkWidget *dlg, GtkWidget *vb, const gchar *label, cons gtk_entry_set_max_length (GTK_ENTRY (tf), 64); gtk_box_pack_start (GTK_BOX (hb), tf, TRUE, TRUE, 0); gtk_object_set_data (GTK_OBJECT (dlg), id, tf); - gtk_tooltips_set_tip (tt, tf, tip, NULL); + gtk_widget_set_tooltip_text (tf, tip); g_signal_connect ( G_OBJECT (tf), "activate", G_CALLBACK (sp_find_dialog_find), dlg ); gtk_label_set_mnemonic_widget (GTK_LABEL(l), tf); @@ -432,10 +432,10 @@ sp_find_new_searchfield (GtkWidget *dlg, GtkWidget *vb, const gchar *label, cons } void -sp_find_new_button (GtkWidget *dlg, GtkWidget *hb, const gchar *label, GtkTooltips *tt, const gchar *tip, void (*function) (GObject *, GObject *)) +sp_find_new_button (GtkWidget *dlg, GtkWidget *hb, const gchar *label, const gchar *tip, void (*function) (GObject *, GObject *)) { GtkWidget *b = gtk_button_new_with_mnemonic (label); - gtk_tooltips_set_tip (tt, b, tip, NULL); + gtk_widget_set_tooltip_text (b, tip); gtk_box_pack_start (GTK_BOX (hb), b, TRUE, TRUE, 0); g_signal_connect ( G_OBJECT (b), "clicked", G_CALLBACK (function), dlg ); gtk_widget_show (b); @@ -483,7 +483,7 @@ toggle_shapes (GtkToggleButton *tb, gpointer data) GtkWidget * sp_find_types_checkbox (GtkWidget *w, const gchar *data, gboolean active, - GtkTooltips *tt, const gchar *tip, + const gchar *tip, const gchar *label, void (*toggled)(GtkToggleButton *, gpointer)) { @@ -495,7 +495,7 @@ sp_find_types_checkbox (GtkWidget *w, const gchar *data, gboolean active, gtk_widget_show (b); gtk_toggle_button_set_active ((GtkToggleButton *) b, active); gtk_object_set_data (GTK_OBJECT (w), data, b); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, tip, NULL); + gtk_widget_set_tooltip_text (b, tip); if (toggled) gtk_signal_connect (GTK_OBJECT (b), "toggled", GTK_SIGNAL_FUNC (toggled), w); gtk_box_pack_start (GTK_BOX (hb), b, FALSE, FALSE, 0); @@ -506,7 +506,7 @@ sp_find_types_checkbox (GtkWidget *w, const gchar *data, gboolean active, GtkWidget * sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, gboolean active, - GtkTooltips *tt, const gchar *tip, + const gchar *tip, const gchar *label, void (*toggled)(GtkToggleButton *, gpointer), guint indent) { @@ -520,7 +520,7 @@ sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, gboolean activ gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 0); } - GtkWidget *c = sp_find_types_checkbox (w, data, active, tt, tip, label, toggled); + GtkWidget *c = sp_find_types_checkbox (w, data, active, tip, label, toggled); gtk_box_pack_start (GTK_BOX (hb), c, FALSE, FALSE, 0); return hb; @@ -530,8 +530,6 @@ sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, gboolean activ GtkWidget * sp_find_types () { - GtkTooltips *tt = gtk_tooltips_new (); - GtkWidget *vb = gtk_vbox_new (FALSE, 4); gtk_widget_show (vb); @@ -547,7 +545,7 @@ sp_find_types () gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 0); } - GtkWidget *alltypes = sp_find_types_checkbox (vb, "all", TRUE, tt, _("Search in all object types"), _("All types"), toggle_alltypes); + GtkWidget *alltypes = sp_find_types_checkbox (vb, "all", TRUE, _("Search in all object types"), _("All types"), toggle_alltypes); gtk_box_pack_start (GTK_BOX (hb), alltypes, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vb), hb, FALSE, FALSE, 0); @@ -558,7 +556,7 @@ sp_find_types () gtk_widget_show (vb_all); { - GtkWidget *c = sp_find_types_checkbox_indented (vb, "shapes", FALSE, tt, _("Search all shapes"), _("All shapes"), toggle_shapes, 10); + GtkWidget *c = sp_find_types_checkbox_indented (vb, "shapes", FALSE, _("Search all shapes"), _("All shapes"), toggle_shapes, 10); gtk_box_pack_start (GTK_BOX (vb_all), c, FALSE, FALSE, 0); } @@ -575,22 +573,22 @@ sp_find_types () } { - GtkWidget *c = sp_find_types_checkbox (vb, "rects", FALSE, tt, _("Search rectangles"), _("Rectangles"), NULL); + GtkWidget *c = sp_find_types_checkbox (vb, "rects", FALSE, _("Search rectangles"), _("Rectangles"), NULL); gtk_box_pack_start (GTK_BOX (hb), c, FALSE, FALSE, 0); } { - GtkWidget *c = sp_find_types_checkbox (vb, "ellipses", FALSE, tt, _("Search ellipses, arcs, circles"), _("Ellipses"), NULL); + GtkWidget *c = sp_find_types_checkbox (vb, "ellipses", FALSE, _("Search ellipses, arcs, circles"), _("Ellipses"), NULL); gtk_box_pack_start (GTK_BOX (hb), c, FALSE, FALSE, 0); } { - GtkWidget *c = sp_find_types_checkbox (vb, "stars", FALSE, tt, _("Search stars and polygons"), _("Stars"), NULL); + GtkWidget *c = sp_find_types_checkbox (vb, "stars", FALSE, _("Search stars and polygons"), _("Stars"), NULL); gtk_box_pack_start (GTK_BOX (hb), c, FALSE, FALSE, 0); } { - GtkWidget *c = sp_find_types_checkbox (vb, "spirals", FALSE, tt, _("Search spirals"), _("Spirals"), NULL); + GtkWidget *c = sp_find_types_checkbox (vb, "spirals", FALSE, _("Search spirals"), _("Spirals"), NULL); gtk_box_pack_start (GTK_BOX (hb), c, FALSE, FALSE, 0); } @@ -603,34 +601,34 @@ sp_find_types () { // TRANSLATORS: polyline is a set of connected straight line segments // http://www.w3.org/TR/SVG11/shapes.html#PolylineElement - GtkWidget *c = sp_find_types_checkbox_indented (vb, "paths", TRUE, tt, _("Search paths, lines, polylines"), _("Paths"), NULL, 10); + GtkWidget *c = sp_find_types_checkbox_indented (vb, "paths", TRUE, _("Search paths, lines, polylines"), _("Paths"), NULL, 10); gtk_box_pack_start (GTK_BOX (vb_all), c, FALSE, FALSE, 0); } { - GtkWidget *c = sp_find_types_checkbox_indented (vb, "texts", TRUE, tt, _("Search text objects"), _("Texts"), NULL, 10); + GtkWidget *c = sp_find_types_checkbox_indented (vb, "texts", TRUE, _("Search text objects"), _("Texts"), NULL, 10); gtk_box_pack_start (GTK_BOX (vb_all), c, FALSE, FALSE, 0); } { - GtkWidget *c = sp_find_types_checkbox_indented (vb, "groups", TRUE, tt, _("Search groups"), _("Groups"), NULL, 10); + GtkWidget *c = sp_find_types_checkbox_indented (vb, "groups", TRUE, _("Search groups"), _("Groups"), NULL, 10); gtk_box_pack_start (GTK_BOX (vb_all), c, FALSE, FALSE, 0); } { - GtkWidget *c = sp_find_types_checkbox_indented (vb, "clones", TRUE, tt, _("Search clones"), + GtkWidget *c = sp_find_types_checkbox_indented (vb, "clones", TRUE, _("Search clones"), //TRANSLATORS: "Clones" is a noun indicating type of object to find C_("Find dialog","Clones"), NULL, 10); gtk_box_pack_start (GTK_BOX (vb_all), c, FALSE, FALSE, 0); } { - GtkWidget *c = sp_find_types_checkbox_indented (vb, "images", TRUE, tt, _("Search images"), _("Images"), NULL, 10); + GtkWidget *c = sp_find_types_checkbox_indented (vb, "images", TRUE, _("Search images"), _("Images"), NULL, 10); gtk_box_pack_start (GTK_BOX (vb_all), c, FALSE, FALSE, 0); } { - GtkWidget *c = sp_find_types_checkbox_indented (vb, "offsets", TRUE, tt, _("Search offset objects"), _("Offsets"), NULL, 10); + GtkWidget *c = sp_find_types_checkbox_indented (vb, "offsets", TRUE, _("Search offset objects"), _("Offsets"), NULL, 10); gtk_box_pack_start (GTK_BOX (vb_all), c, FALSE, FALSE, 0); } @@ -687,18 +685,16 @@ sp_find_dialog_old (void) g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_hide", G_CALLBACK (sp_dialog_hide), dlg); g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_unhide", G_CALLBACK (sp_dialog_unhide), dlg); - GtkTooltips *tt = gtk_tooltips_new (); - gtk_container_set_border_width (GTK_CONTAINER (dlg), 4); /* Toplevel vbox */ GtkWidget *vb = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (dlg), vb); - sp_find_new_searchfield (dlg, vb, _("_Text:"), "text", tt, _("Find objects by their text content (exact or partial match)")); - sp_find_new_searchfield (dlg, vb, _("_ID:"), "id", tt, _("Find objects by the value of the id attribute (exact or partial match)")); - sp_find_new_searchfield (dlg, vb, _("_Style:"), "style", tt, _("Find objects by the value of the style attribute (exact or partial match)")); - sp_find_new_searchfield (dlg, vb, _("_Attribute:"), "attr", tt ,_("Find objects by the name of an attribute (exact or partial match)")); + sp_find_new_searchfield (dlg, vb, _("_Text:"), "text", _("Find objects by their text content (exact or partial match)")); + sp_find_new_searchfield (dlg, vb, _("_ID:"), "id", _("Find objects by the value of the id attribute (exact or partial match)")); + sp_find_new_searchfield (dlg, vb, _("_Style:"), "style", _("Find objects by the value of the style attribute (exact or partial match)")); + sp_find_new_searchfield (dlg, vb, _("_Attribute:"), "attr", _("Find objects by the name of an attribute (exact or partial match)")); gtk_widget_show_all (vb); @@ -716,7 +712,7 @@ sp_find_dialog_old (void) gtk_widget_show (b); gtk_toggle_button_set_active ((GtkToggleButton *) b, FALSE); gtk_object_set_data (GTK_OBJECT (dlg), "inselection", b); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Limit search to the current selection"), NULL); + gtk_widget_set_tooltip_text (b, _("Limit search to the current selection")); gtk_box_pack_start (GTK_BOX (vb), b, FALSE, FALSE, 0); } @@ -725,7 +721,7 @@ sp_find_dialog_old (void) gtk_widget_show (b); gtk_toggle_button_set_active ((GtkToggleButton *) b, FALSE); gtk_object_set_data (GTK_OBJECT (dlg), "inlayer", b); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Limit search to the current layer"), NULL); + gtk_widget_set_tooltip_text (b, _("Limit search to the current layer")); gtk_box_pack_start (GTK_BOX (vb), b, FALSE, FALSE, 0); } @@ -734,7 +730,7 @@ sp_find_dialog_old (void) gtk_widget_show (b); gtk_toggle_button_set_active ((GtkToggleButton *) b, FALSE); gtk_object_set_data (GTK_OBJECT (dlg), "includehidden", b); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Include hidden objects in search"), NULL); + gtk_widget_set_tooltip_text (b, _("Include hidden objects in search")); gtk_box_pack_start (GTK_BOX (vb), b, FALSE, FALSE, 0); } @@ -743,7 +739,7 @@ sp_find_dialog_old (void) gtk_widget_show (b); gtk_toggle_button_set_active ((GtkToggleButton *) b, FALSE); gtk_object_set_data (GTK_OBJECT (dlg), "includelocked", b); - gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), b, _("Include locked objects in search"), NULL); + gtk_widget_set_tooltip_text (b, _("Include locked objects in search")); gtk_box_pack_start (GTK_BOX (vb), b, FALSE, FALSE, 0); } } @@ -754,8 +750,8 @@ sp_find_dialog_old (void) gtk_box_pack_start (GTK_BOX (vb), hb, FALSE, FALSE, 0); // TRANSLATORS: "Clear" is a verb here - sp_find_new_button (dlg, hb, _("_Clear"), tt, _("Clear values"), sp_find_dialog_reset); - sp_find_new_button (dlg, hb, _("_Find"), tt, _("Select objects matching all of the fields you filled in"), sp_find_dialog_find); + sp_find_new_button (dlg, hb, _("_Clear"), _("Clear values"), sp_find_dialog_reset); + sp_find_new_button (dlg, hb, _("_Find"), _("Select objects matching all of the fields you filled in"), sp_find_dialog_find); } } diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index 54707c0aa..cd0cea9b5 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -89,8 +89,6 @@ sp_item_widget_new (void) GtkWidget *spw, *vb, *t, *cb, *l, *f, *tf, *pb, *int_expander, *int_label; GtkTextBuffer *desc_buffer; - GtkTooltips *tt = gtk_tooltips_new(); - /* Create container widget */ spw = sp_widget_new_global (INKSCAPE); gtk_signal_connect ( GTK_OBJECT (spw), "modify_selection", @@ -120,7 +118,7 @@ sp_item_widget_new (void) /* Create the entry box for the object id */ tf = gtk_entry_new (); - gtk_tooltips_set_tip (tt, tf, _("The id= attribute (only letters, digits, and the characters .-_: allowed)"), NULL); + gtk_widget_set_tooltip_text (tf, _("The id= attribute (only letters, digits, and the characters .-_: allowed)")); gtk_entry_set_max_length (GTK_ENTRY (tf), 64); gtk_table_attach ( GTK_TABLE (t), tf, 1, 2, 0, 1, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -152,7 +150,7 @@ sp_item_widget_new (void) /* Create the entry box for the object label */ tf = gtk_entry_new (); - gtk_tooltips_set_tip (tt, tf, _("A freeform label for the object"), NULL); + gtk_widget_set_tooltip_text (tf, _("A freeform label for the object")); gtk_entry_set_max_length (GTK_ENTRY (tf), 256); gtk_table_attach ( GTK_TABLE (t), tf, 1, 2, 1, 2, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -214,7 +212,7 @@ sp_item_widget_new (void) /* Hide */ cb = gtk_check_button_new_with_mnemonic (_("_Hide")); - gtk_tooltips_set_tip (tt, cb, _("Check to make the object invisible"), NULL); + gtk_widget_set_tooltip_text (cb, _("Check to make the object invisible")); gtk_table_attach ( GTK_TABLE (t), cb, 0, 1, 0, 1, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions)0, 0, 0 ); @@ -224,7 +222,7 @@ sp_item_widget_new (void) /* Lock */ // TRANSLATORS: "Lock" is a verb here cb = gtk_check_button_new_with_mnemonic (_("L_ock")); - gtk_tooltips_set_tip (tt, cb, _("Check to make the object insensitive (not selectable by mouse)"), NULL); + gtk_widget_set_tooltip_text (cb, _("Check to make the object insensitive (not selectable by mouse)")); gtk_table_attach ( GTK_TABLE (t), cb, 1, 2, 0, 1, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions)0, 0, 0 ); diff --git a/src/dialogs/spellcheck.cpp b/src/dialogs/spellcheck.cpp index ecdc0e0ca..47de25061 100644 --- a/src/dialogs/spellcheck.cpp +++ b/src/dialogs/spellcheck.cpp @@ -185,10 +185,10 @@ static gboolean sp_spellcheck_dialog_delete(GtkObject *, GdkEvent *, gpointer /* } void -sp_spellcheck_new_button (GtkWidget *dlg, GtkWidget *hb, const gchar *label, GtkTooltips *tt, const gchar *tip, void (*function) (GObject *, GObject *), const gchar *cookie) +sp_spellcheck_new_button (GtkWidget *dlg, GtkWidget *hb, const gchar *label, const gchar *tip, void (*function) (GObject *, GObject *), const gchar *cookie) { GtkWidget *b = gtk_button_new_with_mnemonic (label); - gtk_tooltips_set_tip (tt, b, tip, NULL); + gtk_widget_set_tooltip_text (b, tip); gtk_box_pack_start (GTK_BOX (hb), b, TRUE, TRUE, 0); g_signal_connect ( G_OBJECT (b), "clicked", G_CALLBACK (function), dlg ); gtk_object_set_data (GTK_OBJECT (dlg), cookie, b); @@ -926,8 +926,6 @@ sp_spellcheck_dialog (void) g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_hide", G_CALLBACK (sp_dialog_hide), dlg); g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_unhide", G_CALLBACK (sp_dialog_unhide), dlg); - GtkTooltips *tt = gtk_tooltips_new (); - gtk_container_set_border_width (GTK_CONTAINER (dlg), 4); /* Toplevel vbox */ @@ -971,18 +969,18 @@ sp_spellcheck_dialog (void) { GtkWidget *hb = gtk_hbox_new (FALSE, 0); - sp_spellcheck_new_button (dlg, hb, _("_Accept"), tt, _("Accept the chosen suggestion"), + sp_spellcheck_new_button (dlg, hb, _("_Accept"), _("Accept the chosen suggestion"), sp_spellcheck_accept, "b_accept"); - sp_spellcheck_new_button (dlg, hb, _("_Ignore once"), tt, _("Ignore this word only once"), + sp_spellcheck_new_button (dlg, hb, _("_Ignore once"), _("Ignore this word only once"), sp_spellcheck_ignore_once, "b_ignore_once"); - sp_spellcheck_new_button (dlg, hb, _("_Ignore"), tt, _("Ignore this word in this session"), + sp_spellcheck_new_button (dlg, hb, _("_Ignore"), _("Ignore this word in this session"), sp_spellcheck_ignore, "b_ignore"); gtk_box_pack_start (GTK_BOX (vb), hb, FALSE, FALSE, 0); } { GtkWidget *hb = gtk_hbox_new (FALSE, 0); - sp_spellcheck_new_button (dlg, hb, _("A_dd to dictionary:"), tt, _("Add this word to the chosen dictionary"), + sp_spellcheck_new_button (dlg, hb, _("A_dd to dictionary:"), _("Add this word to the chosen dictionary"), sp_spellcheck_add, "b_add"); GtkComboBox *cbox = GTK_COMBO_BOX (gtk_combo_box_new_text()); gtk_combo_box_append_text (cbox, _lang); @@ -1006,9 +1004,9 @@ sp_spellcheck_dialog (void) { GtkWidget *hb = gtk_hbox_new (FALSE, 0); - sp_spellcheck_new_button (dlg, hb, _("_Stop"), tt, _("Stop the check"), + sp_spellcheck_new_button (dlg, hb, _("_Stop"), _("Stop the check"), sp_spellcheck_stop, "b_stop"); - sp_spellcheck_new_button (dlg, hb, _("_Start"), tt, _("Start the check"), + sp_spellcheck_new_button (dlg, hb, _("_Start"), _("Start the check"), sp_spellcheck_start, "b_start"); gtk_box_pack_start (GTK_BOX (vb), hb, FALSE, FALSE, 0); } diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index d46f62d17..46d5637c3 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -188,8 +188,6 @@ sp_text_edit_dialog (void) gtk_window_set_policy (GTK_WINDOW (dlg), TRUE, TRUE, FALSE); - GtkTooltips *tt = gtk_tooltips_new(); - // box containing the notebook and the bottom buttons GtkWidget *mainvb = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (dlg), mainvb); @@ -240,7 +238,7 @@ sp_text_edit_dialog (void) // TODO - replace with Inkscape-specific call GtkWidget *px = gtk_image_new_from_stock ( GTK_STOCK_JUSTIFY_LEFT, GTK_ICON_SIZE_LARGE_TOOLBAR ); GtkWidget *b = group = gtk_radio_button_new (NULL); - gtk_tooltips_set_tip (tt, b, _("Align lines left"), NULL); + gtk_widget_set_tooltip_text (b, _("Align lines left")); gtk_button_set_relief (GTK_BUTTON (b), GTK_RELIEF_NONE); g_signal_connect ( G_OBJECT (b), "toggled", G_CALLBACK (sp_text_edit_dialog_any_toggled), dlg); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (b), FALSE ); @@ -255,7 +253,7 @@ sp_text_edit_dialog (void) GtkWidget *px = gtk_image_new_from_stock ( GTK_STOCK_JUSTIFY_CENTER, GTK_ICON_SIZE_LARGE_TOOLBAR ); GtkWidget *b = gtk_radio_button_new (gtk_radio_button_group (GTK_RADIO_BUTTON (group))); /* TRANSLATORS: `Center' here is a verb. */ - gtk_tooltips_set_tip (tt, b, _("Center lines"), NULL); + gtk_widget_set_tooltip_text (b, _("Center lines")); gtk_button_set_relief (GTK_BUTTON (b), GTK_RELIEF_NONE); g_signal_connect ( G_OBJECT (b), "toggled", G_CALLBACK (sp_text_edit_dialog_any_toggled), dlg ); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (b), FALSE); @@ -269,7 +267,7 @@ sp_text_edit_dialog (void) // TODO - replace with Inkscape-specific call GtkWidget *px = gtk_image_new_from_stock ( GTK_STOCK_JUSTIFY_RIGHT, GTK_ICON_SIZE_LARGE_TOOLBAR ); GtkWidget *b = gtk_radio_button_new (gtk_radio_button_group (GTK_RADIO_BUTTON (group))); - gtk_tooltips_set_tip (tt, b, _("Align lines right"), NULL); + gtk_widget_set_tooltip_text (b, _("Align lines right")); gtk_button_set_relief (GTK_BUTTON (b), GTK_RELIEF_NONE); g_signal_connect ( G_OBJECT (b), "toggled", G_CALLBACK (sp_text_edit_dialog_any_toggled), dlg ); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (b), FALSE); @@ -283,7 +281,7 @@ sp_text_edit_dialog (void) // TODO - replace with Inkscape-specific call GtkWidget *px = gtk_image_new_from_stock ( GTK_STOCK_JUSTIFY_FILL, GTK_ICON_SIZE_LARGE_TOOLBAR ); GtkWidget *b = gtk_radio_button_new (gtk_radio_button_group (GTK_RADIO_BUTTON (group))); - gtk_tooltips_set_tip (tt, b, _("Justify lines"), NULL); + gtk_widget_set_tooltip_text (b, _("Justify lines")); gtk_button_set_relief (GTK_BUTTON (b), GTK_RELIEF_NONE); g_signal_connect ( G_OBJECT (b), "toggled", G_CALLBACK (sp_text_edit_dialog_any_toggled), dlg ); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (b), FALSE); @@ -305,7 +303,7 @@ sp_text_edit_dialog (void) GtkWidget *px = sp_icon_new( Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON_FORMAT_TEXT_DIRECTION_HORIZONTAL ); GtkWidget *b = group = gtk_radio_button_new (NULL); - gtk_tooltips_set_tip (tt, b, _("Horizontal text"), NULL); + gtk_widget_set_tooltip_text (b, _("Horizontal text")); gtk_button_set_relief (GTK_BUTTON (b), GTK_RELIEF_NONE); g_signal_connect ( G_OBJECT (b), "toggled", G_CALLBACK (sp_text_edit_dialog_any_toggled), dlg ); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (b), FALSE); @@ -319,7 +317,7 @@ sp_text_edit_dialog (void) GtkWidget *px = sp_icon_new( Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON_FORMAT_TEXT_DIRECTION_VERTICAL ); GtkWidget *b = gtk_radio_button_new (gtk_radio_button_group (GTK_RADIO_BUTTON (group))); - gtk_tooltips_set_tip (tt, b, _("Vertical text"), NULL); + gtk_widget_set_tooltip_text (b, _("Vertical text")); gtk_button_set_relief (GTK_BUTTON (b), GTK_RELIEF_NONE); g_signal_connect ( G_OBJECT (b), "toggled", G_CALLBACK (sp_text_edit_dialog_any_toggled), dlg ); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (b), FALSE); diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index ddb419dcd..5fd306149 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -66,7 +66,6 @@ static Inkscape::MessageStack *_message_stack = NULL; static Inkscape::MessageContext *_message_context = NULL; static sigc::connection _message_changed_connection; -static GtkTooltips *tooltips = NULL; static GtkEditable *attr_name = NULL; static GtkTextView *attr_value = NULL; static SPXMLViewTree *tree = NULL; @@ -194,9 +193,6 @@ void sp_xml_tree_dialog() GtkWidget *text_container, *attr_container, *attr_subpaned_container, *box2; GtkWidget *set_attr; - tooltips = gtk_tooltips_new(); - gtk_tooltips_enable(tooltips); - dlg = sp_window_new("", TRUE); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); if (x == -1000 || y == -1000) { @@ -267,8 +263,8 @@ void sp_xml_tree_dialog() gtk_paned_pack1(GTK_PANED(paned), box, FALSE, FALSE); tree = SP_XMLVIEW_TREE(sp_xmlview_tree_new(NULL, NULL, NULL)); - gtk_tooltips_set_tip( tooltips, GTK_WIDGET(tree), - _("Drag to reorder nodes"), NULL ); + gtk_widget_set_tooltip_text( GTK_WIDGET(tree), + _("Drag to reorder nodes") ); g_signal_connect( G_OBJECT(tree), "tree_select_row", G_CALLBACK(on_tree_select_row), NULL ); @@ -495,9 +491,9 @@ void sp_xml_tree_dialog() FALSE, TRUE, 0); attr_name = GTK_EDITABLE(gtk_entry_new()); - gtk_tooltips_set_tip( tooltips, GTK_WIDGET(attr_name), + gtk_widget_set_tooltip_text( GTK_WIDGET(attr_name), // TRANSLATORS: "Attribute" is a noun here - _("Attribute name"), NULL ); + _("Attribute name") ); gtk_signal_connect( GTK_OBJECT(attributes), "select_row", (GCallback) on_attr_select_row_set_name_content, @@ -515,9 +511,9 @@ void sp_xml_tree_dialog() TRUE, TRUE, 0); set_attr = gtk_button_new(); - gtk_tooltips_set_tip( tooltips, GTK_WIDGET(set_attr), + gtk_widget_set_tooltip_text( GTK_WIDGET(set_attr), // TRANSLATORS: "Set" is a verb here - _("Set attribute"), NULL ); + _("Set attribute") ); // TRANSLATORS: "Set" is a verb here GtkWidget *set_label = gtk_label_new(_("Set")); gtk_container_add(GTK_CONTAINER(set_attr), set_label); @@ -540,9 +536,9 @@ void sp_xml_tree_dialog() attr_value =(GtkTextView *) gtk_text_view_new(); gtk_text_view_set_wrap_mode((GtkTextView *) attr_value, GTK_WRAP_CHAR); - gtk_tooltips_set_tip( tooltips, GTK_WIDGET(attr_value), + gtk_widget_set_tooltip_text( GTK_WIDGET(attr_value), // TRANSLATORS: "Attribute" is a noun here - _("Attribute value"), NULL ); + _("Attribute value") ); gtk_signal_connect( GTK_OBJECT(attributes), "select_row", (GCallback) on_attr_select_row_set_value_content, attr_value ); @@ -895,8 +891,6 @@ void after_tree_move(GtkCTree */*tree*/, static void on_destroy(GtkObject */*object*/, gpointer /*data*/) { set_tree_desktop(NULL); - gtk_object_destroy(GTK_OBJECT(tooltips)); - tooltips = NULL; sp_signal_disconnect_by_data(INKSCAPE, dlg); wd.win = dlg = NULL; wd.stop = 0; diff --git a/src/ege-adjustment-action.cpp b/src/ege-adjustment-action.cpp index f6df395b9..6b0ffd1ab 100644 --- a/src/ege-adjustment-action.cpp +++ b/src/ege-adjustment-action.cpp @@ -103,7 +103,6 @@ struct _EgeAdjustmentDescr struct _EgeAdjustmentActionPrivate { GtkAdjustment* adj; - GtkTooltips* toolTips; GtkWidget* focusWidget; gdouble climbRate; guint digits; @@ -275,7 +274,6 @@ static void ege_adjustment_action_init( EgeAdjustmentAction* action ) { action->private_data = EGE_ADJUSTMENT_ACTION_GET_PRIVATE( action ); action->private_data->adj = 0; - action->private_data->toolTips = 0; action->private_data->focusWidget = 0; action->private_data->climbRate = 0.0; action->private_data->digits = 2; @@ -852,10 +850,7 @@ static GtkWidget* create_tool_item( GtkAction* action ) g_object_get_property( G_OBJECT(action), "tooltip", &tooltip ); const gchar* tipstr = g_value_get_string( &tooltip ); if ( tipstr && *tipstr ) { - if ( !act->private_data->toolTips ) { - act->private_data->toolTips = gtk_tooltips_new(); - } - gtk_tooltips_set_tip( act->private_data->toolTips, spinbutton, tipstr, 0 ); + gtk_widget_set_tooltip_text( spinbutton, tipstr ); } g_value_unset( &tooltip ); } diff --git a/src/ege-select-one-action.cpp b/src/ege-select-one-action.cpp index 2fd45e268..ea08f1c06 100644 --- a/src/ege-select-one-action.cpp +++ b/src/ege-select-one-action.cpp @@ -652,7 +652,6 @@ GtkWidget* create_tool_item( GtkAction* action ) GtkTreeIter iter; gboolean valid = FALSE; gint index = 0; - GtkTooltips* tooltips = gtk_tooltips_new(); { gchar* sss = 0; @@ -737,7 +736,7 @@ GtkWidget* create_tool_item( GtkAction* action ) sub = gtk_action_create_tool_item( GTK_ACTION(ract) ); gtk_action_connect_proxy( GTK_ACTION(ract), sub ); - gtk_tool_item_set_tooltip( GTK_TOOL_ITEM(sub), tooltips, tip, NULL ); + gtk_tool_item_set_tooltip_text( GTK_TOOL_ITEM(sub), tip ); gtk_box_pack_start( GTK_BOX(holder), sub, FALSE, FALSE, 0 ); @@ -750,7 +749,6 @@ GtkWidget* create_tool_item( GtkAction* action ) } g_object_set_data( G_OBJECT(holder), "ege-proxy_action-group", group ); - g_object_set_data( G_OBJECT(holder), "ege-tooltips", tooltips ); gtk_container_add( GTK_CONTAINER(item), holder ); } else { diff --git a/src/libgdl/gdl-dock-bar.c b/src/libgdl/gdl-dock-bar.c index c4882e7ad..37710b693 100644 --- a/src/libgdl/gdl-dock-bar.c +++ b/src/libgdl/gdl-dock-bar.c @@ -65,7 +65,6 @@ static void gdl_dock_bar_remove_item (GdlDockBar *dockbar, struct _GdlDockBarPrivate { GdlDockMaster *master; GSList *items; - GtkTooltips *tooltips; GtkOrientation orientation; GdlDockBarStyle dockbar_style; }; @@ -130,11 +129,8 @@ gdl_dock_bar_instance_init (GdlDockBar *dockbar) dockbar->_priv = g_new0 (GdlDockBarPrivate, 1); dockbar->_priv->master = NULL; dockbar->_priv->items = NULL; - dockbar->_priv->tooltips = gtk_tooltips_new (); dockbar->_priv->orientation = GTK_ORIENTATION_VERTICAL; dockbar->_priv->dockbar_style = GDL_DOCK_BAR_BOTH; - g_object_ref (dockbar->_priv->tooltips); - gtk_object_sink (GTK_OBJECT (dockbar->_priv->tooltips)); } static void @@ -208,11 +204,6 @@ gdl_dock_bar_destroy (GtkObject *object) priv->master = NULL; } - if (priv->tooltips) { - g_object_unref (priv->tooltips); - priv->tooltips = NULL; - } - dockbar->_priv = NULL; g_free (priv); @@ -334,7 +325,7 @@ gdl_dock_bar_add_item (GdlDockBar *dockbar, gtk_container_add (GTK_CONTAINER (button), box); gtk_box_pack_start (GTK_BOX (dockbar), button, FALSE, FALSE, 0); - gtk_tooltips_set_tip (priv->tooltips, button, name, name); + gtk_widget_set_tooltip_text (button, name); g_free (name); g_object_set_data (G_OBJECT (item), "GdlDockBar", dockbar); diff --git a/src/libgdl/gdl-dock-item-grip.c b/src/libgdl/gdl-dock-item-grip.c index 6457016de..de09fc150 100644 --- a/src/libgdl/gdl-dock-item-grip.c +++ b/src/libgdl/gdl-dock-item-grip.c @@ -33,7 +33,6 @@ enum { struct _GdlDockItemGripPrivate { GtkWidget *close_button; GtkWidget *iconify_button; - GtkTooltips *tooltips; gboolean icon_pixbuf_valid; GdkPixbuf *icon_pixbuf; @@ -264,11 +263,6 @@ gdl_dock_item_grip_destroy (GtkObject *object) priv->icon_pixbuf = NULL; } - if (priv->tooltips) { - g_object_unref (priv->tooltips); - priv->tooltips = NULL; - } - if (grip->item) g_signal_handlers_disconnect_by_func (grip->item, gdl_dock_item_grip_item_notify, @@ -386,13 +380,10 @@ gdl_dock_item_grip_instance_init (GdlDockItemGrip *grip) g_signal_connect (G_OBJECT (grip->_priv->iconify_button), "clicked", G_CALLBACK (gdl_dock_item_grip_iconify_clicked), grip); - grip->_priv->tooltips = gtk_tooltips_new (); - g_object_ref (grip->_priv->tooltips); - gtk_object_sink (GTK_OBJECT (grip->_priv->tooltips)); - gtk_tooltips_set_tip (grip->_priv->tooltips, grip->_priv->iconify_button, - _("Iconify"), _("Iconify this dock")); - gtk_tooltips_set_tip (grip->_priv->tooltips, grip->_priv->close_button, - _("Close"), _("Close this dock")); + gtk_widget_set_tooltip_text (grip->_priv->iconify_button, + _("Iconify")); + gtk_widget_set_tooltip_text (grip->_priv->close_button, + _("Close")); } static void diff --git a/src/libgdl/gdl-switcher.c b/src/libgdl/gdl-switcher.c index c5e139e70..aaddc6d80 100644 --- a/src/libgdl/gdl-switcher.c +++ b/src/libgdl/gdl-switcher.c @@ -74,7 +74,6 @@ typedef struct { GtkWidget *icon; GtkWidget *arrow; GtkWidget *hbox; - GtkTooltips *tooltips; int id; } Button; @@ -103,7 +102,7 @@ GDL_CLASS_BOILERPLATE (GdlSwitcher, gdl_switcher, GtkNotebook, GTK_TYPE_NOTEBOOK static Button * button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon, - GtkTooltips *tooltips, GtkWidget *arrow, GtkWidget *hbox, int id) + GtkWidget *arrow, GtkWidget *hbox, int id) { Button *button = g_new (Button, 1); @@ -112,7 +111,6 @@ button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon, button->icon = icon; button->arrow = arrow; button->hbox = hbox; - button->tooltips = tooltips; button->id = id; g_object_ref (button_widget); @@ -120,7 +118,6 @@ button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon, g_object_ref (icon); g_object_ref (arrow); g_object_ref (hbox); - g_object_ref (tooltips); return button; } @@ -132,7 +129,6 @@ button_free (Button *button) g_object_unref (button->label); g_object_unref (button->icon); g_object_unref (button->hbox); - g_object_unref (button->tooltips); g_free (button); } @@ -750,7 +746,6 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label, GtkWidget *icon_widget; GtkWidget *label_widget; GtkWidget *arrow; - GtkTooltips *button_tooltips; button_widget = gtk_toggle_button_new (); if (switcher->priv->show) @@ -781,24 +776,19 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label, } gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5); gtk_widget_show (label_widget); - button_tooltips = gtk_tooltips_new(); - gtk_tooltips_set_tip (GTK_TOOLTIPS (button_tooltips), button_widget, - tooltips, NULL); + gtk_widget_set_tooltip_text (button_widget, tooltips); switch (INTERNAL_MODE (switcher)) { case GDL_SWITCHER_STYLE_TEXT: gtk_box_pack_start (GTK_BOX (hbox), label_widget, TRUE, TRUE, 0); - gtk_tooltips_disable (button_tooltips); break; case GDL_SWITCHER_STYLE_ICON: gtk_box_pack_start (GTK_BOX (hbox), icon_widget, TRUE, TRUE, 0); - gtk_tooltips_enable (button_tooltips); break; case GDL_SWITCHER_STYLE_BOTH: default: gtk_box_pack_start (GTK_BOX (hbox), icon_widget, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), label_widget, TRUE, TRUE, 0); - gtk_tooltips_disable (button_tooltips); break; } arrow = gtk_arrow_new (GTK_ARROW_UP, GTK_SHADOW_NONE); @@ -808,7 +798,7 @@ gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label, switcher->priv->buttons = g_slist_append (switcher->priv->buttons, button_new (button_widget, label_widget, - icon_widget, button_tooltips, + icon_widget, arrow, hbox, switcher_id)); gtk_widget_set_parent (button_widget, GTK_WIDGET (switcher)); @@ -901,7 +891,6 @@ set_switcher_style_internal (GdlSwitcher *switcher, gtk_box_pack_start (GTK_BOX (button->hbox), button->label, TRUE, TRUE, 0); gtk_widget_show (button->label); - gtk_tooltips_disable (button->tooltips); } break; case GDL_SWITCHER_STYLE_ICON: @@ -914,7 +903,6 @@ set_switcher_style_internal (GdlSwitcher *switcher, } else gtk_container_child_set (GTK_CONTAINER (button->hbox), button->icon, "expand", TRUE, NULL); - gtk_tooltips_enable (button->tooltips); break; case GDL_SWITCHER_STYLE_BOTH: if (INTERNAL_MODE (switcher) @@ -929,7 +917,6 @@ set_switcher_style_internal (GdlSwitcher *switcher, button->icon, "expand", FALSE, NULL); } - gtk_tooltips_disable (button->tooltips); gtk_box_pack_start (GTK_BOX (button->hbox), button->label, TRUE, TRUE, 0); gtk_widget_show (button->label); diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp index dc830d096..9676651d3 100644 --- a/src/widgets/button.cpp +++ b/src/widgets/button.cpp @@ -46,7 +46,7 @@ static void sp_button_set_doubleclick_action (SPButton *button, SPAction *action static void sp_button_action_set_active (SPAction *action, unsigned int active, void *data); static void sp_button_action_set_sensitive (SPAction *action, unsigned int sensitive, void *data); static void sp_button_action_set_shortcut (SPAction *action, unsigned int shortcut, void *data); -static void sp_button_set_composed_tooltip (GtkTooltips *tooltips, GtkWidget *widget, SPAction *action); +static void sp_button_set_composed_tooltip (GtkWidget *widget, SPAction *action); static GtkToggleButtonClass *parent_class; SPActionEventVector button_event_vector = { @@ -98,7 +98,6 @@ sp_button_init (SPButton *button) { button->action = NULL; button->doubleclick_action = NULL; - button->tooltips = NULL; gtk_container_set_border_width (GTK_CONTAINER (button), 0); @@ -116,11 +115,6 @@ sp_button_destroy (GtkObject *object) button = SP_BUTTON (object); - if (button->tooltips) { - g_object_unref (G_OBJECT (button->tooltips)); - button->tooltips = NULL; - } - if (button->action) { sp_button_set_action (button, NULL); } @@ -186,7 +180,7 @@ sp_button_perform_action (SPButton *button, gpointer /*data*/) GtkWidget * -sp_button_new( Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action, GtkTooltips *tooltips ) +sp_button_new( Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action ) { SPButton *button; @@ -194,9 +188,6 @@ sp_button_new( Inkscape::IconSize size, SPButtonType type, SPAction *action, SPA button->type = type; button->lsize = CLAMP( size, Inkscape::ICON_SIZE_MENU, Inkscape::ICON_SIZE_DECORATION ); - button->tooltips = tooltips; - - if (tooltips) g_object_ref ((GObject *) tooltips); sp_button_set_action (button, action); if (doubleclick_action) @@ -253,9 +244,7 @@ sp_button_set_action (SPButton *button, SPAction *action) } } - if (button->tooltips) { - sp_button_set_composed_tooltip (button->tooltips, (GtkWidget *) button, action); - } + sp_button_set_composed_tooltip ((GtkWidget *) button, action); } static void @@ -283,12 +272,10 @@ static void sp_button_action_set_shortcut (SPAction *action, unsigned int /*shortcut*/, void *data) { SPButton *button=SP_BUTTON (data); - if (button->tooltips) { - sp_button_set_composed_tooltip (button->tooltips, GTK_WIDGET (button), action); - } + sp_button_set_composed_tooltip (GTK_WIDGET (button), action); } -static void sp_button_set_composed_tooltip(GtkTooltips *tooltips, GtkWidget *widget, SPAction *action) +static void sp_button_set_composed_tooltip(GtkWidget *widget, SPAction *action) { if (action) { unsigned int shortcut = sp_shortcut_get_primary (action->verb); @@ -298,16 +285,16 @@ static void sp_button_set_composed_tooltip(GtkTooltips *tooltips, GtkWidget *wid gchar *key = sp_shortcut_get_label(shortcut); gchar *tip = g_strdup_printf ("%s (%s)", action->tip, key); - gtk_tooltips_set_tip(tooltips, widget, tip, NULL); + gtk_widget_set_tooltip_text(widget, tip); g_free(tip); g_free(key); } else { // action has no shortcut - gtk_tooltips_set_tip(tooltips, widget, action->tip, NULL); + gtk_widget_set_tooltip_text(widget, action->tip); } } else { // no action - gtk_tooltips_set_tip(tooltips, widget, NULL, NULL); + gtk_widget_set_tooltip_text(widget, NULL); } } @@ -316,12 +303,11 @@ sp_button_new_from_data( Inkscape::IconSize size, SPButtonType type, Inkscape::UI::View::View *view, const gchar *name, - const gchar *tip, - GtkTooltips *tooltips ) + const gchar *tip ) { GtkWidget *button; SPAction *action=sp_action_new(view, name, name, tip, name, 0); - button = sp_button_new (size, type, action, NULL, tooltips); + button = sp_button_new (size, type, action, NULL); nr_object_unref ((NRObject *) action); return button; } diff --git a/src/widgets/button.h b/src/widgets/button.h index 26191f524..19a513074 100644 --- a/src/widgets/button.h +++ b/src/widgets/button.h @@ -38,7 +38,6 @@ struct SPButton { unsigned int psize; SPAction *action; SPAction *doubleclick_action; - GtkTooltips *tooltips; }; struct SPButtonClass { @@ -49,7 +48,7 @@ struct SPButtonClass { GType sp_button_get_type (void); -GtkWidget *sp_button_new (Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action, GtkTooltips *tooltips); +GtkWidget *sp_button_new (Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action); void sp_button_toggle_set_down (SPButton *button, gboolean down); @@ -57,8 +56,7 @@ GtkWidget *sp_button_new_from_data (Inkscape::IconSize size, SPButtonType type, Inkscape::UI::View::View *view, const gchar *name, - const gchar *tip, - GtkTooltips *tooltips); + const gchar *tip); diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 9f0367665..1de82a315 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -236,7 +236,7 @@ SPDesktopWidget::setMessage (Inkscape::MessageType type, const gchar *message) gdk_window_process_updates(GTK_WIDGET(sb)->window, TRUE); } - gtk_tooltips_set_tip (this->tt, this->select_status_eventbox, gtk_label_get_text (sb) , NULL); + gtk_widget_set_tooltip_text (this->select_status_eventbox, gtk_label_get_text (sb)); } Geom::Point @@ -313,7 +313,6 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) dtw->window = 0; dtw->desktop = NULL; dtw->_interaction_disabled_counter = 0; - dtw->tt = gtk_tooltips_new (); /* Main table */ dtw->vbox = gtk_vbox_new (FALSE, 0); @@ -359,7 +358,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) dtw->hruler = sp_hruler_new (); dtw->hruler_box = eventbox; sp_ruler_set_metric (GTK_RULER (dtw->hruler), SP_PT); - gtk_tooltips_set_tip (dtw->tt, dtw->hruler_box, gettext(sp_unit_get_plural (&sp_unit_get_by_id(SP_UNIT_PT))), NULL); + gtk_widget_set_tooltip_text (dtw->hruler_box, gettext(sp_unit_get_plural (&sp_unit_get_by_id(SP_UNIT_PT)))); gtk_container_add (GTK_CONTAINER (eventbox), dtw->hruler); gtk_table_attach (GTK_TABLE (canvas_tbl), eventbox, 1, 2, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(GTK_FILL), widget->style->xthickness, 0); g_signal_connect (G_OBJECT (eventbox), "button_press_event", G_CALLBACK (sp_dt_hruler_event), dtw); @@ -371,7 +370,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) dtw->vruler = sp_vruler_new (); dtw->vruler_box = eventbox; sp_ruler_set_metric (GTK_RULER (dtw->vruler), SP_PT); - gtk_tooltips_set_tip (dtw->tt, dtw->vruler_box, gettext(sp_unit_get_plural (&sp_unit_get_by_id(SP_UNIT_PT))), NULL); + gtk_widget_set_tooltip_text (dtw->vruler_box, gettext(sp_unit_get_plural (&sp_unit_get_by_id(SP_UNIT_PT)))); gtk_container_add (GTK_CONTAINER (eventbox), GTK_WIDGET (dtw->vruler)); gtk_table_attach (GTK_TABLE (canvas_tbl), eventbox, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(GTK_FILL), 0, widget->style->ythickness); g_signal_connect (G_OBJECT (eventbox), "button_press_event", G_CALLBACK (sp_dt_vruler_event), dtw); @@ -389,8 +388,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) SP_BUTTON_TYPE_TOGGLE, NULL, INKSCAPE_ICON_ZOOM_ORIGINAL, - _("Zoom drawing if window size changes"), - dtw->tt); + _("Zoom drawing if window size changes")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dtw->sticky_zoom), prefs->getBool("/options/stickyzoom/value")); gtk_box_pack_start (GTK_BOX (dtw->vscrollbar_box), dtw->sticky_zoom, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (dtw->sticky_zoom), "toggled", G_CALLBACK (sp_dtw_sticky_zoom_toggled), dtw); @@ -412,8 +410,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) SP_BUTTON_TYPE_TOGGLE, NULL, INKSCAPE_ICON_COLOR_MANAGEMENT, - tip, - dtw->tt ); + tip ); #if ENABLE_LCMS { Glib::ustring current = prefs->getString("/options/displayprofile/uri"); @@ -493,7 +490,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) // zoom status spinbutton dtw->zoom_status = gtk_spin_button_new_with_range (log(SP_DESKTOP_ZOOM_MIN)/log(2), log(SP_DESKTOP_ZOOM_MAX)/log(2), 0.1); - gtk_tooltips_set_tip (dtw->tt, dtw->zoom_status, _("Zoom"), NULL); + gtk_widget_set_tooltip_text (dtw->zoom_status, _("Zoom")); gtk_widget_set_size_request (dtw->zoom_status, STATUS_ZOOM_WIDTH, -1); gtk_entry_set_width_chars (GTK_ENTRY (dtw->zoom_status), 6); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (dtw->zoom_status), FALSE); @@ -513,7 +510,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) gtk_table_attach(GTK_TABLE(dtw->coord_status), gtk_vseparator_new(), 0,1, 0,2, GTK_FILL, GTK_FILL, 0, 0); eventbox = gtk_event_box_new (); gtk_container_add (GTK_CONTAINER (eventbox), dtw->coord_status); - gtk_tooltips_set_tip (dtw->tt, eventbox, _("Cursor coordinates"), NULL); + gtk_widget_set_tooltip_text (eventbox, _("Cursor coordinates")); GtkWidget *label_x = gtk_label_new(_("X:")); gtk_misc_set_alignment (GTK_MISC(label_x), 0.0, 0.5); gtk_table_attach(GTK_TABLE(dtw->coord_status), label_x, 1,2, 0,1, GTK_FILL, GTK_FILL, 0, 0); @@ -1595,8 +1592,8 @@ void SPDesktopWidget::namedviewModified(SPObject *obj, guint flags) } // children } // if aux_toolbox is a container - gtk_tooltips_set_tip(this->tt, this->hruler_box, gettext(sp_unit_get_plural (nv->doc_units)), NULL); - gtk_tooltips_set_tip(this->tt, this->vruler_box, gettext(sp_unit_get_plural (nv->doc_units)), NULL); + gtk_widget_set_tooltip_text(this->hruler_box, gettext(sp_unit_get_plural (nv->doc_units))); + gtk_widget_set_tooltip_text(this->vruler_box, gettext(sp_unit_get_plural (nv->doc_units))); sp_desktop_widget_update_rulers(this); ToolboxFactory::updateSnapToolbox(this->desktop, 0, this->snap_toolbox); diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h index c045d6e28..57ba71d8f 100644 --- a/src/widgets/desktop-widget.h +++ b/src/widgets/desktop-widget.h @@ -69,8 +69,6 @@ struct SPDesktopWidget { sigc::connection modified_connection; - GtkTooltips *tt; - SPDesktop *desktop; Gtk::Window *window; diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp index 9a907e78b..3f07e09c8 100644 --- a/src/widgets/gradient-selector.cpp +++ b/src/widgets/gradient-selector.cpp @@ -133,7 +133,6 @@ static void sp_gradient_selector_init(SPGradientSelector *sel) GtkWidget *hb = gtk_hbox_new( FALSE, 0 ); sel->nonsolid.push_back(hb); gtk_box_pack_start( GTK_BOX(sel), hb, FALSE, FALSE, 0 ); - GtkTooltips *ttips = gtk_tooltips_new (); sel->add = gtk_button_new_with_label (_("Duplicate")); sel->nonsolid.push_back(sel->add); @@ -159,12 +158,12 @@ static void sp_gradient_selector_init(SPGradientSelector *sel) sel->nonsolid.push_back(sel->spread); gtk_widget_show(sel->spread); gtk_box_pack_end( GTK_BOX(hb), sel->spread, FALSE, FALSE, 0 ); - gtk_tooltips_set_tip( ttips, sel->spread, + gtk_widget_set_tooltip_text( sel->spread, // TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/pservers.html#LinearGradientSpreadMethodAttribute _("Whether to fill with flat color beyond the ends of the gradient vector " "(spreadMethod=\"pad\"), or repeat the gradient in the same direction " "(spreadMethod=\"repeat\"), or repeat the gradient in alternating opposite " - "directions (spreadMethod=\"reflect\")"), NULL); + "directions (spreadMethod=\"reflect\")")); GtkWidget *m = gtk_menu_new(); GtkWidget *mi = gtk_menu_item_new_with_label(_("none")); diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index 64ed1e309..10e1fb95a 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -464,8 +464,6 @@ GtkWidget * gr_change_widget(SPDesktop *desktop) SPGradientSpread spr_selected = (SPGradientSpread) INT_MAX; // meaning undefined bool spr_multi = false; - GtkTooltips *tt = gtk_tooltips_new(); - gr_read_selection (selection, ev? ev->get_drag() : 0, gr_selected, gr_multi, spr_selected, spr_multi); GtkWidget *widget = gtk_hbox_new(FALSE, FALSE); @@ -484,7 +482,7 @@ GtkWidget * gr_change_widget(SPDesktop *desktop) { GtkWidget *hb = gtk_hbox_new(FALSE, 1); GtkWidget *b = gtk_button_new_with_label(_("Edit...")); - gtk_tooltips_set_tip(tt, b, _("Edit the stops of the gradient"), NULL); + gtk_widget_set_tooltip_text(b, _("Edit the stops of the gradient")); gtk_widget_show(b); gtk_container_add(GTK_CONTAINER(hb), b); gtk_signal_connect(GTK_OBJECT(b), "clicked", GTK_SIGNAL_FUNC(gr_edit), widget); @@ -542,8 +540,6 @@ sp_gradient_toolbox_new(SPDesktop *desktop) gtk_object_set_data(GTK_OBJECT(tbl), "dtw", desktop->canvas); gtk_object_set_data(GTK_OBJECT(tbl), "desktop", desktop); - GtkTooltips *tt = gtk_tooltips_new(); - sp_toolbox_add_label(tbl, _("<b>New:</b>")); // TODO replace aux_toolbox_space(tbl, AUX_SPACING); @@ -557,8 +553,7 @@ sp_gradient_toolbox_new(SPDesktop *desktop) SP_BUTTON_TYPE_TOGGLE, NULL, INKSCAPE_ICON_PAINT_GRADIENT_LINEAR, - _("Create linear gradient"), - tt); + _("Create linear gradient") ); g_signal_connect_after (G_OBJECT (button), "clicked", G_CALLBACK (gr_toggle_type), tbl); g_object_set_data(G_OBJECT(tbl), "linear", button); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), @@ -571,8 +566,7 @@ sp_gradient_toolbox_new(SPDesktop *desktop) SP_BUTTON_TYPE_TOGGLE, NULL, INKSCAPE_ICON_PAINT_GRADIENT_RADIAL, - _("Create radial (elliptic or circular) gradient"), - tt); + _("Create radial (elliptic or circular) gradient")); g_signal_connect_after (G_OBJECT (button), "clicked", G_CALLBACK (gr_toggle_type), tbl); g_object_set_data(G_OBJECT(tbl), "radial", button); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), @@ -599,8 +593,7 @@ sp_gradient_toolbox_new(SPDesktop *desktop) SP_BUTTON_TYPE_TOGGLE, NULL, INKSCAPE_ICON_OBJECT_FILL, - _("Create gradient in the fill"), - tt); + _("Create gradient in the fill")); g_signal_connect_after (G_OBJECT (button), "clicked", G_CALLBACK (gr_toggle_fillstroke), tbl); g_object_set_data(G_OBJECT(tbl), "fill", button); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), @@ -613,8 +606,7 @@ sp_gradient_toolbox_new(SPDesktop *desktop) SP_BUTTON_TYPE_TOGGLE, NULL, INKSCAPE_ICON_OBJECT_STROKE, - _("Create gradient in the stroke"), - tt); + _("Create gradient in the stroke")); g_signal_connect_after (G_OBJECT (button), "clicked", G_CALLBACK (gr_toggle_fillstroke), tbl); g_object_set_data(G_OBJECT(tbl), "stroke", button); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 8ef0ee313..9aa414ab6 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -788,7 +788,6 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s gtk_box_pack_start(GTK_BOX(vb), w, TRUE, TRUE, PAD); sp_repr_add_listener(gradient->getRepr(), &grad_edit_dia_repr_events, vb); - GtkTooltips *tt = gtk_tooltips_new(); /* Stop list */ GtkWidget *mnu = gtk_option_menu_new(); @@ -805,12 +804,12 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s GtkWidget *b = gtk_button_new_with_label(_("Add stop")); gtk_widget_show(b); gtk_container_add(GTK_CONTAINER(hb), b); - gtk_tooltips_set_tip(tt, b, _("Add another control stop to gradient"), NULL); + gtk_widget_set_tooltip_text(b, _("Add another control stop to gradient")); gtk_signal_connect(GTK_OBJECT(b), "clicked", GTK_SIGNAL_FUNC(sp_grd_ed_add_stop), vb); b = gtk_button_new_with_label(_("Delete stop")); gtk_widget_show(b); gtk_container_add(GTK_CONTAINER(hb), b); - gtk_tooltips_set_tip(tt, b, _("Delete current control stop from gradient"), NULL); + gtk_widget_set_tooltip_text(b, _("Delete current control stop from gradient")); gtk_signal_connect(GTK_OBJECT(b), "clicked", GTK_SIGNAL_FUNC(sp_grd_ed_del_stop), vb); gtk_widget_show(hb); diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index 610930a46..631675ede 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -71,7 +71,7 @@ static void sp_paint_selector_class_init(SPPaintSelectorClass *klass); static void sp_paint_selector_init(SPPaintSelector *slider); static void sp_paint_selector_destroy(GtkObject *object); -static GtkWidget *sp_paint_selector_style_button_add(SPPaintSelector *psel, gchar const *px, SPPaintSelector::Mode mode, GtkTooltips *tt, gchar const *tip); +static GtkWidget *sp_paint_selector_style_button_add(SPPaintSelector *psel, gchar const *px, SPPaintSelector::Mode mode, gchar const *tip); static void sp_paint_selector_style_button_toggled(GtkToggleButton *tb, SPPaintSelector *psel); static void sp_paint_selector_fillrule_toggled(GtkToggleButton *tb, SPPaintSelector *psel); @@ -210,8 +210,6 @@ sp_paint_selector_class_init(SPPaintSelectorClass *klass) static void sp_paint_selector_init(SPPaintSelector *psel) { - GtkTooltips *tt = gtk_tooltips_new(); - psel->mode = static_cast<SPPaintSelector::Mode>(-1); // huh? do you mean 0xff? -- I think this means "not in the enum" /* Paint style button box */ @@ -222,19 +220,19 @@ sp_paint_selector_init(SPPaintSelector *psel) /* Buttons */ psel->none = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON_PAINT_NONE, - SPPaintSelector::MODE_NONE, tt, _("No paint")); + SPPaintSelector::MODE_NONE, _("No paint")); psel->solid = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON_PAINT_SOLID, - SPPaintSelector::MODE_COLOR_RGB, tt, _("Flat color")); + SPPaintSelector::MODE_COLOR_RGB, _("Flat color")); psel->gradient = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON_PAINT_GRADIENT_LINEAR, - SPPaintSelector::MODE_GRADIENT_LINEAR, tt, _("Linear gradient")); + SPPaintSelector::MODE_GRADIENT_LINEAR, _("Linear gradient")); psel->radial = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON_PAINT_GRADIENT_RADIAL, - SPPaintSelector::MODE_GRADIENT_RADIAL, tt, _("Radial gradient")); + SPPaintSelector::MODE_GRADIENT_RADIAL, _("Radial gradient")); psel->pattern = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON_PAINT_PATTERN, - SPPaintSelector::MODE_PATTERN, tt, _("Pattern")); + SPPaintSelector::MODE_PATTERN, _("Pattern")); psel->swatch = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON_PAINT_SWATCH, - SPPaintSelector::MODE_SWATCH, tt, _("Swatch")); + SPPaintSelector::MODE_SWATCH, _("Swatch")); psel->unset = sp_paint_selector_style_button_add(psel, INKSCAPE_ICON_PAINT_UNKNOWN, - SPPaintSelector::MODE_UNSET, tt, _("Unset paint (make it undefined so it can be inherited)")); + SPPaintSelector::MODE_UNSET, _("Unset paint (make it undefined so it can be inherited)")); /* Fillrule */ { @@ -246,7 +244,7 @@ sp_paint_selector_init(SPPaintSelector *psel) gtk_button_set_relief(GTK_BUTTON(psel->evenodd), GTK_RELIEF_NONE); gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(psel->evenodd), FALSE); // TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/painting.html#FillRuleProperty - gtk_tooltips_set_tip(tt, psel->evenodd, _("Any path self-intersections or subpaths create holes in the fill (fill-rule: evenodd)"), NULL); + gtk_widget_set_tooltip_text(psel->evenodd, _("Any path self-intersections or subpaths create holes in the fill (fill-rule: evenodd)")); gtk_object_set_data(GTK_OBJECT(psel->evenodd), "mode", GUINT_TO_POINTER(SPPaintSelector::FILLRULE_EVENODD)); w = sp_icon_new(Inkscape::ICON_SIZE_DECORATION, INKSCAPE_ICON_FILL_RULE_EVEN_ODD); gtk_container_add(GTK_CONTAINER(psel->evenodd), w); @@ -257,7 +255,7 @@ sp_paint_selector_init(SPPaintSelector *psel) gtk_button_set_relief(GTK_BUTTON(psel->nonzero), GTK_RELIEF_NONE); gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(psel->nonzero), FALSE); // TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/painting.html#FillRuleProperty - gtk_tooltips_set_tip(tt, psel->nonzero, _("Fill is solid unless a subpath is counterdirectional (fill-rule: nonzero)"), NULL); + gtk_widget_set_tooltip_text(psel->nonzero, _("Fill is solid unless a subpath is counterdirectional (fill-rule: nonzero)")); gtk_object_set_data(GTK_OBJECT(psel->nonzero), "mode", GUINT_TO_POINTER(SPPaintSelector::FILLRULE_NONZERO)); w = sp_icon_new(Inkscape::ICON_SIZE_DECORATION, INKSCAPE_ICON_FILL_RULE_NONZERO); gtk_container_add(GTK_CONTAINER(psel->nonzero), w); @@ -290,12 +288,12 @@ sp_paint_selector_destroy(GtkObject *object) static GtkWidget *sp_paint_selector_style_button_add(SPPaintSelector *psel, gchar const *pixmap, SPPaintSelector::Mode mode, - GtkTooltips *tt, gchar const *tip) + gchar const *tip) { GtkWidget *b, *w; b = gtk_toggle_button_new(); - gtk_tooltips_set_tip(tt, b, tip, NULL); + gtk_widget_set_tooltip_text(b, tip); gtk_widget_show(b); gtk_container_set_border_width(GTK_CONTAINER(b), 0); diff --git a/src/widgets/sp-color-icc-selector.cpp b/src/widgets/sp-color-icc-selector.cpp index 72134c48f..0bae54655 100644 --- a/src/widgets/sp-color-icc-selector.cpp +++ b/src/widgets/sp-color-icc-selector.cpp @@ -137,8 +137,7 @@ ColorICCSelector::ColorICCSelector( SPColorSelector* csel ) _fooMap(0), _adj(0), _sbtn(0), - _label(0), - _tt(0) + _label(0) #if ENABLE_LCMS , _profileName(""), @@ -270,8 +269,6 @@ void ColorICCSelector::init() _updating = FALSE; _dragging = FALSE; - _tt = gtk_tooltips_new(); - t = gtk_table_new (5, 3, FALSE); gtk_widget_show (t); gtk_box_pack_start (GTK_BOX (_csel), t, TRUE, TRUE, 0); @@ -290,7 +287,7 @@ void ColorICCSelector::init() _fixupBtn = gtk_button_new_with_label(_("Fix")); g_signal_connect( G_OBJECT(_fixupBtn), "clicked", G_CALLBACK(_fixupHit), (gpointer)this ); gtk_widget_set_sensitive( _fixupBtn, FALSE ); - gtk_tooltips_set_tip( _tt, _fixupBtn, _("Fix RGB fallback to match icc-color() value."), NULL ); + gtk_widget_set_tooltip_text( _fixupBtn, _("Fix RGB fallback to match icc-color() value.") ); //gtk_misc_set_alignment( GTK_MISC (_fixupBtn), 1.0, 0.5 ); gtk_widget_show( _fixupBtn ); gtk_table_attach( GTK_TABLE (t), _fixupBtn, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, XPAD, YPAD ); @@ -338,18 +335,18 @@ void ColorICCSelector::init() /* Slider */ _fooSlider[i] = sp_color_slider_new( _fooAdj[i] ); #if ENABLE_LCMS - gtk_tooltips_set_tip( _tt, _fooSlider[i], tips[i], NULL ); + gtk_widget_set_tooltip_text( _fooSlider[i], tips[i] ); #else - gtk_tooltips_set_tip( _tt, _fooSlider[i], ".", NULL ); + gtk_widget_set_tooltip_text( _fooSlider[i], "." ); #endif // ENABLE_LCMS gtk_widget_show( _fooSlider[i] ); gtk_table_attach( GTK_TABLE (t), _fooSlider[i], 1, 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)GTK_FILL, XPAD, YPAD ); _fooBtn[i] = gtk_spin_button_new( _fooAdj[i], step, digits ); #if ENABLE_LCMS - gtk_tooltips_set_tip( _tt, _fooBtn[i], tips[i], NULL ); + gtk_widget_set_tooltip_text( _fooBtn[i], tips[i] ); #else - gtk_tooltips_set_tip( _tt, _fooBtn[i], ".", NULL ); + gtk_widget_set_tooltip_text( _fooBtn[i], "." ); #endif // ENABLE_LCMS sp_dialog_defocus_on_enter( _fooBtn[i] ); gtk_label_set_mnemonic_widget( GTK_LABEL(_fooLabel[i]), _fooBtn[i] ); @@ -381,7 +378,7 @@ void ColorICCSelector::init() /* Slider */ _slider = sp_color_slider_new (_adj); - gtk_tooltips_set_tip (_tt, _slider, _("Alpha (opacity)"), NULL); + gtk_widget_set_tooltip_text (_slider, _("Alpha (opacity)")); gtk_widget_show (_slider); gtk_table_attach (GTK_TABLE (t), _slider, 1, 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)GTK_FILL, XPAD, YPAD); @@ -393,7 +390,7 @@ void ColorICCSelector::init() /* Spinbutton */ _sbtn = gtk_spin_button_new (GTK_ADJUSTMENT (_adj), 1.0, 0); - gtk_tooltips_set_tip (_tt, _sbtn, _("Alpha (opacity)"), NULL); + gtk_widget_set_tooltip_text (_sbtn, _("Alpha (opacity)")); sp_dialog_defocus_on_enter (_sbtn); gtk_label_set_mnemonic_widget (GTK_LABEL(_label), _sbtn); gtk_widget_show (_sbtn); @@ -694,8 +691,8 @@ void ColorICCSelector::_setProfile( SVGICCColor* profile ) for ( guint i = 0; i < _profChannelCount; i++ ) { gtk_label_set_text_with_mnemonic( GTK_LABEL(_fooLabel[i]), names[i]); - gtk_tooltips_set_tip( _tt, _fooSlider[i], tips[i], NULL ); - gtk_tooltips_set_tip( _tt, _fooBtn[i], tips[i], NULL ); + gtk_widget_set_tooltip_text( _fooSlider[i], tips[i] ); + gtk_widget_set_tooltip_text( _fooBtn[i], tips[i] ); sp_color_slider_set_colors( SP_COLOR_SLIDER(_fooSlider[i]), SPColor(0.0, 0.0, 0.0).toRGBA32(0xff), diff --git a/src/widgets/sp-color-icc-selector.h b/src/widgets/sp-color-icc-selector.h index f40d93189..b0efa35f4 100644 --- a/src/widgets/sp-color-icc-selector.h +++ b/src/widgets/sp-color-icc-selector.h @@ -66,8 +66,6 @@ protected: GtkWidget* _sbtn; /* Spinbutton */ GtkWidget* _label; /* Label */ - GtkTooltips* _tt; /* tooltip container */ - #if ENABLE_LCMS std::string _profileName; Inkscape::ColorProfile* _prof; diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index 174971555..4c2c03e8a 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -203,8 +203,6 @@ void ColorNotebook::init() GType *selector_types = 0; guint selector_type_count = 0; - GtkTooltips *tt = gtk_tooltips_new (); - /* tempory hardcoding to get types loaded */ SP_TYPE_COLOR_SCALES; SP_TYPE_COLOR_WHEEL_SELECTOR; @@ -336,24 +334,21 @@ void ColorNotebook::init() _box_colormanaged = gtk_event_box_new (); GtkWidget *colormanaged = gtk_image_new_from_icon_name ("color-management-icon", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add (GTK_CONTAINER (_box_colormanaged), colormanaged); - GtkTooltips *tooltips_colormanaged = gtk_tooltips_new (); - gtk_tooltips_set_tip (tooltips_colormanaged, _box_colormanaged, _("Color Managed"), ""); + gtk_widget_set_tooltip_text (_box_colormanaged, _("Color Managed")); gtk_widget_set_sensitive (_box_colormanaged, false); gtk_box_pack_start(GTK_BOX(rgbabox), _box_colormanaged, FALSE, FALSE, 2); _box_outofgamut = gtk_event_box_new (); GtkWidget *outofgamut = gtk_image_new_from_icon_name ("out-of-gamut-icon", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add (GTK_CONTAINER (_box_outofgamut), outofgamut); - GtkTooltips *tooltips_outofgamut = gtk_tooltips_new (); - gtk_tooltips_set_tip (tooltips_outofgamut, _box_outofgamut, _("Out of gamut!"), ""); + gtk_widget_set_tooltip_text (_box_outofgamut, _("Out of gamut!")); gtk_widget_set_sensitive (_box_outofgamut, false); gtk_box_pack_start(GTK_BOX(rgbabox), _box_outofgamut, FALSE, FALSE, 2); _box_toomuchink = gtk_event_box_new (); GtkWidget *toomuchink = gtk_image_new_from_icon_name ("too-much-ink-icon", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_container_add (GTK_CONTAINER (_box_toomuchink), toomuchink); - GtkTooltips *tooltips_toomuchink = gtk_tooltips_new (); - gtk_tooltips_set_tip (tooltips_toomuchink, _box_toomuchink, _("Too much ink!"), ""); + gtk_widget_set_tooltip_text (_box_toomuchink, _("Too much ink!")); gtk_widget_set_sensitive (_box_toomuchink, false); gtk_box_pack_start(GTK_BOX(rgbabox), _box_toomuchink, FALSE, FALSE, 2); @@ -368,7 +363,7 @@ void ColorNotebook::init() sp_dialog_defocus_on_enter (_rgbae); gtk_entry_set_max_length (GTK_ENTRY (_rgbae), 8); gtk_entry_set_width_chars (GTK_ENTRY (_rgbae), 8); - gtk_tooltips_set_tip (tt, _rgbae, _("Hexadecimal RGBA value of the color"), NULL); + gtk_widget_set_tooltip_text (_rgbae, _("Hexadecimal RGBA value of the color")); gtk_box_pack_start(GTK_BOX(rgbabox), _rgbae, FALSE, FALSE, 0); gtk_label_set_mnemonic_widget (GTK_LABEL(_rgbal), _rgbae); diff --git a/src/widgets/sp-color-scales.cpp b/src/widgets/sp-color-scales.cpp index fb8bb0795..001b54752 100644 --- a/src/widgets/sp-color-scales.cpp +++ b/src/widgets/sp-color-scales.cpp @@ -140,8 +140,6 @@ void ColorScales::init() _updating = FALSE; _dragging = FALSE; - _tt = gtk_tooltips_new(); - t = gtk_table_new (5, 3, FALSE); gtk_widget_show (t); gtk_box_pack_start (GTK_BOX (_csel), t, TRUE, TRUE, 0); @@ -402,17 +400,17 @@ void ColorScales::setMode(SPColorScalesMode mode) case SP_COLOR_SCALES_MODE_RGB: _setRangeLimit(255.0); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[0]), _("_R:")); - gtk_tooltips_set_tip (_tt, _s[0], _("Red"), NULL); - gtk_tooltips_set_tip (_tt, _b[0], _("Red"), NULL); + gtk_widget_set_tooltip_text (_s[0], _("Red")); + gtk_widget_set_tooltip_text (_b[0], _("Red")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[1]), _("_G:")); - gtk_tooltips_set_tip (_tt, _s[1], _("Green"), NULL); - gtk_tooltips_set_tip (_tt, _b[1], _("Green"), NULL); + gtk_widget_set_tooltip_text (_s[1], _("Green")); + gtk_widget_set_tooltip_text (_b[1], _("Green")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[2]), _("_B:")); - gtk_tooltips_set_tip (_tt, _s[2], _("Blue"), NULL); - gtk_tooltips_set_tip (_tt, _b[2], _("Blue"), NULL); + gtk_widget_set_tooltip_text (_s[2], _("Blue")); + gtk_widget_set_tooltip_text (_b[2], _("Blue")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[3]), _("_A:")); - gtk_tooltips_set_tip (_tt, _s[3], _("Alpha (opacity)"), NULL); - gtk_tooltips_set_tip (_tt, _b[3], _("Alpha (opacity)"), NULL); + gtk_widget_set_tooltip_text (_s[3], _("Alpha (opacity)")); + gtk_widget_set_tooltip_text (_b[3], _("Alpha (opacity)")); sp_color_slider_set_map (SP_COLOR_SLIDER (_s[0]), NULL); gtk_widget_hide (_l[4]); gtk_widget_hide (_s[4]); @@ -428,17 +426,17 @@ void ColorScales::setMode(SPColorScalesMode mode) case SP_COLOR_SCALES_MODE_HSV: _setRangeLimit(255.0); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[0]), _("_H:")); - gtk_tooltips_set_tip (_tt, _s[0], _("Hue"), NULL); - gtk_tooltips_set_tip (_tt, _b[0], _("Hue"), NULL); + gtk_widget_set_tooltip_text (_s[0], _("Hue")); + gtk_widget_set_tooltip_text (_b[0], _("Hue")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[1]), _("_S:")); - gtk_tooltips_set_tip (_tt, _s[1], _("Saturation"), NULL); - gtk_tooltips_set_tip (_tt, _b[1], _("Saturation"), NULL); + gtk_widget_set_tooltip_text (_s[1], _("Saturation")); + gtk_widget_set_tooltip_text (_b[1], _("Saturation")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[2]), _("_L:")); - gtk_tooltips_set_tip (_tt, _s[2], _("Lightness"), NULL); - gtk_tooltips_set_tip (_tt, _b[2], _("Lightness"), NULL); + gtk_widget_set_tooltip_text (_s[2], _("Lightness")); + gtk_widget_set_tooltip_text (_b[2], _("Lightness")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[3]), _("_A:")); - gtk_tooltips_set_tip (_tt, _s[3], _("Alpha (opacity)"), NULL); - gtk_tooltips_set_tip (_tt, _b[3], _("Alpha (opacity)"), NULL); + gtk_widget_set_tooltip_text (_s[3], _("Alpha (opacity)")); + gtk_widget_set_tooltip_text (_b[3], _("Alpha (opacity)")); sp_color_slider_set_map (SP_COLOR_SLIDER (_s[0]), (guchar*)sp_color_scales_hue_map ()); gtk_widget_hide (_l[4]); gtk_widget_hide (_s[4]); @@ -456,20 +454,20 @@ void ColorScales::setMode(SPColorScalesMode mode) case SP_COLOR_SCALES_MODE_CMYK: _setRangeLimit(100.0); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[0]), _("_C:")); - gtk_tooltips_set_tip (_tt, _s[0], _("Cyan"), NULL); - gtk_tooltips_set_tip (_tt, _b[0], _("Cyan"), NULL); + gtk_widget_set_tooltip_text (_s[0], _("Cyan")); + gtk_widget_set_tooltip_text (_b[0], _("Cyan")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[1]), _("_M:")); - gtk_tooltips_set_tip (_tt, _s[1], _("Magenta"), NULL); - gtk_tooltips_set_tip (_tt, _b[1], _("Magenta"), NULL); + gtk_widget_set_tooltip_text (_s[1], _("Magenta")); + gtk_widget_set_tooltip_text (_b[1], _("Magenta")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[2]), _("_Y:")); - gtk_tooltips_set_tip (_tt, _s[2], _("Yellow"), NULL); - gtk_tooltips_set_tip (_tt, _b[2], _("Yellow"), NULL); + gtk_widget_set_tooltip_text (_s[2], _("Yellow")); + gtk_widget_set_tooltip_text (_b[2], _("Yellow")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[3]), _("_K:")); - gtk_tooltips_set_tip (_tt, _s[3], _("Black"), NULL); - gtk_tooltips_set_tip (_tt, _b[3], _("Black"), NULL); + gtk_widget_set_tooltip_text (_s[3], _("Black")); + gtk_widget_set_tooltip_text (_b[3], _("Black")); gtk_label_set_markup_with_mnemonic (GTK_LABEL (_l[4]), _("_A:")); - gtk_tooltips_set_tip (_tt, _s[4], _("Alpha (opacity)"), NULL); - gtk_tooltips_set_tip (_tt, _b[4], _("Alpha (opacity)"), NULL); + gtk_widget_set_tooltip_text (_s[4], _("Alpha (opacity)")); + gtk_widget_set_tooltip_text (_b[4], _("Alpha (opacity)")); sp_color_slider_set_map (SP_COLOR_SLIDER (_s[0]), NULL); gtk_widget_show (_l[4]); gtk_widget_show (_s[4]); diff --git a/src/widgets/sp-color-scales.h b/src/widgets/sp-color-scales.h index b50c386e8..798a920af 100644 --- a/src/widgets/sp-color-scales.h +++ b/src/widgets/sp-color-scales.h @@ -65,8 +65,6 @@ protected: GtkWidget *_b[5]; /* Spinbuttons */ GtkWidget *_l[5]; /* Labels */ - GtkTooltips *_tt; /* tooltip container */ - private: // By default, disallow copy constructor and assignment operator ColorScales(ColorScales const &obj); diff --git a/src/widgets/sp-color-wheel-selector.cpp b/src/widgets/sp-color-wheel-selector.cpp index 147c91525..25ba250a7 100644 --- a/src/widgets/sp-color-wheel-selector.cpp +++ b/src/widgets/sp-color-wheel-selector.cpp @@ -152,8 +152,6 @@ void ColorWheelSelector::init() _updating = FALSE; _dragging = FALSE; - _tt = gtk_tooltips_new(); - t = gtk_table_new (5, 3, FALSE); gtk_widget_show (t); gtk_box_pack_start (GTK_BOX (_csel), t, TRUE, TRUE, 0); @@ -179,7 +177,7 @@ void ColorWheelSelector::init() /* Slider */ _slider = sp_color_slider_new (_adj); - gtk_tooltips_set_tip (_tt, _slider, _("Alpha (opacity)"), NULL); + gtk_widget_set_tooltip_text (_slider, _("Alpha (opacity)")); gtk_widget_show (_slider); gtk_table_attach (GTK_TABLE (t), _slider, 1, 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)GTK_FILL, XPAD, YPAD); @@ -191,7 +189,7 @@ void ColorWheelSelector::init() /* Spinbutton */ _sbtn = gtk_spin_button_new (GTK_ADJUSTMENT (_adj), 1.0, 0); - gtk_tooltips_set_tip (_tt, _sbtn, _("Alpha (opacity)"), NULL); + gtk_widget_set_tooltip_text (_sbtn, _("Alpha (opacity)")); sp_dialog_defocus_on_enter (_sbtn); gtk_label_set_mnemonic_widget (GTK_LABEL(_label), _sbtn); gtk_widget_show (_sbtn); diff --git a/src/widgets/sp-color-wheel-selector.h b/src/widgets/sp-color-wheel-selector.h index 6c8d2d12b..553f351a0 100644 --- a/src/widgets/sp-color-wheel-selector.h +++ b/src/widgets/sp-color-wheel-selector.h @@ -44,8 +44,6 @@ protected: GtkWidget* _sbtn; /* Spinbutton */ GtkWidget* _label; /* Label */ - GtkTooltips* _tt; /* tooltip container */ - private: // By default, disallow copy constructor and assignment operator ColorWheelSelector( const ColorWheelSelector& obj ); diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp index 49e3a7495..aec1e2e11 100644 --- a/src/widgets/spw-utilities.cpp +++ b/src/widgets/spw-utilities.cpp @@ -92,10 +92,8 @@ GtkWidget *spw_vbox_checkbutton(GtkWidget *dialog, GtkWidget *vbox, g_assert (dialog != NULL); g_assert (vbox != NULL); - GtkTooltips *tt = gtk_tooltips_new (); - GtkWidget *b = gtk_check_button_new_with_label (label); - gtk_tooltips_set_tip(tt, b, tip, NULL); + gtk_widget_set_tooltip_text(b, tip); g_assert (b != NULL); gtk_widget_show (b); gtk_box_pack_start (GTK_BOX (vbox), b, FALSE, FALSE, 0); diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 0dcecfcb1..238e5df7a 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -548,11 +548,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); @@ -570,31 +570,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) { } @@ -624,8 +622,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); } @@ -808,7 +805,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) { @@ -824,7 +821,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); @@ -959,9 +956,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 ) { |
