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

Re: [PATCH v2 resend] gitk: Use an external icon file on Windows

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 8, 2012, 21:13 UTC
Message-ID
<7v628trsry.fsf@alter.siamese.dyndns.org>
In-Reply-To
<5022CDFC.4090900@gmail.com>
Sebastian Schuberth <sschuberth@gmail.com> writes:
Show 5 quoted lines
> Git for Windows now ships with the new Git icon from git-scm.com. Use that
> icon file instead of the old procedurally drawn one if it exists.
>
> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
> ---

Forwarding a misdirected patch to the maintainer who is free to pick or ignore.

Personally I am negative on it (nobody on the list asked for the "new" Git icon as far as I recall), but my voice on this counts just as little as others.

Thanks.
Show 70 quoted lines
>  gitk-git/gitk | 49 ++++++++++++++++++++++++++-----------------------
>  1 file changed, 26 insertions(+), 23 deletions(-)
>
> diff --git a/gitk-git/gitk b/gitk-git/gitk
> index 59693c0..5127e55 100755
> --- a/gitk-git/gitk
> +++ b/gitk-git/gitk
> @@ -11664,7 +11664,6 @@ if { [info exists ::env(GITK_MSGSDIR)] } {
>      set gitk_prefix [file dirname [file dirname [file normalize $argv0]]]
>      set gitk_libdir [file join $gitk_prefix share gitk lib]
>      set gitk_msgsdir [file join $gitk_libdir msgs]
> -    unset gitk_prefix
>  }
>  
>  ## Internationalization (i18n) through msgcat and gettext. See
> @@ -11821,28 +11820,32 @@ if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
>  set worktree [exec git rev-parse --show-toplevel]
>  setcoords
>  makewindow
> -catch {
> -    image create photo gitlogo      -width 16 -height 16
> -
> -    image create photo gitlogominus -width  4 -height  2
> -    gitlogominus put #C00000 -to 0 0 4 2
> -    gitlogo copy gitlogominus -to  1 5
> -    gitlogo copy gitlogominus -to  6 5
> -    gitlogo copy gitlogominus -to 11 5
> -    image delete gitlogominus
> -
> -    image create photo gitlogoplus  -width  4 -height  4
> -    gitlogoplus  put #008000 -to 1 0 3 4
> -    gitlogoplus  put #008000 -to 0 1 4 3
> -    gitlogo copy gitlogoplus  -to  1 9
> -    gitlogo copy gitlogoplus  -to  6 9
> -    gitlogo copy gitlogoplus  -to 11 9
> -    image delete gitlogoplus
> -
> -    image create photo gitlogo32    -width 32 -height 32
> -    gitlogo32 copy gitlogo -zoom 2 2
> -
> -    wm iconphoto . -default gitlogo gitlogo32
> +if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix/etc/git.ico]} {
> +    wm iconbitmap . -default $gitk_prefix/etc/git.ico
> +} else {
> +    catch {
> +        image create photo gitlogo      -width 16 -height 16
> +
> +        image create photo gitlogominus -width  4 -height  2
> +        gitlogominus put #C00000 -to 0 0 4 2
> +        gitlogo copy gitlogominus -to  1 5
> +        gitlogo copy gitlogominus -to  6 5
> +        gitlogo copy gitlogominus -to 11 5
> +        image delete gitlogominus
> +
> +        image create photo gitlogoplus  -width  4 -height  4
> +        gitlogoplus  put #008000 -to 1 0 3 4
> +        gitlogoplus  put #008000 -to 0 1 4 3
> +        gitlogo copy gitlogoplus  -to  1 9
> +        gitlogo copy gitlogoplus  -to  6 9
> +        gitlogo copy gitlogoplus  -to 11 9
> +        image delete gitlogoplus
> +
> +        image create photo gitlogo32    -width 32 -height 32
> +        gitlogo32 copy gitlogo -zoom 2 2
> +
> +        wm iconphoto . -default gitlogo gitlogo32
> +    }
>  }
>  # wait for the window to become visible
>  tkwait visibility .
Previous: Sebastian SchuberthNext: Sebastian Schuberth
Message 4 of 7 in “gitk: Use an external icon file on Windows”
  1. gitk: Use an external icon file on WindowsSebastian Schuberth, Jul 22, 2012
  2. gitk: Use an external icon file on WindowsSebastian Schuberth, Jul 23, 2012
  3. gitk: Use an external icon file on WindowsSebastian Schuberth, Aug 8, 2012
  4. Junio C HamanoAug 8, 2012
  5. Sebastian SchuberthAug 9, 2012
  6. Junio C HamanoAug 9, 2012
  7. Sebastian SchuberthAug 9, 2012

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.