[gnome-control-center] network: Remove unnecessary nm-default.h



commit f63ac35b41d503c7f2af66b9d3f701d825825913
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Nov 12 09:53:18 2019 +1300

    network: Remove unnecessary nm-default.h

 panels/network/wireless-security/eap-method-fast.c |  5 +-
 panels/network/wireless-security/eap-method-leap.c |  5 +-
 panels/network/wireless-security/eap-method-peap.c |  5 +-
 .../network/wireless-security/eap-method-simple.c  | 10 ++--
 panels/network/wireless-security/eap-method-tls.c  |  5 +-
 panels/network/wireless-security/eap-method-ttls.c |  5 +-
 panels/network/wireless-security/eap-method.c      |  7 +--
 panels/network/wireless-security/eap-method.h      |  2 +-
 panels/network/wireless-security/helpers.c         |  2 -
 panels/network/wireless-security/helpers.h         |  3 ++
 panels/network/wireless-security/nm-default.h      | 62 ----------------------
 .../network/wireless-security/wireless-security.c  |  4 +-
 .../network/wireless-security/wireless-security.h  |  1 +
 panels/network/wireless-security/ws-dynamic-wep.c  |  5 +-
 panels/network/wireless-security/ws-leap.c         |  4 +-
 panels/network/wireless-security/ws-wep-key.c      |  4 +-
 panels/network/wireless-security/ws-wpa-eap.c      |  5 +-
 panels/network/wireless-security/ws-wpa-psk.c      |  4 +-
 18 files changed, 22 insertions(+), 116 deletions(-)
---
diff --git a/panels/network/wireless-security/eap-method-fast.c 
b/panels/network/wireless-security/eap-method-fast.c
index dceb8b3fd..970e54a9a 100644
--- a/panels/network/wireless-security/eap-method-fast.c
+++ b/panels/network/wireless-security/eap-method-fast.c
@@ -20,10 +20,7 @@
  * Copyright 2012 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "eap-method.h"
 #include "eap-method-fast.h"
diff --git a/panels/network/wireless-security/eap-method-leap.c 
b/panels/network/wireless-security/eap-method-leap.c
index e7b2ff91c..419dfbb07 100644
--- a/panels/network/wireless-security/eap-method-leap.c
+++ b/panels/network/wireless-security/eap-method-leap.c
@@ -20,10 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "eap-method.h"
 #include "eap-method-leap.h"
diff --git a/panels/network/wireless-security/eap-method-peap.c 
b/panels/network/wireless-security/eap-method-peap.c
index fbcab226c..e042d0d5b 100644
--- a/panels/network/wireless-security/eap-method-peap.c
+++ b/panels/network/wireless-security/eap-method-peap.c
@@ -20,10 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "eap-method.h"
 #include "eap-method-peap.h"
diff --git a/panels/network/wireless-security/eap-method-simple.c 
b/panels/network/wireless-security/eap-method-simple.c
index 01b1ef3de..2ab690296 100644
--- a/panels/network/wireless-security/eap-method-simple.c
+++ b/panels/network/wireless-security/eap-method-simple.c
@@ -20,10 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "eap-method.h"
 #include "eap-method-simple.h"
@@ -288,7 +285,10 @@ eap_method_simple_dispose (GObject *object)
        g_signal_handlers_disconnect_by_data (self->password_entry, self);
        g_signal_handlers_disconnect_by_data (self->show_password_check, self);
 
-       nm_clear_g_source (&self->idle_func_id);
+       if (self->idle_func_id != 0) {
+               g_source_remove (self->idle_func_id);
+               self->idle_func_id = 0;
+       }
 
        G_OBJECT_CLASS (eap_method_simple_parent_class)->dispose (object);
 }
diff --git a/panels/network/wireless-security/eap-method-tls.c 
b/panels/network/wireless-security/eap-method-tls.c
index 15c615c7d..15748c04a 100644
--- a/panels/network/wireless-security/eap-method-tls.c
+++ b/panels/network/wireless-security/eap-method-tls.c
@@ -20,10 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "eap-method.h"
 #include "eap-method-tls.h"
diff --git a/panels/network/wireless-security/eap-method-ttls.c 
b/panels/network/wireless-security/eap-method-ttls.c
index 207c96ad3..3cacd767f 100644
--- a/panels/network/wireless-security/eap-method-ttls.c
+++ b/panels/network/wireless-security/eap-method-ttls.c
@@ -20,10 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "eap-method.h"
 #include "eap-method-simple.h"
diff --git a/panels/network/wireless-security/eap-method.c b/panels/network/wireless-security/eap-method.c
index ce76885b4..9fc6a63c6 100644
--- a/panels/network/wireless-security/eap-method.c
+++ b/panels/network/wireless-security/eap-method.c
@@ -21,13 +21,8 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
-#include <unistd.h>
+#include <glib/gi18n.h>
 
 #include "eap-method.h"
 #include "utils.h"
