From 1f60171e53e17a1c30da527ea2f53291e1262eaf Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Mon, 3 May 2010 15:19:10 +0300 Subject: gtk-ui: preserve configuration names on save (BME #1266) use the name of a saved config (and not the the template) when saving the config again. --- src/gtk-ui/sync-config-widget.c | 1 + src/gtk-ui/sync-ui.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gtk-ui/sync-config-widget.c b/src/gtk-ui/sync-config-widget.c index 01306d21..2647c58e 100644 --- a/src/gtk-ui/sync-config-widget.c +++ b/src/gtk-ui/sync-config-widget.c @@ -2115,6 +2115,7 @@ sync_config_widget_add_alternative_config (SyncConfigWidget *self, { if (configured) { sync_config_widget_set_config (self, config); + sync_config_widget_set_name (self, name); sync_config_widget_set_configured (self, TRUE); } else { sync_config_widget_add_config (self, name, config); diff --git a/src/gtk-ui/sync-ui.c b/src/gtk-ui/sync-ui.c index c6b619eb..c39d0f00 100644 --- a/src/gtk-ui/sync-ui.c +++ b/src/gtk-ui/sync-ui.c @@ -2040,6 +2040,7 @@ get_config_for_config_widget_cb (SyncevoServer *server, /* NOTE: using device_name here means a new config will be saved with * device_name (and not the template name). Not sure if this is * what we really want... */ + syncevo_config_get_value (config, NULL, "templateName", &device_name); if (!device_name) { syncevo_config_get_value (config, NULL, "fingerPrint", &fp); @@ -2072,7 +2073,7 @@ get_config_for_config_widget_cb (SyncevoServer *server, * all configs / templates, then decide what to sho w*/ /* there is a widget for this device already, add this info there*/ - if (g_strcmp0 ("1", ready) == 0) { + if (c_data->has_configuration || g_strcmp0 ("1", ready) == 0) { sync_config_widget_add_alternative_config (w, device_name, config, c_data->has_configuration); } -- cgit v1.2.3