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:

committed by
Sven Neumann

parent
509351d069
commit
3b3252c0e3
@ -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>
|
2007-01-23 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/main.c: improved output.
|
* app/main.c: improved output.
|
||||||
|
@ -1776,29 +1776,34 @@ type_combo_callback (GimpIntComboBox *combo,
|
|||||||
{
|
{
|
||||||
if (gimp_int_combo_box_get_active (combo, &composeint.compose_idx))
|
if (gimp_int_combo_box_get_active (combo, &composeint.compose_idx))
|
||||||
{
|
{
|
||||||
const gchar *text;
|
|
||||||
gboolean combo4;
|
gboolean combo4;
|
||||||
gboolean scale4;
|
gboolean scale4;
|
||||||
gint compose_idx, j;
|
gint compose_idx;
|
||||||
|
gint j;
|
||||||
|
|
||||||
compose_idx = composeint.compose_idx;
|
compose_idx = composeint.compose_idx;
|
||||||
|
|
||||||
for (j = 0; j < MAX_COMPOSE_IMAGES; j++)
|
for (j = 0; j < MAX_COMPOSE_IMAGES; j++)
|
||||||
{
|
{
|
||||||
text = (compose_dsc[compose_idx].channel_name[j] ?
|
GtkWidget *label = composeint.channel_label[j];
|
||||||
gettext (compose_dsc[compose_idx].channel_name[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_set_text_with_mnemonic (GTK_LABEL (label),
|
||||||
(GTK_LABEL (composeint.channel_label[j]), text);
|
text ? gettext (text) : "");
|
||||||
|
|
||||||
gtk_image_set_from_stock (GTK_IMAGE (composeint.channel_icon[j]),
|
if (icon)
|
||||||
compose_dsc[compose_idx].channel_icon[j],
|
{
|
||||||
GTK_ICON_SIZE_BUTTON);
|
gtk_image_set_from_stock (GTK_IMAGE (image),
|
||||||
|
icon, GTK_ICON_SIZE_BUTTON);
|
||||||
if (compose_dsc[compose_idx].channel_icon[j])
|
gtk_widget_show (image);
|
||||||
gtk_widget_show (composeint.channel_icon[j]);
|
}
|
||||||
else
|
else
|
||||||
gtk_widget_hide (composeint.channel_icon[j]);
|
{
|
||||||
|
gtk_image_clear (GTK_IMAGE (image));
|
||||||
|
gtk_widget_hide (image);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set sensitivity of last menu */
|
/* Set sensitivity of last menu */
|
||||||
|
Reference in New Issue
Block a user