~tualatrix/ibentu/gnome-do

« back to all changes in this revision

Viewing changes to debian/patches/06_expand_homedir_in_open.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2008-10-10 12:51:54 UTC
  • Revision ID: james.westby@ubuntu.com-20081010125154-pm94liugpf0fcovy
Tags: 0.6.1.0-0ubuntu2
* debian/patches/05_fix_localised_theme_setting:
  + Use the index of the selected theme rather than text of the theme
    when setting the UI preference.  The text is now correctly translated,
    so using the text no longer works (LP: #280719).
* debian/patches/06_expand_homedir_in_open:
  + Expand '~' in strings for the Open action (LP: #280540).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 06_expand_homedir_in_open.dpatch by Christopher James Halse Rogers <raof@ubuntu.com>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Expand ~ when opening a TextItem as a file or folder.
 
6
## DP: xdg-open obviously doesn't expand ~ itself.
 
7
 
 
8
@DPATCH@
 
9
diff -urNad gnome-do-0.6.1.0~/Do.Addins/src/Do.Universe/OpenAction.cs gnome-do-0.6.1.0/Do.Addins/src/Do.Universe/OpenAction.cs
 
10
--- gnome-do-0.6.1.0~/Do.Addins/src/Do.Universe/OpenAction.cs   2008-10-07 08:03:00.000000000 +1100
 
11
+++ gnome-do-0.6.1.0/Do.Addins/src/Do.Universe/OpenAction.cs    2008-10-10 12:47:40.000000000 +1100
 
12
@@ -92,6 +92,10 @@
 
13
                                } else if (item is ITextItem) {
 
14
                                        // item is a valid file or folder path.
 
15
                                        toOpen = (item as ITextItem).Text
 
16
+                                               .Replace ("~", Paths.UserHome)
 
17
+                                               .Replace ("\\", "\\\\")
 
18
+                                               .Replace ("'", "\\'")
 
19
+                                               .Replace ("\"", "\\\"")
 
20
                                                .Replace (" ", "\\ ");
 
21
                                }
 
22
                                Util.Environment.Open (toOpen);