[gnac/devel] Fixed bugs
- From: BenoÃt Dupasquier <bdupasqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac/devel] Fixed bugs
- Date: Wed, 7 Mar 2012 23:02:11 +0000 (UTC)
commit 4cff59caf721867383202475d4b0477700b9e475
Author: BenoÃt Dupasquier <bdupasqu src gnome org>
Date: Wed Mar 7 22:59:33 2012 +0000
Fixed bugs
src/profiles/gnac-profiles-manager.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/profiles/gnac-profiles-manager.c b/src/profiles/gnac-profiles-manager.c
index 4dcc3cf..ba00b29 100644
--- a/src/profiles/gnac-profiles-manager.c
+++ b/src/profiles/gnac-profiles-manager.c
@@ -491,10 +491,10 @@ gnac_profiles_mgr_import_default_profiles(void)
gnac_profiles_properties_free_audio_profile(profile);
}
- g_free(profile_file_path);
g_object_unref(file_info);
}
+ g_free(profile_file_path);
g_file_enumerator_close(files, NULL, NULL);
g_object_unref(files);
}
@@ -561,11 +561,18 @@ gnac_profiles_mgr_show(void)
static void
gnac_profiles_mgr_clear(void)
{
- GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(
gnac_profiles_mgr_get_object("liststore"));
+ GtkTreeView *view = GTK_TREE_VIEW(
+ gnac_profiles_mgr_get_widget("profile_treeview"));
+ GtkTreeSelection *selection = gtk_tree_view_get_selection(view);
+
+ GtkTreeIter iter;
gboolean has_next = gtk_tree_model_get_iter_first(model, &iter);
+ g_signal_handlers_block_by_func(selection,
+ gnac_profiles_mgr_on_treeselection_changed, NULL);
+
while (has_next) {
AudioProfileGeneric *profile;
gtk_tree_model_get(model, &iter, COL_PROFILE, &profile, -1);
@@ -574,6 +581,9 @@ gnac_profiles_mgr_clear(void)
}
gtk_list_store_clear(GTK_LIST_STORE(model));
+
+ g_signal_handlers_unblock_by_func(selection,
+ gnac_profiles_mgr_on_treeselection_changed, NULL);
}
@@ -655,7 +665,7 @@ gnac_profiles_mgr_set(GtkTreeRowReference *ref, ...)
if (!path) return;
GtkTreeIter iter;
- va_list ap;
+ va_list ap;
if (gtk_tree_model_get_iter(GTK_TREE_MODEL(list_store), &iter, path)) {
va_start(ap, ref);
@@ -1241,7 +1251,8 @@ gnac_profiles_mgr_on_treeselection_changed(void)
GList *selected = gnac_profiles_mgr_get_selected_rows();
if (!selected) return;
- GtkTreeRowReference *reference = (GtkTreeRowReference *) selected->data;
+ GtkTreeRowReference *reference = (GtkTreeRowReference *)
+ g_list_nth_data(selected, 0);
gnac_profiles_mgr_activate_buttons(TRUE);
gnac_profiles_mgr_display_status_message(NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]