aboutsummaryrefslogtreecommitdiff
path: root/src/idomessagedialog.c
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-07-08 10:28:53 -0500
committerCody Russell <crussell@canonical.com>2010-07-08 10:28:53 -0500
commit5fa7b66f3411fe6eaf54335348534f396b2058a4 (patch)
treea79b1953cbdadc2a0d3725a1f6e57e3e14656051 /src/idomessagedialog.c
parent717cf40fd831c0d6af26d44c35df0e94ceeb9458 (diff)
downloadayatana-ido-5fa7b66f3411fe6eaf54335348534f396b2058a4.tar.gz
ayatana-ido-5fa7b66f3411fe6eaf54335348534f396b2058a4.tar.bz2
ayatana-ido-5fa7b66f3411fe6eaf54335348534f396b2058a4.zip
Start the morph on focus-in-event rather than button-press-event.
Diffstat (limited to 'src/idomessagedialog.c')
-rw-r--r--src/idomessagedialog.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/idomessagedialog.c b/src/idomessagedialog.c
index 3fa6f7a..54e1298 100644
--- a/src/idomessagedialog.c
+++ b/src/idomessagedialog.c
@@ -150,11 +150,10 @@ timeline_finished_cb (IdoTimeline *timeline,
}
static gboolean
-button_pressed (GtkWidget *event_box,
- GdkEventButton *event,
- gpointer user_data)
+ido_message_dialog_focus_in_event (GtkWidget *widget,
+ GdkEventFocus *event)
{
- IdoMessageDialog *dialog = (IdoMessageDialog *) user_data;
+ IdoMessageDialog *dialog = IDO_MESSAGE_DIALOG (widget);
IdoMessageDialogPrivate *priv = IDO_MESSAGE_DIALOG_GET_PRIVATE (dialog);
if (!priv->expanded)
@@ -206,10 +205,6 @@ ido_message_dialog_constructed (GObject *object)
event_box = gtk_event_box_new ();
gtk_widget_show (event_box);
- g_signal_connect (event_box,
- "button-press-event",
- G_CALLBACK (button_pressed),
- object);
vbox = GTK_DIALOG (object)->vbox;
priv->action_area = gtk_dialog_get_action_area (GTK_DIALOG (object));
@@ -228,9 +223,10 @@ ido_message_dialog_class_init (IdoMessageDialogClass *class)
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
- object_class->constructed = ido_message_dialog_constructed;
+ object_class->constructed = ido_message_dialog_constructed;
- widget_class->map = ido_message_dialog_map;
+ widget_class->map = ido_message_dialog_map;
+ widget_class->focus_in_event = ido_message_dialog_focus_in_event;
g_type_class_add_private (object_class, sizeof (IdoMessageDialogPrivate));
}