mirror of https://github.com/GNOME/gimp.git
Bug 667367 - Bad widget hint
Remove the tooltip of GimpTransformOptions:constrain from the param spec and add it manually, so it is different for rotate and scale.
This commit is contained in:
parent
92e86baa2d
commit
c34239c0bb
|
@ -135,7 +135,7 @@ gimp_transform_options_class_init (GimpTransformOptionsClass *klass)
|
|||
GIMP_PARAM_STATIC_STRINGS);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CONSTRAIN,
|
||||
"constrain",
|
||||
N_("Limit rotation steps to 15 degrees"),
|
||||
NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
}
|
||||
|
@ -267,7 +267,8 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
|
|||
GtkWidget *combo;
|
||||
GtkWidget *scale;
|
||||
GtkWidget *grid_box;
|
||||
const gchar *constrain = NULL;
|
||||
const gchar *constrain_label = NULL;
|
||||
const gchar *constrain_tip = NULL;
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
@ -342,14 +343,16 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
|
|||
|
||||
if (tool_options->tool_info->tool_type == GIMP_TYPE_ROTATE_TOOL)
|
||||
{
|
||||
constrain = (_("15 degrees (%s)"));
|
||||
constrain_label = _("15 degrees (%s)");
|
||||
constrain_tip = _("Limit rotation steps to 15 degrees");
|
||||
}
|
||||
else if (tool_options->tool_info->tool_type == GIMP_TYPE_SCALE_TOOL)
|
||||
{
|
||||
constrain = (_("Keep aspect (%s)"));
|
||||
constrain_label = _("Keep aspect (%s)");
|
||||
constrain_tip = _("Keep the original aspect ratio");
|
||||
}
|
||||
|
||||
if (constrain)
|
||||
if (constrain_label)
|
||||
{
|
||||
GtkWidget *button;
|
||||
gchar *label;
|
||||
|
@ -357,13 +360,15 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
|
|||
|
||||
constrain_mask = gimp_get_constrain_behavior_mask ();
|
||||
|
||||
label = g_strdup_printf (constrain,
|
||||
label = g_strdup_printf (constrain_label,
|
||||
gimp_get_mod_string (constrain_mask));
|
||||
|
||||
button = gimp_prop_check_button_new (config, "constrain", label);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gimp_help_set_help_data (button, constrain_tip, NULL);
|
||||
|
||||
g_free (label);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue