network: Allow setting title on connection editor

We want the title to match whats in the device list, which
sometimes does not match the connection id exactly. This
API lets us do so.
https://bugzilla.gnome.org/show_bug.cgi?id=693780
This commit is contained in:
Matthias Clasen 2013-04-12 21:58:14 -04:00
parent dffb46e6db
commit 7618df792f
2 changed files with 15 additions and 0 deletions

View file

@ -278,6 +278,9 @@ net_connection_editor_update_title (NetConnectionEditor *editor)
{
gchar *id;
if (editor->title_set)
return;
if (editor->is_new_connection) {
if (editor->device) {
id = g_strdup (_("New Profile"));
@ -961,3 +964,11 @@ net_connection_editor_reset (NetConnectionEditor *editor)
nm_connection_replace_settings (editor->connection, settings, NULL);
g_hash_table_destroy (settings);
}
void
net_connection_editor_set_title (NetConnectionEditor *editor,
const gchar *title)
{
gtk_window_set_title (GTK_WINDOW (editor->window), title);
editor->title_set = TRUE;
}