~jbicha/ubuntu/oneiric/gnome-shell/oneiric-3.2.2.1

« back to all changes in this revision

Viewing changes to js/misc/util.js

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-07-20 14:46:28 UTC
  • mfrom: (1.1.25 upstream)
  • Revision ID: james.westby@ubuntu.com-20110720144628-ipirjtz8od4uktpg
Tags: 3.1.3-0ubuntu1
* New upstream release
* debian/control.in:
  - Update dependency versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
const Main = imports.ui.main;
9
9
 
10
 
const Gettext = imports.gettext.domain('gnome-shell');
11
 
const _ = Gettext.gettext;
12
 
 
13
10
/* http://daringfireball.net/2010/07/improved_regex_for_matching_urls */
14
11
const _urlRegexp = new RegExp('\\b(([a-z][\\w-]+:(/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)([^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'\\".,<>?«»“”‘’]))', 'gi');
15
12
 
48
45
// occur when trying to parse or start the program.
49
46
function spawnCommandLine(command_line) {
50
47
    try {
51
 
        let [success, argc, argv] = GLib.shell_parse_argv(command_line);
 
48
        let [success, argv] = GLib.shell_parse_argv(command_line);
52
49
        trySpawn(argv);
53
50
    } catch (err) {
54
51
        _handleSpawnError(command_line, err);
88
85
// Runs @command_line in the background. If launching @command_line
89
86
// fails, this will throw an error.
90
87
function trySpawnCommandLine(command_line) {
91
 
    let success, argc, argv;
 
88
    let success, argv;
92
89
 
93
90
    try {
94
 
        [success, argc, argv] = GLib.shell_parse_argv(command_line);
 
91
        [success, argv] = GLib.shell_parse_argv(command_line);
95
92
    } catch (err) {
96
93
        // Replace "Error invoking GLib.shell_parse_argv: " with
97
94
        // something nicer