[ekiga] Fixed ekiga hiding/quitting.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Fixed ekiga hiding/quitting.
- Date: Sun, 22 Apr 2012 12:00:23 +0000 (UTC)
commit 23b53c453e7d6d350c5862597613b791bf9b26bb
Author: Damien Sandras <dsandras beip be>
Date: Sun Apr 22 13:59:44 2012 +0200
Fixed ekiga hiding/quitting.
This is done the bad way but it works and can be improved anytime.
src/gui/main_window.cpp | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index ef2534d..0287120 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -1221,7 +1221,18 @@ window_closed_cb (G_GNUC_UNUSED GtkWidget *widget,
G_GNUC_UNUSED GdkEvent *event,
gpointer data)
{
+ StatusIcon *statusicon = GnomeMeeting::Process ()->GetStatusicon ();
+ // If we have persistent notifications:
+ // - we can hide the window
+ // - clicking on a notification should show the window back
+ // - launching the application again should show the window back
+ // If we do not have persistent notifications:
+ // - If the status icon is enabled, it allows showing the window back
+ // - If not, we quit
gtk_widget_hide (GTK_WIDGET (data));
+ if (!notify_has_persistence () && statusicon && !gtk_status_icon_is_embedded (GTK_STATUS_ICON (statusicon)))
+ quit_callback (NULL, widget);
+
return (TRUE);
}
@@ -1976,14 +1987,7 @@ static gboolean
ekiga_main_window_delete_event (GtkWidget *widget,
G_GNUC_UNUSED GdkEventAny *event)
{
- GtkStatusIcon *statusicon = NULL;
-
- statusicon = GTK_STATUS_ICON (GnomeMeeting::Process ()->GetStatusicon ());
-
- if (!gtk_status_icon_is_embedded (statusicon))
- quit_callback (NULL, widget);
- else
- gtk_widget_hide (widget);
+ window_closed_cb (widget, NULL, NULL);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]