aboutsummaryrefslogtreecommitdiff
path: root/src/notificationwindow.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2013-02-13 08:09:40 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2013-02-13 08:09:40 +0000
commitdef6dee82e3ddfbaaba95255f08e196575444f58 (patch)
tree77017fe65127eb83dc5211ab39c0afe6c3c4c34f /src/notificationwindow.c
parent5ce784ecf14a06f6e84f39a3cfd20f4c2292cbc2 (diff)
modified notification window.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3216 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/notificationwindow.c')
-rw-r--r--src/notificationwindow.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/notificationwindow.c b/src/notificationwindow.c
index 7c8b0258..51c7d4ae 100644
--- a/src/notificationwindow.c
+++ b/src/notificationwindow.c
@@ -34,8 +34,8 @@
#include "utils.h"
#define NOTIFICATIONWINDOW_NOTIFY_PERIOD 10000
-#define NOTIFICATIONWINDOW_WIDTH 280
-#define NOTIFICATIONWINDOW_HEIGHT 96
+#define NOTIFICATIONWINDOW_WIDTH 300
+#define NOTIFICATIONWINDOW_HEIGHT 64
#define FADE_REFRESH_RATE 50
#define FADE_SPEED 5
@@ -54,6 +54,7 @@ struct _NotificationWindow
gint height;
gint fade_length;
gint fade_count;
+ gint notify_event_count;
guint timeout;
};
@@ -95,8 +96,8 @@ static void get_work_area(GdkRectangle *rect)
#endif
}
-gint notification_window_create(const gchar *message, const gchar *submessage,
- guint timeout)
+gint notification_window_open(const gchar *message, const gchar *submessage,
+ guint timeout)
{
GtkWidget *window;
GtkWidget *vbox;
@@ -172,6 +173,7 @@ gint notification_window_create(const gchar *message, const gchar *submessage,
notify_window.y = y;
notify_window.fade_length = 0;
notify_window.fade_count = 0;
+ notify_window.notify_event_count = 0;
notify_window.timeout = timeout;
return 0;
@@ -258,11 +260,18 @@ static gboolean nwin_entered(GtkWidget *widget, GdkEventCrossing *event,
static gboolean nwin_motion_notify(GtkWidget *widget, GdkEventMotion *event,
gpointer data)
{
+ if (notify_window.fade_count > 0 &&
+ notify_window.notify_event_count == 0) {
+ notify_window.notify_event_count++;
+ return FALSE;
+ }
+
if (notify_window.notify_tag > 0) {
g_source_remove(notify_window.notify_tag);
notify_window.notify_tag = 0;
}
notify_window.fade_count = 0;
+ 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,