diff options
author | Jussi Kukkonen <jku@linux.intel.com> | 2010-05-03 15:19:10 +0300 |
---|---|---|
committer | Jussi Kukkonen <jku@linux.intel.com> | 2010-05-03 15:24:41 +0300 |
commit | 1f60171e53e17a1c30da527ea2f53291e1262eaf (patch) | |
tree | a898cbe5ba6aeb4f7c860fdcea482fa5605305f0 /src | |
parent | d4e05b253185d4d1f511b0cdc77ee24d4e8f62b5 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/gtk-ui/sync-config-widget.c | 1 | ||||
-rw-r--r-- | src/gtk-ui/sync-ui.c | 3 |
2 files changed, 3 insertions, 1 deletions
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); } |