code cleanup.

2007-01-23  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/compose.c (type_combo_callback): code cleanup.


svn path=/trunk/; revision=21764
This commit is contained in:
Sven Neumann 2007-01-23 08:18:13 +00:00 committed by Sven Neumann
parent 509351d069
commit 3b3252c0e3
2 changed files with 24 additions and 15 deletions

View File

@ -1,3 +1,7 @@
2007-01-23 Sven Neumann <sven@gimp.org>
* plug-ins/common/compose.c (type_combo_callback): code cleanup.
2007-01-23 Sven Neumann <sven@gimp.org>
* app/main.c: improved output.

View File

@ -1776,29 +1776,34 @@ type_combo_callback (GimpIntComboBox *combo,
{
if (gimp_int_combo_box_get_active (combo, &composeint.compose_idx))
{
const gchar *text;
gboolean combo4;
gboolean scale4;
gint compose_idx, j;
gboolean combo4;
gboolean scale4;
gint compose_idx;
gint j;
compose_idx = composeint.compose_idx;
for (j = 0; j < MAX_COMPOSE_IMAGES; j++)
{
text = (compose_dsc[compose_idx].channel_name[j] ?
gettext (compose_dsc[compose_idx].channel_name[j]) : "");
GtkWidget *label = composeint.channel_label[j];
GtkWidget *image = composeint.channel_icon[j];
const gchar *text = compose_dsc[compose_idx].channel_name[j];
const gchar *icon = compose_dsc[compose_idx].channel_icon[j];
gtk_label_set_text_with_mnemonic
(GTK_LABEL (composeint.channel_label[j]), text);
gtk_label_set_text_with_mnemonic (GTK_LABEL (label),
text ? gettext (text) : "");
gtk_image_set_from_stock (GTK_IMAGE (composeint.channel_icon[j]),
compose_dsc[compose_idx].channel_icon[j],
GTK_ICON_SIZE_BUTTON);
if (compose_dsc[compose_idx].channel_icon[j])
gtk_widget_show (composeint.channel_icon[j]);
if (icon)
{
gtk_image_set_from_stock (GTK_IMAGE (image),
icon, GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image);
}
else
gtk_widget_hide (composeint.channel_icon[j]);
{
gtk_image_clear (GTK_IMAGE (image));
gtk_widget_hide (image);
}
}
/* Set sensitivity of last menu */