[network-manager-applet] c-e: remove compatibility for missing proxy API



commit 064a97564bc3dadfed9439461b2419ac32528eaa
Author: Thomas Haller <thaller redhat com>
Date:   Tue Mar 21 13:48:45 2017 +0100

    c-e: remove compatibility for missing proxy API
    
    As applet now depends on libnm-1-8, proxy support is always given.

 shared/nm-libnm-compat.h                     |    9 ---------
 src/connection-editor/connection-helpers.c   |    6 ------
 src/connection-editor/nm-connection-editor.c |    4 ----
 src/connection-editor/nm-connection-list.c   |    4 ----
 src/connection-editor/page-proxy.c           |    4 ----
 src/connection-editor/page-proxy.h           |    4 ----
 6 files changed, 0 insertions(+), 31 deletions(-)
---
diff --git a/shared/nm-libnm-compat.h b/shared/nm-libnm-compat.h
index dd6b48c..508b441 100644
--- a/shared/nm-libnm-compat.h
+++ b/shared/nm-libnm-compat.h
@@ -29,13 +29,4 @@
                G_GNUC_END_IGNORE_DEPRECATIONS \
        })
 
-#define NM_LIBNM_COMPAT_PROXY_SUPPORTED (NM_CHECK_VERSION (1, 5, 0))
-
-#define nm_setting_proxy_new(setting)               NM_LIBNM_COMPAT_UNDEPRECATE (nm_setting_proxy_new 
(setting))
-#define nm_setting_proxy_get_method(setting)        NM_LIBNM_COMPAT_UNDEPRECATE (nm_setting_proxy_get_method 
(setting))
-#define nm_setting_proxy_get_pac_url(setting)       NM_LIBNM_COMPAT_UNDEPRECATE 
(nm_setting_proxy_get_pac_url (setting))
-#define nm_setting_proxy_get_pac_script(setting)    NM_LIBNM_COMPAT_UNDEPRECATE 
(nm_setting_proxy_get_pac_script (setting))
-#define nm_setting_proxy_get_browser_only(setting)  NM_LIBNM_COMPAT_UNDEPRECATE 
(nm_setting_proxy_get_browser_only (setting))
-#define nm_connection_get_setting_proxy(connection) NM_LIBNM_COMPAT_UNDEPRECATE 
(nm_connection_get_setting_proxy (connection))
-
 #endif /* __NM_LIBNM_COMPAT_H__ */
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index 3ad0975..18a8f4f 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -791,18 +791,12 @@ delete_connection (GtkWindow *parent_window,
 gboolean
 connection_supports_proxy (NMConnection *connection)
 {
-#if NM_LIBNM_COMPAT_PROXY_SUPPORTED
        NMSettingConnection *s_con;
 
        g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
 
        s_con = nm_connection_get_setting_connection (connection);
        return (nm_setting_connection_get_slave_type (s_con) == NULL);
-#else
-       g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
-
-       return FALSE;
-#endif
 }
 
 gboolean
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c
index 739c439..f032f89 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -876,13 +876,9 @@ nm_connection_editor_set_connection (NMConnectionEditor *editor,
                        goto out;
        }
 
-#if NM_LIBNM_COMPAT_PROXY_SUPPORTED
-       G_GNUC_BEGIN_IGNORE_DEPRECATIONS
        if (   nm_connection_get_setting_proxy (editor->connection)
            && !add_page (editor, ce_page_proxy_new, editor->connection, error))
                goto out;
-       G_GNUC_END_IGNORE_DEPRECATIONS
-#endif
        if (   nm_connection_get_setting_ip4_config (editor->connection)
            && !add_page (editor, ce_page_ip4_new, editor->connection, error))
                goto out;
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index 9368f8b..3ef6f18 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -278,12 +278,8 @@ really_add_connection (FUNC_TAG_NEW_CONNECTION_RESULT_IMPL,
                return;
        }
 
-#if NM_LIBNM_COMPAT_PROXY_SUPPORTED
-       G_GNUC_BEGIN_IGNORE_DEPRECATIONS
        if (connection_supports_proxy (connection) && !nm_connection_get_setting_proxy (connection))
                nm_connection_add_setting (connection, nm_setting_proxy_new ());
-       G_GNUC_END_IGNORE_DEPRECATIONS
-#endif
        if (connection_supports_ip4 (connection) && !nm_connection_get_setting_ip4_config (connection))
                nm_connection_add_setting (connection, nm_setting_ip4_config_new ());
        if (connection_supports_ip6 (connection) && !nm_connection_get_setting_ip6_config (connection))
diff --git a/src/connection-editor/page-proxy.c b/src/connection-editor/page-proxy.c
index 3422239..7c1a6e8 100644
--- a/src/connection-editor/page-proxy.c
+++ b/src/connection-editor/page-proxy.c
@@ -20,8 +20,6 @@
 
 #include "nm-default.h"
 
-#if NM_LIBNM_COMPAT_PROXY_SUPPORTED
-
 #include "page-proxy.h"
 
 #include <string.h>
@@ -317,5 +315,3 @@ ce_page_proxy_class_init (CEPageProxyClass *proxy_class)
        /* virtual methods */
        parent_class->ce_page_validate_v = ce_page_validate_v;
 }
-
-#endif /* NM_LIBNM_COMPAT_PROXY_SUPPORTED */
diff --git a/src/connection-editor/page-proxy.h b/src/connection-editor/page-proxy.h
index 9e5afb3..75ec9df 100644
--- a/src/connection-editor/page-proxy.h
+++ b/src/connection-editor/page-proxy.h
@@ -23,8 +23,6 @@
 
 #include "ce-page.h"
 
-#if NM_LIBNM_COMPAT_PROXY_SUPPORTED
-
 #define CE_TYPE_PAGE_PROXY            (ce_page_proxy_get_type ())
 #define CE_PAGE_PROXY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), CE_TYPE_PAGE_PROXY, CEPageProxy))
 #define CE_PAGE_PROXY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), CE_TYPE_PAGE_PROXY, 
CEPageProxyClass))
@@ -49,6 +47,4 @@ CEPage *ce_page_proxy_new (NMConnectionEditor *editor,
                            const char **out_secrets_setting_name,
                            GError **error);
 
-#endif /* NM_LIBNM_COMPAT_PROXY_SUPPORTED */
-
 #endif  /* __PAGE_PROXY_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]