[accounts-dialog] Port to new GTK+ 3.x drawing APIs
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Port to new GTK+ 3.x drawing APIs
- Date: Wed, 6 Oct 2010 13:32:21 +0000 (UTC)
commit d6bead4800ff5cad5f46cf011e42c4df17288446
Author: Bastien Nocera <hadess hadess net>
Date: Wed Oct 6 14:31:24 2010 +0100
Port to new GTK+ 3.x drawing APIs
src/um-password-dialog.c | 13 ++++++-------
src/um-photo-dialog.c | 13 ++++++-------
2 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/src/um-password-dialog.c b/src/um-password-dialog.c
index 81c03dd..bd6ad8c 100644
--- a/src/um-password-dialog.c
+++ b/src/um-password-dialog.c
@@ -77,9 +77,9 @@ generate_clicked (GtkButton *button,
}
static void
-generate_expose (GtkWidget *widget,
- GdkEventExpose *event,
- UmPasswordDialog *um)
+generate_draw (GtkWidget *widget,
+ cairo_t *cr,
+ UmPasswordDialog *um)
{
GtkAllocation allocation;
@@ -88,9 +88,8 @@ generate_expose (GtkWidget *widget,
gtk_widget_get_allocation (widget, &allocation);
gtk_paint_expander (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
+ cr,
gtk_widget_get_state (widget),
- NULL,
widget,
NULL,
allocation.x + allocation.width,
@@ -709,8 +708,8 @@ um_password_dialog_new (void)
G_CALLBACK (generate_state_changed), um);
#endif
um->generate_button = widget;
- g_signal_connect_after (gtk_bin_get_child (GTK_BIN (widget)), "expose-event",
- G_CALLBACK (generate_expose), um);
+ g_signal_connect_after (gtk_bin_get_child (GTK_BIN (widget)), "draw",
+ G_CALLBACK (generate_draw), um);
um->normal_hint_entry = (GtkWidget *) gtk_builder_get_object (builder, "normal-hint-entry");
diff --git a/src/um-photo-dialog.c b/src/um-photo-dialog.c
index 5c3c604..fc3415c 100644
--- a/src/um-photo-dialog.c
+++ b/src/um-photo-dialog.c
@@ -496,9 +496,9 @@ on_photo_popup_unmap (GtkWidget *popup_menu,
}
static void
-popup_button_expose (GtkWidget *widget,
- GdkEventExpose *event,
- UmPhotoDialog *um)
+popup_button_draw (GtkWidget *widget,
+ cairo_t *cr,
+ UmPhotoDialog *um)
{
GtkAllocation allocation;
@@ -509,9 +509,8 @@ popup_button_expose (GtkWidget *widget,
gtk_widget_get_allocation (widget, &allocation);
gtk_paint_expander (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
+ cr,
gtk_widget_get_state (widget),
- NULL,
widget,
NULL,
allocation.x + allocation.width,
@@ -545,8 +544,8 @@ um_photo_dialog_new (GtkWidget *button)
G_CALLBACK (on_popup_button_button_pressed), um);
g_signal_connect (button, "notify::is-focus",
G_CALLBACK (popup_button_focus_changed), um);
- g_signal_connect_after (gtk_bin_get_child (GTK_BIN (button)), "expose-event",
- G_CALLBACK (popup_button_expose), um);
+ g_signal_connect_after (gtk_bin_get_child (GTK_BIN (button)), "draw",
+ G_CALLBACK (popup_button_draw), um);
g_signal_connect (um->photo_popup, "unmap",
G_CALLBACK (on_photo_popup_unmap), um);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]