diff --git a/ChangeLog b/ChangeLog index 31cb5728ad..6cefd20e6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2004-06-21 Sven Neumann + + * libgimpwidgets/gimpwidgets.[ch] + * libgimpwidgets/gimpwidgets.def: added new utility function + gimp_label_set_attributes(). + + * app/display/gimpdisplayshell.c + * app/gui/preferences-dialog.c + * app/gui/resolution-calibrate-dialog.c + * app/widgets/gimpviewabledialog.c + * app/widgets/gimpwidgets-utils.c: use the new function. + + * app/widgets/gimpcontainergridview.c + * app/widgets/gimphistogrameditor.c: display the name in italic. + + * plug-ins/common/jpeg.c: display the file size in italic. + 2004-06-20 Bill Skaggs * plug-ins/common/url.c: if url does not end in a recognized diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c index 3ff2650d58..7728e319dd 100644 --- a/app/dialogs/preferences-dialog.c +++ b/app/dialogs/preferences-dialog.c @@ -950,8 +950,6 @@ prefs_dialog_new (Gimp *gimp, GtkWidget *image; GtkWidget *sizeentry; GtkWidget *calibrate_button; - PangoAttrList *attrs; - PangoAttribute *attr; GSList *group; GtkWidget *editor; gint i; @@ -1040,24 +1038,13 @@ prefs_dialog_new (Gimp *gimp, label = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (label), + PANGO_ATTR_SCALE, PANGO_SCALE_LARGE, + PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD, + -1); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 6); gtk_widget_show (label); - attrs = pango_attr_list_new (); - - attr = pango_attr_scale_new (PANGO_SCALE_LARGE); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - gtk_label_set_attributes (GTK_LABEL (label), attrs); - pango_attr_list_unref (attrs); - image = gtk_image_new (); gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 0); gtk_widget_show (image); diff --git a/app/dialogs/resolution-calibrate-dialog.c b/app/dialogs/resolution-calibrate-dialog.c index 758988e980..7326a0fc8e 100644 --- a/app/dialogs/resolution-calibrate-dialog.c +++ b/app/dialogs/resolution-calibrate-dialog.c @@ -49,15 +49,13 @@ void resolution_calibrate_dialog (GtkWidget *resolution_entry, GdkPixbuf *pixbuf) { - GtkWidget *dialog; - GtkWidget *table; - GtkWidget *vbox; - GtkWidget *hbox; - GtkWidget *ruler; - GtkWidget *label; - GdkScreen *screen; - PangoAttrList *attrs; - PangoAttribute *attr; + GtkWidget *dialog; + GtkWidget *table; + GtkWidget *vbox; + GtkWidget *hbox; + GtkWidget *ruler; + GtkWidget *label; + GdkScreen *screen; g_return_if_fail (GIMP_IS_SIZE_ENTRY (resolution_entry)); g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf)); @@ -122,24 +120,13 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry, gtk_label_new (_("Measure the rulers and enter their lengths:")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (label), + PANGO_ATTR_SCALE, PANGO_SCALE_LARGE, + PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD, + -1); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_widget_show (label); - attrs = pango_attr_list_new (); - - attr = pango_attr_scale_new (PANGO_SCALE_LARGE); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - gtk_label_set_attributes (GTK_LABEL (label), attrs); - pango_attr_list_unref (attrs); - hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index 48a6ca6f2e..50862e4a14 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -1474,8 +1474,6 @@ gimp_display_shell_close_warning_dialog (GimpDisplayShell *shell, GtkWidget *vbox; GtkWidget *image; GtkWidget *label; - PangoAttrList *attrs; - PangoAttribute *attr; gchar *name; gchar *title; gchar *message; @@ -1526,18 +1524,6 @@ gimp_display_shell_close_warning_dialog (GimpDisplayShell *shell, gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); gtk_widget_show (vbox); - attrs = pango_attr_list_new (); - - attr = pango_attr_scale_new (PANGO_SCALE_LARGE); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - message = g_strdup_printf (_("Changes were made to '%s'."), name); label = gtk_label_new (message); @@ -1546,12 +1532,13 @@ gimp_display_shell_close_warning_dialog (GimpDisplayShell *shell, g_free (name); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_label_set_attributes (GTK_LABEL (label), attrs); + gimp_label_set_attributes (GTK_LABEL (label), + PANGO_ATTR_SCALE, PANGO_SCALE_LARGE, + PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD, + -1); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_widget_show (label); - pango_attr_list_unref (attrs); - label = gtk_label_new (_("Unsaved changes will be lost.")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); diff --git a/app/gui/preferences-dialog.c b/app/gui/preferences-dialog.c index 3ff2650d58..7728e319dd 100644 --- a/app/gui/preferences-dialog.c +++ b/app/gui/preferences-dialog.c @@ -950,8 +950,6 @@ prefs_dialog_new (Gimp *gimp, GtkWidget *image; GtkWidget *sizeentry; GtkWidget *calibrate_button; - PangoAttrList *attrs; - PangoAttribute *attr; GSList *group; GtkWidget *editor; gint i; @@ -1040,24 +1038,13 @@ prefs_dialog_new (Gimp *gimp, label = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (label), + PANGO_ATTR_SCALE, PANGO_SCALE_LARGE, + PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD, + -1); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 6); gtk_widget_show (label); - attrs = pango_attr_list_new (); - - attr = pango_attr_scale_new (PANGO_SCALE_LARGE); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - gtk_label_set_attributes (GTK_LABEL (label), attrs); - pango_attr_list_unref (attrs); - image = gtk_image_new (); gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 0); gtk_widget_show (image); diff --git a/app/gui/resolution-calibrate-dialog.c b/app/gui/resolution-calibrate-dialog.c index 758988e980..7326a0fc8e 100644 --- a/app/gui/resolution-calibrate-dialog.c +++ b/app/gui/resolution-calibrate-dialog.c @@ -49,15 +49,13 @@ void resolution_calibrate_dialog (GtkWidget *resolution_entry, GdkPixbuf *pixbuf) { - GtkWidget *dialog; - GtkWidget *table; - GtkWidget *vbox; - GtkWidget *hbox; - GtkWidget *ruler; - GtkWidget *label; - GdkScreen *screen; - PangoAttrList *attrs; - PangoAttribute *attr; + GtkWidget *dialog; + GtkWidget *table; + GtkWidget *vbox; + GtkWidget *hbox; + GtkWidget *ruler; + GtkWidget *label; + GdkScreen *screen; g_return_if_fail (GIMP_IS_SIZE_ENTRY (resolution_entry)); g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf)); @@ -122,24 +120,13 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry, gtk_label_new (_("Measure the rulers and enter their lengths:")); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (label), + PANGO_ATTR_SCALE, PANGO_SCALE_LARGE, + PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD, + -1); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_widget_show (label); - attrs = pango_attr_list_new (); - - attr = pango_attr_scale_new (PANGO_SCALE_LARGE); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - gtk_label_set_attributes (GTK_LABEL (label), attrs); - pango_attr_list_unref (attrs); - hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); diff --git a/app/widgets/gimpcontainergridview.c b/app/widgets/gimpcontainergridview.c index f5c8ca6b99..eca31b9a45 100644 --- a/app/widgets/gimpcontainergridview.c +++ b/app/widgets/gimpcontainergridview.c @@ -204,6 +204,9 @@ gimp_container_grid_view_init (GimpContainerGridView *grid_view) grid_view->name_label = gtk_label_new (_("(None)")); gtk_misc_set_alignment (GTK_MISC (grid_view->name_label), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (grid_view->name_label), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (grid_view), grid_view->name_label, FALSE, FALSE, 0); gtk_box_reorder_child (GTK_BOX (grid_view), grid_view->name_label, 0); diff --git a/app/widgets/gimphistogrameditor.c b/app/widgets/gimphistogrameditor.c index 57112e56f9..d63a97eb63 100644 --- a/app/widgets/gimphistogrameditor.c +++ b/app/widgets/gimphistogrameditor.c @@ -140,6 +140,9 @@ gimp_histogram_editor_init (GimpHistogramEditor *editor) editor->name = label = gtk_label_new (_("(None)")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (editor->name), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (editor), label, FALSE, FALSE, 0); gtk_widget_show (label); diff --git a/app/widgets/gimpviewabledialog.c b/app/widgets/gimpviewabledialog.c index f83a67829e..9ff0581211 100644 --- a/app/widgets/gimpviewabledialog.c +++ b/app/widgets/gimpviewabledialog.c @@ -163,29 +163,13 @@ gimp_viewable_dialog_init (GimpViewableDialog *dialog) dialog->desc_label = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (dialog->desc_label), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (dialog->desc_label), + PANGO_ATTR_SCALE, PANGO_SCALE_LARGE, + PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD, + -1); gtk_box_pack_start (GTK_BOX (vbox), dialog->desc_label, FALSE, FALSE, 0); gtk_widget_show (dialog->desc_label); - { - PangoAttrList *attrs; - PangoAttribute *attr; - - attrs = pango_attr_list_new (); - - attr = pango_attr_scale_new (PANGO_SCALE_LARGE); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - gtk_label_set_attributes (GTK_LABEL (dialog->desc_label), attrs); - pango_attr_list_unref (attrs); - } - dialog->viewable_label = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (dialog->viewable_label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (vbox), dialog->viewable_label, FALSE, FALSE, 0); diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c index 586338d91a..9c1a6f8709 100644 --- a/app/widgets/gimpwidgets-utils.c +++ b/app/widgets/gimpwidgets-utils.c @@ -77,16 +77,14 @@ gimp_message_box (const gchar *stock_id, GtkCallback callback, gpointer data) { - MessageBox *msg_box; - GtkWidget *dialog; - GtkWidget *hbox; - GtkWidget *vbox; - GtkWidget *image; - GtkWidget *label; - GList *list; - PangoAttrList *attrs; - PangoAttribute *attr; - gchar *str; + MessageBox *msg_box; + GtkWidget *dialog; + GtkWidget *hbox; + GtkWidget *vbox; + GtkWidget *image; + GtkWidget *label; + GList *list; + gchar *str; g_return_if_fail (stock_id != NULL); g_return_if_fail (message != NULL); @@ -120,22 +118,15 @@ gimp_message_box (const gchar *stock_id, { GtkWidget *label; - attrs = pango_attr_list_new (); - - attr = pango_attr_style_new (PANGO_STYLE_OBLIQUE); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - label = gtk_label_new (_("Message repeated once.")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_label_set_attributes (GTK_LABEL (label), attrs); + gimp_label_set_attributes (GTK_LABEL (label), + PANGO_ATTR_STYLE, PANGO_STYLE_OBLIQUE, + -1); gtk_box_pack_end (GTK_BOX (msg_box->vbox), label, FALSE, FALSE, 0); gtk_widget_show (label); - pango_attr_list_unref (attrs); - msg_box->repeat_label = label; } @@ -184,29 +175,18 @@ gimp_message_box (const gchar *stock_id, gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); gtk_widget_show (vbox); - attrs = pango_attr_list_new (); - - attr = pango_attr_scale_new (PANGO_SCALE_LARGE); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - - attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); - attr->start_index = 0; - attr->end_index = -1; - pango_attr_list_insert (attrs, attr); - str = g_strdup_printf (_("%s Message"), domain); label = gtk_label_new (str); g_free (str); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_label_set_attributes (GTK_LABEL (label), attrs); + gimp_label_set_attributes (GTK_LABEL (label), + PANGO_ATTR_SCALE, PANGO_SCALE_LARGE, + PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD, + -1); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_widget_show (label); - pango_attr_list_unref (attrs); - label = gtk_label_new (message); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); diff --git a/devel-docs/ChangeLog b/devel-docs/ChangeLog index c0ec7fa634..ddfb632341 100644 --- a/devel-docs/ChangeLog +++ b/devel-docs/ChangeLog @@ -1,3 +1,9 @@ +2004-06-21 Sven Neumann + + * libgimpwidgets/libgimpwidgets-sections.txt + * libgimpwidgets/tmpl/gimpwidgets.sgml: + added gimp_label_set_attributes(). + 2004-06-02 Michael Natterer * libgimp/libgimp-sections.txt: follow function renaming. diff --git a/devel-docs/libgimpwidgets/libgimpwidgets-sections.txt b/devel-docs/libgimpwidgets/libgimpwidgets-sections.txt index eb296966c8..ff0ff9a544 100644 --- a/devel-docs/libgimpwidgets/libgimpwidgets-sections.txt +++ b/devel-docs/libgimpwidgets/libgimpwidgets-sections.txt @@ -585,6 +585,7 @@ gimp_float_adjustment_update gimp_double_adjustment_update gimp_unit_menu_update gimp_table_attach_aligned +gimp_label_set_attributes
diff --git a/devel-docs/libgimpwidgets/tmpl/gimpwidgets.sgml b/devel-docs/libgimpwidgets/tmpl/gimpwidgets.sgml index 247358ff76..87cfb5fa0a 100644 --- a/devel-docs/libgimpwidgets/tmpl/gimpwidgets.sgml +++ b/devel-docs/libgimpwidgets/tmpl/gimpwidgets.sgml @@ -355,3 +355,12 @@ Returns the #GimpChainButton which is attached to the #GimpSizeEntry. @Returns: + + + + + +@label: +@Varargs: + + diff --git a/libgimpwidgets/gimpwidgets.c b/libgimpwidgets/gimpwidgets.c index 460a45b7c8..201d3713eb 100644 --- a/libgimpwidgets/gimpwidgets.c +++ b/libgimpwidgets/gimpwidgets.c @@ -1406,3 +1406,134 @@ gimp_table_attach_aligned (GtkTable *table, return label; } + +/** + * gimp_label_set_attributes: + * @label: a #GtkLabel + * @...: a list of PangoAttrType and value pairs terminated by -1. + * + * Sets Pango attributes on a #GtkLabel in a more convenient way than + * gtk_label_set_attributes(). + * + * This function is useful if you want to change the font attributes + * of a #GtkLabel. This is an alternative to using PangoMarkup which + * is slow to parse and akward to handle in an i18n-friendly way. + * + * The attributes are set on the complete label, from start to end. If + * you need to set attributes on part of the label, you will have to + * use the PangoAttributes API directly. + * + * Since: GIMP 2.2 + **/ +void +gimp_label_set_attributes (GtkLabel *label, + ...) +{ + PangoAttribute *attr = NULL; + PangoAttrList *attrs; + va_list args; + + g_return_if_fail (GTK_IS_LABEL (label)); + + attrs = pango_attr_list_new (); + + va_start (args, label); + + do + { + PangoAttrType attr_type = va_arg (args, PangoAttrType); + + switch (attr_type) + { + case PANGO_ATTR_LANGUAGE: + attr = pango_attr_language_new (va_arg (args, PangoLanguage *)); + break; + + case PANGO_ATTR_FAMILY: + attr = pango_attr_family_new (va_arg (args, const gchar *)); + break; + + case PANGO_ATTR_STYLE: + attr = pango_attr_style_new (va_arg (args, PangoStyle)); + break; + + case PANGO_ATTR_WEIGHT: + attr = pango_attr_weight_new (va_arg (args, PangoWeight)); + break; + + case PANGO_ATTR_VARIANT: + attr = pango_attr_variant_new (va_arg (args, PangoVariant)); + break; + + case PANGO_ATTR_STRETCH: + attr = pango_attr_stretch_new (va_arg (args, PangoStretch)); + break; + + case PANGO_ATTR_SIZE: + attr = pango_attr_stretch_new (va_arg (args, gint)); + break; + + case PANGO_ATTR_FONT_DESC: + attr = pango_attr_font_desc_new (va_arg (args, + const PangoFontDescription *)); + break; + + case PANGO_ATTR_FOREGROUND: + { + const PangoColor *color = va_arg (args, const PangoColor *); + + attr = pango_attr_foreground_new (color->red, + color->green, + color->blue); + } + break; + + case PANGO_ATTR_BACKGROUND: + { + const PangoColor *color = va_arg (args, const PangoColor *); + + attr = pango_attr_background_new (color->red, + color->green, + color->blue); + } + break; + + case PANGO_ATTR_UNDERLINE: + attr = pango_attr_underline_new (va_arg (args, PangoUnderline)); + break; + + case PANGO_ATTR_STRIKETHROUGH: + attr = pango_attr_underline_new (va_arg (args, gboolean)); + break; + + case PANGO_ATTR_RISE: + attr = pango_attr_rise_new (va_arg (args, gint)); + break; + + case PANGO_ATTR_SCALE: + attr = pango_attr_scale_new (va_arg (args, gdouble)); + break; + + default: + g_warning ("%s: invalid PangoAttribute type %d", + G_STRFUNC, attr_type); + case -1: + case PANGO_ATTR_INVALID: + attr = NULL; + break; + } + + if (attr) + { + attr->start_index = 0; + attr->end_index = -1; + pango_attr_list_insert (attrs, attr); + } + } + while (attr); + + va_end (args); + + gtk_label_set_attributes (label, attrs); + pango_attr_list_unref (attrs); +} diff --git a/libgimpwidgets/gimpwidgets.def b/libgimpwidgets/gimpwidgets.def index 1a53b5b4e2..950eb66e1f 100644 --- a/libgimpwidgets/gimpwidgets.def +++ b/libgimpwidgets/gimpwidgets.def @@ -112,6 +112,7 @@ EXPORTS gimp_int_store_get_type gimp_int_store_lookup_by_value gimp_int_store_new + gimp_label_set_attributes gimp_memsize_entry_get_type gimp_memsize_entry_get_value gimp_memsize_entry_new diff --git a/libgimpwidgets/gimpwidgets.h b/libgimpwidgets/gimpwidgets.h index 54ac6c033b..d86bc4bf51 100644 --- a/libgimpwidgets/gimpwidgets.h +++ b/libgimpwidgets/gimpwidgets.h @@ -267,6 +267,10 @@ GtkWidget * gimp_table_attach_aligned (GtkTable *table, gboolean left_align); +void gimp_label_set_attributes (GtkLabel *label, + ...); + + G_END_DECLS #endif /* __GIMP_WIDGETS_H__ */ diff --git a/plug-ins/common/jpeg.c b/plug-ins/common/jpeg.c index bab1222954..d3724b1ec3 100644 --- a/plug-ins/common/jpeg.c +++ b/plug-ins/common/jpeg.c @@ -1720,6 +1720,9 @@ save_dialog (void) preview_size = gtk_label_new (_("File size: unknown")); gtk_misc_set_alignment (GTK_MISC (preview_size), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (preview_size), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (vbox), preview_size, FALSE, FALSE, 0); gtk_widget_show (preview_size); diff --git a/plug-ins/jpeg/jpeg-load.c b/plug-ins/jpeg/jpeg-load.c index bab1222954..d3724b1ec3 100644 --- a/plug-ins/jpeg/jpeg-load.c +++ b/plug-ins/jpeg/jpeg-load.c @@ -1720,6 +1720,9 @@ save_dialog (void) preview_size = gtk_label_new (_("File size: unknown")); gtk_misc_set_alignment (GTK_MISC (preview_size), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (preview_size), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (vbox), preview_size, FALSE, FALSE, 0); gtk_widget_show (preview_size); diff --git a/plug-ins/jpeg/jpeg-load.h b/plug-ins/jpeg/jpeg-load.h index bab1222954..d3724b1ec3 100644 --- a/plug-ins/jpeg/jpeg-load.h +++ b/plug-ins/jpeg/jpeg-load.h @@ -1720,6 +1720,9 @@ save_dialog (void) preview_size = gtk_label_new (_("File size: unknown")); gtk_misc_set_alignment (GTK_MISC (preview_size), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (preview_size), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (vbox), preview_size, FALSE, FALSE, 0); gtk_widget_show (preview_size); diff --git a/plug-ins/jpeg/jpeg-save.c b/plug-ins/jpeg/jpeg-save.c index bab1222954..d3724b1ec3 100644 --- a/plug-ins/jpeg/jpeg-save.c +++ b/plug-ins/jpeg/jpeg-save.c @@ -1720,6 +1720,9 @@ save_dialog (void) preview_size = gtk_label_new (_("File size: unknown")); gtk_misc_set_alignment (GTK_MISC (preview_size), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (preview_size), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (vbox), preview_size, FALSE, FALSE, 0); gtk_widget_show (preview_size); diff --git a/plug-ins/jpeg/jpeg-save.h b/plug-ins/jpeg/jpeg-save.h index bab1222954..d3724b1ec3 100644 --- a/plug-ins/jpeg/jpeg-save.h +++ b/plug-ins/jpeg/jpeg-save.h @@ -1720,6 +1720,9 @@ save_dialog (void) preview_size = gtk_label_new (_("File size: unknown")); gtk_misc_set_alignment (GTK_MISC (preview_size), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (preview_size), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (vbox), preview_size, FALSE, FALSE, 0); gtk_widget_show (preview_size); diff --git a/plug-ins/jpeg/jpeg.c b/plug-ins/jpeg/jpeg.c index bab1222954..d3724b1ec3 100644 --- a/plug-ins/jpeg/jpeg.c +++ b/plug-ins/jpeg/jpeg.c @@ -1720,6 +1720,9 @@ save_dialog (void) preview_size = gtk_label_new (_("File size: unknown")); gtk_misc_set_alignment (GTK_MISC (preview_size), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (preview_size), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (vbox), preview_size, FALSE, FALSE, 0); gtk_widget_show (preview_size); diff --git a/plug-ins/jpeg/jpeg.h b/plug-ins/jpeg/jpeg.h index bab1222954..d3724b1ec3 100644 --- a/plug-ins/jpeg/jpeg.h +++ b/plug-ins/jpeg/jpeg.h @@ -1720,6 +1720,9 @@ save_dialog (void) preview_size = gtk_label_new (_("File size: unknown")); gtk_misc_set_alignment (GTK_MISC (preview_size), 0.0, 0.5); + gimp_label_set_attributes (GTK_LABEL (preview_size), + PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC, + -1); gtk_box_pack_start (GTK_BOX (vbox), preview_size, FALSE, FALSE, 0); gtk_widget_show (preview_size);