[gdl] Always return FALSE in GtkWidget::draw (or return what the parent returns)
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdl] Always return FALSE in GtkWidget::draw (or return what the parent returns)
- Date: Wed, 27 Oct 2010 13:13:43 +0000 (UTC)
commit e0527336b385c3138e9c93dd666905605c8c0ee6
Author: Johannes Schmid <jhs gnome org>
Date: Wed Oct 27 14:57:42 2010 +0200
Always return FALSE in GtkWidget::draw (or return what the parent returns)
gdl/gdl-dock-item-button-image.c | 4 ++--
gdl/gdl-dock-item-grip.c | 2 +-
gdl/gdl-dock-item.c | 37 -------------------------------------
gdl/gdl-dock-tablabel.c | 4 ++--
gdl/gdl-preview-window.c | 2 +-
5 files changed, 6 insertions(+), 43 deletions(-)
---
diff --git a/gdl/gdl-dock-item-button-image.c b/gdl/gdl-dock-item-button-image.c
index ef7cbe6..c4915ad 100644
--- a/gdl/gdl-dock-item-button-image.c
+++ b/gdl/gdl-dock-item-button-image.c
@@ -30,7 +30,7 @@ G_DEFINE_TYPE (GdlDockItemButtonImage,
gdl_dock_item_button_image,
GTK_TYPE_WIDGET);
-static gint
+static gboolean
gdl_dock_item_button_image_draw (GtkWidget *widget,
cairo_t *cr)
{
@@ -104,7 +104,7 @@ gdl_dock_item_button_image_draw (GtkWidget *widget,
cairo_fill (cr);
- return 0;
+ return FALSE;
}
static void
diff --git a/gdl/gdl-dock-item-grip.c b/gdl/gdl-dock-item-grip.c
index ff10762..9e26b38 100644
--- a/gdl/gdl-dock-item-grip.c
+++ b/gdl/gdl-dock-item-grip.c
@@ -100,7 +100,7 @@ gdl_dock_item_create_label_widget(GdlDockItemGrip *grip)
return GTK_WIDGET(label_box);
}
-static gint
+static gboolean
gdl_dock_item_grip_draw (GtkWidget *widget,
cairo_t *cr)
{
diff --git a/gdl/gdl-dock-item.c b/gdl/gdl-dock-item.c
index 6c17db5..b8c5ffa 100644
--- a/gdl/gdl-dock-item.c
+++ b/gdl/gdl-dock-item.c
@@ -88,8 +88,6 @@ static void gdl_dock_item_unmap (GtkWidget *widget);
static void gdl_dock_item_realize (GtkWidget *widget);
static void gdl_dock_item_style_set (GtkWidget *widget,
GtkStyle *previous_style);
-static gint gdl_dock_item_draw (GtkWidget *widget,
- cairo_t *cr);
static gint gdl_dock_item_button_changed (GtkWidget *widget,
GdkEventButton *event);
@@ -220,7 +218,6 @@ gdl_dock_item_class_init (GdlDockItemClass *klass)
widget_class->size_request = gdl_dock_item_size_request;
widget_class->size_allocate = gdl_dock_item_size_allocate;
widget_class->style_set = gdl_dock_item_style_set;
- widget_class->draw = gdl_dock_item_draw;
widget_class->button_press_event = gdl_dock_item_button_changed;
widget_class->button_release_event = gdl_dock_item_button_changed;
widget_class->motion_notify_event = gdl_dock_item_motion;
@@ -957,40 +954,6 @@ gdl_dock_item_style_set (GtkWidget *widget,
}
}
-static void
-gdl_dock_item_paint (GtkWidget *widget,
- cairo_t *cr)
-{
- GdlDockItem *item;
-
- item = GDL_DOCK_ITEM (widget);
-
- gtk_paint_box (gtk_widget_get_style (widget),
- cr,
- gtk_widget_get_state (widget),
- GTK_SHADOW_NONE,
- widget,
- "dockitem",
- 0, 0, 0, 0);
-}
-
-static gint
-gdl_dock_item_draw (GtkWidget *widget,
- cairo_t *cr)
-{
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (widget), FALSE);
- g_return_val_if_fail (cr != NULL, FALSE);
-
- if (gtk_widget_is_drawable (widget))
- {
- gdl_dock_item_paint (widget, cr);
- GTK_WIDGET_CLASS (gdl_dock_item_parent_class)->draw (widget, cr);
- }
-
- return FALSE;
-}
-
#define EVENT_IN_GRIP_EVENT_WINDOW(ev,gr) \
((gr) != NULL && (ev)->window == GDL_DOCK_ITEM_GRIP (gr)->title_window)
diff --git a/gdl/gdl-dock-tablabel.c b/gdl/gdl-dock-tablabel.c
index e27c5fd..52bc38d 100644
--- a/gdl/gdl-dock-tablabel.c
+++ b/gdl/gdl-dock-tablabel.c
@@ -57,7 +57,7 @@ static void gdl_dock_tablabel_size_allocate (GtkWidget *widget,
static void gdl_dock_tablabel_paint (GtkWidget *widget,
cairo_t *cr);
-static gint gdl_dock_tablabel_draw (GtkWidget *widget,
+static gboolean gdl_dock_tablabel_draw (GtkWidget *widget,
cairo_t *cr);
static gboolean gdl_dock_tablabel_button_event (GtkWidget *widget,
@@ -381,7 +381,7 @@ gdl_dock_tablabel_paint (GtkWidget *widget,
};
}
-static gint
+static gboolean
gdl_dock_tablabel_draw (GtkWidget *widget,
cairo_t *cr)
{
diff --git a/gdl/gdl-preview-window.c b/gdl/gdl-preview-window.c
index 0b13c41..a92cdb2 100644
--- a/gdl/gdl-preview-window.c
+++ b/gdl/gdl-preview-window.c
@@ -74,7 +74,7 @@ gdl_preview_window_draw (GtkWidget *window,
cairo_paint (cr);
}
- return TRUE;
+ return FALSE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]