git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git gui: keep selected branch when remote is changed in push dialog

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Feb 6, 2011, 17:01 UTC
Message-ID
<20110206170055.GA47941@book.hvoigt.net>

The selection of the branch to be pushed would be cleared when the remote was changed. This seems to be dependent on the fact that the selected content in the combobox was exported to the clipboard. It was only apparent when using the new ttk widget.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
---
Note: This patch was created inside the official git repo but should
apply cleanly to git-gui's master using 'git am -p2'
 git-gui/lib/transport.tcl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl
index 49155c7..e4e1add 100644
--- a/git-gui/lib/transport.tcl
+++ b/git-gui/lib/transport.tcl
@@ -223,7 +223,9 @@ proc do_push_anywhere {} {
 			-value remote \
 			-variable push_urltype
 		if {$use_ttk} {
-			ttk::combobox $w.dest.remote_m -textvariable push_remote \
+			ttk::combobox $w.dest.remote_m -state readonly \
+				-exportselection false \
+				-textvariable push_remote \
 				-values $all_remotes
 		} else {
 			eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
-- 
1.7.4.34.gd2cb1
Message 1 of 1 in “git gui: keep selected branch when remote is changed in push dialog”
  1. git gui: keep selected branch when remote is changed in push dialogHeiko Voigt, Feb 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.