gimp r28205 - in trunk: . app/widgets
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28205 - in trunk: . app/widgets
- Date: Sun, 22 Mar 2009 23:04:37 +0000 (UTC)
Author: mitch
Date: Sun Mar 22 23:04:37 2009
New Revision: 28205
URL: http://svn.gnome.org/viewvc/gimp?rev=28205&view=rev
Log:
2009-03-23 Michael Natterer <mitch gimp org>
* app/widgets/gimpcombotagentry.c: use accessors instead of
widget->window and widget->style.
Modified:
trunk/ChangeLog
trunk/app/widgets/gimpcombotagentry.c
Modified: trunk/app/widgets/gimpcombotagentry.c
==============================================================================
--- trunk/app/widgets/gimpcombotagentry.c (original)
+++ trunk/app/widgets/gimpcombotagentry.c Sun Mar 22 23:04:37 2009
@@ -193,15 +193,16 @@
GdkEventExpose *event,
gpointer user_data)
{
- GimpComboTagEntry *entry = GIMP_COMBO_TAG_ENTRY (widget);
+ GimpComboTagEntry *entry = GIMP_COMBO_TAG_ENTRY (widget);
GimpFilteredContainer *container = GIMP_TAG_ENTRY (entry)->container;
+ GtkStyle *style = gtk_widget_get_style (widget);
GdkRectangle arrow_rect;
gint tag_count;
gint window_width;
gint window_height;
GtkStateType arrow_state;
- if (widget->window == event->window)
+ if (gtk_widget_get_window (widget) == event->window)
{
return FALSE;
}
@@ -212,12 +213,12 @@
gdk_drawable_get_size (GDK_DRAWABLE (event->window), &window_width, &window_height);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
{
- gdk_draw_rectangle (event->window, widget->style->base_gc[widget->state],
+ gdk_draw_rectangle (event->window, style->base_gc[widget->state],
TRUE, 0, 0, 14, window_height);
}
else
{
- gdk_draw_rectangle (event->window, widget->style->base_gc[widget->state],
+ gdk_draw_rectangle (event->window, style->base_gc[widget->state],
TRUE, window_width - 14, 0, 14, window_height);
}
@@ -231,7 +232,7 @@
arrow_state = GTK_STATE_INSENSITIVE;
}
- gtk_paint_arrow (widget->style,
+ gtk_paint_arrow (style,
event->window, arrow_state,
GTK_SHADOW_NONE, &event->area, widget, NULL,
GTK_ARROW_DOWN, TRUE,
@@ -321,11 +322,10 @@
GtkStyle *previous_style)
{
GimpComboTagEntry *entry = GIMP_COMBO_TAG_ENTRY (widget);
- GtkStyle *style;
+ GtkStyle *style = gtk_widget_get_style (widget);
GdkColor color;
PangoAttribute *attribute;
- style = widget->style;
if (entry->normal_item_attr)
{
pango_attr_list_unref (entry->normal_item_attr);
@@ -377,17 +377,14 @@
GdkRectangle *arrow_rect)
{
GtkWidget *widget = GTK_WIDGET (entry);
+ GtkStyle *style = gtk_widget_get_style (widget);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- {
- arrow_rect->x = widget->style->xthickness;
- }
+ arrow_rect->x = style->xthickness;
else
- {
- arrow_rect->x = widget->allocation.width - 16 - widget->style->xthickness * 2;
- }
+ arrow_rect->x = widget->allocation.width - 16 - style->xthickness * 2;
- arrow_rect->y = 0;
- arrow_rect->width = 12;
- arrow_rect->height = widget->allocation.height - widget->style->ythickness * 2;
+ arrow_rect->y = 0;
+ arrow_rect->width = 12;
+ arrow_rect->height = widget->allocation.height - style->ythickness * 2;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]