summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Kukkonen <jku@linux.intel.com>2010-03-31 17:23:07 +0300
committerJussi Kukkonen <jku@linux.intel.com>2010-03-31 17:23:07 +0300
commit975d0eb6773da8ff12e3b3fec11295336a3c3ee7 (patch)
tree888e4b676773ad71f5636d8ccf731aad5748530e
parent9319a1f3ebba3abe25dedd9d997fd118a5baa732 (diff)
gtk-ui: fix source order in emergency view (MB #9714)
-rw-r--r--src/gtk-ui/sync-ui.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gtk-ui/sync-ui.c b/src/gtk-ui/sync-ui.c
index 90fad42f..6a750c5c 100644
--- a/src/gtk-ui/sync-ui.c
+++ b/src/gtk-ui/sync-ui.c
@@ -1328,8 +1328,9 @@ update_emergency_expander (app_data *data)
}
static void
-add_emergency_source (const char *name, source_config *conf, app_data *data)
+add_emergency_source (const char *name, GHashTable *source, app_data *data)
{
+ source_config *conf;
GtkWidget *toggle;
guint rows, cols;
guint row;
@@ -1337,6 +1338,8 @@ add_emergency_source (const char *name, source_config *conf, app_data *data)
gboolean active = TRUE;
char *pretty_name;
+ conf = g_hash_table_lookup (data->current_service->source_configs,
+ name);
g_object_get (data->emergency_source_table,
"n-rows", &rows,
"n-columns", &cols,
@@ -1609,9 +1612,12 @@ update_emergency_view (app_data *data)
(GtkCallback)remove_child,
data->emergency_source_table);
gtk_table_resize (GTK_TABLE (data->emergency_source_table), 1, 1);
- g_hash_table_foreach (data->current_service->source_configs,
- (GHFunc)add_emergency_source,
- data);
+
+ /* using this instead of current_service->source_configs
+ * to get the same order as the configuration has... */
+ syncevo_config_foreach_source (data->current_service->config,
+ (ConfigFunc)add_emergency_source,
+ data);
update_emergency_expander (data);
data->backup_count = 0;