[gtk+/rendering-cleanup-next: 103/199] filechooserentry: Connect to draw event
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 103/199] filechooserentry: Connect to draw event
- Date: Thu, 23 Sep 2010 21:27:45 +0000 (UTC)
commit eb5121c367133e5b99030035d1cd6f6ede721308
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 8 20:56:36 2010 +0200
filechooserentry: Connect to draw event
gtk/gtkfilechooserentry.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 70f76a6..54c69ce 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -882,26 +882,23 @@ gtk_file_chooser_entry_unmap (GtkWidget *widget)
}
static gboolean
-completion_feedback_window_expose_event_cb (GtkWidget *widget,
- GdkEventExpose *event,
- gpointer data)
+completion_feedback_window_draw_cb (GtkWidget *widget,
+ cairo_t *cr,
+ gpointer data)
{
/* Stolen from gtk_tooltip_paint_window() */
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (data);
- GtkAllocation allocation;
- gtk_widget_get_allocation (chooser_entry->completion_feedback_window, &allocation);
-
- gtk_paint_flat_box (gtk_widget_get_style (chooser_entry->completion_feedback_window),
- gtk_widget_get_window (chooser_entry->completion_feedback_window),
+ gtk_cairo_paint_flat_box (gtk_widget_get_style (chooser_entry->completion_feedback_window),
+ cr,
GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
- NULL,
chooser_entry->completion_feedback_window,
"tooltip",
0, 0,
- allocation.width, allocation.height);
+ gtk_widget_get_allocated_width (widget),
+ gtk_widget_get_allocated_height (widget));
return FALSE;
}
@@ -954,8 +951,8 @@ create_completion_feedback_window (GtkFileChooserEntry *chooser_entry)
gtk_container_add (GTK_CONTAINER (chooser_entry->completion_feedback_window), alignment);
gtk_widget_show (alignment);
- g_signal_connect (chooser_entry->completion_feedback_window, "expose-event",
- G_CALLBACK (completion_feedback_window_expose_event_cb), chooser_entry);
+ g_signal_connect (chooser_entry->completion_feedback_window, "draw",
+ G_CALLBACK (completion_feedback_window_draw_cb), chooser_entry);
g_signal_connect (chooser_entry->completion_feedback_window, "realize",
G_CALLBACK (completion_feedback_window_realize_cb), chooser_entry);
/* FIXME: connect to motion-notify-event, and *show* the cursor when the mouse moves */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]