[totem] backend: Handle GDesktopProxyMode in a switch
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Handle GDesktopProxyMode in a switch
- Date: Thu, 29 Mar 2012 10:31:02 +0000 (UTC)
commit a683fc045debe3c0205a7e703b48c4c0f84a4fea
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Mar 29 11:29:35 2012 +0100
backend: Handle GDesktopProxyMode in a switch
So that gcc will warn of new unhandled values in future.
src/backend/bacon-video-widget-gst-0.10.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 0a9ab3e..2465df2 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -2184,14 +2184,20 @@ bvw_set_proxy_on_element (BaconVideoWidget * bvw, GstElement * element)
mode = g_settings_get_enum (settings, "mode");
g_object_unref (settings);
- if (mode == G_DESKTOP_PROXY_MODE_NONE)
- return;
- if (mode == G_DESKTOP_PROXY_MODE_AUTO)
- {
+ switch (mode) {
+ case G_DESKTOP_PROXY_MODE_NONE:
+ return;
+ case G_DESKTOP_PROXY_MODE_MANUAL:
+ /* Handled below. */
+ break;
+ case G_DESKTOP_PROXY_MODE_AUTO:
/* FIXME: Auto proxy configuration is unhandled */
GST_DEBUG ("Auto proxy configuration is unhandled");
return;
- }
+ default:
+ GST_DEBUG ("Proxy mode %d is unhandled", mode);
+ return;
+ }
if (g_str_has_prefix (bvw->priv->mrl, "https://"))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]