Commit 3b679fbf authored by Guillaume Carmel-Archambault's avatar Guillaume Carmel-Archambault
Browse files

GTK Bug fix gpointer conversion

parent 807f103e
...@@ -261,7 +261,7 @@ select_codec(GtkTreeSelection *selection, GtkTreeModel *model) ...@@ -261,7 +261,7 @@ select_codec(GtkTreeSelection *selection, GtkTreeModel *model)
* and in configuration files * and in configuration files
*/ */
static void static void
codec_active_toggled(GtkCellRendererToggle *renderer, gchar *path, gpointer *data) codec_active_toggled(GtkCellRendererToggle *renderer, gchar *path, gpointer data)
{ {
GtkTreeIter iter; GtkTreeIter iter;
GtkTreePath *treePath; GtkTreePath *treePath;
...@@ -270,7 +270,6 @@ codec_active_toggled(GtkCellRendererToggle *renderer, gchar *path, gpointer *dat ...@@ -270,7 +270,6 @@ codec_active_toggled(GtkCellRendererToggle *renderer, gchar *path, gpointer *dat
// Get path of clicked codec active toggle box // Get path of clicked codec active toggle box
treePath = gtk_tree_path_new_from_string(path); treePath = gtk_tree_path_new_from_string(path);
printf(path);
model = gtk_tree_view_get_model(GTK_TREE_VIEW(data)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(data));
gtk_tree_model_get_iter(model, &iter, treePath); gtk_tree_model_get_iter(model, &iter, treePath);
...@@ -375,10 +374,9 @@ bold_if_default_account(GtkTreeViewColumn *col, ...@@ -375,10 +374,9 @@ bold_if_default_account(GtkTreeViewColumn *col,
GtkTreeIter *iter, GtkTreeIter *iter,
gpointer data) gpointer data)
{ {
GValue val; GValue val = { 0, };
val.g_type = G_TYPE_POINTER;
gtk_tree_model_get_value(tree_model, iter, 3, &val); gtk_tree_model_get_value(tree_model, iter, 3, &val);
account_t *current = (account_t*) g_value_get_pointer(&val); account_t *current = (account_t*)g_value_get_pointer(&val);
g_value_unset(&val); g_value_unset(&val);
if(g_strcasecmp(current->accountID, account_list_get_default()) == 0) if(g_strcasecmp(current->accountID, account_list_get_default()) == 0)
g_object_set(G_OBJECT(rend), "weight", 800, NULL); g_object_set(G_OBJECT(rend), "weight", 800, NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment