summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-11-09 19:18:55 +0100
committerLubomir Rintel <lkundrak@v3.sk>2019-02-27 10:13:39 +0100
commit4e8da1c4252b5870a933a5896f0a228791dec3d3 (patch)
tree48362866e9ac2c05fb48f095779f322b07a9a773
parentdad2476cfaf9e5770426dacf42e895ad46b8bebb (diff)
downloadnetwork-manager-applet-4e8da1c4252b5870a933a5896f0a228791dec3d3.tar.gz
applet/info-dialog: remove the "(default)" from connection label
We're sort of short in the notebook tab space and this serves no purpose: the default connections just gets sorted first.
-rw-r--r--src/applet-dialogs.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c
index a856f768..05f24262 100644
--- a/src/applet-dialogs.c
+++ b/src/applet-dialogs.c
@@ -261,22 +261,6 @@ create_info_label_security (NMConnection *connection)
return w;
}
-static GtkWidget *
-create_info_notebook_label (NMConnection *connection, gboolean is_default)
-{
- GtkWidget *label;
- char *str;
-
- if (is_default) {
- str = g_strdup_printf (_("%s (default)"), nm_connection_get_id (connection));
- label = gtk_label_new (str);
- g_free (str);
- } else
- label = gtk_label_new (nm_connection_get_id (connection));
-
- return label;
-}
-
typedef struct {
NMDevice *device;
GtkWidget *label;
@@ -471,7 +455,6 @@ display_dns_info (const char * const *dns, GtkGrid *grid, int *row)
static void
info_dialog_add_page (GtkNotebook *notebook,
NMConnection *connection,
- gboolean is_default,
NMDevice *device)
{
GtkGrid *grid;
@@ -702,7 +685,7 @@ info_dialog_add_page (GtkNotebook *notebook,
data_object = NULL;
gtk_notebook_append_page (notebook, GTK_WIDGET (grid),
- create_info_notebook_label (connection, is_default));
+ gtk_label_new (nm_connection_get_id (connection)));
gtk_widget_show_all (GTK_WIDGET (grid));
}
@@ -794,7 +777,6 @@ info_dialog_add_page_for_vpn (GtkNotebook *notebook,
GPtrArray *addresses;
NMSettingIPConfig *s_ip6;
const char *method = NULL;
- gboolean is_default = nm_active_connection_get_default (active);
grid = GTK_GRID (gtk_grid_new ());
gtk_grid_set_column_spacing (grid, 12);
@@ -875,7 +857,7 @@ info_dialog_add_page_for_vpn (GtkNotebook *notebook,
}
gtk_notebook_append_page (notebook, GTK_WIDGET (grid),
- create_info_notebook_label (connection, is_default));
+ gtk_label_new (nm_connection_get_id (connection)));
gtk_widget_show_all (GTK_WIDGET (grid));
}
@@ -1009,7 +991,6 @@ info_dialog_update (NMApplet *applet)
} else if (devices && devices->len > 0) {
info_dialog_add_page (notebook,
connection,
- nm_active_connection_get_default (active_connection),
g_ptr_array_index (devices, 0));
} else {
g_warning ("Active connection %s had no devices and was not a VPN!",