Commit 86ed3ac6 authored by Robert Love's avatar Robert Love Committed by Robert Love
Browse files

2005-08-05  Robert Love  <rml@novell.com>

        * gnome/applet/other-network-dialog.c: default the adhoc network to the
          machine's hostname to make adhoc creation idiot-proof.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@820 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 085a86bb
2005-08-05 Robert Love <rml@novell.com>
* gnome/applet/other-network-dialog.c: default the adhoc network to the
machine's hostname to make adhoc creation idiot-proof.
2005-08-04 Robert Love <rml@novell.com> 2005-08-04 Robert Love <rml@novell.com>
* gnome/applet/other-network-dialog.c: fix leak. "label" needs to be * gnome/applet/other-network-dialog.c: fix leak. "label" needs to be
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
...@@ -214,15 +215,25 @@ static GtkDialog *nmwa_other_network_dialog_init (GladeXML *xml, NMWirelessApple ...@@ -214,15 +215,25 @@ static GtkDialog *nmwa_other_network_dialog_init (GladeXML *xml, NMWirelessApple
gtk_widget_grab_default (GTK_WIDGET (button)); gtk_widget_grab_default (GTK_WIDGET (button));
gtk_widget_grab_focus (essid_entry); gtk_widget_grab_focus (essid_entry);
gtk_entry_set_text (GTK_ENTRY (essid_entry), "");
gtk_widget_set_sensitive (button, FALSE); gtk_widget_set_sensitive (button, FALSE);
g_signal_connect (essid_entry, "changed", G_CALLBACK (update_button_cb), xml); g_signal_connect (essid_entry, "changed", G_CALLBACK (update_button_cb), xml);
if (create_network) if (create_network)
{ {
label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s", char hostname[HOST_NAME_MAX] = "hostname";
gethostname (hostname, HOST_NAME_MAX);
hostname[HOST_NAME_MAX-1] = '\n'; /* unspecified whether a truncated hostname is terminated */
gtk_entry_set_text (GTK_ENTRY (essid_entry), hostname);
gtk_editable_set_position (GTK_EDITABLE (essid_entry), -1);
label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s\n\n%s %s%s",
_("Create new wireless network"), _("Create new wireless network"),
_("Enter the ESSID and security settings of the wireless network you wish to create.")); _("Enter the ESSID and security settings of the wireless network you wish to create."),
_("By default, the ESSID is set to your computer's name,"),
hostname,
_(", with no encryption enabled."));
} }
else else
{ {
......
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