git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: git@vger.kernel.org
Cc: Anders Kaseorg <andersk@MIT.EDU>,
	Pat Thoyts <patthoyts@users.sourceforge.net>,
	Todd Zullinger <tmz@pobox.com>
Subject: [RFC/PATCH] git-gui: add a .desktop file
Date: Thu, 12 May 2011 05:02:02 -0500	[thread overview]
Message-ID: <20110512100202.GF28872@elie> (raw)
In-Reply-To: <alpine.DEB.2.02.1105112205450.14343@dr-wily.mit.edu>

From: Todd Zullinger <tmz@pobox.com>

Most X desktops use files following the Desktop Entry Specification
for menu entries.  Provide a .desktop file for users and distros to
install in the system menu to make git gui easier to find.

Caveats: this patch does not include Makefile rules to actually
install the .desktop file; they can come later.  Such Makefile rules
would need to change the Icon= line to avoid hardcoding a /usr
prefix.

[jn: removed GenericName and added RevisionControl category]

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Anders Kaseorg wrote[1]:

> From https://bugs.launchpad.net/ubuntu/+source/git/+bug/781454 (under, you 
> know, some interpretation):
>
> git-gui could install a /usr/share/applications/git-gui.desktop, like this 
> one: 
> http://pkgs.fedoraproject.org/gitweb/?p=git.git;a=blob;f=git-gui.desktop;hb=HEAD

That's a good idea.  How about something like this, to start?

Installing to /usr/local/share/applications or /usr/share/applications
is not right for a program that is being installed for an individual
user.  I suppose $HOME/.local/share is a good default in that case.
Is a makefile supposed to check ifeq ($(prefix), $(HOME)) to take care
of that?

xdg-utils includes an xdg-desktop-menu helper which supports a --user
/ --system option that will presumably install to the right place, and
it is even nice enough to run update-desktop-database when done.
Unfortunately, it lacks DESTDIR support, so I don't think we can use
it.

The xdg-desktop-menu documentation suggests installing icons in some
centralized place with xdg-icon-resource.  The supported icon formats
are xpm and png.

So this is rough, but I still think including it would be an
improvement in the current state.  Thoughts?  Bugs?  Improvements?

Thanks to Todd for writing the desktop file in the first place.  I
hope I haven't broken it too much.

[1] http://bugs.debian.org/626442

 git-gui.desktop |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
 create mode 100644 git-gui.desktop

diff --git a/git-gui.desktop b/git-gui.desktop
new file mode 100644
index 0000000..019ee8f
--- /dev/null
+++ b/git-gui.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Git GUI
+Comment=A graphical interface to Git
+Exec=git gui
+Icon=/usr/share/git-gui/lib/git-gui.ico
+Terminal=false
+Type=Application
+Categories=Development;RevisionControl;
-- 
1.7.5.1

           reply	other threads:[~2011-05-12 10:02 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <alpine.DEB.2.02.1105112205450.14343@dr-wily.mit.edu>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110512100202.GF28872@elie \
    --to=jrnieder@gmail.com \
    --cc=andersk@MIT.EDU \
    --cc=git@vger.kernel.org \
    --cc=patthoyts@users.sourceforge.net \
    --cc=tmz@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).