Merge lp:~cszikszoy/do-plugins/fandfignore into lp:do-plugins
- fandfignore
- Merge into trunk
Proposed by
Chris S.
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~cszikszoy/do-plugins/fandfignore |
Merge into: | lp:do-plugins |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~cszikszoy/do-plugins/fandfignore |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alex Launi (community) | Needs Fixing | ||
Review via email: mp+4053@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Alex Launi (alexlauni) : | # |
Revision history for this message
Alex Launi (alexlauni) wrote : | # |
Here's a pretty bad bug, when installing this plugin for the first time, all of my indexed folders are listed as ignored.
- 559. By Chris S.
-
try to fix old db versions
- 560. By Chris S.
-
detect old serialization database and fix
- 561. By Chris S.
-
use enum instead of bool
- 562. By Chris S.
-
added another constructor for IndexedFolder
- 563. By Chris S.
-
GUI fixes, button fixes
- 564. By Chris S.
-
update ver number
- 565. By Chris S.
-
merge trunk
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'File/File.mdp' | |||
2 | --- File/File.mdp 2009-02-28 16:16:48 +0000 | |||
3 | +++ File/File.mdp 2009-03-01 00:06:44 +0000 | |||
4 | @@ -41,6 +41,9 @@ | |||
5 | 41 | <File name="src/Do/Do.FilesAndFolders/MoveToTrashAction.cs" subtype="Code" buildaction="Compile" /> | 41 | <File name="src/Do/Do.FilesAndFolders/MoveToTrashAction.cs" subtype="Code" buildaction="Compile" /> |
6 | 42 | <File name="src/Do/Do.FilesAndFolders/AbstractFileAction.cs" subtype="Code" buildaction="Compile" /> | 42 | <File name="src/Do/Do.FilesAndFolders/AbstractFileAction.cs" subtype="Code" buildaction="Compile" /> |
7 | 43 | <File name="src/Do/Do.FilesAndFolders/RenameAction.cs" subtype="Code" buildaction="Compile" /> | 43 | <File name="src/Do/Do.FilesAndFolders/RenameAction.cs" subtype="Code" buildaction="Compile" /> |
8 | 44 | <File name="src/CellRendererTogglePixbuf.cs" subtype="Code" buildaction="Compile" /> | ||
9 | 45 | <File name="src/IndexPathNodeView.cs" subtype="Code" buildaction="Compile" /> | ||
10 | 46 | <File name="src/IgnorePathNodeView.cs" subtype="Code" buildaction="Compile" /> | ||
11 | 44 | </Contents> | 47 | </Contents> |
12 | 45 | <References> | 48 | <References> |
13 | 46 | <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | 49 | <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> |
14 | @@ -52,5 +55,6 @@ | |||
15 | 52 | <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> | 55 | <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> |
16 | 53 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> | 56 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> |
17 | 54 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> | 57 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> |
18 | 58 | <ProjectReference type="Gac" localcopy="True" refto="Do.Interface.Linux, Version=0.9.0.0, Culture=neutral, PublicKeyToken=null" /> | ||
19 | 55 | </References> | 59 | </References> |
20 | 56 | </Project> | 60 | </Project> |
21 | 57 | \ No newline at end of file | 61 | \ No newline at end of file |
22 | 58 | 62 | ||
23 | === modified file 'File/Makefile.am' | |||
24 | --- File/Makefile.am 2009-01-14 00:28:50 +0000 | |||
25 | +++ File/Makefile.am 2009-02-16 01:11:46 +0000 | |||
26 | @@ -6,6 +6,8 @@ | |||
27 | 6 | gtk-gui/Do.FilesAndFolders.Configuration.cs \ | 6 | gtk-gui/Do.FilesAndFolders.Configuration.cs \ |
28 | 7 | gtk-gui/generated.cs \ | 7 | gtk-gui/generated.cs \ |
29 | 8 | src/PathNodeView.cs \ | 8 | src/PathNodeView.cs \ |
30 | 9 | src/IndexPathNodeView.cs \ | ||
31 | 10 | src/IgnorePathNodeView.cs \ | ||
32 | 9 | src/Do/Do.FilesAndFolders/NewFolderAction.cs \ | 11 | src/Do/Do.FilesAndFolders/NewFolderAction.cs \ |
33 | 10 | src/Do/Do.FilesAndFolders/IndexedFolderCollection.cs \ | 12 | src/Do/Do.FilesAndFolders/IndexedFolderCollection.cs \ |
34 | 11 | src/Do/Do.FilesAndFolders/Preferences.cs \ | 13 | src/Do/Do.FilesAndFolders/Preferences.cs \ |
35 | 12 | 14 | ||
36 | === modified file 'File/Resources/File.addin.xml' | |||
37 | --- File/Resources/File.addin.xml 2009-01-10 02:13:19 +0000 | |||
38 | +++ File/Resources/File.addin.xml 2009-02-14 20:58:03 +0000 | |||
39 | @@ -1,10 +1,10 @@ | |||
40 | 1 | <Addin | 1 | <Addin |
41 | 2 | id="File" | 2 | id="File" |
42 | 3 | namespace="Do" | 3 | namespace="Do" |
44 | 4 | version="2.0" | 4 | version="2.2" |
45 | 5 | name="Files and Folders" | 5 | name="Files and Folders" |
46 | 6 | description="Search, browse, and perform other actions on files and folders." | 6 | description="Search, browse, and perform other actions on files and folders." |
48 | 7 | author="David Siegel, Alex Launi, Ankit Solanki" | 7 | author="David Siegel, Alex Launi, Ankit Solanki, Chris Szikszoy" |
49 | 8 | category="Official" | 8 | category="Official" |
50 | 9 | > | 9 | > |
51 | 10 | 10 | ||
52 | 11 | 11 | ||
53 | === modified file 'File/gtk-gui/Do.FilesAndFolders.Configuration.cs' | |||
54 | --- File/gtk-gui/Do.FilesAndFolders.Configuration.cs 2009-02-13 21:34:02 +0000 | |||
55 | +++ File/gtk-gui/Do.FilesAndFolders.Configuration.cs 2009-02-17 10:48:05 +0000 | |||
56 | @@ -17,19 +17,23 @@ | |||
57 | 17 | 17 | ||
58 | 18 | private Gtk.VBox vbox2; | 18 | private Gtk.VBox vbox2; |
59 | 19 | 19 | ||
60 | 20 | private Gtk.ScrolledWindow node_scroll; | ||
61 | 21 | |||
62 | 22 | private Gtk.VBox vbox1; | 20 | private Gtk.VBox vbox1; |
63 | 23 | 21 | ||
73 | 24 | private Gtk.HButtonBox hbuttonbox1; | 22 | private Gtk.Notebook notebook1; |
74 | 25 | 23 | ||
75 | 26 | private Gtk.Button remove_btn; | 24 | private Gtk.VBox vbox4; |
76 | 27 | 25 | ||
77 | 28 | private Gtk.Image image3; | 26 | private Gtk.ScrolledWindow index_node_scroll; |
78 | 29 | 27 | ||
79 | 30 | private Gtk.Button add_btn; | 28 | private Gtk.HBox hbox1; |
80 | 31 | 29 | ||
81 | 32 | private Gtk.Image image1; | 30 | private Gtk.Label IndexLabel; |
82 | 31 | |||
83 | 32 | private Gtk.HButtonBox hbuttonbox2; | ||
84 | 33 | |||
85 | 34 | private Gtk.Button index_remove_btn; | ||
86 | 35 | |||
87 | 36 | private Gtk.Button index_add_btn; | ||
88 | 33 | 37 | ||
89 | 34 | private Gtk.HBox hbox2; | 38 | private Gtk.HBox hbox2; |
90 | 35 | 39 | ||
91 | @@ -37,10 +41,26 @@ | |||
92 | 37 | 41 | ||
93 | 38 | private Gtk.Entry numFiles; | 42 | private Gtk.Entry numFiles; |
94 | 39 | 43 | ||
95 | 40 | private Gtk.VBox vbox3; | ||
96 | 41 | |||
97 | 42 | private Gtk.CheckButton show_hidden_chk; | 44 | private Gtk.CheckButton show_hidden_chk; |
98 | 43 | 45 | ||
99 | 46 | private Gtk.Label label1; | ||
100 | 47 | |||
101 | 48 | private Gtk.VBox vbox5; | ||
102 | 49 | |||
103 | 50 | private Gtk.ScrolledWindow ignore_node_scroll; | ||
104 | 51 | |||
105 | 52 | private Gtk.HBox hbox3; | ||
106 | 53 | |||
107 | 54 | private Gtk.Label IgnoreLabel; | ||
108 | 55 | |||
109 | 56 | private Gtk.HButtonBox hbuttonbox3; | ||
110 | 57 | |||
111 | 58 | private Gtk.Button ignore_remove_btn; | ||
112 | 59 | |||
113 | 60 | private Gtk.Button ignore_add_btn; | ||
114 | 61 | |||
115 | 62 | private Gtk.Label label2; | ||
116 | 63 | |||
117 | 44 | protected virtual void Build() { | 64 | protected virtual void Build() { |
118 | 45 | Stetic.Gui.Initialize(this); | 65 | Stetic.Gui.Initialize(this); |
119 | 46 | // Widget Do.FilesAndFolders.Configuration | 66 | // Widget Do.FilesAndFolders.Configuration |
120 | @@ -55,57 +75,98 @@ | |||
121 | 55 | this.vbox2.Name = "vbox2"; | 75 | this.vbox2.Name = "vbox2"; |
122 | 56 | this.vbox2.Spacing = 6; | 76 | this.vbox2.Spacing = 6; |
123 | 57 | // Container child vbox2.Gtk.Box+BoxChild | 77 | // Container child vbox2.Gtk.Box+BoxChild |
124 | 58 | this.node_scroll = new Gtk.ScrolledWindow(); | ||
125 | 59 | this.node_scroll.CanFocus = true; | ||
126 | 60 | this.node_scroll.Name = "node_scroll"; | ||
127 | 61 | this.node_scroll.ShadowType = ((Gtk.ShadowType)(1)); | ||
128 | 62 | this.vbox2.Add(this.node_scroll); | ||
129 | 63 | Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox2[this.node_scroll])); | ||
130 | 64 | w1.Position = 0; | ||
131 | 65 | // Container child vbox2.Gtk.Box+BoxChild | ||
132 | 66 | this.vbox1 = new Gtk.VBox(); | 78 | this.vbox1 = new Gtk.VBox(); |
133 | 67 | this.vbox1.Name = "vbox1"; | 79 | this.vbox1.Name = "vbox1"; |
134 | 68 | this.vbox1.Spacing = 6; | 80 | this.vbox1.Spacing = 6; |
135 | 69 | // Container child vbox1.Gtk.Box+BoxChild | 81 | // Container child vbox1.Gtk.Box+BoxChild |
175 | 70 | this.hbuttonbox1 = new Gtk.HButtonBox(); | 82 | this.notebook1 = new Gtk.Notebook(); |
176 | 71 | this.hbuttonbox1.Name = "hbuttonbox1"; | 83 | this.notebook1.HeightRequest = 270; |
177 | 72 | this.hbuttonbox1.Spacing = 4; | 84 | this.notebook1.CanFocus = true; |
178 | 73 | this.hbuttonbox1.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); | 85 | this.notebook1.Name = "notebook1"; |
179 | 74 | // Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild | 86 | this.notebook1.CurrentPage = 1; |
180 | 75 | this.remove_btn = new Gtk.Button(); | 87 | this.notebook1.ShowBorder = false; |
181 | 76 | this.remove_btn.CanFocus = true; | 88 | // Container child notebook1.Gtk.Notebook+NotebookChild |
182 | 77 | this.remove_btn.Name = "remove_btn"; | 89 | this.vbox4 = new Gtk.VBox(); |
183 | 78 | // Container child remove_btn.Gtk.Container+ContainerChild | 90 | this.vbox4.Name = "vbox4"; |
184 | 79 | this.image3 = new Gtk.Image(); | 91 | this.vbox4.Spacing = 6; |
185 | 80 | this.image3.Name = "image3"; | 92 | // Container child vbox4.Gtk.Box+BoxChild |
186 | 81 | this.image3.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-remove", Gtk.IconSize.Button, 20); | 93 | this.index_node_scroll = new Gtk.ScrolledWindow(); |
187 | 82 | this.remove_btn.Add(this.image3); | 94 | this.index_node_scroll.CanFocus = true; |
188 | 83 | this.remove_btn.Label = null; | 95 | this.index_node_scroll.Name = "index_node_scroll"; |
189 | 84 | this.hbuttonbox1.Add(this.remove_btn); | 96 | this.index_node_scroll.ShadowType = ((Gtk.ShadowType)(1)); |
190 | 85 | Gtk.ButtonBox.ButtonBoxChild w3 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox1[this.remove_btn])); | 97 | this.vbox4.Add(this.index_node_scroll); |
191 | 86 | w3.Expand = false; | 98 | Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox4[this.index_node_scroll])); |
192 | 87 | w3.Fill = false; | 99 | w1.Position = 0; |
193 | 88 | // Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild | 100 | // Container child vbox4.Gtk.Box+BoxChild |
194 | 89 | this.add_btn = new Gtk.Button(); | 101 | this.hbox1 = new Gtk.HBox(); |
195 | 90 | this.add_btn.CanFocus = true; | 102 | this.hbox1.Name = "hbox1"; |
196 | 91 | this.add_btn.Name = "add_btn"; | 103 | this.hbox1.Spacing = 6; |
197 | 92 | // Container child add_btn.Gtk.Container+ContainerChild | 104 | // Container child hbox1.Gtk.Box+BoxChild |
198 | 93 | this.image1 = new Gtk.Image(); | 105 | this.IndexLabel = new Gtk.Label(); |
199 | 94 | this.image1.Name = "image1"; | 106 | this.IndexLabel.Name = "IndexLabel"; |
200 | 95 | this.image1.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Button, 20); | 107 | this.hbox1.Add(this.IndexLabel); |
201 | 96 | this.add_btn.Add(this.image1); | 108 | Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.IndexLabel])); |
202 | 97 | this.add_btn.Label = null; | 109 | w2.Position = 0; |
203 | 98 | this.hbuttonbox1.Add(this.add_btn); | 110 | // Container child hbox1.Gtk.Box+BoxChild |
204 | 99 | Gtk.ButtonBox.ButtonBoxChild w5 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox1[this.add_btn])); | 111 | this.hbuttonbox2 = new Gtk.HButtonBox(); |
205 | 100 | w5.Position = 1; | 112 | this.hbuttonbox2.Name = "hbuttonbox2"; |
206 | 101 | w5.Expand = false; | 113 | // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild |
207 | 102 | w5.Fill = false; | 114 | this.index_remove_btn = new Gtk.Button(); |
208 | 103 | this.vbox1.Add(this.hbuttonbox1); | 115 | this.index_remove_btn.CanFocus = true; |
209 | 104 | Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbuttonbox1])); | 116 | this.index_remove_btn.Name = "index_remove_btn"; |
210 | 105 | w6.Position = 0; | 117 | this.index_remove_btn.UseUnderline = true; |
211 | 106 | w6.Expand = false; | 118 | // Container child index_remove_btn.Gtk.Container+ContainerChild |
212 | 107 | w6.Fill = false; | 119 | Gtk.Alignment w3 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); |
213 | 108 | // Container child vbox1.Gtk.Box+BoxChild | 120 | // Container child GtkAlignment.Gtk.Container+ContainerChild |
214 | 121 | Gtk.HBox w4 = new Gtk.HBox(); | ||
215 | 122 | w4.Spacing = 2; | ||
216 | 123 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
217 | 124 | Gtk.Image w5 = new Gtk.Image(); | ||
218 | 125 | w5.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-remove", Gtk.IconSize.Button, 20); | ||
219 | 126 | w4.Add(w5); | ||
220 | 127 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
221 | 128 | Gtk.Label w7 = new Gtk.Label(); | ||
222 | 129 | w4.Add(w7); | ||
223 | 130 | w3.Add(w4); | ||
224 | 131 | this.index_remove_btn.Add(w3); | ||
225 | 132 | this.hbuttonbox2.Add(this.index_remove_btn); | ||
226 | 133 | Gtk.ButtonBox.ButtonBoxChild w11 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.index_remove_btn])); | ||
227 | 134 | w11.Expand = false; | ||
228 | 135 | w11.Fill = false; | ||
229 | 136 | // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild | ||
230 | 137 | this.index_add_btn = new Gtk.Button(); | ||
231 | 138 | this.index_add_btn.CanFocus = true; | ||
232 | 139 | this.index_add_btn.Name = "index_add_btn"; | ||
233 | 140 | this.index_add_btn.UseUnderline = true; | ||
234 | 141 | // Container child index_add_btn.Gtk.Container+ContainerChild | ||
235 | 142 | Gtk.Alignment w12 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); | ||
236 | 143 | // Container child GtkAlignment.Gtk.Container+ContainerChild | ||
237 | 144 | Gtk.HBox w13 = new Gtk.HBox(); | ||
238 | 145 | w13.Spacing = 2; | ||
239 | 146 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
240 | 147 | Gtk.Image w14 = new Gtk.Image(); | ||
241 | 148 | w14.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16); | ||
242 | 149 | w13.Add(w14); | ||
243 | 150 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
244 | 151 | Gtk.Label w16 = new Gtk.Label(); | ||
245 | 152 | w13.Add(w16); | ||
246 | 153 | w12.Add(w13); | ||
247 | 154 | this.index_add_btn.Add(w12); | ||
248 | 155 | this.hbuttonbox2.Add(this.index_add_btn); | ||
249 | 156 | Gtk.ButtonBox.ButtonBoxChild w20 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.index_add_btn])); | ||
250 | 157 | w20.Position = 1; | ||
251 | 158 | w20.Expand = false; | ||
252 | 159 | w20.Fill = false; | ||
253 | 160 | this.hbox1.Add(this.hbuttonbox2); | ||
254 | 161 | Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.hbox1[this.hbuttonbox2])); | ||
255 | 162 | w21.Position = 1; | ||
256 | 163 | w21.Expand = false; | ||
257 | 164 | this.vbox4.Add(this.hbox1); | ||
258 | 165 | Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.vbox4[this.hbox1])); | ||
259 | 166 | w22.Position = 1; | ||
260 | 167 | w22.Expand = false; | ||
261 | 168 | w22.Fill = false; | ||
262 | 169 | // Container child vbox4.Gtk.Box+BoxChild | ||
263 | 109 | this.hbox2 = new Gtk.HBox(); | 170 | this.hbox2 = new Gtk.HBox(); |
264 | 110 | this.hbox2.Name = "hbox2"; | 171 | this.hbox2.Name = "hbox2"; |
265 | 111 | this.hbox2.Spacing = 6; | 172 | this.hbox2.Spacing = 6; |
266 | @@ -114,10 +175,10 @@ | |||
267 | 114 | this.maxFileslbl.Name = "maxFileslbl"; | 175 | this.maxFileslbl.Name = "maxFileslbl"; |
268 | 115 | this.maxFileslbl.LabelProp = Mono.Unix.Catalog.GetString("Maximum number of items to index:"); | 176 | this.maxFileslbl.LabelProp = Mono.Unix.Catalog.GetString("Maximum number of items to index:"); |
269 | 116 | this.hbox2.Add(this.maxFileslbl); | 177 | this.hbox2.Add(this.maxFileslbl); |
274 | 117 | Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox2[this.maxFileslbl])); | 178 | Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(this.hbox2[this.maxFileslbl])); |
275 | 118 | w7.Position = 0; | 179 | w23.Position = 0; |
276 | 119 | w7.Expand = false; | 180 | w23.Expand = false; |
277 | 120 | w7.Fill = false; | 181 | w23.Fill = false; |
278 | 121 | // Container child hbox2.Gtk.Box+BoxChild | 182 | // Container child hbox2.Gtk.Box+BoxChild |
279 | 122 | this.numFiles = new Gtk.Entry(); | 183 | this.numFiles = new Gtk.Entry(); |
280 | 123 | this.numFiles.CanFocus = true; | 184 | this.numFiles.CanFocus = true; |
281 | @@ -126,19 +187,15 @@ | |||
282 | 126 | this.numFiles.WidthChars = 5; | 187 | this.numFiles.WidthChars = 5; |
283 | 127 | this.numFiles.InvisibleChar = '●'; | 188 | this.numFiles.InvisibleChar = '●'; |
284 | 128 | this.hbox2.Add(this.numFiles); | 189 | this.hbox2.Add(this.numFiles); |
298 | 129 | Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox2[this.numFiles])); | 190 | Gtk.Box.BoxChild w24 = ((Gtk.Box.BoxChild)(this.hbox2[this.numFiles])); |
299 | 130 | w8.Position = 1; | 191 | w24.Position = 1; |
300 | 131 | w8.Expand = false; | 192 | w24.Expand = false; |
301 | 132 | this.vbox1.Add(this.hbox2); | 193 | this.vbox4.Add(this.hbox2); |
302 | 133 | Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox2])); | 194 | Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.vbox4[this.hbox2])); |
303 | 134 | w9.Position = 1; | 195 | w25.Position = 2; |
304 | 135 | w9.Expand = false; | 196 | w25.Expand = false; |
305 | 136 | w9.Fill = false; | 197 | w25.Fill = false; |
306 | 137 | // Container child vbox1.Gtk.Box+BoxChild | 198 | // Container child vbox4.Gtk.Box+BoxChild |
294 | 138 | this.vbox3 = new Gtk.VBox(); | ||
295 | 139 | this.vbox3.Name = "vbox3"; | ||
296 | 140 | this.vbox3.Spacing = 6; | ||
297 | 141 | // Container child vbox3.Gtk.Box+BoxChild | ||
307 | 142 | this.show_hidden_chk = new Gtk.CheckButton(); | 199 | this.show_hidden_chk = new Gtk.CheckButton(); |
308 | 143 | this.show_hidden_chk.CanFocus = true; | 200 | this.show_hidden_chk.CanFocus = true; |
309 | 144 | this.show_hidden_chk.Name = "show_hidden_chk"; | 201 | this.show_hidden_chk.Name = "show_hidden_chk"; |
310 | @@ -147,31 +204,127 @@ | |||
311 | 147 | this.show_hidden_chk.DrawIndicator = true; | 204 | this.show_hidden_chk.DrawIndicator = true; |
312 | 148 | this.show_hidden_chk.UseUnderline = true; | 205 | this.show_hidden_chk.UseUnderline = true; |
313 | 149 | this.show_hidden_chk.BorderWidth = ((uint)(5)); | 206 | this.show_hidden_chk.BorderWidth = ((uint)(5)); |
324 | 150 | this.vbox3.Add(this.show_hidden_chk); | 207 | this.vbox4.Add(this.show_hidden_chk); |
325 | 151 | Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox3[this.show_hidden_chk])); | 208 | Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.vbox4[this.show_hidden_chk])); |
326 | 152 | w10.Position = 0; | 209 | w26.Position = 3; |
327 | 153 | w10.Expand = false; | 210 | w26.Expand = false; |
328 | 154 | w10.Fill = false; | 211 | w26.Fill = false; |
329 | 155 | this.vbox1.Add(this.vbox3); | 212 | this.notebook1.Add(this.vbox4); |
330 | 156 | Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox1[this.vbox3])); | 213 | // Notebook tab |
331 | 157 | w11.Position = 2; | 214 | this.label1 = new Gtk.Label(); |
332 | 158 | w11.Expand = false; | 215 | this.label1.Name = "label1"; |
333 | 159 | w11.Fill = false; | 216 | this.label1.LabelProp = Mono.Unix.Catalog.GetString("Indexed Folders"); |
334 | 217 | this.notebook1.SetTabLabel(this.vbox4, this.label1); | ||
335 | 218 | this.label1.ShowAll(); | ||
336 | 219 | // Container child notebook1.Gtk.Notebook+NotebookChild | ||
337 | 220 | this.vbox5 = new Gtk.VBox(); | ||
338 | 221 | this.vbox5.Name = "vbox5"; | ||
339 | 222 | this.vbox5.Spacing = 6; | ||
340 | 223 | // Container child vbox5.Gtk.Box+BoxChild | ||
341 | 224 | this.ignore_node_scroll = new Gtk.ScrolledWindow(); | ||
342 | 225 | this.ignore_node_scroll.CanFocus = true; | ||
343 | 226 | this.ignore_node_scroll.Name = "ignore_node_scroll"; | ||
344 | 227 | this.ignore_node_scroll.ShadowType = ((Gtk.ShadowType)(1)); | ||
345 | 228 | this.vbox5.Add(this.ignore_node_scroll); | ||
346 | 229 | Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.vbox5[this.ignore_node_scroll])); | ||
347 | 230 | w28.Position = 0; | ||
348 | 231 | // Container child vbox5.Gtk.Box+BoxChild | ||
349 | 232 | this.hbox3 = new Gtk.HBox(); | ||
350 | 233 | this.hbox3.Name = "hbox3"; | ||
351 | 234 | this.hbox3.Spacing = 6; | ||
352 | 235 | // Container child hbox3.Gtk.Box+BoxChild | ||
353 | 236 | this.IgnoreLabel = new Gtk.Label(); | ||
354 | 237 | this.IgnoreLabel.Name = "IgnoreLabel"; | ||
355 | 238 | this.hbox3.Add(this.IgnoreLabel); | ||
356 | 239 | Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.hbox3[this.IgnoreLabel])); | ||
357 | 240 | w29.Position = 0; | ||
358 | 241 | w29.Fill = false; | ||
359 | 242 | // Container child hbox3.Gtk.Box+BoxChild | ||
360 | 243 | this.hbuttonbox3 = new Gtk.HButtonBox(); | ||
361 | 244 | this.hbuttonbox3.Name = "hbuttonbox3"; | ||
362 | 245 | // Container child hbuttonbox3.Gtk.ButtonBox+ButtonBoxChild | ||
363 | 246 | this.ignore_remove_btn = new Gtk.Button(); | ||
364 | 247 | this.ignore_remove_btn.CanFocus = true; | ||
365 | 248 | this.ignore_remove_btn.Name = "ignore_remove_btn"; | ||
366 | 249 | this.ignore_remove_btn.UseUnderline = true; | ||
367 | 250 | // Container child ignore_remove_btn.Gtk.Container+ContainerChild | ||
368 | 251 | Gtk.Alignment w30 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); | ||
369 | 252 | // Container child GtkAlignment.Gtk.Container+ContainerChild | ||
370 | 253 | Gtk.HBox w31 = new Gtk.HBox(); | ||
371 | 254 | w31.Spacing = 2; | ||
372 | 255 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
373 | 256 | Gtk.Image w32 = new Gtk.Image(); | ||
374 | 257 | w32.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-remove", Gtk.IconSize.Button, 20); | ||
375 | 258 | w31.Add(w32); | ||
376 | 259 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
377 | 260 | Gtk.Label w34 = new Gtk.Label(); | ||
378 | 261 | w31.Add(w34); | ||
379 | 262 | w30.Add(w31); | ||
380 | 263 | this.ignore_remove_btn.Add(w30); | ||
381 | 264 | this.hbuttonbox3.Add(this.ignore_remove_btn); | ||
382 | 265 | Gtk.ButtonBox.ButtonBoxChild w38 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox3[this.ignore_remove_btn])); | ||
383 | 266 | w38.Expand = false; | ||
384 | 267 | w38.Fill = false; | ||
385 | 268 | // Container child hbuttonbox3.Gtk.ButtonBox+ButtonBoxChild | ||
386 | 269 | this.ignore_add_btn = new Gtk.Button(); | ||
387 | 270 | this.ignore_add_btn.CanFocus = true; | ||
388 | 271 | this.ignore_add_btn.Name = "ignore_add_btn"; | ||
389 | 272 | this.ignore_add_btn.UseUnderline = true; | ||
390 | 273 | // Container child ignore_add_btn.Gtk.Container+ContainerChild | ||
391 | 274 | Gtk.Alignment w39 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); | ||
392 | 275 | // Container child GtkAlignment.Gtk.Container+ContainerChild | ||
393 | 276 | Gtk.HBox w40 = new Gtk.HBox(); | ||
394 | 277 | w40.Spacing = 2; | ||
395 | 278 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
396 | 279 | Gtk.Image w41 = new Gtk.Image(); | ||
397 | 280 | w41.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16); | ||
398 | 281 | w40.Add(w41); | ||
399 | 282 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
400 | 283 | Gtk.Label w43 = new Gtk.Label(); | ||
401 | 284 | w40.Add(w43); | ||
402 | 285 | w39.Add(w40); | ||
403 | 286 | this.ignore_add_btn.Add(w39); | ||
404 | 287 | this.hbuttonbox3.Add(this.ignore_add_btn); | ||
405 | 288 | Gtk.ButtonBox.ButtonBoxChild w47 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox3[this.ignore_add_btn])); | ||
406 | 289 | w47.Position = 1; | ||
407 | 290 | w47.Expand = false; | ||
408 | 291 | w47.Fill = false; | ||
409 | 292 | this.hbox3.Add(this.hbuttonbox3); | ||
410 | 293 | Gtk.Box.BoxChild w48 = ((Gtk.Box.BoxChild)(this.hbox3[this.hbuttonbox3])); | ||
411 | 294 | w48.Position = 1; | ||
412 | 295 | w48.Expand = false; | ||
413 | 296 | this.vbox5.Add(this.hbox3); | ||
414 | 297 | Gtk.Box.BoxChild w49 = ((Gtk.Box.BoxChild)(this.vbox5[this.hbox3])); | ||
415 | 298 | w49.Position = 1; | ||
416 | 299 | w49.Expand = false; | ||
417 | 300 | w49.Fill = false; | ||
418 | 301 | this.notebook1.Add(this.vbox5); | ||
419 | 302 | Gtk.Notebook.NotebookChild w50 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.vbox5])); | ||
420 | 303 | w50.Position = 1; | ||
421 | 304 | // Notebook tab | ||
422 | 305 | this.label2 = new Gtk.Label(); | ||
423 | 306 | this.label2.Name = "label2"; | ||
424 | 307 | this.label2.LabelProp = Mono.Unix.Catalog.GetString("Ignored Folders"); | ||
425 | 308 | this.notebook1.SetTabLabel(this.vbox5, this.label2); | ||
426 | 309 | this.label2.ShowAll(); | ||
427 | 310 | this.vbox1.Add(this.notebook1); | ||
428 | 311 | Gtk.Box.BoxChild w51 = ((Gtk.Box.BoxChild)(this.vbox1[this.notebook1])); | ||
429 | 312 | w51.Position = 0; | ||
430 | 160 | this.vbox2.Add(this.vbox1); | 313 | this.vbox2.Add(this.vbox1); |
435 | 161 | Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox2[this.vbox1])); | 314 | Gtk.Box.BoxChild w52 = ((Gtk.Box.BoxChild)(this.vbox2[this.vbox1])); |
436 | 162 | w12.Position = 1; | 315 | w52.Position = 0; |
433 | 163 | w12.Expand = false; | ||
434 | 164 | w12.Fill = false; | ||
437 | 165 | this.alignment1.Add(this.vbox2); | 316 | this.alignment1.Add(this.vbox2); |
438 | 166 | this.Add(this.alignment1); | 317 | this.Add(this.alignment1); |
439 | 167 | if ((this.Child != null)) { | 318 | if ((this.Child != null)) { |
440 | 168 | this.Child.ShowAll(); | 319 | this.Child.ShowAll(); |
441 | 169 | } | 320 | } |
442 | 170 | this.Show(); | 321 | this.Show(); |
445 | 171 | this.remove_btn.Clicked += new System.EventHandler(this.OnRemoveBtnClicked); | 322 | this.index_remove_btn.Clicked += new System.EventHandler(this.OnRemoveBtnClicked); |
446 | 172 | this.add_btn.Clicked += new System.EventHandler(this.OnAddBtnClicked); | 323 | this.index_add_btn.Clicked += new System.EventHandler(this.OnAddBtnClicked); |
447 | 173 | this.numFiles.Changed += new System.EventHandler(this.OnNumFilesEdited); | 324 | this.numFiles.Changed += new System.EventHandler(this.OnNumFilesEdited); |
448 | 174 | this.show_hidden_chk.Clicked += new System.EventHandler(this.OnShowHiddenChkClicked); | 325 | this.show_hidden_chk.Clicked += new System.EventHandler(this.OnShowHiddenChkClicked); |
449 | 326 | this.ignore_remove_btn.Clicked += new System.EventHandler(this.OnRemoveBtnClicked); | ||
450 | 327 | this.ignore_add_btn.Clicked += new System.EventHandler(this.OnAddBtnClicked); | ||
451 | 175 | } | 328 | } |
452 | 176 | } | 329 | } |
453 | 177 | } | 330 | } |
454 | 178 | 331 | ||
455 | === modified file 'File/gtk-gui/gui.stetic' | |||
456 | --- File/gtk-gui/gui.stetic 2009-02-13 21:34:02 +0000 | |||
457 | +++ File/gtk-gui/gui.stetic 2009-03-02 03:08:02 +0000 | |||
458 | @@ -2,9 +2,12 @@ | |||
459 | 2 | <stetic-interface> | 2 | <stetic-interface> |
460 | 3 | <configuration> | 3 | <configuration> |
461 | 4 | <images-root-path>..</images-root-path> | 4 | <images-root-path>..</images-root-path> |
463 | 5 | <target-gtk-version>2.12.1</target-gtk-version> | 5 | <target-gtk-version>2.12</target-gtk-version> |
464 | 6 | </configuration> | 6 | </configuration> |
466 | 7 | <widget class="Gtk.Bin" id="Do.FilesAndFolders.Configuration" design-size="328 354"> | 7 | <import> |
467 | 8 | <widget-library name="../bin/Debug/File.dll" internal="true" /> | ||
468 | 9 | </import> | ||
469 | 10 | <widget class="Gtk.Bin" id="Do.FilesAndFolders.Configuration" design-size="414 356"> | ||
470 | 8 | <property name="MemberName" /> | 11 | <property name="MemberName" /> |
471 | 9 | <child> | 12 | <child> |
472 | 10 | <widget class="Gtk.Alignment" id="alignment1"> | 13 | <widget class="Gtk.Alignment" id="alignment1"> |
473 | @@ -15,156 +18,284 @@ | |||
474 | 15 | <property name="MemberName" /> | 18 | <property name="MemberName" /> |
475 | 16 | <property name="Spacing">6</property> | 19 | <property name="Spacing">6</property> |
476 | 17 | <child> | 20 | <child> |
477 | 18 | <widget class="Gtk.ScrolledWindow" id="node_scroll"> | ||
478 | 19 | <property name="MemberName" /> | ||
479 | 20 | <property name="CanFocus">True</property> | ||
480 | 21 | <property name="ShadowType">In</property> | ||
481 | 22 | <child> | ||
482 | 23 | <widget class="Gtk.Viewport" id="GtkViewport"> | ||
483 | 24 | <property name="MemberName" /> | ||
484 | 25 | <property name="ShadowType">None</property> | ||
485 | 26 | <child> | ||
486 | 27 | <placeholder /> | ||
487 | 28 | </child> | ||
488 | 29 | </widget> | ||
489 | 30 | </child> | ||
490 | 31 | </widget> | ||
491 | 32 | <packing> | ||
492 | 33 | <property name="Position">0</property> | ||
493 | 34 | <property name="AutoSize">True</property> | ||
494 | 35 | </packing> | ||
495 | 36 | </child> | ||
496 | 37 | <child> | ||
497 | 38 | <widget class="Gtk.VBox" id="vbox1"> | 21 | <widget class="Gtk.VBox" id="vbox1"> |
498 | 39 | <property name="MemberName" /> | 22 | <property name="MemberName" /> |
499 | 40 | <property name="Spacing">6</property> | 23 | <property name="Spacing">6</property> |
500 | 41 | <child> | 24 | <child> |
502 | 42 | <widget class="Gtk.HButtonBox" id="hbuttonbox1"> | 25 | <widget class="Gtk.Notebook" id="notebook1"> |
503 | 43 | <property name="MemberName" /> | 26 | <property name="MemberName" /> |
519 | 44 | <property name="Spacing">4</property> | 27 | <property name="HeightRequest">270</property> |
520 | 45 | <property name="Size">2</property> | 28 | <property name="CanFocus">True</property> |
521 | 46 | <property name="LayoutStyle">End</property> | 29 | <property name="CurrentPage">1</property> |
522 | 47 | <child> | 30 | <property name="ShowBorder">False</property> |
523 | 48 | <widget class="Gtk.Button" id="remove_btn"> | 31 | <child> |
524 | 49 | <property name="MemberName" /> | 32 | <widget class="Gtk.VBox" id="vbox4"> |
525 | 50 | <property name="CanFocus">True</property> | 33 | <property name="MemberName" /> |
526 | 51 | <property name="Type">Custom</property> | 34 | <property name="Spacing">6</property> |
527 | 52 | <signal name="Clicked" handler="OnRemoveBtnClicked" /> | 35 | <child> |
528 | 53 | <child> | 36 | <widget class="Gtk.ScrolledWindow" id="index_node_scroll"> |
529 | 54 | <widget class="Gtk.Image" id="image3"> | 37 | <property name="MemberName" /> |
530 | 55 | <property name="MemberName" /> | 38 | <property name="CanFocus">True</property> |
531 | 56 | <property name="Pixbuf">stock:gtk-remove Button</property> | 39 | <property name="ShadowType">In</property> |
532 | 57 | </widget> | 40 | <child> |
533 | 58 | </child> | 41 | <widget class="Gtk.Viewport" id="GtkViewport"> |
534 | 42 | <property name="MemberName" /> | ||
535 | 43 | <property name="ShadowType">None</property> | ||
536 | 44 | <child> | ||
537 | 45 | <placeholder /> | ||
538 | 46 | </child> | ||
539 | 47 | </widget> | ||
540 | 48 | </child> | ||
541 | 49 | </widget> | ||
542 | 50 | <packing> | ||
543 | 51 | <property name="Position">0</property> | ||
544 | 52 | <property name="AutoSize">True</property> | ||
545 | 53 | </packing> | ||
546 | 54 | </child> | ||
547 | 55 | <child> | ||
548 | 56 | <widget class="Gtk.HBox" id="hbox1"> | ||
549 | 57 | <property name="MemberName" /> | ||
550 | 58 | <property name="Spacing">6</property> | ||
551 | 59 | <child> | ||
552 | 60 | <widget class="Gtk.Label" id="IndexLabel"> | ||
553 | 61 | <property name="MemberName" /> | ||
554 | 62 | </widget> | ||
555 | 63 | <packing> | ||
556 | 64 | <property name="Position">0</property> | ||
557 | 65 | <property name="AutoSize">False</property> | ||
558 | 66 | </packing> | ||
559 | 67 | </child> | ||
560 | 68 | <child> | ||
561 | 69 | <widget class="Gtk.HButtonBox" id="hbuttonbox2"> | ||
562 | 70 | <property name="MemberName" /> | ||
563 | 71 | <property name="Size">2</property> | ||
564 | 72 | <child> | ||
565 | 73 | <widget class="Gtk.Button" id="index_remove_btn"> | ||
566 | 74 | <property name="MemberName" /> | ||
567 | 75 | <property name="CanFocus">True</property> | ||
568 | 76 | <property name="Type">TextAndIcon</property> | ||
569 | 77 | <property name="Icon">stock:gtk-remove Button</property> | ||
570 | 78 | <property name="Label" translatable="yes" /> | ||
571 | 79 | <property name="UseUnderline">True</property> | ||
572 | 80 | <signal name="Clicked" handler="OnRemoveBtnClicked" /> | ||
573 | 81 | </widget> | ||
574 | 82 | <packing> | ||
575 | 83 | <property name="Expand">False</property> | ||
576 | 84 | <property name="Fill">False</property> | ||
577 | 85 | </packing> | ||
578 | 86 | </child> | ||
579 | 87 | <child> | ||
580 | 88 | <widget class="Gtk.Button" id="index_add_btn"> | ||
581 | 89 | <property name="MemberName" /> | ||
582 | 90 | <property name="CanFocus">True</property> | ||
583 | 91 | <property name="Type">TextAndIcon</property> | ||
584 | 92 | <property name="Icon">stock:gtk-add Menu</property> | ||
585 | 93 | <property name="Label" translatable="yes" /> | ||
586 | 94 | <property name="UseUnderline">True</property> | ||
587 | 95 | <signal name="Clicked" handler="OnAddBtnClicked" /> | ||
588 | 96 | </widget> | ||
589 | 97 | <packing> | ||
590 | 98 | <property name="Position">1</property> | ||
591 | 99 | <property name="Expand">False</property> | ||
592 | 100 | <property name="Fill">False</property> | ||
593 | 101 | </packing> | ||
594 | 102 | </child> | ||
595 | 103 | </widget> | ||
596 | 104 | <packing> | ||
597 | 105 | <property name="Position">1</property> | ||
598 | 106 | <property name="AutoSize">False</property> | ||
599 | 107 | <property name="Expand">False</property> | ||
600 | 108 | </packing> | ||
601 | 109 | </child> | ||
602 | 110 | </widget> | ||
603 | 111 | <packing> | ||
604 | 112 | <property name="Position">1</property> | ||
605 | 113 | <property name="AutoSize">True</property> | ||
606 | 114 | <property name="Expand">False</property> | ||
607 | 115 | <property name="Fill">False</property> | ||
608 | 116 | </packing> | ||
609 | 117 | </child> | ||
610 | 118 | <child> | ||
611 | 119 | <widget class="Gtk.HBox" id="hbox2"> | ||
612 | 120 | <property name="MemberName" /> | ||
613 | 121 | <property name="Spacing">6</property> | ||
614 | 122 | <child> | ||
615 | 123 | <widget class="Gtk.Label" id="maxFileslbl"> | ||
616 | 124 | <property name="MemberName" /> | ||
617 | 125 | <property name="LabelProp" translatable="yes">Maximum number of items to index:</property> | ||
618 | 126 | </widget> | ||
619 | 127 | <packing> | ||
620 | 128 | <property name="Position">0</property> | ||
621 | 129 | <property name="AutoSize">False</property> | ||
622 | 130 | <property name="Expand">False</property> | ||
623 | 131 | <property name="Fill">False</property> | ||
624 | 132 | </packing> | ||
625 | 133 | </child> | ||
626 | 134 | <child> | ||
627 | 135 | <widget class="Gtk.Entry" id="numFiles"> | ||
628 | 136 | <property name="MemberName">numFiles</property> | ||
629 | 137 | <property name="CanFocus">True</property> | ||
630 | 138 | <property name="IsEditable">True</property> | ||
631 | 139 | <property name="WidthChars">5</property> | ||
632 | 140 | <property name="InvisibleChar">●</property> | ||
633 | 141 | <signal name="Changed" handler="OnNumFilesEdited" /> | ||
634 | 142 | </widget> | ||
635 | 143 | <packing> | ||
636 | 144 | <property name="Position">1</property> | ||
637 | 145 | <property name="AutoSize">False</property> | ||
638 | 146 | <property name="Expand">False</property> | ||
639 | 147 | </packing> | ||
640 | 148 | </child> | ||
641 | 149 | </widget> | ||
642 | 150 | <packing> | ||
643 | 151 | <property name="Position">2</property> | ||
644 | 152 | <property name="AutoSize">True</property> | ||
645 | 153 | <property name="Expand">False</property> | ||
646 | 154 | <property name="Fill">False</property> | ||
647 | 155 | </packing> | ||
648 | 156 | </child> | ||
649 | 157 | <child> | ||
650 | 158 | <widget class="Gtk.CheckButton" id="show_hidden_chk"> | ||
651 | 159 | <property name="MemberName" /> | ||
652 | 160 | <property name="CanFocus">True</property> | ||
653 | 161 | <property name="Label" translatable="yes">Show hidden files</property> | ||
654 | 162 | <property name="Active">True</property> | ||
655 | 163 | <property name="DrawIndicator">True</property> | ||
656 | 164 | <property name="HasLabel">True</property> | ||
657 | 165 | <property name="UseUnderline">True</property> | ||
658 | 166 | <property name="BorderWidth">5</property> | ||
659 | 167 | <signal name="Clicked" handler="OnShowHiddenChkClicked" /> | ||
660 | 168 | </widget> | ||
661 | 169 | <packing> | ||
662 | 170 | <property name="Position">3</property> | ||
663 | 171 | <property name="AutoSize">True</property> | ||
664 | 172 | <property name="Expand">False</property> | ||
665 | 173 | <property name="Fill">False</property> | ||
666 | 174 | </packing> | ||
667 | 175 | </child> | ||
668 | 176 | </widget> | ||
669 | 177 | </child> | ||
670 | 178 | <child> | ||
671 | 179 | <widget class="Gtk.Label" id="label1"> | ||
672 | 180 | <property name="MemberName" /> | ||
673 | 181 | <property name="LabelProp" translatable="yes">Indexed Folders</property> | ||
674 | 59 | </widget> | 182 | </widget> |
675 | 60 | <packing> | 183 | <packing> |
678 | 61 | <property name="Expand">False</property> | 184 | <property name="type">tab</property> |
677 | 62 | <property name="Fill">False</property> | ||
679 | 63 | </packing> | 185 | </packing> |
680 | 64 | </child> | 186 | </child> |
681 | 65 | <child> | 187 | <child> |
683 | 66 | <widget class="Gtk.Button" id="add_btn"> | 188 | <widget class="Gtk.VBox" id="vbox5"> |
684 | 67 | <property name="MemberName" /> | 189 | <property name="MemberName" /> |
693 | 68 | <property name="CanFocus">True</property> | 190 | <property name="Spacing">6</property> |
694 | 69 | <property name="Type">Custom</property> | 191 | <child> |
695 | 70 | <signal name="Clicked" handler="OnAddBtnClicked" /> | 192 | <widget class="Gtk.ScrolledWindow" id="ignore_node_scroll"> |
696 | 71 | <child> | 193 | <property name="MemberName" /> |
697 | 72 | <widget class="Gtk.Image" id="image1"> | 194 | <property name="CanFocus">True</property> |
698 | 73 | <property name="MemberName" /> | 195 | <property name="ShadowType">In</property> |
699 | 74 | <property name="Pixbuf">stock:gtk-add Button</property> | 196 | <child> |
700 | 75 | </widget> | 197 | <widget class="Gtk.Viewport" id="GtkViewport1"> |
701 | 198 | <property name="MemberName" /> | ||
702 | 199 | <property name="ShadowType">None</property> | ||
703 | 200 | <child> | ||
704 | 201 | <placeholder /> | ||
705 | 202 | </child> | ||
706 | 203 | </widget> | ||
707 | 204 | </child> | ||
708 | 205 | </widget> | ||
709 | 206 | <packing> | ||
710 | 207 | <property name="Position">0</property> | ||
711 | 208 | <property name="AutoSize">True</property> | ||
712 | 209 | </packing> | ||
713 | 210 | </child> | ||
714 | 211 | <child> | ||
715 | 212 | <widget class="Gtk.HBox" id="hbox3"> | ||
716 | 213 | <property name="MemberName" /> | ||
717 | 214 | <property name="Spacing">6</property> | ||
718 | 215 | <child> | ||
719 | 216 | <widget class="Gtk.Label" id="IgnoreLabel"> | ||
720 | 217 | <property name="MemberName" /> | ||
721 | 218 | </widget> | ||
722 | 219 | <packing> | ||
723 | 220 | <property name="Position">0</property> | ||
724 | 221 | <property name="AutoSize">False</property> | ||
725 | 222 | <property name="Fill">False</property> | ||
726 | 223 | </packing> | ||
727 | 224 | </child> | ||
728 | 225 | <child> | ||
729 | 226 | <widget class="Gtk.HButtonBox" id="hbuttonbox3"> | ||
730 | 227 | <property name="MemberName" /> | ||
731 | 228 | <property name="Size">2</property> | ||
732 | 229 | <child> | ||
733 | 230 | <widget class="Gtk.Button" id="ignore_remove_btn"> | ||
734 | 231 | <property name="MemberName" /> | ||
735 | 232 | <property name="CanFocus">True</property> | ||
736 | 233 | <property name="Type">TextAndIcon</property> | ||
737 | 234 | <property name="Icon">stock:gtk-remove Button</property> | ||
738 | 235 | <property name="Label" translatable="yes" /> | ||
739 | 236 | <property name="UseUnderline">True</property> | ||
740 | 237 | <signal name="Clicked" handler="OnRemoveBtnClicked" /> | ||
741 | 238 | </widget> | ||
742 | 239 | <packing> | ||
743 | 240 | <property name="Expand">False</property> | ||
744 | 241 | <property name="Fill">False</property> | ||
745 | 242 | </packing> | ||
746 | 243 | </child> | ||
747 | 244 | <child> | ||
748 | 245 | <widget class="Gtk.Button" id="ignore_add_btn"> | ||
749 | 246 | <property name="MemberName" /> | ||
750 | 247 | <property name="CanFocus">True</property> | ||
751 | 248 | <property name="Type">TextAndIcon</property> | ||
752 | 249 | <property name="Icon">stock:gtk-add Menu</property> | ||
753 | 250 | <property name="Label" translatable="yes" /> | ||
754 | 251 | <property name="UseUnderline">True</property> | ||
755 | 252 | <signal name="Clicked" handler="OnAddBtnClicked" /> | ||
756 | 253 | </widget> | ||
757 | 254 | <packing> | ||
758 | 255 | <property name="Position">1</property> | ||
759 | 256 | <property name="Expand">False</property> | ||
760 | 257 | <property name="Fill">False</property> | ||
761 | 258 | </packing> | ||
762 | 259 | </child> | ||
763 | 260 | </widget> | ||
764 | 261 | <packing> | ||
765 | 262 | <property name="Position">1</property> | ||
766 | 263 | <property name="AutoSize">False</property> | ||
767 | 264 | <property name="Expand">False</property> | ||
768 | 265 | </packing> | ||
769 | 266 | </child> | ||
770 | 267 | </widget> | ||
771 | 268 | <packing> | ||
772 | 269 | <property name="Position">1</property> | ||
773 | 270 | <property name="AutoSize">True</property> | ||
774 | 271 | <property name="Expand">False</property> | ||
775 | 272 | <property name="Fill">False</property> | ||
776 | 273 | </packing> | ||
777 | 76 | </child> | 274 | </child> |
778 | 77 | </widget> | 275 | </widget> |
779 | 78 | <packing> | 276 | <packing> |
780 | 79 | <property name="Position">1</property> | 277 | <property name="Position">1</property> |
783 | 80 | <property name="Expand">False</property> | 278 | </packing> |
784 | 81 | <property name="Fill">False</property> | 279 | </child> |
785 | 280 | <child> | ||
786 | 281 | <widget class="Gtk.Label" id="label2"> | ||
787 | 282 | <property name="MemberName" /> | ||
788 | 283 | <property name="LabelProp" translatable="yes">Ignored Folders</property> | ||
789 | 284 | </widget> | ||
790 | 285 | <packing> | ||
791 | 286 | <property name="type">tab</property> | ||
792 | 82 | </packing> | 287 | </packing> |
793 | 83 | </child> | 288 | </child> |
794 | 84 | </widget> | 289 | </widget> |
795 | 85 | <packing> | 290 | <packing> |
796 | 86 | <property name="Position">0</property> | 291 | <property name="Position">0</property> |
797 | 87 | <property name="AutoSize">True</property> | 292 | <property name="AutoSize">True</property> |
798 | 88 | <property name="Expand">False</property> | ||
799 | 89 | <property name="Fill">False</property> | ||
800 | 90 | </packing> | ||
801 | 91 | </child> | ||
802 | 92 | <child> | ||
803 | 93 | <widget class="Gtk.HBox" id="hbox2"> | ||
804 | 94 | <property name="MemberName" /> | ||
805 | 95 | <property name="Spacing">6</property> | ||
806 | 96 | <child> | ||
807 | 97 | <widget class="Gtk.Label" id="maxFileslbl"> | ||
808 | 98 | <property name="MemberName" /> | ||
809 | 99 | <property name="LabelProp" translatable="yes">Maximum number of items to index:</property> | ||
810 | 100 | </widget> | ||
811 | 101 | <packing> | ||
812 | 102 | <property name="Position">0</property> | ||
813 | 103 | <property name="AutoSize">False</property> | ||
814 | 104 | <property name="Expand">False</property> | ||
815 | 105 | <property name="Fill">False</property> | ||
816 | 106 | </packing> | ||
817 | 107 | </child> | ||
818 | 108 | <child> | ||
819 | 109 | <widget class="Gtk.Entry" id="numFiles"> | ||
820 | 110 | <property name="MemberName">numFiles</property> | ||
821 | 111 | <property name="CanFocus">True</property> | ||
822 | 112 | <property name="IsEditable">True</property> | ||
823 | 113 | <property name="WidthChars">5</property> | ||
824 | 114 | <property name="InvisibleChar">●</property> | ||
825 | 115 | <signal name="Changed" handler="OnNumFilesEdited" /> | ||
826 | 116 | </widget> | ||
827 | 117 | <packing> | ||
828 | 118 | <property name="Position">1</property> | ||
829 | 119 | <property name="AutoSize">False</property> | ||
830 | 120 | <property name="Expand">False</property> | ||
831 | 121 | </packing> | ||
832 | 122 | </child> | ||
833 | 123 | </widget> | ||
834 | 124 | <packing> | ||
835 | 125 | <property name="Position">1</property> | ||
836 | 126 | <property name="AutoSize">True</property> | ||
837 | 127 | <property name="Expand">False</property> | ||
838 | 128 | <property name="Fill">False</property> | ||
839 | 129 | </packing> | ||
840 | 130 | </child> | ||
841 | 131 | <child> | ||
842 | 132 | <widget class="Gtk.VBox" id="vbox3"> | ||
843 | 133 | <property name="MemberName" /> | ||
844 | 134 | <property name="Spacing">6</property> | ||
845 | 135 | <child> | ||
846 | 136 | <widget class="Gtk.CheckButton" id="show_hidden_chk"> | ||
847 | 137 | <property name="MemberName" /> | ||
848 | 138 | <property name="CanFocus">True</property> | ||
849 | 139 | <property name="Label" translatable="yes">Show hidden files</property> | ||
850 | 140 | <property name="Active">True</property> | ||
851 | 141 | <property name="DrawIndicator">True</property> | ||
852 | 142 | <property name="HasLabel">True</property> | ||
853 | 143 | <property name="UseUnderline">True</property> | ||
854 | 144 | <property name="BorderWidth">5</property> | ||
855 | 145 | <signal name="Clicked" handler="OnShowHiddenChkClicked" /> | ||
856 | 146 | </widget> | ||
857 | 147 | <packing> | ||
858 | 148 | <property name="Position">0</property> | ||
859 | 149 | <property name="AutoSize">True</property> | ||
860 | 150 | <property name="Expand">False</property> | ||
861 | 151 | <property name="Fill">False</property> | ||
862 | 152 | </packing> | ||
863 | 153 | </child> | ||
864 | 154 | </widget> | ||
865 | 155 | <packing> | ||
866 | 156 | <property name="Position">2</property> | ||
867 | 157 | <property name="AutoSize">True</property> | ||
868 | 158 | <property name="Expand">False</property> | ||
869 | 159 | <property name="Fill">False</property> | ||
870 | 160 | </packing> | 293 | </packing> |
871 | 161 | </child> | 294 | </child> |
872 | 162 | </widget> | 295 | </widget> |
873 | 163 | <packing> | 296 | <packing> |
875 | 164 | <property name="Position">1</property> | 297 | <property name="Position">0</property> |
876 | 165 | <property name="AutoSize">True</property> | 298 | <property name="AutoSize">True</property> |
877 | 166 | <property name="Expand">False</property> | ||
878 | 167 | <property name="Fill">False</property> | ||
879 | 168 | </packing> | 299 | </packing> |
880 | 169 | </child> | 300 | </child> |
881 | 170 | </widget> | 301 | </widget> |
882 | 171 | 302 | ||
883 | === modified file 'File/src/Do/Do.FilesAndFolders/Configuration.cs' | |||
884 | --- File/src/Do/Do.FilesAndFolders/Configuration.cs 2009-02-13 21:34:02 +0000 | |||
885 | +++ File/src/Do/Do.FilesAndFolders/Configuration.cs 2009-02-17 10:48:05 +0000 | |||
886 | @@ -30,49 +30,86 @@ | |||
887 | 30 | [System.ComponentModel.ToolboxItem(true)] | 30 | [System.ComponentModel.ToolboxItem(true)] |
888 | 31 | public partial class Configuration : Gtk.Bin | 31 | public partial class Configuration : Gtk.Bin |
889 | 32 | { | 32 | { |
891 | 33 | PathNodeView nview; | 33 | IndexPathNodeView indexNview; |
892 | 34 | IgnorePathNodeView ignoreNview; | ||
893 | 34 | 35 | ||
894 | 36 | string indexDialog = Catalog.GetString ("Choose a folder to index"); | ||
895 | 37 | string ignoreDialog = Catalog.GetString ("Choose a folder to ignore"); | ||
896 | 38 | |||
897 | 35 | public Configuration () | 39 | public Configuration () |
899 | 36 | { | 40 | { |
900 | 37 | Build (); | 41 | Build (); |
901 | 38 | 42 | ||
904 | 39 | nview = new PathNodeView (); | 43 | indexNview = new IndexPathNodeView (); |
905 | 40 | nview.Selection.Changed += OnPathNodeViewSelectionChange; | 44 | ignoreNview = new IgnorePathNodeView (); |
906 | 45 | indexNview.Selection.Changed += OnPathNodeViewSelectionChange; | ||
907 | 46 | ignoreNview.Selection.Changed += OnPathNodeViewSelectionChange; | ||
908 | 41 | numFiles.Changed += OnNumFilesEdited; | 47 | numFiles.Changed += OnNumFilesEdited; |
910 | 42 | node_scroll.Add (nview); | 48 | |
911 | 49 | index_node_scroll.Add (indexNview); | ||
912 | 50 | ignore_node_scroll.Add (ignoreNview); | ||
913 | 43 | 51 | ||
914 | 44 | show_hidden_chk.Active = Plugin.Preferences.IncludeHiddenFiles; | 52 | show_hidden_chk.Active = Plugin.Preferences.IncludeHiddenFiles; |
915 | 45 | numFiles.Text = Plugin.Preferences.MaximumFilesIndexed.ToString (); | 53 | numFiles.Text = Plugin.Preferences.MaximumFilesIndexed.ToString (); |
920 | 46 | remove_btn.Sensitive = false; | 54 | index_remove_btn.Sensitive = false; |
921 | 47 | 55 | ignore_remove_btn.Sensitive = false; | |
922 | 48 | } | 56 | |
923 | 49 | 57 | notebook1.Page = 0; | |
924 | 58 | |||
925 | 59 | } | ||
926 | 60 | |||
927 | 61 | private PathNodeView GetCurrentView () | ||
928 | 62 | { | ||
929 | 63 | PathNodeView currentNview; | ||
930 | 64 | if (this.notebook1.CurrentPage == 0) | ||
931 | 65 | currentNview = indexNview; | ||
932 | 66 | else | ||
933 | 67 | currentNview = ignoreNview; | ||
934 | 68 | |||
935 | 69 | return currentNview; | ||
936 | 70 | } | ||
937 | 71 | |||
938 | 50 | protected virtual void OnAddBtnClicked (object sender, System.EventArgs e) | 72 | protected virtual void OnAddBtnClicked (object sender, System.EventArgs e) |
939 | 51 | { | 73 | { |
940 | 52 | FileChooserDialog chooser; | 74 | FileChooserDialog chooser; |
942 | 53 | 75 | string dialogTitle; | |
943 | 76 | bool index; | ||
944 | 77 | uint depth; | ||
945 | 78 | |||
946 | 79 | if (GetCurrentView () == indexNview) { | ||
947 | 80 | dialogTitle = indexDialog; | ||
948 | 81 | index = true; | ||
949 | 82 | depth = 1; | ||
950 | 83 | } | ||
951 | 84 | else { | ||
952 | 85 | index = false; | ||
953 | 86 | depth = 0; | ||
954 | 87 | dialogTitle = ignoreDialog; | ||
955 | 88 | } | ||
956 | 89 | |||
957 | 54 | chooser = new FileChooserDialog ( | 90 | chooser = new FileChooserDialog ( |
959 | 55 | Catalog.GetString ("Choose a folder to index"), | 91 | dialogTitle, |
960 | 56 | new Dialog (), FileChooserAction.SelectFolder, | 92 | new Dialog (), FileChooserAction.SelectFolder, |
961 | 57 | Catalog.GetString ("Cancel"), ResponseType.Cancel, | 93 | Catalog.GetString ("Cancel"), ResponseType.Cancel, |
962 | 58 | Catalog.GetString ("Choose folder"), ResponseType.Accept); | 94 | Catalog.GetString ("Choose folder"), ResponseType.Accept); |
965 | 59 | 95 | ||
964 | 60 | |||
966 | 61 | if (chooser.Run () == (int) ResponseType.Accept) { | 96 | if (chooser.Run () == (int) ResponseType.Accept) { |
969 | 62 | Plugin.FolderIndex.Add (new IndexedFolder (chooser.Filename, 1)); | 97 | if (!Plugin.FolderIndex.ContainsFolder (chooser.Filename)) |
970 | 63 | nview.Refresh (); | 98 | Plugin.FolderIndex.Add (new IndexedFolder (chooser.Filename, depth, index)); |
971 | 99 | GetCurrentView ().Refresh (); | ||
972 | 64 | } | 100 | } |
973 | 65 | chooser.Destroy (); | 101 | chooser.Destroy (); |
974 | 66 | } | 102 | } |
975 | 67 | 103 | ||
976 | 68 | protected virtual void OnRemoveBtnClicked (object sender, EventArgs e) | 104 | protected virtual void OnRemoveBtnClicked (object sender, EventArgs e) |
977 | 69 | { | 105 | { |
979 | 70 | nview.OnRemoveSelected (sender, e); | 106 | GetCurrentView ().OnRemoveSelected (sender, e); |
980 | 71 | } | 107 | } |
981 | 72 | 108 | ||
982 | 73 | protected void OnPathNodeViewSelectionChange (object sender, EventArgs e) | 109 | protected void OnPathNodeViewSelectionChange (object sender, EventArgs e) |
983 | 74 | { | 110 | { |
985 | 75 | remove_btn.Sensitive = nview.Selection.GetSelectedRows ().Any (); | 111 | index_remove_btn.Sensitive = indexNview.Selection.GetSelectedRows ().Any (); |
986 | 112 | ignore_remove_btn.Sensitive = ignoreNview.Selection.GetSelectedRows ().Any (); | ||
987 | 76 | } | 113 | } |
988 | 77 | 114 | ||
989 | 78 | protected virtual void OnShowHiddenChkClicked (object sender, EventArgs e) | 115 | protected virtual void OnShowHiddenChkClicked (object sender, EventArgs e) |
990 | @@ -85,7 +122,7 @@ | |||
991 | 85 | try { | 122 | try { |
992 | 86 | Plugin.Preferences.MaximumFilesIndexed = int.Parse (numFiles.Text); | 123 | Plugin.Preferences.MaximumFilesIndexed = int.Parse (numFiles.Text); |
993 | 87 | } | 124 | } |
995 | 88 | catch (Exception ex) { | 125 | catch { |
996 | 89 | numFiles.Text = ""; | 126 | numFiles.Text = ""; |
997 | 90 | Plugin.Preferences.MaximumFilesIndexed = 0; | 127 | Plugin.Preferences.MaximumFilesIndexed = 0; |
998 | 91 | } | 128 | } |
999 | 92 | 129 | ||
1000 | === modified file 'File/src/Do/Do.FilesAndFolders/FileItemSource.cs' | |||
1001 | --- File/src/Do/Do.FilesAndFolders/FileItemSource.cs 2009-01-18 06:04:49 +0000 | |||
1002 | +++ File/src/Do/Do.FilesAndFolders/FileItemSource.cs 2009-02-14 20:52:23 +0000 | |||
1003 | @@ -36,6 +36,7 @@ | |||
1004 | 36 | public class FileItemSource : ItemSource, IConfigurable { | 36 | public class FileItemSource : ItemSource, IConfigurable { |
1005 | 37 | 37 | ||
1006 | 38 | IEnumerable<Item> items; | 38 | IEnumerable<Item> items; |
1007 | 39 | static IEnumerable<IndexedFolder> ignored; | ||
1008 | 39 | bool maximum_files_warned; | 40 | bool maximum_files_warned; |
1009 | 40 | 41 | ||
1010 | 41 | string MaximumFilesIndexedWarning { | 42 | string MaximumFilesIndexedWarning { |
1011 | @@ -55,6 +56,7 @@ | |||
1012 | 55 | public FileItemSource () | 56 | public FileItemSource () |
1013 | 56 | { | 57 | { |
1014 | 57 | items = Enumerable.Empty<Item> (); | 58 | items = Enumerable.Empty<Item> (); |
1015 | 59 | ignored = Enumerable.Empty<IndexedFolder> (); | ||
1016 | 58 | } | 60 | } |
1017 | 59 | 61 | ||
1018 | 60 | public override IEnumerable<Item> Items { | 62 | public override IEnumerable<Item> Items { |
1019 | @@ -104,11 +106,15 @@ | |||
1020 | 104 | 106 | ||
1021 | 105 | public override void UpdateItems () | 107 | public override void UpdateItems () |
1022 | 106 | { | 108 | { |
1023 | 109 | ignored = Plugin.FolderIndex | ||
1024 | 110 | .Where (folder => !folder.Index) | ||
1025 | 111 | .ToArray (); | ||
1026 | 112 | |||
1027 | 107 | items = Plugin.FolderIndex | 113 | items = Plugin.FolderIndex |
1028 | 108 | .SelectMany (folder => RecursiveGetItems (folder.Path, folder.Level, Plugin.Preferences.IncludeHiddenFiles)) | 114 | .SelectMany (folder => RecursiveGetItems (folder.Path, folder.Level, Plugin.Preferences.IncludeHiddenFiles)) |
1029 | 109 | .Take (Plugin.Preferences.MaximumFilesIndexed) | 115 | .Take (Plugin.Preferences.MaximumFilesIndexed) |
1030 | 110 | .ToArray (); | 116 | .ToArray (); |
1032 | 111 | 117 | ||
1033 | 112 | if (!maximum_files_warned && items.Count () == Plugin.Preferences.MaximumFilesIndexed) { | 118 | if (!maximum_files_warned && items.Count () == Plugin.Preferences.MaximumFilesIndexed) { |
1034 | 113 | Log.Warn (MaximumFilesIndexedWarning); | 119 | Log.Warn (MaximumFilesIndexedWarning); |
1035 | 114 | Services.Notifications.Notify ("Do is indexing too many files.", MaximumFilesIndexedWarning); | 120 | Services.Notifications.Notify ("Do is indexing too many files.", MaximumFilesIndexedWarning); |
1036 | @@ -167,9 +173,9 @@ | |||
1037 | 167 | IEnumerable<string> files, directories, recursiveFiles; | 173 | IEnumerable<string> files, directories, recursiveFiles; |
1038 | 168 | 174 | ||
1039 | 169 | files = Directory.GetFiles (path) | 175 | files = Directory.GetFiles (path) |
1041 | 170 | .Where (filepath => ShouldIndexPath (filepath, includeHidden)); | 176 | .Where (filepath => ShouldIndexPath (filepath, includeHidden, false)); |
1042 | 171 | directories = Directory.GetDirectories (path) | 177 | directories = Directory.GetDirectories (path) |
1044 | 172 | .Where (filepath => ShouldIndexPath (filepath, includeHidden)); | 178 | .Where (filepath => ShouldIndexPath (filepath, includeHidden, true)); |
1045 | 173 | recursiveFiles = directories | 179 | recursiveFiles = directories |
1046 | 174 | .SelectMany (dir => RecursiveListFiles (dir, levels - 1, includeHidden)); | 180 | .SelectMany (dir => RecursiveListFiles (dir, levels - 1, includeHidden)); |
1047 | 175 | 181 | ||
1048 | @@ -182,11 +188,13 @@ | |||
1049 | 182 | return results; | 188 | return results; |
1050 | 183 | } | 189 | } |
1051 | 184 | 190 | ||
1053 | 185 | static bool ShouldIndexPath (string path, bool includeHidden) | 191 | static bool ShouldIndexPath (string path, bool includeHidden, bool isDirectory) |
1054 | 186 | { | 192 | { |
1055 | 187 | string filename = Path.GetFileName (path); | 193 | string filename = Path.GetFileName (path); |
1056 | 188 | bool isForbidden = filename == "." || filename == ".." || filename.EndsWith ("~"); | 194 | bool isForbidden = filename == "." || filename == ".." || filename.EndsWith ("~"); |
1057 | 189 | bool isHidden = filename.StartsWith ("."); | 195 | bool isHidden = filename.StartsWith ("."); |
1058 | 196 | if (isDirectory && ignored.Where (folder => path == folder.Path).Any ()) | ||
1059 | 197 | isForbidden = true; | ||
1060 | 190 | return !isForbidden && (includeHidden || !isHidden); | 198 | return !isForbidden && (includeHidden || !isHidden); |
1061 | 191 | } | 199 | } |
1062 | 192 | 200 | ||
1063 | 193 | 201 | ||
1064 | === modified file 'File/src/Do/Do.FilesAndFolders/IndexedFolder.cs' | |||
1065 | --- File/src/Do/Do.FilesAndFolders/IndexedFolder.cs 2009-01-14 18:43:13 +0000 | |||
1066 | +++ File/src/Do/Do.FilesAndFolders/IndexedFolder.cs 2009-02-14 20:52:23 +0000 | |||
1067 | @@ -31,18 +31,20 @@ | |||
1068 | 31 | { | 31 | { |
1069 | 32 | public string Path { get; private set; } | 32 | public string Path { get; private set; } |
1070 | 33 | public uint Level { get; private set; } | 33 | public uint Level { get; private set; } |
1071 | 34 | public bool Index { get; private set; } | ||
1072 | 34 | 35 | ||
1074 | 35 | public IndexedFolder (string path, uint level) | 36 | public IndexedFolder (string path, uint level, bool index) |
1075 | 36 | { | 37 | { |
1076 | 37 | if (path == null) throw new ArgumentNullException ("path"); | 38 | if (path == null) throw new ArgumentNullException ("path"); |
1077 | 38 | 39 | ||
1078 | 39 | Path = path.Replace ("~", Plugin.ImportantFolders.UserHome); | 40 | Path = path.Replace ("~", Plugin.ImportantFolders.UserHome); |
1079 | 40 | Level = level; | 41 | Level = level; |
1080 | 42 | Index = index; | ||
1081 | 41 | } | 43 | } |
1082 | 42 | 44 | ||
1083 | 43 | public override string ToString () | 45 | public override string ToString () |
1084 | 44 | { | 46 | { |
1086 | 45 | return string.Format ("{0} {2} {1}", GetType ().Name, Path, Level); | 47 | return string.Format ("{0} {2} {1} {3}", GetType ().Name, Path, Level, Index); |
1087 | 46 | } | 48 | } |
1088 | 47 | 49 | ||
1089 | 48 | public override bool Equals (object other) | 50 | public override bool Equals (object other) |
1090 | @@ -52,12 +54,12 @@ | |||
1091 | 52 | 54 | ||
1092 | 53 | public override int GetHashCode () | 55 | public override int GetHashCode () |
1093 | 54 | { | 56 | { |
1095 | 55 | return Path.GetHashCode () ^ Level.GetHashCode (); | 57 | return Path.GetHashCode () ^ Level.GetHashCode () ^ Index.GetHashCode (); |
1096 | 56 | } | 58 | } |
1097 | 57 | 59 | ||
1098 | 58 | public bool Equals (IndexedFolder other) | 60 | public bool Equals (IndexedFolder other) |
1099 | 59 | { | 61 | { |
1101 | 60 | return other.Path == Path && other.Level == Level; | 62 | return other.Path == Path && other.Level == Level && other.Index == Index; |
1102 | 61 | } | 63 | } |
1103 | 62 | 64 | ||
1104 | 63 | public static bool operator== (IndexedFolder left, IndexedFolder right) | 65 | public static bool operator== (IndexedFolder left, IndexedFolder right) |
1105 | 64 | 66 | ||
1106 | === modified file 'File/src/Do/Do.FilesAndFolders/IndexedFolderCollection.cs' | |||
1107 | --- File/src/Do/Do.FilesAndFolders/IndexedFolderCollection.cs 2009-01-18 20:29:57 +0000 | |||
1108 | +++ File/src/Do/Do.FilesAndFolders/IndexedFolderCollection.cs 2009-02-16 01:11:46 +0000 | |||
1109 | @@ -49,10 +49,10 @@ | |||
1110 | 49 | 49 | ||
1111 | 50 | IEnumerable<IndexedFolder> GetDefaultFolders () | 50 | IEnumerable<IndexedFolder> GetDefaultFolders () |
1112 | 51 | { | 51 | { |
1117 | 52 | yield return new IndexedFolder (Path.GetDirectoryName (Plugin.ImportantFolders.UserHome), 1); | 52 | yield return new IndexedFolder (Path.GetDirectoryName (Plugin.ImportantFolders.UserHome), 1, true); |
1118 | 53 | yield return new IndexedFolder (Plugin.ImportantFolders.UserHome, 1); | 53 | yield return new IndexedFolder (Plugin.ImportantFolders.UserHome, 1, true); |
1119 | 54 | yield return new IndexedFolder (Plugin.ImportantFolders.Desktop, 1); | 54 | yield return new IndexedFolder (Plugin.ImportantFolders.Desktop, 1, true); |
1120 | 55 | yield return new IndexedFolder (Plugin.ImportantFolders.Documents, 2); | 55 | yield return new IndexedFolder (Plugin.ImportantFolders.Documents, 2, true); |
1121 | 56 | } | 56 | } |
1122 | 57 | 57 | ||
1123 | 58 | public IndexedFolderCollection () | 58 | public IndexedFolderCollection () |
1124 | @@ -64,14 +64,16 @@ | |||
1125 | 64 | Deserialize (); | 64 | Deserialize (); |
1126 | 65 | 65 | ||
1127 | 66 | foreach (IndexedFolder folder in Folders.Values) { | 66 | foreach (IndexedFolder folder in Folders.Values) { |
1130 | 67 | if (folder.Level < LargeIndexLevel) continue; | 67 | if (folder.Level > LargeIndexLevel) |
1131 | 68 | Log.Warn (LargeIndexLevelWarning, folder.Path, folder.Level); | 68 | Log.Warn (LargeIndexLevelWarning, folder.Path, folder.Level); |
1132 | 69 | } | 69 | } |
1133 | 70 | } | 70 | } |
1134 | 71 | 71 | ||
1136 | 72 | public void UpdateIndexedFolder (string path, string newPath, uint newDepth) | 72 | public void UpdateIndexedFolder (string path, string newPath, uint newDepth, bool newIndex) |
1137 | 73 | { | 73 | { |
1139 | 74 | UpdateIndexedFolder (path, new IndexedFolder (newPath, newDepth)); | 74 | if (newDepth > LargeIndexLevel) |
1140 | 75 | Log.Warn (LargeIndexLevelWarning, newPath, newDepth); | ||
1141 | 76 | UpdateIndexedFolder (path, new IndexedFolder (newPath, newDepth, newIndex)); | ||
1142 | 75 | } | 77 | } |
1143 | 76 | 78 | ||
1144 | 77 | public void UpdateIndexedFolder (string path, IndexedFolder folder) | 79 | public void UpdateIndexedFolder (string path, IndexedFolder folder) |
1145 | @@ -87,6 +89,11 @@ | |||
1146 | 87 | if (!Folders.ContainsKey (path)) return; | 89 | if (!Folders.ContainsKey (path)) return; |
1147 | 88 | Remove (Folders [path]); | 90 | Remove (Folders [path]); |
1148 | 89 | } | 91 | } |
1149 | 92 | |||
1150 | 93 | public bool ContainsFolder (string path) | ||
1151 | 94 | { | ||
1152 | 95 | return Folders.ContainsKey (path); | ||
1153 | 96 | } | ||
1154 | 90 | 97 | ||
1155 | 91 | #region ICollection<IndexedFolder> | 98 | #region ICollection<IndexedFolder> |
1156 | 92 | 99 | ||
1157 | 93 | 100 | ||
1158 | === modified file 'File/src/Do/Do.FilesAndFolders/RecentFileItemSource.cs' | |||
1159 | --- File/src/Do/Do.FilesAndFolders/RecentFileItemSource.cs 2008-12-23 23:42:53 +0000 | |||
1160 | +++ File/src/Do/Do.FilesAndFolders/RecentFileItemSource.cs 2009-02-14 20:52:23 +0000 | |||
1161 | @@ -53,10 +53,14 @@ | |||
1162 | 53 | 53 | ||
1163 | 54 | IEnumerable<IFileItem> GetRecentFiles () | 54 | IEnumerable<IFileItem> GetRecentFiles () |
1164 | 55 | { | 55 | { |
1169 | 56 | // These lines always cause mono to blow up: | 56 | /* |
1170 | 57 | //foreach (RecentInfo info in RecentManager.Default.Items) { | 57 | These lines always cause mono to blow up: |
1171 | 58 | // yield return UniverseFactory.NewFileItem (info.Uri); | 58 | |
1172 | 59 | //} | 59 | foreach (Gtk.RecentInfo info in Gtk.RecentManager.Default.Items) { |
1173 | 60 | Console.WriteLine(info); | ||
1174 | 61 | yield return Services.UniverseFactory.NewFileItem (info.Uri); | ||
1175 | 62 | } | ||
1176 | 63 | */ | ||
1177 | 60 | return Enumerable.Empty<IFileItem> (); | 64 | return Enumerable.Empty<IFileItem> (); |
1178 | 61 | } | 65 | } |
1179 | 62 | 66 | ||
1180 | 63 | 67 | ||
1181 | === added file 'File/src/IgnorePathNodeView.cs' | |||
1182 | --- File/src/IgnorePathNodeView.cs 1970-01-01 00:00:00 +0000 | |||
1183 | +++ File/src/IgnorePathNodeView.cs 2009-02-17 10:48:05 +0000 | |||
1184 | @@ -0,0 +1,74 @@ | |||
1185 | 1 | /* IgnorePathNodeView.cs | ||
1186 | 2 | * | ||
1187 | 3 | * GNOME Do is the legal property of its developers. Please refer to the | ||
1188 | 4 | * COPYRIGHT file distributed with this | ||
1189 | 5 | * source distribution. | ||
1190 | 6 | * | ||
1191 | 7 | * This program is free software: you can redistribute it and/or modify | ||
1192 | 8 | * it under the terms of the GNU General Public License as published by | ||
1193 | 9 | * the Free Software Foundation, either version 3 of the License, or | ||
1194 | 10 | * (at your option) any later version. | ||
1195 | 11 | * | ||
1196 | 12 | * This program is distributed in the hope that it will be useful, | ||
1197 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1198 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1199 | 15 | * GNU General Public License for more details. | ||
1200 | 16 | * | ||
1201 | 17 | * You should have received a copy of the GNU General Public License | ||
1202 | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1203 | 19 | */ | ||
1204 | 20 | |||
1205 | 21 | using System; | ||
1206 | 22 | using Mono.Unix; | ||
1207 | 23 | |||
1208 | 24 | using Gtk; | ||
1209 | 25 | |||
1210 | 26 | namespace Do.FilesAndFolders | ||
1211 | 27 | { | ||
1212 | 28 | |||
1213 | 29 | // TODO: update this class to use spin buttons, | ||
1214 | 30 | public class IgnorePathNodeView : PathNodeView | ||
1215 | 31 | { | ||
1216 | 32 | public enum Column { | ||
1217 | 33 | Path = 0, | ||
1218 | 34 | Index, | ||
1219 | 35 | NumColumns | ||
1220 | 36 | } | ||
1221 | 37 | |||
1222 | 38 | public IgnorePathNodeView () : base () | ||
1223 | 39 | { | ||
1224 | 40 | CellRenderer cell; | ||
1225 | 41 | RulesHint = true; | ||
1226 | 42 | HeadersVisible = true; | ||
1227 | 43 | |||
1228 | 44 | Model = new ListStore (typeof (string), typeof (bool)); | ||
1229 | 45 | |||
1230 | 46 | cell = new CellRendererText (); | ||
1231 | 47 | (cell as CellRendererText).Width = 310; | ||
1232 | 48 | (cell as CellRendererText).Ellipsize = Pango.EllipsizeMode.Middle; | ||
1233 | 49 | AppendColumn (Catalog.GetString ("Folder"), cell, "text", Column.Path); | ||
1234 | 50 | |||
1235 | 51 | Refresh (); | ||
1236 | 52 | } | ||
1237 | 53 | |||
1238 | 54 | public override void Refresh () | ||
1239 | 55 | { | ||
1240 | 56 | ListStore store = Model as ListStore; | ||
1241 | 57 | //try to keep the currently selected row across refreshes | ||
1242 | 58 | Gtk.TreePath selected = null; | ||
1243 | 59 | try { | ||
1244 | 60 | selected = this.Selection.GetSelectedRows ()[0]; | ||
1245 | 61 | } | ||
1246 | 62 | catch { } | ||
1247 | 63 | finally { | ||
1248 | 64 | store.Clear (); | ||
1249 | 65 | foreach (IndexedFolder pair in Plugin.FolderIndex) { | ||
1250 | 66 | if (!pair.Index) | ||
1251 | 67 | store.AppendValues (pair.Path, pair.Index); | ||
1252 | 68 | } | ||
1253 | 69 | if (selected != null) | ||
1254 | 70 | this.Selection.SelectPath (selected); | ||
1255 | 71 | } | ||
1256 | 72 | } | ||
1257 | 73 | } | ||
1258 | 74 | } | ||
1259 | 0 | \ No newline at end of file | 75 | \ No newline at end of file |
1260 | 1 | 76 | ||
1261 | === added file 'File/src/IndexPathNodeView.cs' | |||
1262 | --- File/src/IndexPathNodeView.cs 1970-01-01 00:00:00 +0000 | |||
1263 | +++ File/src/IndexPathNodeView.cs 2009-02-17 10:48:05 +0000 | |||
1264 | @@ -0,0 +1,97 @@ | |||
1265 | 1 | /* IndexPathNodeView.cs | ||
1266 | 2 | * | ||
1267 | 3 | * GNOME Do is the legal property of its developers. Please refer to the | ||
1268 | 4 | * COPYRIGHT file distributed with this | ||
1269 | 5 | * source distribution. | ||
1270 | 6 | * | ||
1271 | 7 | * This program is free software: you can redistribute it and/or modify | ||
1272 | 8 | * it under the terms of the GNU General Public License as published by | ||
1273 | 9 | * the Free Software Foundation, either version 3 of the License, or | ||
1274 | 10 | * (at your option) any later version. | ||
1275 | 11 | * | ||
1276 | 12 | * This program is distributed in the hope that it will be useful, | ||
1277 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1278 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1279 | 15 | * GNU General Public License for more details. | ||
1280 | 16 | * | ||
1281 | 17 | * You should have received a copy of the GNU General Public License | ||
1282 | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1283 | 19 | */ | ||
1284 | 20 | |||
1285 | 21 | using System; | ||
1286 | 22 | using Mono.Unix; | ||
1287 | 23 | |||
1288 | 24 | using Gtk; | ||
1289 | 25 | |||
1290 | 26 | namespace Do.FilesAndFolders | ||
1291 | 27 | { | ||
1292 | 28 | |||
1293 | 29 | // TODO: update this class to use spin buttons, | ||
1294 | 30 | public class IndexPathNodeView : PathNodeView | ||
1295 | 31 | { | ||
1296 | 32 | public enum Column { | ||
1297 | 33 | Path = 0, | ||
1298 | 34 | Depth, | ||
1299 | 35 | NumColumns | ||
1300 | 36 | } | ||
1301 | 37 | |||
1302 | 38 | public IndexPathNodeView () : base () | ||
1303 | 39 | { | ||
1304 | 40 | CellRenderer cell; | ||
1305 | 41 | RulesHint = true; | ||
1306 | 42 | HeadersVisible = true; | ||
1307 | 43 | |||
1308 | 44 | Model = new ListStore (typeof (string), typeof (uint)); | ||
1309 | 45 | |||
1310 | 46 | cell = new CellRendererText (); | ||
1311 | 47 | (cell as CellRendererText).Width = 310; | ||
1312 | 48 | (cell as CellRendererText).Ellipsize = Pango.EllipsizeMode.Middle; | ||
1313 | 49 | AppendColumn (Catalog.GetString ("Folder"), cell, "text", Column.Path); | ||
1314 | 50 | |||
1315 | 51 | cell = new CellRendererText (); | ||
1316 | 52 | (cell as CellRendererText).Editable = true; | ||
1317 | 53 | (cell as CellRendererText).Edited += OnDepthEdited; | ||
1318 | 54 | (cell as CellRendererText).Alignment = Pango.Alignment.Right; | ||
1319 | 55 | AppendColumn (Catalog.GetString ("Depth"), cell, "text", Column.Depth); | ||
1320 | 56 | |||
1321 | 57 | Refresh (); | ||
1322 | 58 | } | ||
1323 | 59 | |||
1324 | 60 | public override void Refresh () | ||
1325 | 61 | { | ||
1326 | 62 | ListStore store = Model as ListStore; | ||
1327 | 63 | //try to keep the currently selected row across refreshes | ||
1328 | 64 | Gtk.TreePath selected = null; | ||
1329 | 65 | try { | ||
1330 | 66 | selected = this.Selection.GetSelectedRows ()[0]; | ||
1331 | 67 | } | ||
1332 | 68 | catch { } | ||
1333 | 69 | finally { | ||
1334 | 70 | store.Clear (); | ||
1335 | 71 | foreach (IndexedFolder pair in Plugin.FolderIndex) { | ||
1336 | 72 | if (pair.Index) | ||
1337 | 73 | store.AppendValues ( pair.Path, pair.Level); | ||
1338 | 74 | } | ||
1339 | 75 | if (selected != null) | ||
1340 | 76 | this.Selection.SelectPath (selected); | ||
1341 | 77 | } | ||
1342 | 78 | } | ||
1343 | 79 | |||
1344 | 80 | public void OnDepthEdited (object o, EditedArgs e) | ||
1345 | 81 | { | ||
1346 | 82 | uint depth; | ||
1347 | 83 | string path; | ||
1348 | 84 | TreeIter iter; | ||
1349 | 85 | ListStore store; | ||
1350 | 86 | |||
1351 | 87 | store = Model as ListStore; | ||
1352 | 88 | store.GetIter (out iter, new TreePath (e.Path)); | ||
1353 | 89 | |||
1354 | 90 | path = store.GetValue (iter, (int) Column.Path) as string; | ||
1355 | 91 | depth = uint.Parse (e.NewText); | ||
1356 | 92 | Plugin.FolderIndex.UpdateIndexedFolder (path, path, depth, true); | ||
1357 | 93 | |||
1358 | 94 | Refresh (); | ||
1359 | 95 | } | ||
1360 | 96 | } | ||
1361 | 97 | } | ||
1362 | 0 | \ No newline at end of file | 98 | \ No newline at end of file |
1363 | 1 | 99 | ||
1364 | === modified file 'File/src/PathNodeView.cs' | |||
1365 | --- File/src/PathNodeView.cs 2009-01-14 19:27:04 +0000 | |||
1366 | +++ File/src/PathNodeView.cs 2009-02-16 01:11:46 +0000 | |||
1367 | @@ -19,8 +19,6 @@ | |||
1368 | 19 | */ | 19 | */ |
1369 | 20 | 20 | ||
1370 | 21 | using System; | 21 | using System; |
1371 | 22 | using System.IO; | ||
1372 | 23 | |||
1373 | 24 | using Mono.Unix; | 22 | using Mono.Unix; |
1374 | 25 | 23 | ||
1375 | 26 | using Gtk; | 24 | using Gtk; |
1376 | @@ -29,61 +27,17 @@ | |||
1377 | 29 | { | 27 | { |
1378 | 30 | 28 | ||
1379 | 31 | // TODO: update this class to use spin buttons, | 29 | // TODO: update this class to use spin buttons, |
1381 | 32 | public class PathNodeView : NodeView | 30 | public abstract class PathNodeView : NodeView |
1382 | 33 | { | 31 | { |
1388 | 34 | enum Column { | 32 | |
1384 | 35 | Path = 0, | ||
1385 | 36 | Depth, | ||
1386 | 37 | NumColumns | ||
1387 | 38 | } | ||
1389 | 39 | 33 | ||
1390 | 40 | public PathNodeView () : base () | 34 | public PathNodeView () : base () |
1391 | 41 | { | 35 | { |
1437 | 42 | CellRenderer cell; | 36 | } |
1438 | 43 | RulesHint = true; | 37 | |
1439 | 44 | HeadersVisible = true; | 38 | public abstract void Refresh (); |
1440 | 45 | 39 | ||
1441 | 46 | Model = new ListStore (typeof (string), typeof (uint)); | 40 | public virtual void OnRemoveSelected (object sender, EventArgs e) |
1397 | 47 | |||
1398 | 48 | cell = new CellRendererText (); | ||
1399 | 49 | (cell as CellRendererText).Width = 310; | ||
1400 | 50 | (cell as CellRendererText).Ellipsize = Pango.EllipsizeMode.Middle; | ||
1401 | 51 | AppendColumn (Catalog.GetString ("Folder"), cell, "text", Column.Path); | ||
1402 | 52 | |||
1403 | 53 | cell = new CellRendererText (); | ||
1404 | 54 | (cell as CellRendererText).Editable = true; | ||
1405 | 55 | (cell as CellRendererText).Edited += OnDepthEdited; | ||
1406 | 56 | (cell as CellRendererText).Alignment = Pango.Alignment.Right; | ||
1407 | 57 | AppendColumn (Catalog.GetString ("Depth"), cell, "text", Column.Depth); | ||
1408 | 58 | |||
1409 | 59 | Refresh (); | ||
1410 | 60 | } | ||
1411 | 61 | |||
1412 | 62 | public void Refresh () | ||
1413 | 63 | { | ||
1414 | 64 | ListStore store = Model as ListStore; | ||
1415 | 65 | store.Clear (); | ||
1416 | 66 | foreach (IndexedFolder pair in Plugin.FolderIndex) | ||
1417 | 67 | store.AppendValues (pair.Path, pair.Level); | ||
1418 | 68 | } | ||
1419 | 69 | |||
1420 | 70 | void OnDepthEdited (object o, EditedArgs e) | ||
1421 | 71 | { | ||
1422 | 72 | uint depth; | ||
1423 | 73 | string path; | ||
1424 | 74 | TreeIter iter; | ||
1425 | 75 | ListStore store; | ||
1426 | 76 | |||
1427 | 77 | store = Model as ListStore; | ||
1428 | 78 | store.GetIter (out iter, new TreePath (e.Path)); | ||
1429 | 79 | path = store.GetValue (iter, (int)Column.Path) as string; | ||
1430 | 80 | depth = uint.Parse (e.NewText); | ||
1431 | 81 | Plugin.FolderIndex.UpdateIndexedFolder (path, path, depth); | ||
1432 | 82 | |||
1433 | 83 | Refresh (); | ||
1434 | 84 | } | ||
1435 | 85 | |||
1436 | 86 | public void OnRemoveSelected (object sender, EventArgs e) | ||
1442 | 87 | { | 41 | { |
1443 | 88 | string path; | 42 | string path; |
1444 | 89 | TreeIter iter; | 43 | TreeIter iter; |
1445 | @@ -91,7 +45,7 @@ | |||
1446 | 91 | 45 | ||
1447 | 92 | store = Model as ListStore; | 46 | store = Model as ListStore; |
1448 | 93 | Selection.GetSelected (out iter); | 47 | Selection.GetSelected (out iter); |
1450 | 94 | path = store.GetValue (iter, (int)Column.Path) as string; | 48 | path = store.GetValue (iter, 0) as string; |
1451 | 95 | Plugin.FolderIndex.RemoveIndexedFolder (path); | 49 | Plugin.FolderIndex.RemoveIndexedFolder (path); |
1452 | 96 | store.Remove (ref iter); | 50 | store.Remove (ref iter); |
1453 | 97 | 51 |
The nodeview can be abstracted further, the Refresh methods are almost identical, that should be a red flag for you to get rid of that duplicated code. Should be easy to do.
I think you should make RecursiveListFiles take a new IEnumerable parameter of files to ignore instead of keeping a heap variable of ignored paths, just keep it on the stack. Load it in UpdateItems, and then pass it in. The way you're doing it now requires you to keep a static variable on the heap, and also it looks like it will prevent files marked as ignored from showing up when exploring child items via the arrow keys.