mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-19 22:34:37 +00:00
Move mitch's unitmenu change so now it actually Works For Me (TMO
This commit is contained in:
parent
1944949150
commit
7c96774bd4
|
@ -1,3 +1,8 @@
|
|||
Sat Dec 4 05:30:38 GMT 1999 Nick Lamb <njl195@zepler.org.uk>
|
||||
|
||||
* libgimp/gimpunitmenu.c: Move mitch's change so now it
|
||||
actually Works For Me (TM)
|
||||
|
||||
1999-12-03 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimp/gimpunitmenu.c: Set the clist columns to their
|
||||
|
|
|
@ -491,8 +491,33 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum)
|
|||
gtk_clist_set_shadow_type (GTK_CLIST (gum->clist), GTK_SHADOW_IN);
|
||||
gtk_clist_set_selection_mode (GTK_CLIST (gum->clist), GTK_SELECTION_BROWSE);
|
||||
gtk_clist_column_titles_passive (GTK_CLIST (gum->clist));
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_win), gum->clist);
|
||||
/* the unit lines */
|
||||
num_units = gimp_unit_get_number_of_units ();
|
||||
for (unit = UNIT_END; unit < num_units; unit++)
|
||||
{
|
||||
row[0] = g_strdup (gimp_unit_menu_build_string (gum->format, unit));
|
||||
row[1] = g_strdup (gimp_unit_menu_build_string ("(%f)", unit));
|
||||
|
||||
gtk_clist_append (GTK_CLIST (gum->clist), row);
|
||||
gtk_clist_set_row_data (GTK_CLIST (gum->clist),
|
||||
unit - UNIT_END,
|
||||
(gpointer) unit);
|
||||
|
||||
g_free (row[0]);
|
||||
g_free (row[1]);
|
||||
}
|
||||
|
||||
unit_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 0);
|
||||
factor_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 1);
|
||||
|
||||
gtk_clist_set_column_width (GTK_CLIST (gum->clist), 0, unit_width);
|
||||
gtk_clist_set_column_width (GTK_CLIST (gum->clist), 1, factor_width);
|
||||
|
||||
gtk_widget_set_usize (gum->clist, -1, 150);
|
||||
|
||||
/* now show the dialog */
|
||||
gtk_widget_show (gum->clist);
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_win), gum->clist);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (gum->selection), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
|
||||
|
@ -530,31 +555,6 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum)
|
|||
gum);
|
||||
gtk_widget_show (button);
|
||||
|
||||
/* the unit lines */
|
||||
num_units = gimp_unit_get_number_of_units ();
|
||||
for (unit = UNIT_END; unit < num_units; unit++)
|
||||
{
|
||||
row[0] = g_strdup (gimp_unit_menu_build_string (gum->format, unit));
|
||||
row[1] = g_strdup (gimp_unit_menu_build_string ("(%f)", unit));
|
||||
|
||||
gtk_clist_append (GTK_CLIST (gum->clist), row);
|
||||
gtk_clist_set_row_data (GTK_CLIST (gum->clist),
|
||||
unit - UNIT_END,
|
||||
(gpointer) unit);
|
||||
|
||||
g_free (row[0]);
|
||||
g_free (row[1]);
|
||||
}
|
||||
|
||||
unit_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 0);
|
||||
factor_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 1);
|
||||
|
||||
gtk_clist_set_column_width (GTK_CLIST (gum->clist), 0, unit_width);
|
||||
gtk_clist_set_column_width (GTK_CLIST (gum->clist), 1, factor_width);
|
||||
|
||||
gtk_widget_set_usize (gum->clist, -1, 150);
|
||||
|
||||
/* now show the dialog */
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (gum->selection);
|
||||
|
||||
|
|
|
@ -491,8 +491,33 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum)
|
|||
gtk_clist_set_shadow_type (GTK_CLIST (gum->clist), GTK_SHADOW_IN);
|
||||
gtk_clist_set_selection_mode (GTK_CLIST (gum->clist), GTK_SELECTION_BROWSE);
|
||||
gtk_clist_column_titles_passive (GTK_CLIST (gum->clist));
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_win), gum->clist);
|
||||
/* the unit lines */
|
||||
num_units = gimp_unit_get_number_of_units ();
|
||||
for (unit = UNIT_END; unit < num_units; unit++)
|
||||
{
|
||||
row[0] = g_strdup (gimp_unit_menu_build_string (gum->format, unit));
|
||||
row[1] = g_strdup (gimp_unit_menu_build_string ("(%f)", unit));
|
||||
|
||||
gtk_clist_append (GTK_CLIST (gum->clist), row);
|
||||
gtk_clist_set_row_data (GTK_CLIST (gum->clist),
|
||||
unit - UNIT_END,
|
||||
(gpointer) unit);
|
||||
|
||||
g_free (row[0]);
|
||||
g_free (row[1]);
|
||||
}
|
||||
|
||||
unit_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 0);
|
||||
factor_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 1);
|
||||
|
||||
gtk_clist_set_column_width (GTK_CLIST (gum->clist), 0, unit_width);
|
||||
gtk_clist_set_column_width (GTK_CLIST (gum->clist), 1, factor_width);
|
||||
|
||||
gtk_widget_set_usize (gum->clist, -1, 150);
|
||||
|
||||
/* now show the dialog */
|
||||
gtk_widget_show (gum->clist);
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_win), gum->clist);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (gum->selection), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
|
||||
|
@ -530,31 +555,6 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum)
|
|||
gum);
|
||||
gtk_widget_show (button);
|
||||
|
||||
/* the unit lines */
|
||||
num_units = gimp_unit_get_number_of_units ();
|
||||
for (unit = UNIT_END; unit < num_units; unit++)
|
||||
{
|
||||
row[0] = g_strdup (gimp_unit_menu_build_string (gum->format, unit));
|
||||
row[1] = g_strdup (gimp_unit_menu_build_string ("(%f)", unit));
|
||||
|
||||
gtk_clist_append (GTK_CLIST (gum->clist), row);
|
||||
gtk_clist_set_row_data (GTK_CLIST (gum->clist),
|
||||
unit - UNIT_END,
|
||||
(gpointer) unit);
|
||||
|
||||
g_free (row[0]);
|
||||
g_free (row[1]);
|
||||
}
|
||||
|
||||
unit_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 0);
|
||||
factor_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 1);
|
||||
|
||||
gtk_clist_set_column_width (GTK_CLIST (gum->clist), 0, unit_width);
|
||||
gtk_clist_set_column_width (GTK_CLIST (gum->clist), 1, factor_width);
|
||||
|
||||
gtk_widget_set_usize (gum->clist, -1, 150);
|
||||
|
||||
/* now show the dialog */
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (gum->selection);
|
||||
|
||||
|
|
Loading…
Reference in a new issue