gnome panel launchers patch

14 views
Skip to first unread message

mitch_feaster

unread,
Mar 28, 2011, 1:28:21 AM3/28/11
to GNOME Do
I know this is ghetto, but I'm pasting a patch below that may or may
not add support for including user-created launchers (from the gnome
panel) in the universe. The main use case for this feature (for me, at
least) is that I have a few shortcuts set up to launch the chromium
web browser with different user data profiles (one for me, one for my
wife, one for random testing, etc).

I'm definitely no C# hacker, I've done a few projects in VS, nothing
in MonoDevelop, so I was never able to get my project to build
(something about a missing reference to pango), and ./autogen.sh; ./
configure; make; didn't succeed either.

Anyways, if this is something that might be useful I'll spend some
time to get a proper environment set up and push my branch to
launchpad. If this is something that would be a better fit as a
plugin, I can look into that as well...

Any thoughts/comments are greatly appreciated!
-Mitch

<pre>
=== modified file 'Do.Platform.Linux/src/Do.Universe/
ApplicationItemSource.cs'
--- Do.Platform.Linux/src/Do.Universe/ApplicationItemSource.cs
2010-12-04 09:56:11 +0000
+++ Do.Platform.Linux/src/Do.Universe/ApplicationItemSource.cs
2011-03-28 05:15:27 +0000
@@ -165,11 +165,17 @@
/// </returns>
static IEnumerable<string> GetDesktopFileDirectories
()
{
- return new [] {
+ // Some handy places to look for user-
created .desktop files:
+ List<string> dirs = new List<string>(new
string[] {
+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal),
".gnome2/panel2.d/default/launchers")
+ });
+ List<string> xdgDirs = new List<string>(new
string [] {
// These are XDG variables...
"XDG_DATA_HOME",
"XDG_DATA_DIRS"
- }.SelectMany (v => GetXdgEnvironmentPaths
(v));
+ }.SelectMany (v => GetXdgEnvironmentPaths
(v)) );
+ dirs.AddRange( xdgDirs );
+ return dirs;
}

static IEnumerable<string> GetXdgEnvironmentPaths
(string xdgVar)
</pre>
Reply all
Reply to author
Forward
0 new messages