diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2014-03-19 08:33:29 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2014-03-19 08:33:29 +0000 |
commit | bf166a12fba39baa7d17ffd40c2a32131f8689c5 (patch) | |
tree | 951bac4dd69fba2c57e378bc4daf390cd8f57bde /src/notificationwindow.c | |
parent | 394f514c0a07a93ee41e082b01ffbc9606095dae (diff) |
made the display period of notification window configurable.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3355 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/notificationwindow.c')
-rw-r--r-- | src/notificationwindow.c | 15 |
1 files changed, 9 insertions, 6 deletions
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; } |