diff --git a/panels/network/wireless-security/eap-method.h b/panels/network/wireless-security/eap-method.h
index 28d19790c..bd6987851 100644
--- a/panels/network/wireless-security/eap-method.h
+++ b/panels/network/wireless-security/eap-method.h
@@ -22,7 +22,7 @@
 
 #pragma once
 
-#include <glib-object.h>
+#include <gtk/gtk.h>
 #include <NetworkManager.h>
 
 G_BEGIN_DECLS
diff --git a/panels/network/wireless-security/helpers.c b/panels/network/wireless-security/helpers.c
index 23d8678dd..ea08093de 100644
--- a/panels/network/wireless-security/helpers.c
+++ b/panels/network/wireless-security/helpers.c
@@ -20,8 +20,6 @@
  * Copyright 2009 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
 #include "helpers.h"
 
 void
diff --git a/panels/network/wireless-security/helpers.h b/panels/network/wireless-security/helpers.h
index 24c12ff69..f5fc3613b 100644
--- a/panels/network/wireless-security/helpers.h
+++ b/panels/network/wireless-security/helpers.h
@@ -23,6 +23,9 @@
 #ifndef _HELPERS_H_
 #define _HELPERS_H_
 
+#include <NetworkManager.h>
+#include <gtk/gtk.h>
+
 typedef const char * (*HelperSecretFunc)(NMSetting *);
 
 void helper_fill_secret_entry (NMConnection *connection,
diff --git a/panels/network/wireless-security/wireless-security.c 
b/panels/network/wireless-security/wireless-security.c
index 1386c2195..4dc2619b9 100644
--- a/panels/network/wireless-security/wireless-security.c
+++ b/panels/network/wireless-security/wireless-security.c
@@ -20,9 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "wireless-security.h"
 #include "wireless-security-resources.h"
diff --git a/panels/network/wireless-security/wireless-security.h 
b/panels/network/wireless-security/wireless-security.h
index 1c3f0159d..00ded70a4 100644
--- a/panels/network/wireless-security/wireless-security.h
+++ b/panels/network/wireless-security/wireless-security.h
@@ -23,6 +23,7 @@
 #pragma once
 
 #include <gtk/gtk.h>
+#include <NetworkManager.h>
 
 G_BEGIN_DECLS
 
diff --git a/panels/network/wireless-security/ws-dynamic-wep.c 
b/panels/network/wireless-security/ws-dynamic-wep.c
index 49f171c44..cf8447c90 100644
--- a/panels/network/wireless-security/ws-dynamic-wep.c
+++ b/panels/network/wireless-security/ws-dynamic-wep.c
@@ -20,10 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "eap-method.h"
 #include "eap-method-fast.h"
diff --git a/panels/network/wireless-security/ws-leap.c b/panels/network/wireless-security/ws-leap.c
index f8e148b73..db2278fc7 100644
--- a/panels/network/wireless-security/ws-leap.c
+++ b/panels/network/wireless-security/ws-leap.c
@@ -20,9 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "ws-leap.h"
 #include "wireless-security.h"
diff --git a/panels/network/wireless-security/ws-wep-key.c b/panels/network/wireless-security/ws-wep-key.c
index f394c7c59..bae8fa9d7 100644
--- a/panels/network/wireless-security/ws-wep-key.c
+++ b/panels/network/wireless-security/ws-wep-key.c
@@ -20,9 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "ws-wep-key.h"
 #include "wireless-security.h"
diff --git a/panels/network/wireless-security/ws-wpa-eap.c b/panels/network/wireless-security/ws-wpa-eap.c
index 6c7aed573..ca244ef11 100644
--- a/panels/network/wireless-security/ws-wpa-eap.c
+++ b/panels/network/wireless-security/ws-wpa-eap.c
@@ -20,10 +20,7 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
-#include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "ws-wpa-eap.h"
 #include "wireless-security.h"
diff --git a/panels/network/wireless-security/ws-wpa-psk.c b/panels/network/wireless-security/ws-wpa-psk.c
index 3081ba7aa..09bbd7b2d 100644
--- a/panels/network/wireless-security/ws-wpa-psk.c
+++ b/panels/network/wireless-security/ws-wpa-psk.c
@@ -20,10 +20,8 @@
  * Copyright 2007 - 2014 Red Hat, Inc.
  */
 
-#include "nm-default.h"
-
 #include <ctype.h>
-#include <string.h>
+#include <glib/gi18n.h>
 
 #include "ws-wpa-psk.h"
 #include "wireless-security.h"


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