~cszikszoy/do-plugins/pastebin

« back to all changes in this revision

Viewing changes to Launchpad/src/LaunchpadBugsItem.cs

  • Committer: Ken Simon
  • Date: 2008-05-30 14:47:16 UTC
  • mfrom: (39.9.1 do-plugins)
  • mto: This revision was merged to the branch mainline in revision 113.
  • Revision ID: ken@ninkendo.org-20080530144716-u4g92ign9i7sp80c
Remove ubuntu-specific assumptions from launchpad plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
                public void Perform (IItem item)
46
46
                {
47
 
                        Util.Environment.Open(string.Format("https://bugs.launchpad.net/ubuntu/+bug/{0}", (item as ITextItem).Text));
 
47
                        Util.Environment.Open(string.Format("https://bugs.launchpad.net/bugs/{0}", (item as ITextItem).Text));
48
48
                }
49
49
        }
50
50
 
52
52
        {
53
53
                public LaunchpadBugReportItem() { }
54
54
                public string Name { get { return "Bug Report"; } }
55
 
                public string Description { get { return "Report an Ubuntu bug at Launchpad"; } }
 
55
                public string Description { get { return "Report a bug at Launchpad"; } }
56
56
                
57
57
                public string Icon
58
58
                { 
66
66
 
67
67
                public void Perform (IItem item)
68
68
                {
69
 
                        Util.Environment.Open("https://launchpad.net/ubuntu/+filebug");
 
69
                        Util.Environment.Open(string.Format("https://launchpad.net/{0}/+filebug", (item as ITextItem).Text));
70
70
                }
71
71
        }
72
72
 
97
97
        public class LaunchpadBugSearchItem : LaunchpadItem
98
98
        {
99
99
                public LaunchpadBugSearchItem() { }
100
 
                public string Name { get { return "Ubuntu Bug Search"; } }
101
 
                public string Description { get { return "Search for Ubuntu bugs at Launchpad"; } }
 
100
                public string Name { get { return "Bug Search"; } }
 
101
                public string Description { get { return "Search for bugs at Launchpad"; } }
102
102
                public string Icon
103
103
                { 
104
104
                        get { return "LaunchpadBugs.png@" + GetType ().Assembly.FullName; }
114
114
                        Regex spaces = new Regex(@"\s+");
115
115
                        string query = (item as ITextItem).Text;
116
116
                        string[] qwords = spaces.Split(query);
117
 
                        Util.Environment.Open("https://bugs.launchpad.net/ubuntu/+bugs?field.searchtext=" + string.Join("+", qwords));
 
117
                        Util.Environment.Open("https://bugs.launchpad.net/+bugs?field.searchtext=" + string.Join("+", qwords));
118
118
                }
119
119
        }
120
120
}