app, libgimpwidgets: all GimpColorHexEntries should have the same tooltip

Set the tooltip in GimpColorHexEntry itself and remove all other
tooltip setting. This just moves the translatable string sround in
libgimpwidgets/, and even removes it from app/.
This commit is contained in:
Michael Natterer
2018-06-24 14:19:25 +02:00
parent ca3ffec111
commit 2b8b780b6a
5 changed files with 9 additions and 9 deletions

View File

@ -263,10 +263,6 @@ gimp_color_editor_init (GimpColorEditor *editor)
/* The hex triplet entry */ /* The hex triplet entry */
editor->hex_entry = gimp_color_hex_entry_new (); editor->hex_entry = gimp_color_hex_entry_new ();
gimp_help_set_help_data (editor->hex_entry,
_("Hexadecimal color notation as used in HTML and "
"CSS. This entry also accepts CSS color names."),
NULL);
gtk_box_pack_end (GTK_BOX (vbox), editor->hex_entry, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (vbox), editor->hex_entry, FALSE, FALSE, 0);
gtk_widget_show (editor->hex_entry); gtk_widget_show (editor->hex_entry);

View File

@ -216,7 +216,6 @@ gimp_colormap_editor_init (GimpColormapEditor *editor)
editor->color_entry = gimp_color_hex_entry_new (); editor->color_entry = gimp_color_hex_entry_new ();
gtk_widget_set_halign (editor->color_entry, GTK_ALIGN_START); gtk_widget_set_halign (editor->color_entry, GTK_ALIGN_START);
gtk_entry_set_width_chars (GTK_ENTRY (editor->color_entry), 12);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1, gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("HTML notation:"), 0.0, 0.5, _("HTML notation:"), 0.0, 0.5,
editor->color_entry, 1); editor->color_entry, 1);

View File

@ -33,6 +33,9 @@
#include "gimpcellrenderercolor.h" #include "gimpcellrenderercolor.h"
#include "gimpcolorhexentry.h" #include "gimpcolorhexentry.h"
#include "gimphelpui.h"
#include "libgimp/libgimp-intl.h"
/** /**
@ -131,6 +134,11 @@ gimp_color_hex_entry_init (GimpColorHexEntry *entry)
*/ */
gtk_entry_set_width_chars (GTK_ENTRY (entry), 8); gtk_entry_set_width_chars (GTK_ENTRY (entry), 8);
gimp_help_set_help_data (GTK_WIDGET (entry),
_("Hexadecimal color notation as used in HTML and "
"CSS. This entry also accepts CSS color names."),
NULL);
gimp_rgba_set (&private->color, 0.0, 0.0, 0.0, 1.0); gimp_rgba_set (&private->color, 0.0, 0.0, 0.0, 1.0);
store = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, GIMP_TYPE_RGB); store = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, GIMP_TYPE_RGB);

View File

@ -341,10 +341,6 @@ gimp_color_selection_init (GimpColorSelection *selection)
/* The hex triplet entry */ /* The hex triplet entry */
entry = gimp_color_hex_entry_new (); entry = gimp_color_hex_entry_new ();
gimp_help_set_help_data (entry,
_("Hexadecimal color notation as used in HTML and "
"CSS. This entry also accepts CSS color names."),
NULL);
gtk_box_pack_end (GTK_BOX (hbox), entry, TRUE, TRUE, 0); gtk_box_pack_end (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
gtk_widget_show (entry); gtk_widget_show (entry);

View File

@ -38,6 +38,7 @@ libgimpthumb/gimpthumbnail.c
libgimpwidgets/gimpbrowser.c libgimpwidgets/gimpbrowser.c
libgimpwidgets/gimpcolorbutton.c libgimpwidgets/gimpcolorbutton.c
libgimpwidgets/gimpcolorhexentry.c
libgimpwidgets/gimpcolorprofilechooserdialog.c libgimpwidgets/gimpcolorprofilechooserdialog.c
libgimpwidgets/gimpcolorprofilestore.c libgimpwidgets/gimpcolorprofilestore.c
libgimpwidgets/gimpcolorprofileview.c libgimpwidgets/gimpcolorprofileview.c