mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 19:00:16 +01:00
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
This commit is contained in:
parent
7f966054c8
commit
c109a9ba11
3 changed files with 40 additions and 27 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,11 @@
|
|||
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>
|
||||
|
||||
* src/NetworkManager.c
|
||||
|
|
@ -320,7 +328,6 @@ Fri Oct 8 07:19:55 2004 Jonathan Blandford <jrb@redhat.com>
|
|||
* panel-applet/main.c
|
||||
- Cast the applet appropriately for gtk_widget_show_all ()
|
||||
|
||||
>>>>>>> 1.125
|
||||
Mon Oct 4 12:55:41 2004 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* panel-applet/eggtrayicon.[ch]:
|
||||
|
|
@ -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
|
||||
correct AP quality
|
||||
|
||||
>>>>>>> 1.92
|
||||
2004-09-08 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* panel-applet/no-networkmanager.png
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ animation_timeout (NMWirelessApplet *applet)
|
|||
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap),
|
||||
applet->wireless_connecting_icons[applet->animation_step]);
|
||||
break;
|
||||
case (APPLET_STATE_NO_NM):
|
||||
case (APPLET_STATE_WIRELESS_SCANNING):
|
||||
applet->animation_step ++;
|
||||
if (applet->animation_step >= NUM_WIRELESS_SCANNING_FRAMES)
|
||||
|
|
@ -207,9 +208,6 @@ nmwa_update_state (NMWirelessApplet *applet)
|
|||
/* print_state (applet->applet_state); */
|
||||
switch (applet->applet_state)
|
||||
{
|
||||
case (APPLET_STATE_NO_NM):
|
||||
pixbuf = applet->no_nm_icon;
|
||||
break;
|
||||
case (APPLET_STATE_NO_CONNECTION):
|
||||
show_applet = FALSE;
|
||||
break;
|
||||
|
|
@ -241,6 +239,7 @@ nmwa_update_state (NMWirelessApplet *applet)
|
|||
pixbuf = applet->wireless_connecting_icons[applet->animation_step];
|
||||
need_animation = TRUE;
|
||||
break;
|
||||
case (APPLET_STATE_NO_NM):
|
||||
case (APPLET_STATE_WIRELESS_SCANNING):
|
||||
applet->animation_step = CLAMP (applet->animation_step, 0, NUM_WIRELESS_SCANNING_FRAMES - 1);
|
||||
pixbuf = applet->wireless_scanning_icons[applet->animation_step];
|
||||
|
|
@ -301,7 +300,7 @@ static void show_warning_dialog (gboolean error, gchar *mesg, ...)
|
|||
va_start (ap,mesg);
|
||||
tmp = g_strdup_vprintf (mesg,ap);
|
||||
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_widget_destroy (dialog);
|
||||
g_free (tmp);
|
||||
|
|
@ -309,7 +308,6 @@ static void show_warning_dialog (gboolean error, gchar *mesg, ...)
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* nmwa_destroy
|
||||
*
|
||||
|
|
@ -585,6 +583,8 @@ create_wireless_adaptor_model (NMWirelessApplet *applet)
|
|||
return GTK_TREE_MODEL (retval);
|
||||
}
|
||||
|
||||
/* FIXME: We really should break this dialog into its own file. This function is too long.
|
||||
*/
|
||||
static void
|
||||
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;
|
||||
GSList *element;
|
||||
NetworkDevice *default_dev = NULL;
|
||||
char *label;
|
||||
|
||||
glade_file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_DATADIR,
|
||||
"NetworkManagerNotification/essid.glade",
|
||||
|
|
@ -628,7 +629,12 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
|
|||
gtk_entry_set_text (GTK_ENTRY (entry), "");
|
||||
gtk_widget_set_sensitive (button, FALSE);
|
||||
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? */
|
||||
g_mutex_lock (applet->data_mutex);
|
||||
for (element = applet->devices; element; element = element->next)
|
||||
|
|
@ -646,6 +652,7 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
|
|||
n_wireless_interfaces++;
|
||||
}
|
||||
}
|
||||
|
||||
if (n_wireless_interfaces < 1)
|
||||
{
|
||||
g_mutex_unlock (applet->data_mutex);
|
||||
|
|
@ -676,24 +683,24 @@ custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
|
|||
|
||||
if (response == GTK_RESPONSE_OK)
|
||||
{
|
||||
char *essid;
|
||||
|
||||
if ((essid = gtk_entry_get_text (GTK_ENTRY (entry))))
|
||||
{
|
||||
WirelessNetwork *net = wireless_network_new_with_essid (essid);
|
||||
/* FIXME: allow picking of the wireless device, we currently just
|
||||
* use the first one found in our device list.
|
||||
*
|
||||
* FIXME: default_dev might have gone away by the time the dialog
|
||||
* gets dismissed and we get here...
|
||||
*/
|
||||
if (net)
|
||||
{
|
||||
nmwa_dbus_set_device (applet->connection, default_dev, net);
|
||||
network_device_unref (default_dev);
|
||||
wireless_network_unref (net);
|
||||
}
|
||||
}
|
||||
const char *essid;
|
||||
essid = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
if (essid[0] != '\000')
|
||||
{
|
||||
WirelessNetwork *net = wireless_network_new_with_essid (essid);
|
||||
/* FIXME: allow picking of the wireless device, we currently just
|
||||
* use the first one found in our device list.
|
||||
*
|
||||
* FIXME: default_dev might have gone away by the time the dialog
|
||||
* gets dismissed and we get here...
|
||||
*/
|
||||
if (net)
|
||||
{
|
||||
nmwa_dbus_set_device (applet->connection, default_dev, net);
|
||||
network_device_unref (default_dev);
|
||||
wireless_network_unref (net);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</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="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue