[ekiga] CallWindow: Fixed crash when going crazy with the preview button.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] CallWindow: Fixed crash when going crazy with the preview button.
- Date: Thu, 12 Nov 2015 18:39:35 +0000 (UTC)
commit b34600f937267aaa9537d6779eab9b1034ff1619
Author: Damien Sandras <dsandras seconix com>
Date: Sun Nov 1 15:48:53 2015 +0100
CallWindow: Fixed crash when going crazy with the preview button.
The delayed "closing" and window destruction can now be safely
interrupted if the user reenables preview after having stopped it and
before the window was actually gone.
lib/engine/gui/gtk-frontend/call-window.cpp | 15 +++++++++++++++
lib/engine/gui/gtk-frontend/call-window.h | 2 ++
lib/engine/gui/gtk-frontend/ekiga-app.cpp | 2 +-
3 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/call-window.cpp b/lib/engine/gui/gtk-frontend/call-window.cpp
index b9c6a57..2c46be9 100644
--- a/lib/engine/gui/gtk-frontend/call-window.cpp
+++ b/lib/engine/gui/gtk-frontend/call-window.cpp
@@ -1616,6 +1616,21 @@ call_window_new (GmApplication *app)
void
+call_window_present (EkigaCallWindow *self)
+{
+ g_return_if_fail (EKIGA_IS_CALL_WINDOW (self));
+
+ if (self->priv->destroy_timeout_id > 0) {
+ g_source_remove (self->priv->destroy_timeout_id);
+ self->priv->destroy_timeout_id = 0;
+ }
+ self->priv->dead = false;
+
+ gtk_window_present (GTK_WINDOW (self));
+}
+
+
+void
call_window_add_call (GtkWidget *call_window,
boost::shared_ptr<Ekiga::Call> call)
{
diff --git a/lib/engine/gui/gtk-frontend/call-window.h b/lib/engine/gui/gtk-frontend/call-window.h
index 71788f2..c930bc3 100644
--- a/lib/engine/gui/gtk-frontend/call-window.h
+++ b/lib/engine/gui/gtk-frontend/call-window.h
@@ -65,6 +65,8 @@ GType ekiga_call_window_get_type ();
GtkWidget *call_window_new (GmApplication *app);
+void call_window_present (EkigaCallWindow *call_window);
+
// Add a call to handle to the CallWindow.
// The call is supposed to be in "setup" mode. The reason
// is that the CallWindow should not handle calls that do
diff --git a/lib/engine/gui/gtk-frontend/ekiga-app.cpp b/lib/engine/gui/gtk-frontend/ekiga-app.cpp
index f917023..b3cabdd 100644
--- a/lib/engine/gui/gtk-frontend/ekiga-app.cpp
+++ b/lib/engine/gui/gtk-frontend/ekiga-app.cpp
@@ -208,7 +208,7 @@ gm_application_show_call_window (GmApplication *self)
if (!self->priv->call_window)
self->priv->call_window = call_window_new (self);
- gtk_window_present (GTK_WINDOW (self->priv->call_window));
+ call_window_present (EKIGA_CALL_WINDOW (self->priv->call_window));
g_signal_connect (G_OBJECT (self->priv->call_window), "destroy",
G_CALLBACK (call_window_destroyed_cb), self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]