diff --git a/ChangeLog b/ChangeLog index 8618e60af5..b766f29e60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,7 +20,6 @@ * src/NetworkManagerDevice.c - Honor "ignored" network list when picking best ap to use - 2004-08-06 Seth Nickell * aclocal.m4: diff --git a/panel-applet/NMWirelessApplet.c b/panel-applet/NMWirelessApplet.c index aa7fbbd3b3..feb83bbaf0 100644 --- a/panel-applet/NMWirelessApplet.c +++ b/panel-applet/NMWirelessApplet.c @@ -162,24 +162,15 @@ static int nmwa_timeout_handler (NMWirelessApplet *applet) if (!applet->connection) applet->connection = nmwa_dbus_init (applet); - if (applet->nm_active) + if (applet->nm_active && (active_device = nmwa_dbus_get_active_wireless_device (applet->connection))) { - if (active_device = nmwa_dbus_get_active_wireless_device (applet->connection)) - { - applet->have_active_device = TRUE; - nmwa_update_state (applet); - gtk_widget_show (GTK_WIDGET (applet)); - show_warning_dialog ("showing... %s", active_device); - dbus_free (active_device); - } - else - show_warning_dialog ("didn't get good active device\n"); + applet->have_active_device = TRUE; + nmwa_update_state (applet); + gtk_widget_show (GTK_WIDGET (applet)); + dbus_free (active_device); } else - { - show_warning_dialog ("hiding..."); gtk_widget_hide (GTK_WIDGET (applet)); - } return (TRUE); } diff --git a/panel-applet/NMWirelessAppletDbus.c b/panel-applet/NMWirelessAppletDbus.c index 3eed70a86e..2a1d88805b 100644 --- a/panel-applet/NMWirelessAppletDbus.c +++ b/panel-applet/NMWirelessAppletDbus.c @@ -55,7 +55,7 @@ char * nmwa_dbus_get_string (DBusConnection *connection, const char *path, const if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, NM_DBUS_INTERFACE, method))) { - show_warning_dialog ("Couldn't allocate the dbus message\n"); + fprintf (stderr, "Couldn't allocate the dbus message\n"); return (NULL); } @@ -63,14 +63,14 @@ char * nmwa_dbus_get_string (DBusConnection *connection, const char *path, const reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error); if (dbus_error_is_set (&error)) { - show_warning_dialog ("aaa %s raised:\n %s\n\n", error.name, error.message); + fprintf (stderr, "aaa %s raised:\n %s\n\n", error.name, error.message); dbus_message_unref (message); return (NULL); } if (reply == NULL) { - show_warning_dialog ("dbus reply message was NULL\n" ); + fprintf (stderr, "dbus reply message was NULL\n" ); dbus_message_unref (message); return (NULL); } @@ -78,7 +78,7 @@ char * nmwa_dbus_get_string (DBusConnection *connection, const char *path, const dbus_error_init (&error); if (!dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &string, DBUS_TYPE_INVALID)) { - show_warning_dialog ("bbb %s raised:\n %s\n\n", error.name, error.message); + fprintf (stderr, "bbb %s raised:\n %s\n\n", error.name, error.message); string = NULL; } @@ -258,15 +258,14 @@ char * nmwa_dbus_get_active_wireless_device (DBusConnection *connection) type = nmwa_dbus_get_int (connection, active_device, "getType"); if (type != 2) /* wireless */ { -show_warning_dialog ("nmwa_dbus_get_active_wireless_device(): device was not wireless\n"); dbus_free (active_device); active_device = NULL; } else -show_warning_dialog ("nmwa_dbus_get_active_wireless_device(): device GOOD\n"); +fprintf (stderr, "nmwa_dbus_get_active_wireless_device(): device GOOD\n"); } else -show_warning_dialog ("nmwa_dbus_get_active_wireless_device(): could not get string from dbus\n"); +fprintf (stderr, "nmwa_dbus_get_active_wireless_device(): could not get string from dbus\n"); return (active_device); } @@ -288,18 +287,21 @@ void nmwa_dbus_add_networks_to_menu (DBusConnection *connection, gpointer user_d if (!connection) { nmwa_add_menu_item ("No wireless networks found...", FALSE, user_data); +fprintf( stderr, "!connection\n"); return; } if (!(active_device = nmwa_dbus_get_active_wireless_device (connection))) { nmwa_add_menu_item ("No wireless networks found...", FALSE, user_data); +fprintf( stderr, "!active_device\n"); return; } - +fprintf( stderr, "active_device = '%s'\n", active_device); if (!(active_network = nmwa_dbus_get_string (connection, active_device, "getActiveNetwork"))) { nmwa_add_menu_item ("No wireless networks found...", FALSE, user_data); +fprintf( stderr, "!active_network\n"); return; } @@ -320,6 +322,8 @@ void nmwa_dbus_add_networks_to_menu (DBusConnection *connection, gpointer user_d } dbus_free_string_array (networks); } +else +fprintf( stderr, "!networks\n"); dbus_free (active_device); } @@ -411,10 +415,6 @@ DBusConnection * nmwa_dbus_init (gpointer user_data) "interface='" DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS "'," "sender='" DBUS_SERVICE_ORG_FREEDESKTOP_DBUS "'", &error); - if (dbus_error_is_set (&error)) - { - show_warning_dialog ("Could not add match, error: '%s'", error.message); - } return (connection); }