[network-manager-applet] applet: remove unecessary includes and old gconf helpers bits
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: remove unecessary includes and old gconf helpers bits
- Date: Fri, 4 Mar 2011 17:41:46 +0000 (UTC)
commit 74adbb3c3c412e645e66afcd1aba22245f7e86d9
Author: Dan Williams <dcbw redhat com>
Date: Fri Mar 4 11:41:13 2011 -0600
applet: remove unecessary includes and old gconf helpers bits
Don't need the applet keyring callbacks anymore because all keyring
calls in the secret agent are now asynchronous. Likewise we can
remove the gconf helpers headers from a bunch of places they aren't
used.
src/applet-device-bt.c | 1 -
src/applet-device-wired.c | 1 -
src/applet.c | 62 -------------------------------
src/gconf-helpers/gconf-helpers.c | 34 -----------------
src/gconf-helpers/gconf-helpers.h | 3 -
src/utils/utils.c | 1 -
src/wired-dialog.c | 1 -
src/wireless-dialog.c | 1 -
src/wireless-security/eap-method-leap.c | 1 -
src/wireless-security/helpers.c | 1 -
src/wireless-security/ws-leap.c | 2 -
src/wireless-security/ws-wep-key.c | 2 -
src/wireless-security/ws-wpa-psk.c | 2 -
13 files changed, 0 insertions(+), 112 deletions(-)
---
diff --git a/src/applet-device-bt.c b/src/applet-device-bt.c
index 4e0caee..a6fc091 100644
--- a/src/applet-device-bt.c
+++ b/src/applet-device-bt.c
@@ -41,7 +41,6 @@
#include "applet-device-bt.h"
#include "wired-dialog.h"
#include "utils.h"
-#include "gconf-helpers.h"
#include "applet-dialogs.h"
typedef struct {
diff --git a/src/applet-device-wired.c b/src/applet-device-wired.c
index 38c9899..3baa107 100644
--- a/src/applet-device-wired.c
+++ b/src/applet-device-wired.c
@@ -40,7 +40,6 @@
#include "applet-device-wired.h"
#include "wired-dialog.h"
#include "utils.h"
-#include "gconf-helpers.h"
typedef struct {
NMApplet *applet;
diff --git a/src/applet.c b/src/applet.c
index 54ecbbe..088de7d 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -78,7 +78,6 @@
#include "wireless-dialog.h"
#include "applet-vpn-request.h"
#include "utils.h"
-#include "gconf-helpers.h"
#define NOTIFY_CAPS_ACTIONS_KEY "actions"
@@ -3077,63 +3076,6 @@ setup_widgets (NMApplet *applet)
}
static void
-applet_pre_keyring_callback (gpointer user_data)
-{
- NMApplet *applet = NM_APPLET (user_data);
- GdkScreen *screen;
- GdkDisplay *display;
- GdkWindow *window = NULL;
-
- if (applet->menu)
- window = gtk_widget_get_window (applet->menu);
- if (window) {
-#if GTK_CHECK_VERSION(2,23,0)
- screen = gdk_window_get_screen (window);
-#else
- screen = gdk_drawable_get_screen (window);
-#endif
- display = gdk_screen_get_display (screen);
- g_object_ref (display);
-
- gtk_widget_hide (applet->menu);
- gtk_widget_destroy (applet->menu);
- g_object_unref (applet->menu);
- applet->menu = NULL;
-
- /* Ensure that the widget really gets destroyed before letting the
- * keyring calls happen; if the X events haven't all gone through when
- * the keyring dialog comes up, then the menu will actually still have
- * the screen grab even after we've called gtk_widget_destroy().
- */
- gdk_display_sync (display);
- g_object_unref (display);
- }
-
- window = NULL;
- if (applet->context_menu)
- window = gtk_widget_get_window (applet->context_menu);
- if (window) {
-#if GTK_CHECK_VERSION(2,23,0)
- screen = gdk_window_get_screen (window);
-#else
- screen = gdk_drawable_get_screen (window);
-#endif
- display = gdk_screen_get_display (screen);
- g_object_ref (display);
-
- gtk_widget_hide (applet->context_menu);
-
- /* Ensure that the widget really gets hidden before letting the
- * keyring calls happen; if the X events haven't all gone through when
- * the keyring dialog comes up, then the menu will actually still have
- * the screen grab even after we've called gtk_widget_hide().
- */
- gdk_display_sync (display);
- g_object_unref (display);
- }
-}
-
-static void
applet_embedded_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
{
gboolean embedded = gtk_status_icon_is_embedded (GTK_STATUS_ICON (object));
@@ -3263,8 +3205,6 @@ constructor (GType type,
foo_client_setup (applet);
- applet_set_pre_keyring_callback (applet_pre_keyring_callback, applet);
-
/* Track embedding to help debug issues where user has removed the
* notification area applet from the panel, and thus nm-applet too.
*/
@@ -3285,8 +3225,6 @@ static void finalize (GObject *object)
{
NMApplet *applet = NM_APPLET (object);
- applet_set_pre_keyring_callback (NULL, NULL);
-
g_slice_free (NMADeviceClass, applet->wired_class);
g_slice_free (NMADeviceClass, applet->wifi_class);
g_slice_free (NMADeviceClass, applet->gsm_class);
diff --git a/src/gconf-helpers/gconf-helpers.c b/src/gconf-helpers/gconf-helpers.c
index 5c73ff9..48092bc 100644
--- a/src/gconf-helpers/gconf-helpers.c
+++ b/src/gconf-helpers/gconf-helpers.c
@@ -84,36 +84,6 @@ const char *vpn_ignore_keys[] = {
NULL
};
-static PreKeyringCallback pre_keyring_cb = NULL;
-static gpointer pre_keyring_user_data = NULL;
-
-/* Sets a function to be called before each keyring access */
-void
-applet_set_pre_keyring_callback (PreKeyringCallback func, gpointer user_data)
-{
- pre_keyring_cb = func;
- pre_keyring_user_data = user_data;
-}
-
-static void
-pre_keyring_callback (void)
-{
- GnomeKeyringInfo *info = NULL;
-
- if (!pre_keyring_cb)
- return;
-
- /* Call the pre keyring callback if the keyring is locked or if there
- * was an error talking to the keyring.
- */
- if (gnome_keyring_get_info_sync (NULL, &info) == GNOME_KEYRING_RESULT_OK) {
- if (gnome_keyring_info_get_is_locked (info))
- (*pre_keyring_cb) (pre_keyring_user_data);
- gnome_keyring_info_free (info);
- } else
- (*pre_keyring_cb) (pre_keyring_user_data);
-}
-
gboolean
nm_gconf_get_int_helper (GConfClient *client,
@@ -1989,8 +1959,6 @@ nm_gconf_add_keyring_item (const char *connection_uuid,
g_return_if_fail (setting_key != NULL);
g_return_if_fail (secret != NULL);
- pre_keyring_callback ();
-
attrs = utils_create_keyring_add_attr_list (NULL,
connection_uuid,
connection_name,
@@ -2027,8 +1995,6 @@ keyring_delete_item (const char *connection_uuid,
GnomeKeyringResult ret;
GList *iter;
- pre_keyring_callback ();
-
ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
&found_list,
KEYRING_UUID_TAG,
diff --git a/src/gconf-helpers/gconf-helpers.h b/src/gconf-helpers/gconf-helpers.h
index ba81b1b..d5280dd 100644
--- a/src/gconf-helpers/gconf-helpers.h
+++ b/src/gconf-helpers/gconf-helpers.h
@@ -265,9 +265,6 @@ nm_gconf_add_keyring_item (const char *connection_uuid,
const char *setting_key,
const char *secret);
-typedef void (*PreKeyringCallback) (gpointer user_data);
-void applet_set_pre_keyring_callback (PreKeyringCallback func, gpointer user_data);
-
gboolean nm_gconf_get_ignore_ca_cert (const char *uuid, gboolean phase2);
void nm_gconf_set_ignore_ca_cert (const char *uuid, gboolean phase2, gboolean ignore);
diff --git a/src/utils/utils.c b/src/utils/utils.c
index 8b5cc46..301aa00 100644
--- a/src/utils/utils.c
+++ b/src/utils/utils.c
@@ -45,7 +45,6 @@
#include <nm-utils.h>
#include "utils.h"
-#include "gconf-helpers.h"
static char *ignored_words[] = {
"Semiconductor",
diff --git a/src/wired-dialog.c b/src/wired-dialog.c
index c020900..cb20736 100644
--- a/src/wired-dialog.c
+++ b/src/wired-dialog.c
@@ -33,7 +33,6 @@
#include "wired-dialog.h"
#include "wireless-security.h"
#include "applet-dialogs.h"
-#include "gconf-helpers.h"
static void
stuff_changed_cb (WirelessSecurity *sec, gpointer user_data)
diff --git a/src/wireless-dialog.c b/src/wireless-dialog.c
index 4214197..2cd75e0 100644
--- a/src/wireless-dialog.c
+++ b/src/wireless-dialog.c
@@ -42,7 +42,6 @@
#include "wireless-dialog.h"
#include "wireless-security.h"
#include "utils.h"
-#include "gconf-helpers.h"
G_DEFINE_TYPE (NMAWirelessDialog, nma_wireless_dialog, GTK_TYPE_DIALOG)
diff --git a/src/wireless-security/eap-method-leap.c b/src/wireless-security/eap-method-leap.c
index 513b10c..e61af00 100644
--- a/src/wireless-security/eap-method-leap.c
+++ b/src/wireless-security/eap-method-leap.c
@@ -26,7 +26,6 @@
#include "eap-method.h"
#include "wireless-security.h"
-#include "gconf-helpers.h"
#include "helpers.h"
struct _EAPMethodLEAP {
diff --git a/src/wireless-security/helpers.c b/src/wireless-security/helpers.c
index 273708f..6b2286a 100644
--- a/src/wireless-security/helpers.c
+++ b/src/wireless-security/helpers.c
@@ -21,7 +21,6 @@
*/
#include "helpers.h"
-#include "gconf-helpers.h"
void
helper_fill_secret_entry (NMConnection *connection,
diff --git a/src/wireless-security/ws-leap.c b/src/wireless-security/ws-leap.c
index cb4228d..742374a 100644
--- a/src/wireless-security/ws-leap.c
+++ b/src/wireless-security/ws-leap.c
@@ -24,8 +24,6 @@
#include <nm-setting-wireless.h>
#include "wireless-security.h"
-#include "utils.h"
-#include "gconf-helpers.h"
#include "helpers.h"
struct _WirelessSecurityLEAP {
diff --git a/src/wireless-security/ws-wep-key.c b/src/wireless-security/ws-wep-key.c
index ba5ca01..50f7acb 100644
--- a/src/wireless-security/ws-wep-key.c
+++ b/src/wireless-security/ws-wep-key.c
@@ -27,8 +27,6 @@
#include <nm-setting-wireless-security.h>
#include "wireless-security.h"
-#include "utils.h"
-#include "gconf-helpers.h"
struct _WirelessSecurityWEPKey {
WirelessSecurity parent;
diff --git a/src/wireless-security/ws-wpa-psk.c b/src/wireless-security/ws-wpa-psk.c
index 641d1c6..b69b4a4 100644
--- a/src/wireless-security/ws-wpa-psk.c
+++ b/src/wireless-security/ws-wpa-psk.c
@@ -25,8 +25,6 @@
#include <nm-setting-wireless.h>
#include "wireless-security.h"
-#include "utils.h"
-#include "gconf-helpers.h"
#include "helpers.h"
#define WPA_PMK_LEN 32
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]