Fri Oct 8 07:19:55 2004 Jonathan Blandford <jrb@redhat.com>

        * panel-applet/NMWirelessAppletDbus.c (nmwa_dbus_get_double):
        (nmwa_dbus_get_string): remove unused functions

        * panel-applet/NMWirelessApplet.c (nmwa_about_cb):
        (nmwa_cancel_timeout), (nmwa_get_menu_pos), (nmwa_factory):
        remove unused functions

        * panel-applet/NMWirelessApplet.c: Rewrite icon code.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@217 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 154a0425
Fri Oct 8 07:19:55 2004 Jonathan Blandford <jrb@redhat.com>
* panel-applet/NMWirelessAppletDbus.c (nmwa_dbus_get_double):
(nmwa_dbus_get_string): remove unused functions
* panel-applet/NMWirelessApplet.c (nmwa_about_cb):
(nmwa_cancel_timeout), (nmwa_get_menu_pos), (nmwa_factory):
remove unused functions
* panel-applet/NMWirelessApplet.c: Rewrite icon code.
2004-10-12 Dan Williams <dcbw@redhat.com>
* panel-applet/NMWirelessAppletDbus.c
......@@ -115,7 +126,6 @@
- Be a bit more robust about link checking, ie make sure that
the WEP key we were given actually has some data in it
>>>>>>> 1.127
2004-10-08 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfo.c (main):
......
AC_PREREQ(2.52)
AC_INIT(NetworkManager, 0.2, dcbw@redhat.com, NetworkManager)
AC_INIT(NetworkManager, 0.3, dcbw@redhat.com, NetworkManager)
AM_INIT_AUTOMAKE([subdir-objects])
AM_CONFIG_HEADER(config.h)
......
Makefile
Makefile.in
NMWirelessApplet.server
NMWirelessApplet
NetworkManagerNotification
This diff is collapsed.
......@@ -34,23 +34,6 @@
#include "eggtrayicon.h"
#endif
typedef enum
{
PIX_NO_NETWORKMANAGER,
PIX_WIRED,
PIX_WIRELESS_NO_LINK,
PIX_WIRELESS_SIGNAL_1,
PIX_WIRELESS_SIGNAL_2,
PIX_WIRELESS_SIGNAL_3,
PIX_WIRELESS_SIGNAL_4,
PIX_WIRELESS_CONNECT_0,
PIX_WIRELESS_CONNECT_1,
PIX_WIRELESS_CONNECT_2,
PIX_WIRELESS_CONNECT_3,
PIX_NUMBER
} PixmapState;
typedef enum
{
APPLET_STATE_NO_NM,
......@@ -59,6 +42,7 @@ typedef enum
APPLET_STATE_WIRED_CONNECTING,
APPLET_STATE_WIRELESS,
APPLET_STATE_WIRELESS_CONNECTING,
APPLET_STATE_WIRELESS_SCANNING,
APPLET_STATE_IGNORE
} AppletState;
......@@ -125,19 +109,30 @@ typedef struct
GThread *dbus_thread;
GMainContext *thread_context;
PixmapState pix_state; // Index into pixmaps array
GdkPixbuf *pixmaps[PIX_NUMBER];
GdkPixbuf *current_pixbuf;
GdkPixbuf *key_pixbuf;
GdkPixbuf *wired_icon;
GdkPixbuf *wireless_icon;
/* Data model elements */
/* Data model elements */
GMutex *data_mutex;
GSList *devices;
NetworkDevice *active_device;
AppletState applet_state;
GdkPixbuf *XXno_nm_icon;
GdkPixbuf *XXwired_icon;
#define NUM_WIRED_CONNECTING_FRAMES 4
GdkPixbuf *XXwired_connecting_icons[NUM_WIRED_CONNECTING_FRAMES];
GdkPixbuf *XXwireless_00_icon;
GdkPixbuf *XXwireless_25_icon;
GdkPixbuf *XXwireless_50_icon;
GdkPixbuf *XXwireless_75_icon;
GdkPixbuf *XXwireless_100_icon;
#define NUM_WIRELESS_CONNECTING_FRAMES 4
GdkPixbuf *XXwireless_connecting_icons[NUM_WIRELESS_CONNECTING_FRAMES];
#define NUM_WIRELESS_SCANNING_FRAMES 8
GdkPixbuf *XXwireless_scanning_icons[NUM_WIRELESS_SCANNING_FRAMES];
/* Animation stuff */
int animation_step;
guint animation_id;
/* Direct UI elements */
GtkWidget *pixmap;
GtkWidget *box;
......@@ -149,5 +144,6 @@ typedef struct
NetworkDevice *nmwa_get_device_for_nm_device (NMWirelessApplet *applet, const char *nm_dev);
NMWirelessApplet *nmwa_new ();
NMWirelessApplet *nmwa_new (void);
#endif
......@@ -41,9 +41,6 @@
#define NM_DBUS_NO_ACTIVE_NET_ERROR "org.freedesktop.NetworkManager.NoActiveNetwork"
static void wireless_network_free (void *element, void *user_data);
/*
* nmwa_dbus_get_string
*
......@@ -234,57 +231,6 @@ static int nmwa_dbus_get_bool (DBusConnection *connection, const char *path, con
}
/*
* nmwa_dbus_get_double
*
*/
static double nmwa_dbus_get_double (DBusConnection *connection, const char *path, const char *method)
{
DBusMessage *message;
DBusMessage *reply;
DBusError error;
double num;
g_return_val_if_fail (connection != NULL, 0);
g_return_val_if_fail (path != NULL, 0);
g_return_val_if_fail (method != NULL, 0);
if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, NM_DBUS_INTERFACE, method)))
{
fprintf (stderr, "nmwa_dbus_get_double(): Couldn't allocate the dbus message\n");
return (0);
}
dbus_error_init (&error);
reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
dbus_message_unref (message);
if (dbus_error_is_set (&error))
{
fprintf (stderr, "nmwa_dbus_get_double(): %s raised:\n %s\n\n", error.name, error.message);
dbus_message_unref (message);
dbus_error_free (&error);
return (0);
}
if (reply == NULL)
{
fprintf( stderr, "nmwa_dbus_get_double(): dbus reply message was NULL\n" );
return (0);
}
dbus_error_init (&error);
if (!dbus_message_get_args (reply, &error, DBUS_TYPE_DOUBLE, &num, DBUS_TYPE_INVALID))
{
if (dbus_error_is_set (&error))
dbus_error_free (&error);
num = 0;
}
dbus_message_unref (reply);
return (num);
}
/*
* nmwa_dbus_get_string_array
......@@ -964,7 +910,6 @@ NetworkDevice *network_device_copy (NetworkDevice *src)
static void nmwa_dbus_update_device_wireless_networks (NetworkDevice *dev, NMWirelessApplet *applet)
{
char *active_network = NULL;
int dev_type;
char **networks = NULL;
int num_items = 0;
int i;
......@@ -1036,7 +981,6 @@ out:
*/
static void nmwa_dbus_update_network_state (NMWirelessApplet *applet)
{
char *active_device = NULL;
char *nm_status = NULL;
g_return_if_fail (applet != NULL);
......@@ -1045,6 +989,12 @@ static void nmwa_dbus_update_network_state (NMWirelessApplet *applet)
if (!(nm_status = nmwa_dbus_get_nm_status (applet, APPLET_STATE_NO_CONNECTION)))
return;
if (strcmp (nm_status, "scanning") == 0)
{
applet->applet_state = APPLET_STATE_WIRELESS_SCANNING;
goto out;
}
if (strcmp (nm_status, "disconnected") == 0)
{
applet->applet_state = APPLET_STATE_NO_CONNECTION;
......
......@@ -2,21 +2,31 @@ NULL =
largeicondir=${datadir}/icons/hicolor/48x48/apps
largeicon_DATA=\
nm-device-wireless.png
smallicondir=${datadir}/icons/hicolor/24x24/apps
smallicon_DATA=\
nm-device-wired.png \
nm-device-wireless.png \
nm-connecting00.png \
nm-connecting01.png \
nm-connecting02.png \
nm-connecting03.png \
nm-detect00.png \
nm-detect01.png \
nm-detect02.png \
nm-detect03.png \
nm-detect04.png \
nm-detect05.png \
nm-detect06.png \
nm-detect07.png \
nm-detect00.png \
nm-detect01.png \
nm-detect02.png \
nm-detect03.png \
nm-detect04.png \
nm-detect05.png \
nm-detect06.png \
nm-detect07.png \
nm-signal-00.png \
nm-signal-25.png \
nm-signal-50.png \
nm-signal-75.png \
nm-signal-100.png \
$(NULL)
EXTRA_DIST=\
$(largeicon_DATA)
$(largeicon_DATA) \
$(smallicon_DATA)
panel-applet/icons/nm-device-wired.png

3.68 KB | W: | H:

panel-applet/icons/nm-device-wired.png

828 Bytes | W: | H:

panel-applet/icons/nm-device-wired.png
panel-applet/icons/nm-device-wired.png
panel-applet/icons/nm-device-wired.png
panel-applet/icons/nm-device-wired.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -17,4 +17,6 @@ main (int argc, char *argv[])
gtk_widget_show_all (GTK_WIDGET (nmwa));
gtk_main ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment