From bf166a12fba39baa7d17ffd40c2a32131f8689c5 Mon Sep 17 00:00:00 2001 From: hiro Date: Wed, 19 Mar 2014 08:33:29 +0000 Subject: made the display period of notification window configurable. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3355 ee746299-78ed-0310-b773-934348b2243d --- src/notificationwindow.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/notificationwindow.c') diff --git a/src/notificationwindow.c b/src/notificationwindow.c index 018871cd..38681911 100644 --- a/src/notificationwindow.c +++ b/src/notificationwindow.c @@ -163,10 +163,10 @@ gint notification_window_open(const gchar *message, const gchar *submessage, if (y < 0) y = 0; gtk_window_move(GTK_WINDOW(window), x, y); - if (timeout == 0) - timeout = 1; - notify_window.notify_tag = g_timeout_add(timeout * 1000, - notify_timeout_cb, NULL); + if (timeout > 0) { + notify_window.notify_tag = g_timeout_add(timeout * 1000, + notify_timeout_cb, NULL); + } debug_print("notification window created\n"); @@ -280,8 +280,11 @@ static gboolean nwin_motion_notify(GtkWidget *widget, GdkEventMotion *event, notify_window.notify_event_count = 0; gtk_window_move(GTK_WINDOW(notify_window.window), notify_window.x, notify_window.y); - notify_window.notify_tag = g_timeout_add(notify_window.timeout * 1000, - notify_timeout_cb, NULL); + if (notify_window.timeout > 0) { + notify_window.notify_tag = + g_timeout_add(notify_window.timeout * 1000, + notify_timeout_cb, NULL); + } return FALSE; } -- cgit v1.2.3