gimp r26364 - in branches/soc-2008-tagging: . app/widgets
- From: aurisj svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26364 - in branches/soc-2008-tagging: . app/widgets
- Date: Mon, 4 Aug 2008 17:40:31 +0000 (UTC)
Author: aurisj
Date: Mon Aug 4 17:40:31 2008
New Revision: 26364
URL: http://svn.gnome.org/viewvc/gimp?rev=26364&view=rev
Log:
2008-08-04 Aurimas JuÅka <aurisj svn gnome org>
* app/widgets/gimpcombotagentry.c (gimp_combo_tag_entry_style_set):
* app/widgets/gimptagpopup.c (gimp_tag_popup_list_expose):
underline highlighted tags in popup list.
Modified:
branches/soc-2008-tagging/ChangeLog
branches/soc-2008-tagging/app/widgets/gimpcombotagentry.c
branches/soc-2008-tagging/app/widgets/gimptagpopup.c
Modified: branches/soc-2008-tagging/app/widgets/gimpcombotagentry.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimpcombotagentry.c (original)
+++ branches/soc-2008-tagging/app/widgets/gimpcombotagentry.c Mon Aug 4 17:40:31 2008
@@ -253,8 +253,6 @@
color = style->text[GTK_STATE_NORMAL];
attribute = pango_attr_foreground_new (color.red, color.green, color.blue);
pango_attr_list_insert (combo_entry->normal_item_attr, attribute);
- attribute = pango_attr_underline_new (PANGO_UNDERLINE_SINGLE);
- pango_attr_list_insert (combo_entry->normal_item_attr, attribute);
if (combo_entry->selected_item_attr)
{
Modified: branches/soc-2008-tagging/app/widgets/gimptagpopup.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimptagpopup.c (original)
+++ branches/soc-2008-tagging/app/widgets/gimptagpopup.c Mon Aug 4 17:40:31 2008
@@ -571,6 +571,8 @@
GdkGC *gc;
PangoRenderer *renderer;
gint i;
+ PangoAttribute *attribute;
+ PangoAttrList *attributes;
renderer = gdk_pango_renderer_get_default (gtk_widget_get_screen (widget));
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), widget->style->black_gc);
@@ -588,21 +590,27 @@
gimp_tag_get_name (tag_popup->tag_data[i].tag), -1);
if (tag_popup->tag_data[i].state == GTK_STATE_SELECTED)
{
- pango_layout_set_attributes (tag_popup->layout,
- tag_popup->combo_entry->selected_item_attr);
+ attributes = pango_attr_list_copy (tag_popup->combo_entry->selected_item_attr);
}
else if (tag_popup->tag_data[i].state == GTK_STATE_INSENSITIVE)
{
- pango_layout_set_attributes (tag_popup->layout,
- tag_popup->combo_entry->insensitive_item_attr);
+ attributes = pango_attr_list_copy (tag_popup->combo_entry->insensitive_item_attr);
}
-
else
{
- pango_layout_set_attributes (tag_popup->layout,
- tag_popup->combo_entry->normal_item_attr);
+ attributes = pango_attr_list_copy (tag_popup->combo_entry->normal_item_attr);
+ }
+
+ if (&tag_popup->tag_data[i] == tag_popup->prelight
+ && tag_popup->tag_data[i].state != GTK_STATE_INSENSITIVE)
+ {
+ attribute = pango_attr_underline_new (PANGO_UNDERLINE_SINGLE);
+ pango_attr_list_insert (attributes, attribute);
}
+ pango_layout_set_attributes (tag_popup->layout, attributes);
+ pango_attr_list_unref (attributes);
+
if (tag_popup->tag_data[i].state == GTK_STATE_SELECTED)
{
gdk_draw_rectangle (widget->window, gc, FALSE,
@@ -616,7 +624,8 @@
(tag_popup->tag_data[i].bounds.y - tag_popup->scroll_y) * PANGO_SCALE);
if (&tag_popup->tag_data[i] == tag_popup->prelight
- && tag_popup->tag_data[i].state != GTK_STATE_INSENSITIVE)
+ && tag_popup->tag_data[i].state != GTK_STATE_INSENSITIVE
+ && ! tag_popup->single_select_disabled)
{
gtk_paint_focus (widget->style, widget->window,
tag_popup->tag_data[i].state,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]