mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
app: fix tooltips on the toolbox' color and image areas
we started overwriting our own tooltips with a NULL string when getting rid of GtkAlignment.
This commit is contained in:
parent
c399b894a8
commit
74efea7e34
4 changed files with 25 additions and 25 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "gimpcolordialog.h"
|
||||
#include "gimpdialogfactory.h"
|
||||
#include "gimpfgbgeditor.h"
|
||||
#include "gimphelp-ids.h"
|
||||
#include "gimpsessioninfo.h"
|
||||
#include "gimptoolbox.h"
|
||||
#include "gimptoolbox-color-area.h"
|
||||
|
@ -83,15 +84,14 @@ gimp_toolbox_color_area_create (GimpToolbox *toolbox,
|
|||
|
||||
color_area = gimp_fg_bg_editor_new (context);
|
||||
gtk_widget_set_size_request (color_area, width, height);
|
||||
gtk_widget_add_events (color_area,
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK);
|
||||
|
||||
gimp_help_set_help_data
|
||||
(color_area, _("Foreground & background colors.\n"
|
||||
(color_area,
|
||||
_("Foreground & background colors.\n"
|
||||
"The black and white squares reset colors.\n"
|
||||
"The arrows swap colors.\n"
|
||||
"Click to open the color selection dialog."), NULL);
|
||||
"Click to open the color selection dialog."),
|
||||
GIMP_HELP_TOOLBOX_COLOR_AREA);
|
||||
|
||||
g_signal_connect (color_area, "color-clicked",
|
||||
G_CALLBACK (color_area_color_clicked),
|
||||
|
|
|
@ -32,9 +32,10 @@
|
|||
#include "core/gimpimage.h"
|
||||
|
||||
#include "gimpdnd.h"
|
||||
#include "gimpview.h"
|
||||
#include "gimphelp-ids.h"
|
||||
#include "gimptoolbox.h"
|
||||
#include "gimptoolbox-image-area.h"
|
||||
#include "gimpview.h"
|
||||
#include "gimpwindowstrategy.h"
|
||||
#include "gimpwidgets-utils.h"
|
||||
|
||||
|
@ -84,6 +85,7 @@ image_preview_set_viewable (GimpView *view,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
GtkWidget *
|
||||
|
@ -124,7 +126,8 @@ gimp_toolbox_image_area_create (GimpToolbox *toolbox,
|
|||
"Click to open the Image Dialog."));
|
||||
#endif
|
||||
|
||||
gimp_help_set_help_data (image_view, tooltip, NULL);
|
||||
gimp_help_set_help_data (image_view, tooltip,
|
||||
GIMP_HELP_TOOLBOX_IMAGE_AREA);
|
||||
g_free (tooltip);
|
||||
|
||||
g_signal_connect_object (context, "image-changed",
|
||||
|
|
|
@ -34,9 +34,10 @@
|
|||
#include "core/gimppattern.h"
|
||||
|
||||
#include "gimpdnd.h"
|
||||
#include "gimpview.h"
|
||||
#include "gimphelp-ids.h"
|
||||
#include "gimptoolbox.h"
|
||||
#include "gimptoolbox-indicator-area.h"
|
||||
#include "gimpview.h"
|
||||
#include "gimpwidgets-utils.h"
|
||||
#include "gimpwindowstrategy.h"
|
||||
|
||||
|
@ -134,7 +135,7 @@ GtkWidget *
|
|||
gimp_toolbox_indicator_area_create (GimpToolbox *toolbox)
|
||||
{
|
||||
GimpContext *context;
|
||||
GtkWidget *indicator_grid;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *brush_view;
|
||||
GtkWidget *pattern_view;
|
||||
GtkWidget *gradient_view;
|
||||
|
@ -143,9 +144,11 @@ gimp_toolbox_indicator_area_create (GimpToolbox *toolbox)
|
|||
|
||||
context = gimp_toolbox_get_context (toolbox);
|
||||
|
||||
indicator_grid = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (indicator_grid), CELL_SPACING);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (indicator_grid), CELL_SPACING);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), CELL_SPACING);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), CELL_SPACING);
|
||||
|
||||
gimp_help_set_help_data (grid, NULL, GIMP_HELP_TOOLBOX_INDICATOR_AREA);
|
||||
|
||||
/* brush view */
|
||||
|
||||
|
@ -156,7 +159,7 @@ gimp_toolbox_indicator_area_create (GimpToolbox *toolbox)
|
|||
FALSE, TRUE, TRUE);
|
||||
gimp_view_set_viewable (GIMP_VIEW (brush_view),
|
||||
GIMP_VIEWABLE (gimp_context_get_brush (context)));
|
||||
gtk_grid_attach (GTK_GRID (indicator_grid), brush_view, 0, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (grid), brush_view, 0, 0, 1, 1);
|
||||
gtk_widget_show (brush_view);
|
||||
|
||||
gimp_help_set_help_data (brush_view,
|
||||
|
@ -187,7 +190,7 @@ gimp_toolbox_indicator_area_create (GimpToolbox *toolbox)
|
|||
gimp_view_set_viewable (GIMP_VIEW (pattern_view),
|
||||
GIMP_VIEWABLE (gimp_context_get_pattern (context)));
|
||||
|
||||
gtk_grid_attach (GTK_GRID (indicator_grid), pattern_view, 1, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (grid), pattern_view, 1, 0, 1, 1);
|
||||
gtk_widget_show (pattern_view);
|
||||
|
||||
gimp_help_set_help_data (pattern_view,
|
||||
|
@ -218,7 +221,7 @@ gimp_toolbox_indicator_area_create (GimpToolbox *toolbox)
|
|||
gimp_view_set_viewable (GIMP_VIEW (gradient_view),
|
||||
GIMP_VIEWABLE (gimp_context_get_gradient (context)));
|
||||
|
||||
gtk_grid_attach (GTK_GRID (indicator_grid), gradient_view, 0, 1, 2, 1);
|
||||
gtk_grid_attach (GTK_GRID (grid), gradient_view, 0, 1, 2, 1);
|
||||
gtk_widget_show (gradient_view);
|
||||
|
||||
gimp_help_set_help_data (gradient_view,
|
||||
|
@ -239,7 +242,7 @@ gimp_toolbox_indicator_area_create (GimpToolbox *toolbox)
|
|||
gradient_preview_drop_gradient,
|
||||
context);
|
||||
|
||||
gtk_widget_show (indicator_grid);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
return indicator_grid;
|
||||
return grid;
|
||||
}
|
||||
|
|
|
@ -588,8 +588,6 @@ toolbox_create_color_area (GimpToolbox *toolbox,
|
|||
"margin-bottom", 2,
|
||||
NULL);
|
||||
|
||||
gimp_help_set_help_data (col_area, NULL, GIMP_HELP_TOOLBOX_COLOR_AREA);
|
||||
|
||||
return col_area;
|
||||
}
|
||||
|
||||
|
@ -609,8 +607,6 @@ toolbox_create_foo_area (GimpToolbox *toolbox,
|
|||
"margin-bottom", 2,
|
||||
NULL);
|
||||
|
||||
gimp_help_set_help_data (foo_area, NULL, GIMP_HELP_TOOLBOX_INDICATOR_AREA);
|
||||
|
||||
return foo_area;
|
||||
}
|
||||
|
||||
|
@ -630,8 +626,6 @@ toolbox_create_image_area (GimpToolbox *toolbox,
|
|||
"margin-bottom", 2,
|
||||
NULL);
|
||||
|
||||
gimp_help_set_help_data (image_area, NULL, GIMP_HELP_TOOLBOX_IMAGE_AREA);
|
||||
|
||||
return image_area;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue