~unity-team/unity-lens-applications/trunk

« back to all changes in this revision

Viewing changes to src/daemon.vala

  • Committer: Mikkel Kamstrup Erlandsen
  • Date: 2011-04-07 09:23:15 UTC
  • mfrom: (200.1.2 unity-place-applications)
  • Revision ID: mikkel.kamstrup@gmail.com-20110407092315-y0t14pt19jdqioc1
Merge Bilal Akhtar's branch lp:~bilalakhtar/unity-place-applications/fix-750262:

 * Allow the alt-f2 dialog launch apt: URLs

Show diffs side-by-side

added added

removed removed

Lines of Context:
763
763
        {
764
764
          string orig;
765
765
          orig = uri.offset (15);
766
 
          exec_or_dir = Utils.subst_tilde (orig);
767
 
          args = exec_or_dir.split (" ", 0);
768
 
          for (int i = 0; i < args.length; i++)
769
 
            args[i] = Utils.subst_tilde (args[i]);
770
 
 
 
766
          if (orig.has_prefix ("apt:")) {
 
767
            try {
 
768
              AppInfo.launch_default_for_uri (orig, null);
 
769
            } catch (GLib.Error error) {
 
770
              warning ("failed to install package %s", orig.offset(4));
 
771
              return ActivationStatus.NOT_ACTIVATED;
 
772
            }
 
773
            return ActivationStatus.ACTIVATED_HIDE_DASH;
 
774
          } else {
 
775
            exec_or_dir = Utils.subst_tilde (orig);
 
776
            args = exec_or_dir.split (" ", 0);
 
777
            for (int i = 0; i < args.length; i++)
 
778
              args[i] = Utils.subst_tilde (args[i]);
 
779
          }
771
780
          this.runner.add_history (orig);
772
781
        }
773
782
      else