aboutsummaryrefslogtreecommitdiff
path: root/src/alertpanel.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-12 08:00:26 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-12 08:00:26 +0000
commit38511cacbbe75f5d2a68c2679d878ba4f3f3cd28 (patch)
treebcac62b3150aafbf60d1e756f9750d457402ac7b /src/alertpanel.c
parentada9a8ee0773e165a2b74029aa4856991d07cf96 (diff)
win32: make alert dialog in front on focus out.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@638 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/alertpanel.c')
-rw-r--r--src/alertpanel.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/alertpanel.c b/src/alertpanel.c
index e1454d3f..1fa836f9 100644
--- a/src/alertpanel.c
+++ b/src/alertpanel.c
@@ -64,6 +64,9 @@ static gint alertpanel_deleted (GtkWidget *widget,
static gboolean alertpanel_close (GtkWidget *widget,
GdkEventAny *event,
gpointer data);
+static gint alertpanel_focus_out (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer data);
AlertValue alertpanel_full(const gchar *title, const gchar *message,
AlertType type, AlertValue default_value,
@@ -216,6 +219,8 @@ static void alertpanel_create(const gchar *title,
g_signal_connect(G_OBJECT(dialog), "key_press_event",
G_CALLBACK(alertpanel_close),
(gpointer)G_ALERTCANCEL);
+ g_signal_connect(G_OBJECT(dialog), "focus_out_event",
+ G_CALLBACK(alertpanel_focus_out), NULL);
/* for title icon, label and message */
hbox = gtk_hbox_new(FALSE, 12);
@@ -367,3 +372,13 @@ static gboolean alertpanel_close(GtkWidget *widget, GdkEventAny *event,
value = (value & ~G_ALERT_VALUE_MASK) | (AlertValue)data;
return FALSE;
}
+
+
+static gint alertpanel_focus_out(GtkWidget *widget, GdkEventFocus *event,
+ gpointer data)
+{
+#ifdef G_OS_WIN32
+ gtk_window_present(GTK_WINDOW(widget));
+#endif
+ return FALSE;
+}