[ekiga] Fixed current_call clearance.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Fixed current_call clearance.
- Date: Sun, 19 Feb 2012 14:33:49 +0000 (UTC)
commit 22aaa41942eff8a4de1eb4fcce92ed00cba46379
Author: Damien Sandras <dsandras beip be>
Date: Sun Feb 19 15:15:19 2012 +0100
Fixed current_call clearance.
This was preventing typing anything in the dialpad url entry after a
succesfull call.
src/gui/main_window.cpp | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index a078184..dee8803 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -734,14 +734,20 @@ static void on_established_call_cb (boost::shared_ptr<Ekiga::CallManager> /*man
static void on_cleared_call_cb (boost::shared_ptr<Ekiga::CallManager> /*manager*/,
- boost::shared_ptr<Ekiga::Call> /*call*/,
+ boost::shared_ptr<Ekiga::Call> call,
std::string reason,
gpointer self)
{
EkigaMainWindow *mw = EKIGA_MAIN_WINDOW (self);
GtkWidget *call_window = NULL;
+ if (mw->priv->current_call && mw->priv->current_call->get_id () != call->get_id ()) {
+ return; // Trying to clear another call than the current active one
+ }
+
/* Update calling state */
+ if (mw->priv->current_call)
+ mw->priv->current_call = boost::shared_ptr<Ekiga::Call>();
mw->priv->calling_state = Standby;
/* Info message */
@@ -767,6 +773,11 @@ static void on_cleared_incoming_call_cb (std::string /*reason*/,
EkigaMainWindow *mw = EKIGA_MAIN_WINDOW (GnomeMeeting::Process ()->GetMainWindow ());
GtkWidget *call_window = NULL;
+ /* Update calling state */
+ if (mw->priv->current_call)
+ mw->priv->current_call = boost::shared_ptr<Ekiga::Call>();
+ mw->priv->calling_state = Standby;
+
boost::shared_ptr<Ekiga::AudioOutputCore> audiooutput_core = mw->priv->core->get<Ekiga::AudioOutputCore> ("audiooutput-core");
audiooutput_core->stop_play_event("incoming_call_sound");
audiooutput_core->stop_play_event("ring_tone_sound");
@@ -1258,8 +1269,7 @@ key_press_event_cb (EkigaMainWindow *mw,
}
-
-static gint
+static gint
window_closed_cb (G_GNUC_UNUSED GtkWidget *widget,
G_GNUC_UNUSED GdkEvent *event,
gpointer data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]