[empathy] early return if the camera_state is already the one we want
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] early return if the camera_state is already the one we want
- Date: Fri, 27 Nov 2009 16:40:37 +0000 (UTC)
commit fe97bdb9c202f40f57b1438df9d0045fad8f40c8
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Nov 24 16:28:49 2009 +0000
early return if the camera_state is already the one we want
src/empathy-call-window.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 8d4849d..eda10f1 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -770,6 +770,9 @@ tool_button_camera_off_toggled_cb (GtkToggleToolButton *toggle,
return;
}
+ if (priv->camera_state == CAMERA_STATE_OFF)
+ return;
+
DEBUG ("disable camera");
disable_camera (self);
}
@@ -809,6 +812,9 @@ tool_button_camera_preview_toggled_cb (GtkToggleToolButton *toggle,
return;
}
+ if (priv->camera_state == CAMERA_STATE_PREVIEW)
+ return;
+
DEBUG ("enable preview");
enable_preview (self);
}
@@ -848,6 +854,9 @@ tool_button_camera_on_toggled_cb (GtkToggleToolButton *toggle,
return;
}
+ if (priv->camera_state == CAMERA_STATE_ON)
+ return;
+
DEBUG ("enable camera");
enable_camera (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]