Improve messages with newer dhcpcd versions.
[dhcpcd-ui] / prefs.c
diff --git a/prefs.c b/prefs.c
index 35b0ecd3699b4ebd66276b2141139e729044c9df..6d8845204e2ee2dc8ba534aa6679f3b8e5b19a9c 100644 (file)
--- a/prefs.c
+++ b/prefs.c
@@ -357,7 +357,8 @@ on_rebind(void)
 
        make_config(config);
        if (save_config(block, name, config)) {
 
        make_config(config);
        if (save_config(block, name, config)) {
-               set_name_active_icon("document-save");
+               set_name_active_icon(config->len == 0 ?
+                   "document-new" : "document-save");
                show_config(config);
                if (g_strcmp0(block, "interface") == 0)
                        rebind_interface(name);
                show_config(config);
                if (g_strcmp0(block, "interface") == 0)
                        rebind_interface(name);
@@ -415,9 +416,9 @@ dhcpcd_prefs_show(void)
        dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        g_signal_connect(G_OBJECT(dialog), "destroy", on_destroy, NULL);
 
        dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        g_signal_connect(G_OBJECT(dialog), "destroy", on_destroy, NULL);
 
-       gtk_window_set_title(GTK_WINDOW(dialog), _("dhcpcd preferences"));
+       gtk_window_set_title(GTK_WINDOW(dialog), _("Network Preferences"));
        gtk_window_set_resizable(GTK_WINDOW(dialog), false);
        gtk_window_set_resizable(GTK_WINDOW(dialog), false);
-       gtk_window_set_icon_name(GTK_WINDOW(dialog), "config-users");
+       gtk_window_set_icon_name(GTK_WINDOW(dialog), "network-transmit-receive");
        gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
        gtk_window_set_type_hint(GTK_WINDOW(dialog),
            GDK_WINDOW_TYPE_HINT_DIALOG);
        gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
        gtk_window_set_type_hint(GTK_WINDOW(dialog),
            GDK_WINDOW_TYPE_HINT_DIALOG);
@@ -491,8 +492,8 @@ dhcpcd_prefs_show(void)
        } while (0)
 #define attach_entry(a, b, c, d, e)                                          \
        gtk_table_attach(GTK_TABLE(table), a, b, c, d, e,                     \
        } while (0)
 #define attach_entry(a, b, c, d, e)                                          \
        gtk_table_attach(GTK_TABLE(table), a, b, c, d, e,                     \
-           GTK_EXPAND | GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK, 3, 3); \
-                                                                             \
+           GTK_EXPAND | GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK, 3, 3);
+       
        w = gtk_label_new(_("IP Address:"));
        address = gtk_entry_new();
        gtk_entry_set_max_length(GTK_ENTRY(address), 15);
        w = gtk_label_new(_("IP Address:"));
        address = gtk_entry_new();
        gtk_entry_set_max_length(GTK_ENTRY(address), 15);