Thu Oct 14 16:40:39 2004 Jonathan Blandford <jrb@redhat.com>

        * panel-applet/NMWirelessApplet.c (animation_timeout): Make
        applet->state == APPLET_STATE_NO_NM animation.

        * panel-applet/NMWirelessApplet.c (custom_essid_item_selected):
        set the text correctly.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@233 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 7f966054
Thu Oct 14 16:40:39 2004 Jonathan Blandford <jrb@redhat.com>
* panel-applet/NMWirelessApplet.c (animation_timeout): Make
applet->state == APPLET_STATE_NO_NM animation.
* panel-applet/NMWirelessApplet.c (custom_essid_item_selected):
set the text correctly.
2004-10-14 Dan Williams <dcbw@redhat.com> 2004-10-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c * src/NetworkManager.c
...@@ -320,7 +328,6 @@ Fri Oct 8 07:19:55 2004 Jonathan Blandford <jrb@redhat.com> ...@@ -320,7 +328,6 @@ Fri Oct 8 07:19:55 2004 Jonathan Blandford <jrb@redhat.com>
* panel-applet/main.c * panel-applet/main.c
- Cast the applet appropriately for gtk_widget_show_all () - Cast the applet appropriately for gtk_widget_show_all ()
>>>>>>> 1.125
Mon Oct 4 12:55:41 2004 Jonathan Blandford <jrb@redhat.com> Mon Oct 4 12:55:41 2004 Jonathan Blandford <jrb@redhat.com>
* panel-applet/eggtrayicon.[ch]: * panel-applet/eggtrayicon.[ch]:
...@@ -664,7 +671,6 @@ Fri Sep 17 14:04:34 2004 Jonathan Blandford <jrb@redhat.com> ...@@ -664,7 +671,6 @@ Fri Sep 17 14:04:34 2004 Jonathan Blandford <jrb@redhat.com>
to look like. Also did a Airo card hack to make it show the to look like. Also did a Airo card hack to make it show the
correct AP quality correct AP quality
>>>>>>> 1.92
2004-09-08 Dan Williams <dcbw@redhat.com> 2004-09-08 Dan Williams <dcbw@redhat.com>
* panel-applet/no-networkmanager.png * panel-applet/no-networkmanager.png
......
...@@ -117,6 +117,7 @@ animation_timeout (NMWirelessApplet *applet) ...@@ -117,6 +117,7 @@ animation_timeout (NMWirelessApplet *applet)
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap), gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap),
applet->wireless_connecting_icons[applet->animation_step]); applet->wireless_connecting_icons[applet->animation_step]);
break; break;
case (APPLET_STATE_NO_NM):
case (APPLET_STATE_WIRELESS_SCANNING): case (APPLET_STATE_WIRELESS_SCANNING):
applet->animation_step ++; applet->animation_step ++;
if (applet->animation_step >= NUM_WIRELESS_SCANNING_FRAMES) if (applet->animation_step >= NUM_WIRELESS_SCANNING_FRAMES)
...@@ -207,9 +208,6 @@ nmwa_update_state (NMWirelessApplet *applet) ...@@ -207,9 +208,6 @@ nmwa_update_state (NMWirelessApplet *applet)
/* print_state (applet->applet_state); */ /* print_state (applet->applet_state); */
switch (applet->applet_state) switch (applet->applet_state)
{ {
case (APPLET_STATE_NO_NM):
pixbuf = applet->no_nm_icon;
break;
case (APPLET_STATE_NO_CONNECTION): case (APPLET_STATE_NO_CONNECTION):
show_applet = FALSE; show_applet = FALSE;
break; break;
...@@ -241,6 +239,7 @@ nmwa_update_state (NMWirelessApplet *applet) ...@@ -241,6 +239,7 @@ nmwa_update_state (NMWirelessApplet *applet)
pixbuf = applet->wireless_connecting_icons[applet->animation_step]; pixbuf = applet->wireless_connecting_icons[applet->animation_step];
need_animation = TRUE; need_animation = TRUE;
break; break;
case (APPLET_STATE_NO_NM):
case (APPLET_STATE_WIRELESS_SCANNING): case (APPLET_STATE_WIRELESS_SCANNING):
applet->animation_step = CLAMP (applet->animation_step, 0, NUM_WIRELESS_SCANNING_FRAMES - 1); applet->animation_step = CLAMP (applet->animation_step, 0, NUM_WIRELESS_SCANNING_FRAMES - 1);
pixbuf = applet->wireless_scanning_icons[applet->animation_step]; pixbuf = applet->wireless_scanning_icons[applet->animation_step];
...@@ -301,7 +300,7 @@ static void show_warning_dialog (gboolean error, gchar *mesg, ...) ...@@ -301,7 +300,7 @@ static void show_warning_dialog (gboolean error, gchar *mesg, ...)
va_start (ap,mesg); va_start (ap,mesg);
tmp = g_strdup_vprintf (mesg,ap); tmp = g_strdup_vprintf (mesg,ap);
dialog = gtk_message_dialog_new (NULL, 0, error ? GTK_MESSAGE_ERROR : GTK_MESSAGE_WARNING, dialog = gtk_message_dialog_new (NULL, 0, error ? GTK_MESSAGE_ERROR : GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK, mesg, NULL); GTK_BUTTONS_OK, mesg, NULL);
gtk_dialog_run (GTK_DIALOG (dialog)); gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
g_free (tmp); g_free (tmp);
...@@ -309,7 +308,6 @@ static void show_warning_dialog (gboolean error, gchar *mesg, ...) ...@@ -309,7 +308,6 @@ static void show_warning_dialog (gboolean error, gchar *mesg, ...)
} }
/* /*
* nmwa_destroy * nmwa_destroy
* *
...@@ -585,6 +583,8 @@ create_wireless_adaptor_model (NMWirelessApplet *applet) ...@@ -585,6 +583,8 @@ create_wireless_adaptor_model (NMWirelessApplet *applet)
return GTK_TREE_MODEL (retval); return GTK_TREE_MODEL (retval);
} }
/* FIXME: We really should break this dialog into its own file. This function is too long.
*/
static void static void
custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet) custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
{ {
...@@ -597,6 +597,7 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet) ...@@ -597,6 +597,7 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
gint n_wireless_interfaces = 0; gint n_wireless_interfaces = 0;
GSList *element; GSList *element;
NetworkDevice *default_dev = NULL; NetworkDevice *default_dev = NULL;
char *label;
glade_file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_DATADIR, glade_file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_DATADIR,
"NetworkManagerNotification/essid.glade", "NetworkManagerNotification/essid.glade",
...@@ -628,7 +629,12 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet) ...@@ -628,7 +629,12 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
gtk_entry_set_text (GTK_ENTRY (entry), ""); gtk_entry_set_text (GTK_ENTRY (entry), "");
gtk_widget_set_sensitive (button, FALSE); gtk_widget_set_sensitive (button, FALSE);
g_signal_connect (entry, "changed", update_button_cb, button); g_signal_connect (entry, "changed", update_button_cb, button);
label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s",
_("Custom wireless network"),
_("Enter the ESSID of the wireless network to which you wish to connect."));
gtk_label_set_markup (GTK_LABEL (glade_xml_get_widget (xml, "essid_label")), label);
/* Do we have multiple Network cards? */ /* Do we have multiple Network cards? */
g_mutex_lock (applet->data_mutex); g_mutex_lock (applet->data_mutex);
for (element = applet->devices; element; element = element->next) for (element = applet->devices; element; element = element->next)
...@@ -646,6 +652,7 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet) ...@@ -646,6 +652,7 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
n_wireless_interfaces++; n_wireless_interfaces++;
} }
} }
if (n_wireless_interfaces < 1) if (n_wireless_interfaces < 1)
{ {
g_mutex_unlock (applet->data_mutex); g_mutex_unlock (applet->data_mutex);
...@@ -676,24 +683,24 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet) ...@@ -676,24 +683,24 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
if (response == GTK_RESPONSE_OK) if (response == GTK_RESPONSE_OK)
{ {
char *essid; const char *essid;
essid = gtk_entry_get_text (GTK_ENTRY (entry));
if ((essid = gtk_entry_get_text (GTK_ENTRY (entry)))) if (essid[0] != '\000')
{ {
WirelessNetwork *net = wireless_network_new_with_essid (essid); WirelessNetwork *net = wireless_network_new_with_essid (essid);
/* FIXME: allow picking of the wireless device, we currently just /* FIXME: allow picking of the wireless device, we currently just
* use the first one found in our device list. * use the first one found in our device list.
* *
* FIXME: default_dev might have gone away by the time the dialog * FIXME: default_dev might have gone away by the time the dialog
* gets dismissed and we get here... * gets dismissed and we get here...
*/ */
if (net) if (net)
{ {
nmwa_dbus_set_device (applet->connection, default_dev, net); nmwa_dbus_set_device (applet->connection, default_dev, net);
network_device_unref (default_dev); network_device_unref (default_dev);
wireless_network_unref (net); wireless_network_unref (net);
} }
} }
} }
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">True</property> <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property> <property name="wrap">True</property>
<property name="selectable">False</property> <property name="selectable">False</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
......
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