From ff7c07a4e6be5ba560219c01ebfe13c81833bb4c Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Sun, 28 Jun 2009 01:55:26 +0200 Subject: [PATCH] Correctly reselect 'All branches' --- gitg/gitg-repository.c | 2 +- gitg/gitg-window.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gitg/gitg-repository.c b/gitg/gitg-repository.c index b19ced87..68d1eb1b 100644 --- a/gitg/gitg-repository.c +++ b/gitg/gitg-repository.c @@ -942,7 +942,7 @@ load_current_ref(GitgRepository *self) return NULL; } - if (*out) + if (*out && !*(out + 1)) { ret = g_strdup(*out); } diff --git a/gitg/gitg-window.c b/gitg/gitg-window.c index 77ac4927..217c366f 100644 --- a/gitg/gitg-window.c +++ b/gitg/gitg-window.c @@ -793,7 +793,11 @@ fill_branches_combo(GitgWindow *window) COLUMN_BRANCHES_REF, NULL, -1); - if (!refset) + if (current_ref == NULL) + { + gtk_combo_box_set_active_iter (window->priv->combo_branches, &iter); + } + else if (!refset) { gtk_combo_box_set_active(window->priv->combo_branches, 0); }