summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Kukkonen <jku@linux.intel.com>2010-03-25 21:21:07 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2010-03-26 10:23:01 +0100
commitad9a6bd3f6882186391ae313761a1ae1d8dd3ee6 (patch)
tree8ef6b13002fd78364dff92e5ca9d6f788e278d87
parentb89d85e5f3c238b442eacf7df5145d10e3f8dae7 (diff)
gtk-ui: use templateName when availablemb10406
use templateName to describe the device when he needs to select the template to be used.
-rw-r--r--src/gtk-ui/sync-ui.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gtk-ui/sync-ui.c b/src/gtk-ui/sync-ui.c
index e4c59eda..90fad42f 100644
--- a/src/gtk-ui/sync-ui.c
+++ b/src/gtk-ui/sync-ui.c
@@ -1858,12 +1858,14 @@ 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, "fingerPrint", &fp);
-
- if (fp) {
- fpv = g_strsplit_set (fp, ",;", 2);
- if (g_strv_length (fpv) > 0) {
- device_name = fpv[0];
+ syncevo_config_get_value (config, NULL, "templateName", &device_name);
+ if (!device_name) {
+ syncevo_config_get_value (config, NULL, "fingerPrint", &fp);
+ if (fp) {
+ fpv = g_strsplit_set (fp, ",;", 2);
+ if (g_strv_length (fpv) > 0) {
+ device_name = fpv[0];
+ }
}
}
if (!device_name) {