use a PangoAttributeList instead of PangoMarkup for the frame header. Also

2002-03-11  Sven Neumann  <sven@gimp.org>

	* app/gui/preferences-dialog.c: use a PangoAttributeList instead of
	PangoMarkup for the frame header. Also removed bold attribute and
	hardcoded size_request.
This commit is contained in:
Sven Neumann 2002-03-11 20:23:26 +00:00 committed by Sven Neumann
parent a0e47ad8f1
commit 672212e291
3 changed files with 32 additions and 20 deletions

View file

@ -1,3 +1,9 @@
2002-03-11 Sven Neumann <sven@gimp.org>
* app/gui/preferences-dialog.c: use a PangoAttributeList instead of
PangoMarkup for the frame header. Also removed bold attribute and
hardcoded size_request.
2002-03-11 Michael Natterer <mitch@gimp.org> 2002-03-11 Michael Natterer <mitch@gimp.org>
* app/gui/pattern-select.c * app/gui/pattern-select.c

View file

@ -1405,7 +1405,6 @@ prefs_notebook_append_page (Gimp *gimp,
GtkWidget *vbox; GtkWidget *vbox;
GdkPixbuf *pixbuf = NULL; GdkPixbuf *pixbuf = NULL;
GdkPixbuf *small_pixbuf = NULL; GdkPixbuf *small_pixbuf = NULL;
gchar *markup;
event_box = gtk_event_box_new (); event_box = gtk_event_box_new ();
gtk_notebook_append_page (notebook, event_box, NULL); gtk_notebook_append_page (notebook, event_box, NULL);
@ -1418,9 +1417,6 @@ prefs_notebook_append_page (Gimp *gimp,
gtk_container_add (GTK_CONTAINER (event_box), vbox); gtk_container_add (GTK_CONTAINER (event_box), vbox);
gtk_widget_show (vbox); gtk_widget_show (vbox);
markup = g_strdup_printf ("<b><span size=\"x-large\">%s</span></b>",
notebook_label);
if (notebook_icon) if (notebook_icon)
{ {
gchar *filename; gchar *filename;
@ -1448,12 +1444,10 @@ prefs_notebook_append_page (Gimp *gimp,
0, small_pixbuf, 0, small_pixbuf,
1, tree_label, 1, tree_label,
2, page_index, 2, page_index,
3, markup, 3, notebook_label,
4, pixbuf, 4, pixbuf,
-1); -1);
g_free (markup);
if (pixbuf) if (pixbuf)
g_object_unref (pixbuf); g_object_unref (pixbuf);
@ -1482,8 +1476,8 @@ prefs_tree_select_callback (GtkTreeSelection *sel,
gtk_tree_model_get_value (model, &iter, 3, &val); gtk_tree_model_get_value (model, &iter, 3, &val);
gtk_label_set_markup (GTK_LABEL (label), gtk_label_set_text (GTK_LABEL (label),
g_value_get_string (&val)); g_value_get_string (&val));
g_value_unset (&val); g_value_unset (&val);
@ -1638,6 +1632,8 @@ preferences_dialog_create (Gimp *gimp)
GtkWidget *scrolled_window; GtkWidget *scrolled_window;
GtkWidget *text_view; GtkWidget *text_view;
GtkTextBuffer *text_buffer; GtkTextBuffer *text_buffer;
PangoAttrList *attrs;
PangoAttribute *attr;
GSList *group; GSList *group;
gint i; gint i;
@ -1827,11 +1823,18 @@ preferences_dialog_create (Gimp *gimp)
gtk_widget_show (hbox); gtk_widget_show (hbox);
label = gtk_label_new (NULL); label = gtk_label_new (NULL);
gtk_widget_set_size_request (label, -1, 48);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label); gtk_widget_show (label);
attrs = pango_attr_list_new ();
attr = pango_attr_scale_new (PANGO_SCALE_X_LARGE);
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 (); image = gtk_image_new ();
gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image); gtk_widget_show (image);

View file

@ -1405,7 +1405,6 @@ prefs_notebook_append_page (Gimp *gimp,
GtkWidget *vbox; GtkWidget *vbox;
GdkPixbuf *pixbuf = NULL; GdkPixbuf *pixbuf = NULL;
GdkPixbuf *small_pixbuf = NULL; GdkPixbuf *small_pixbuf = NULL;
gchar *markup;
event_box = gtk_event_box_new (); event_box = gtk_event_box_new ();
gtk_notebook_append_page (notebook, event_box, NULL); gtk_notebook_append_page (notebook, event_box, NULL);
@ -1418,9 +1417,6 @@ prefs_notebook_append_page (Gimp *gimp,
gtk_container_add (GTK_CONTAINER (event_box), vbox); gtk_container_add (GTK_CONTAINER (event_box), vbox);
gtk_widget_show (vbox); gtk_widget_show (vbox);
markup = g_strdup_printf ("<b><span size=\"x-large\">%s</span></b>",
notebook_label);
if (notebook_icon) if (notebook_icon)
{ {
gchar *filename; gchar *filename;
@ -1448,12 +1444,10 @@ prefs_notebook_append_page (Gimp *gimp,
0, small_pixbuf, 0, small_pixbuf,
1, tree_label, 1, tree_label,
2, page_index, 2, page_index,
3, markup, 3, notebook_label,
4, pixbuf, 4, pixbuf,
-1); -1);
g_free (markup);
if (pixbuf) if (pixbuf)
g_object_unref (pixbuf); g_object_unref (pixbuf);
@ -1482,8 +1476,8 @@ prefs_tree_select_callback (GtkTreeSelection *sel,
gtk_tree_model_get_value (model, &iter, 3, &val); gtk_tree_model_get_value (model, &iter, 3, &val);
gtk_label_set_markup (GTK_LABEL (label), gtk_label_set_text (GTK_LABEL (label),
g_value_get_string (&val)); g_value_get_string (&val));
g_value_unset (&val); g_value_unset (&val);
@ -1638,6 +1632,8 @@ preferences_dialog_create (Gimp *gimp)
GtkWidget *scrolled_window; GtkWidget *scrolled_window;
GtkWidget *text_view; GtkWidget *text_view;
GtkTextBuffer *text_buffer; GtkTextBuffer *text_buffer;
PangoAttrList *attrs;
PangoAttribute *attr;
GSList *group; GSList *group;
gint i; gint i;
@ -1827,11 +1823,18 @@ preferences_dialog_create (Gimp *gimp)
gtk_widget_show (hbox); gtk_widget_show (hbox);
label = gtk_label_new (NULL); label = gtk_label_new (NULL);
gtk_widget_set_size_request (label, -1, 48);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label); gtk_widget_show (label);
attrs = pango_attr_list_new ();
attr = pango_attr_scale_new (PANGO_SCALE_X_LARGE);
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 (); image = gtk_image_new ();
gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image); gtk_widget_show (image);