{"thread":{"id":"27334","subject":"[RFC/PATCH] git-gui: add a .desktop file","startedAt":"2011-05-12T10:02:02Z","lastAt":"2011-05-12T10:02:02Z","messageCount":1,"participants":["Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"167716","messageId":"20110512100202.GF28872@elie","threadId":"27334","inReplyTo":"alpine.DEB.2.02.1105112205450.14343@dr-wily.mit.edu","subject":"[RFC/PATCH] git-gui: add a .desktop file","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-05-12T10:02:02Z","receivedAt":"2011-05-12T10:02:02Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"From: Todd Zullinger <tmz@pobox.com>\n\nMost X desktops use files following the Desktop Entry Specification\nfor menu entries.  Provide a .desktop file for users and distros to\ninstall in the system menu to make git gui easier to find.\n\nCaveats: this patch does not include Makefile rules to actually\ninstall the .desktop file; they can come later.  Such Makefile rules\nwould need to change the Icon= line to avoid hardcoding a /usr\nprefix.\n\n[jn: removed GenericName and added RevisionControl category]\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nAnders Kaseorg wrote[1]:\n\n> From https://bugs.launchpad.net/ubuntu/+source/git/+bug/781454 (under, you \n> know, some interpretation):\n>\n> git-gui could install a /usr/share/applications/git-gui.desktop, like this \n> one: \n> http://pkgs.fedoraproject.org/gitweb/?p=git.git;a=blob;f=git-gui.desktop;hb=HEAD\n\nThat's a good idea.  How about something like this, to start?\n\nInstalling to /usr/local/share/applications or /usr/share/applications\nis not right for a program that is being installed for an individual\nuser.  I suppose $HOME/.local/share is a good default in that case.\nIs a makefile supposed to check ifeq ($(prefix), $(HOME)) to take care\nof that?\n\nxdg-utils includes an xdg-desktop-menu helper which supports a --user\n/ --system option that will presumably install to the right place, and\nit is even nice enough to run update-desktop-database when done.\nUnfortunately, it lacks DESTDIR support, so I don't think we can use\nit.\n\nThe xdg-desktop-menu documentation suggests installing icons in some\ncentralized place with xdg-icon-resource.  The supported icon formats\nare xpm and png.\n\nSo this is rough, but I still think including it would be an\nimprovement in the current state.  Thoughts?  Bugs?  Improvements?\n\nThanks to Todd for writing the desktop file in the first place.  I\nhope I haven't broken it too much.\n\n[1] http://bugs.debian.org/626442\n\n git-gui.desktop |    8 ++++++++\n 1 files changed, 8 insertions(+), 0 deletions(-)\n create mode 100644 git-gui.desktop\n\ndiff --git a/git-gui.desktop b/git-gui.desktop\nnew file mode 100644\nindex 0000000..019ee8f\n--- /dev/null\n+++ b/git-gui.desktop\n@@ -0,0 +1,8 @@\n+[Desktop Entry]\n+Name=Git GUI\n+Comment=A graphical interface to Git\n+Exec=git gui\n+Icon=/usr/share/git-gui/lib/git-gui.ico\n+Terminal=false\n+Type=Application\n+Categories=Development;RevisionControl;\n-- \n1.7.5.1\n"}]}