~ubuntu-branches/ubuntu/jaunty/gnome-do-plugins/jaunty-proposed

« back to all changes in this revision

Viewing changes to RequestTracker/src/Configuration.cs

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane, Daniel T Chen, Iain Lane
  • Date: 2009-03-18 00:40:51 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090318004051-ujn1ja3kiu3ky7ru
Tags: 0.8.1.3+dfsg-0ubuntu1
[ Daniel T Chen ]
* New upstream release (LP: #344578)
  + Banshee plugin goes crazy if banshee isn't loaded first
    (LP: #289802)
  + gnome-do gCalculate plugin fails to display "times" symbol
    (LP: #274252)
  + Banshee-1 fails to build in Mono 2.0 (LP: #309188)
  + Pidgin 2.5.4 has incompatible dbus interface. s/uint/int/
    (LP: #314927)
  + Pidgin plugin hangs opening a chat if pidgin is unresponsive
    (LP: #315565)
  + twitter plugin still reports friend updates even when
    deactivated (LP: #317674)
  + Misspelling in microblogging plugin confirmation message
    (LP: #319433)
  + make install uses mdtool, but configure doesn't check for it
    (LP: #322951)
  + Virtualbox Icon in 2.10 are broken because of a new
    specification (LP: #323902)
  + Google Maps Plugin shouldn't always use route (LP: #324271)
  + Fix for Google Maps when using newlines and other special
    characters (LP: #324667)
  + VirtualBox failed to load icon (LP: #325712)
  + 'Read Man Pages' plugin makes Gnome-Do unresponsive
    (LP: #325935)
  + Search returns broken URLs (LP: #327855)
  + Default action for SSH hosts is "open" (LP: #328236)
  + Files and Folders Configuration doesn't use standard buttons
    (LP: #328236)
  + Window manager maximize action should focus if window is not
    currently focused (LP: #258893)
  + Locate plugin has no error message (LP: #262360)
  + Wishlist: Let user specify files and folders to ignore
    (LP: #263177)
  + ts-client plugin doesn't index subdirectories (LP: #322352)
  + Max 3000 items in Files and Folders plugin (LP: #324105)
  + putty cannot find host when running from gnome do
    (LP: #324282)
  + locate plugin with globbing (LP: #334798)
  + Twitter plugin encountered an error in UpdateFriends
    (LP: #317575)
  + gnome-terminal profiles no longer work (LP: #321977)
  + Creating a task using Remember the Milk plugin can fail if
    no task list is specified (LP: #324066)
  + bundled libraries makefile needs destdir (LP: #324704)
  + Typographical error in del.icio.us plugin (LP: #330525)
  + ImageShack fails to upload (LP: #337324)
* debian/copyright
  + Refresh for new upstream version; new plugins added.
* debian/patches/00_dfsg_autofoo.dpatch
  + Update for new upstream version
  + Don't build the YouTube plugin due to removal of shipped
    exes and dlls causing FTBFS
* debian/patches/02_ssh_respect_exec_arg.dpatch
  debian/patches/03_buildsystem_respect_mcs.dpatch
  debian/patches/04_fix_pidgin_dbus_ints.dpatch
  + Drop; fixed upstream

[ Iain Lane ]
* debian/rules: Update repackaging to not delete *.dll; upstream now ships
  source copies of google-gdata meaning we can now enable the Google and
  Youtube plugins.
* debian/patches/00_dfsg_autofoo: Drop, fixed by including and building
  these libs now. 
* debian/copyright: Update with information for google-gdata. 
* debian/patches/04_fix_pidgin_dbus_ints.dpatch: Add left out piece of patch
* debian/control: Bump gnome-do build-dep to require current version. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
using System;
 
3
using System.Web;
 
4
using Do.Platform;
 
5
using Do.Platform.Linux;
 
6
using Do.Universe;
 
7
using Do.Universe.Common;
 
8
using Mono.Unix;
 
9
 
 
10
namespace RequestTracker
 
11
{
 
12
        
 
13
        [System.ComponentModel.ToolboxItem(true)]
 
14
        public partial class RTPrefs : Gtk.Bin
 
15
        {
 
16
                Gtk.ListStore rtListStore;
 
17
                Gtk.TreeViewColumn nameColumn;
 
18
                Gtk.TreeViewColumn urlColumn;
 
19
                
 
20
                protected virtual void OnRemoveBtnClicked (object sender, System.EventArgs e)
 
21
                {
 
22
                        Gtk.TreeModel model;
 
23
                        Gtk.TreeIter iter;
 
24
                        RTTree.Selection.GetSelected (out model, out iter);
 
25
                        rtListStore.Remove (ref iter);
 
26
                        
 
27
                        UpdatePrefs ();
 
28
                }
 
29
                
 
30
                protected virtual void OnAddBtnClicked (object sender, System.EventArgs e)
 
31
                {
 
32
                        Gtk.TreeIter iter = rtListStore.AppendValues ("", "");
 
33
                        Gtk.TreePath path = rtListStore.GetPath (iter);
 
34
                        RTTree.SetCursor (path, nameColumn, true);
 
35
                }
 
36
                
 
37
                protected virtual void OnNameCellEdited (object sender, Gtk.EditedArgs args)
 
38
                {
 
39
                        OnCellEdited (sender, args, 0);
 
40
                }
 
41
                
 
42
                protected virtual void OnURLCellEdited (object sender, Gtk.EditedArgs args)
 
43
                {
 
44
                        // Test the URL is valid
 
45
                        try {
 
46
                                new System.Uri (args.NewText);
 
47
                        } catch (System.UriFormatException) {
 
48
                                return;
 
49
                        }
 
50
                        
 
51
                        OnCellEdited (sender, args, 1);
 
52
                }
 
53
                
 
54
                protected virtual void OnCellEdited (object sender, Gtk.EditedArgs args, int column)
 
55
                {
 
56
                        Gtk.TreeIter iter;
 
57
                        rtListStore.GetIter (out iter, new Gtk.TreePath (args.Path));
 
58
 
 
59
                        rtListStore.SetValue (iter, column, args.NewText);
 
60
 
 
61
                        UpdatePrefs ();
 
62
                }
 
63
                
 
64
                public void UpdatePrefs ()
 
65
                {
 
66
                        Gtk.TreeIter iter;
 
67
                        string URLs = "";
 
68
                        string name;
 
69
                        string url;
 
70
                        int num_children = rtListStore.IterNChildren ();
 
71
                        
 
72
                        for (int i = 0; i < num_children; i++) {
 
73
                                rtListStore.IterNthChild (out iter, i);
 
74
                                
 
75
                                name = rtListStore.GetValue (iter, 0).ToString ();
 
76
                                url = rtListStore.GetValue (iter, 1).ToString ();
 
77
                                
 
78
                                if (!string.IsNullOrEmpty (name) && !string.IsNullOrEmpty (url)) {
 
79
                                        if (i > 0) {
 
80
                                                URLs += "|";
 
81
                                        }
 
82
                                        URLs += name.Replace ("|", "");
 
83
                                        URLs += "|";
 
84
                                        URLs += url.Replace ("|", "");
 
85
                                }
 
86
                        }
 
87
                        
 
88
                        RTPreferences prefs = new RTPreferences ();
 
89
                        prefs.URLs = URLs;
 
90
                }
 
91
                
 
92
                public RTPrefs()
 
93
                {
 
94
                        RTPreferences prefs = new RTPreferences();
 
95
                        
 
96
                        this.Build();
 
97
                        
 
98
                        nameColumn = new Gtk.TreeViewColumn ();
 
99
                        nameColumn.Title = "Name";
 
100
                        urlColumn = new Gtk.TreeViewColumn ();
 
101
                        urlColumn.Title = "URL";
 
102
                        
 
103
                        RTTree.AppendColumn (nameColumn);
 
104
                        RTTree.AppendColumn (urlColumn);
 
105
                        
 
106
                        rtListStore = new Gtk.ListStore (typeof (string), typeof (string));
 
107
                        RTTree.Model = rtListStore;
 
108
 
 
109
                        Gtk.CellRendererText nameNameCell = new Gtk.CellRendererText ();
 
110
                        nameNameCell.Editable = true;
 
111
                        nameNameCell.Edited += OnNameCellEdited;
 
112
                        nameColumn.PackStart (nameNameCell, true);
 
113
                        
 
114
                        Gtk.CellRendererText urlTitleCell = new Gtk.CellRendererText ();
 
115
                        urlTitleCell.Editable = true;
 
116
                        urlTitleCell.Edited += OnURLCellEdited;
 
117
                        urlColumn.PackStart (urlTitleCell, true);
 
118
 
 
119
                        nameColumn.AddAttribute (nameNameCell, "text", 0);
 
120
                        urlColumn.AddAttribute (urlTitleCell, "text", 1);
 
121
                        
 
122
                        if (!string.IsNullOrEmpty (prefs.URLs)) {
 
123
                                string[] urlbits = prefs.URLs.Split('|');
 
124
                                for (int i = 0; i < urlbits.Length; i++) {
 
125
                                        string name = urlbits[i];
 
126
                                        string uri = urlbits[++i];
 
127
                                        Uri url;
 
128
                                        try {
 
129
                                                url = new System.Uri(uri);
 
130
                                        } catch (System.UriFormatException) {
 
131
                                                continue;
 
132
                                        }
 
133
                                        
 
134
                                        rtListStore.AppendValues (name, url.ToString());
 
135
                                }
 
136
                        }
 
137
                }
 
138
 
 
139
        }
 
140
}