Tue Oct 12 22:44:15 2004 Jonathan Blandford <jrb@redhat.com>

        * panel-applet/NMWirelessApplet.h: Change the name of the icons.

        * panel-applet/NMWirelessApplet.c: (animation_timeout),
        (nmwa_update_state), (nmwa_destroy), (nmwa_setup_widgets),
        (nmwa_icons_free), (nmwa_icons_load_from_disk), (nmwa_icons_init):
        Change the name of the icons.

        * panel-applet/menu-info.c: (nm_menu_wired_class_init),
        (nm_menu_wired_expose_event), (nm_menu_network_class_init),
        (nm_menu_wireless_class_init), (nm_menu_wireless_new),
        (nm_menu_wireless_expose_event): Really bad hack to get the style
        to draw in the right color.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@219 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 01e70b92
Tue Oct 12 22:44:15 2004 Jonathan Blandford <jrb@redhat.com>
* panel-applet/NMWirelessApplet.h: Change the name of the icons.
* panel-applet/NMWirelessApplet.c: (animation_timeout),
(nmwa_update_state), (nmwa_destroy), (nmwa_setup_widgets),
(nmwa_icons_free), (nmwa_icons_load_from_disk), (nmwa_icons_init):
Change the name of the icons.
* panel-applet/menu-info.c: (nm_menu_wired_class_init),
(nm_menu_wired_expose_event), (nm_menu_network_class_init),
(nm_menu_wireless_class_init), (nm_menu_wireless_new),
(nm_menu_wireless_expose_event): Really bad hack to get the style
to draw in the right color.
Tue Oct 12 John (J5) Palmieri <johnp@redhat.com>
* info-daemon/NetworkManagerInfo.c (main): Add child watch to respawn
......
This diff is collapsed.
......@@ -115,19 +115,19 @@ typedef struct
NetworkDevice *active_device;
AppletState applet_state;
GdkPixbuf *XXno_nm_icon;
GdkPixbuf *XXwired_icon;
GdkPixbuf *no_nm_icon;
GdkPixbuf *wired_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;
GdkPixbuf *wired_connecting_icons[NUM_WIRED_CONNECTING_FRAMES];
GdkPixbuf *wireless_00_icon;
GdkPixbuf *wireless_25_icon;
GdkPixbuf *wireless_50_icon;
GdkPixbuf *wireless_75_icon;
GdkPixbuf *wireless_100_icon;
#define NUM_WIRELESS_CONNECTING_FRAMES 4
GdkPixbuf *XXwireless_connecting_icons[NUM_WIRELESS_CONNECTING_FRAMES];
GdkPixbuf *wireless_connecting_icons[NUM_WIRELESS_CONNECTING_FRAMES];
#define NUM_WIRELESS_SCANNING_FRAMES 8
GdkPixbuf *XXwireless_scanning_icons[NUM_WIRELESS_SCANNING_FRAMES];
GdkPixbuf *wireless_scanning_icons[NUM_WIRELESS_SCANNING_FRAMES];
/* Animation stuff */
int animation_step;
......@@ -135,8 +135,6 @@ typedef struct
/* Direct UI elements */
GtkWidget *pixmap;
GtkWidget *box;
GtkWidget *about_dialog;
GtkWidget *menu;
GtkWidget *toplevel_menu;
GtkSizeGroup *encryption_size_group;
......
......@@ -32,6 +32,9 @@
#include "NMWirelessAppletDbus.h"
#include <config.h>
static gboolean nm_menu_wired_expose_event (GtkWidget *widget, GdkEventExpose *event);
static gboolean nm_menu_wireless_expose_event (GtkWidget *widget, GdkEventExpose *event);
G_DEFINE_TYPE (NMMenuWired, nm_menu_wired, GTK_TYPE_CHECK_MENU_ITEM);
......@@ -50,6 +53,26 @@ nm_menu_wired_init (NMMenuWired *menu_wired)
static void
nm_menu_wired_class_init (NMMenuWiredClass *klass)
{
GTK_WIDGET_CLASS (klass)->expose_event = nm_menu_wired_expose_event;
}
/* Bad hack */
static gboolean
nm_menu_wired_expose_event (GtkWidget *widget, GdkEventExpose *event)
{
gboolean retval;
GtkStyle *old_style;
old_style = NM_MENU_WIRED (widget)->label->style;
NM_MENU_WIRED (widget)->label->style =
gtk_rc_get_style_by_paths (gtk_settings_get_default (),
"GtkWindow.GtkMenu.GtkMenuItem.GtkLabel",
"GtkWindow.GtkMenu.GtkMenuItem.GtkLabel",
GTK_TYPE_LABEL);
retval = GTK_WIDGET_CLASS (nm_menu_wired_parent_class)->expose_event (widget, event);
NM_MENU_WIRED (widget)->label->style = old_style;
return retval;
}
GtkWidget *
......@@ -114,6 +137,7 @@ nm_menu_network_init (NMMenuNetwork *menu_network)
static void
nm_menu_network_class_init (NMMenuNetworkClass *menu_network)
{
}
GtkWidget *
......@@ -184,6 +208,7 @@ nm_menu_wireless_init (NMMenuWireless *menu_info)
static void
nm_menu_wireless_class_init (NMMenuWirelessClass *menu_info_class)
{
GTK_WIDGET_CLASS (menu_info_class)->expose_event = nm_menu_wireless_expose_event;
}
GtkWidget *
......@@ -197,6 +222,25 @@ nm_menu_wireless_new (GtkSizeGroup *encryption_size_group)
return retval;
}
/* Bad hack */
static gboolean
nm_menu_wireless_expose_event (GtkWidget *widget, GdkEventExpose *event)
{
gboolean retval;
GtkStyle *old_style;
old_style = NM_MENU_WIRELESS (widget)->label->style;
NM_MENU_WIRELESS (widget)->label->style =
gtk_rc_get_style_by_paths (gtk_settings_get_default (),
"GtkWindow.GtkMenu.GtkMenuItem.GtkLabel",
"GtkWindow.GtkMenu.GtkMenuItem.GtkLabel",
GTK_TYPE_LABEL);
retval = GTK_WIDGET_CLASS (nm_menu_wireless_parent_class)->expose_event (widget, event);
NM_MENU_WIRELESS (widget)->label->style = old_style;
return retval;
}
/* has_encrypted means that the wireless network has an encrypted
* area, and thus we need to allow for spacing.
*/
......
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