Merge lp://qastaging/~cszikszoy/docky/winewmfix into lp://qastaging/docky

Proposed by Chris S.
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~cszikszoy/docky/winewmfix
Merge into: lp://qastaging/docky
Diff against target: 36 lines (+7/-6)
1 file modified
Docky.Windowing/Windowing/WindowMatcher.cs (+7/-6)
To merge this branch: bzr merge lp://qastaging/~cszikszoy/docky/winewmfix
Reviewer Review Type Date Requested Status
Robert Dyer (community) Approve
Review via email: mp+16005@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert Dyer (psybers) wrote :

We talked on irc. Fix that stuff and then its set.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Docky.Windowing/Windowing/WindowMatcher.cs'
2--- Docky.Windowing/Windowing/WindowMatcher.cs 2009-12-06 04:31:24 +0000
3+++ Docky.Windowing/Windowing/WindowMatcher.cs 2009-12-11 10:02:10 +0000
4@@ -366,9 +366,7 @@
5
6 // otherwise do a match on the commandline
7 command_line.AddRange (CommandLineForPid (pids.ElementAt (currentPid++))
8- .Select (cmd => cmd.Replace (@"\", @"\\"))
9- .Where (cmd => !string.IsNullOrEmpty (cmd))
10- .Distinct ());
11+ .Select (cmd => cmd.Replace (@"\", @"\\")));
12 if (command_line.Count () == 0)
13 continue;
14 foreach (string cmd in command_line) {
15@@ -446,7 +444,10 @@
16 // these are sanitized results
17 foreach (string sanitizedCmd in result
18 .Select (s => s.Split (new []{'/', '\\'}).Last ())
19- .Where (s => !prefix_filters.Any (f => f.IsMatch (s)))) {
20+ .Where (s => !prefix_filters.Any (f => f.IsMatch (s)))
21+ .Distinct ()
22+ .Where (cmd => !string.IsNullOrEmpty (cmd))) {
23+
24 yield return sanitizedCmd;
25
26 // some wine apps are launched via a shell script that sets the proc name to "app.exe"
27@@ -541,8 +542,8 @@
28 int startIndex = exec.IndexOf ("wine ") + 5; // length of 'wine '
29 // CommandLineForPid already splits based on \\ and takes the last entry, so do the same here
30 vexec = exec.Substring (startIndex).Split (new [] {@"\\"}, StringSplitOptions.RemoveEmptyEntries).Last ().ToLower ();
31- if (vexec.EndsWith ("\""))
32- vexec = vexec.Substring (0, vexec.Length - 1);
33+ // remove the trailing " and anything after it
34+ vexec = vexec.Substring (0, vexec.IndexOf ("\""));
35 } else {
36 string [] parts = exec.Split (' ');
37

Subscribers

People subscribed via source and target branches

to status/vote changes: