[anjuta] Revert "git: fix active_branch_iter not behing null though filled with null values."
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] Revert "git: fix active_branch_iter not behing null though filled with null values."
- Date: Tue, 20 Dec 2011 20:45:36 +0000 (UTC)
commit 5be6653edbf78bb1a7445161657608456afd9af8
Author: Johannes Schmid <jhs gnome org>
Date: Tue Dec 20 21:45:24 2011 +0100
Revert "git: fix active_branch_iter not behing null though filled with null values."
This reverts commit 6a7b348dab8d07d5620d3b3ff09881295970aca5.
plugins/git/git-log-pane.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/plugins/git/git-log-pane.c b/plugins/git/git-log-pane.c
index 3ff4336..f989704 100644
--- a/plugins/git/git-log-pane.c
+++ b/plugins/git/git-log-pane.c
@@ -82,7 +82,7 @@ struct _GitLogPanePriv
GHashTable *branches_table;
gchar *selected_branch;
gboolean viewing_active_branch;
- GtkTreeRowReference *active_branch_ref;
+ GtkTreeIter active_branch_iter;
/* Loading spinner data */
guint current_spin_count;
@@ -142,13 +142,8 @@ on_branch_list_command_finished (AnjutaCommand *command,
}
else
{
- if (gtk_tree_row_reference_valid (self->priv->active_branch_ref))
- {
- GtkTreePath *path = gtk_tree_row_reference_get_path (self->priv->active_branch_ref);
- gtk_tree_model_get_iter (log_branch_combo_model, iter, path);
- gtk_combo_box_set_active_iter (branch_combo, iter);
- gtk_tree_path_free (path);
- }
+ gtk_combo_box_set_active_iter (branch_combo,
+ &(self->priv->active_branch_iter));
}
}
@@ -178,16 +173,12 @@ on_branch_list_command_data_arrived (AnjutaCommand *command,
if (git_branch_is_active (branch))
{
- GtkTreePath *path;
gtk_list_store_set (log_branch_combo_model, &iter,
BRANCH_COL_ACTIVE, TRUE,
BRANCH_COL_ACTIVE_ICON, GTK_STOCK_APPLY,
-1);
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (log_branch_combo_model), &iter);
- gtk_tree_row_reference_free (self->priv->active_branch_ref);
- self->priv->active_branch_ref = gtk_tree_row_reference_new (GTK_TREE_MODEL (log_branch_combo_model), path);
- gtk_tree_path_free (path);
+ self->priv->active_branch_iter = iter;
}
else
{
@@ -992,7 +983,6 @@ git_log_pane_finalize (GObject *object)
self = GIT_LOG_PANE (object);
- gtk_tree_row_reference_free (self->priv->active_branch_ref);
g_object_unref (self->priv->builder);
g_free (self->priv->path);
g_hash_table_destroy (self->priv->branches_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]