transmission-rss 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,93 +0,0 @@
1
- # http://www.lakeinfoworks.com/blog/wp-content/listbox.rb
2
- class TransmissionRSS::ListBox < Gtk::ScrolledWindow
3
- def initialize
4
- super
5
-
6
- tbl = Gtk::Table.new(2, 2, false)
7
-
8
- self.hscrollbar_policy = Gtk::PolicyType::AUTOMATIC
9
- self.vscrollbar_policy = Gtk::PolicyType::AUTOMATIC
10
- self.shadow_type = Gtk::ShadowType::NONE
11
- self.window_placement= Gtk::CornerType::TOP_LEFT
12
-
13
- @renderer = Gtk::CellRendererText.new
14
-
15
- # @renderer.set_property('background', 'lavender')
16
- @renderer.set_property('background', 'white')
17
- @renderer.set_property('foreground', 'black')
18
-
19
- @list_store = Gtk::ListStore.new(String)
20
- @tree_view = Gtk::TreeView.new(@list_store)
21
-
22
- @tree_view_col1 = Gtk::TreeViewColumn.new('', @renderer, { :text => 0 })
23
- @tree_view_col1.sizing = Gtk::TreeViewColumn::AUTOSIZE
24
-
25
- @text_col = 0
26
-
27
- @tree_view.append_column(@tree_view_col1)
28
- @tree_view.headers_visible = false
29
- @tree_view.selection.mode = Gtk::SELECTION_SINGLE
30
-
31
- tbl.attach_defaults(@tree_view, 0, 2, 0, 2)
32
-
33
- self.add_with_viewport(tbl)
34
- end
35
-
36
- def add(*args)
37
- args.flatten.each do |arg|
38
- iter = @list_store.append
39
- iter.set_value(0, arg.to_s)
40
- end
41
- end
42
-
43
- def button_release(widget, event, type = 'text')
44
- path, column, cell_x, cell_y = @tree_view.get_path_at_pos(event.x, event.y)
45
-
46
- return('') if(column.nil?)
47
-
48
- entry = case(type)
49
- when 'line_nbr'
50
- path
51
- when 'text'
52
- @tree_view.selection.selected[@tree_view.columns.index(column)]
53
- end
54
-
55
- return(entry)
56
- end
57
-
58
- def clear
59
- @list_store.clear
60
- end
61
-
62
- def header=(string)
63
- @tree_view.headers_visible = true
64
- @tree_view_col1.title = string
65
- end
66
-
67
- # TODO produces Gtk-CRITICAL
68
- def remove(*args)
69
- args.each do |arg|
70
- iter = @list_store.iter_first
71
-
72
- begin
73
- if(iter.get_value(0) == arg)
74
- @list_store.remove(iter)
75
- end
76
- end while(iter.next!)
77
- end
78
- end
79
-
80
- def items
81
- array = []
82
-
83
- iter = @list_store.iter_first
84
-
85
- if(not iter.nil?)
86
- begin
87
- array << iter.get_value(0)
88
- end while(iter.next!)
89
- end
90
-
91
- array
92
- end
93
- end
@@ -1,516 +0,0 @@
1
- <?xml version="1.0"?>
2
- <glade-interface>
3
- <!-- interface-requires gtk+ 2.16 -->
4
- <!-- interface-naming-policy project-wide -->
5
- <widget class="GtkWindow" id="window1">
6
- <property name="width_request">550</property>
7
- <property name="height_request">250</property>
8
- <property name="visible">True</property>
9
- <child>
10
- <widget class="GtkVBox" id="vbox1">
11
- <property name="visible">True</property>
12
- <property name="orientation">vertical</property>
13
- <child>
14
- <widget class="GtkMenuBar" id="menubar1">
15
- <property name="visible">True</property>
16
- <child>
17
- <widget class="GtkMenuItem" id="menuitem1">
18
- <property name="visible">True</property>
19
- <property name="label" translatable="yes">_Datei</property>
20
- <property name="use_underline">True</property>
21
- <child>
22
- <widget class="GtkMenu" id="menu1">
23
- <property name="visible">True</property>
24
- <child>
25
- <widget class="GtkImageMenuItem" id="imagemenuitem1">
26
- <property name="label">gtk-new</property>
27
- <property name="visible">True</property>
28
- <property name="use_underline">True</property>
29
- <property name="use_stock">True</property>
30
- <signal name="activate" handler="on_menu_new"/>
31
- </widget>
32
- </child>
33
- <child>
34
- <widget class="GtkImageMenuItem" id="imagemenuitem2">
35
- <property name="label">gtk-open</property>
36
- <property name="visible">True</property>
37
- <property name="use_underline">True</property>
38
- <property name="use_stock">True</property>
39
- <signal name="activate" handler="on_menu_open"/>
40
- </widget>
41
- </child>
42
- <child>
43
- <widget class="GtkImageMenuItem" id="imagemenuitem3">
44
- <property name="label">gtk-save</property>
45
- <property name="visible">True</property>
46
- <property name="use_underline">True</property>
47
- <property name="use_stock">True</property>
48
- <signal name="activate" handler="on_menu_save"/>
49
- </widget>
50
- </child>
51
- <child>
52
- <widget class="GtkImageMenuItem" id="imagemenuitem4">
53
- <property name="label">gtk-save-as</property>
54
- <property name="visible">True</property>
55
- <property name="use_underline">True</property>
56
- <property name="use_stock">True</property>
57
- <signal name="activate" handler="on_menu_save_as"/>
58
- </widget>
59
- </child>
60
- <child>
61
- <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
62
- <property name="visible">True</property>
63
- </widget>
64
- </child>
65
- <child>
66
- <widget class="GtkImageMenuItem" id="imagemenuitem5">
67
- <property name="label">gtk-quit</property>
68
- <property name="visible">True</property>
69
- <property name="use_underline">True</property>
70
- <property name="use_stock">True</property>
71
- <signal name="activate" handler="on_menu_quit"/>
72
- </widget>
73
- </child>
74
- </widget>
75
- </child>
76
- </widget>
77
- </child>
78
- <child>
79
- <widget class="GtkMenuItem" id="menuitem3">
80
- <property name="visible">True</property>
81
- <property name="label" translatable="yes">_Hilfe</property>
82
- <property name="use_underline">True</property>
83
- <child>
84
- <widget class="GtkMenu" id="menu3">
85
- <property name="visible">True</property>
86
- <child>
87
- <widget class="GtkImageMenuItem" id="imagemenuitem10">
88
- <property name="label">gtk-about</property>
89
- <property name="visible">True</property>
90
- <property name="use_underline">True</property>
91
- <property name="use_stock">True</property>
92
- <signal name="activate" handler="on_menu_about"/>
93
- </widget>
94
- </child>
95
- </widget>
96
- </child>
97
- </widget>
98
- </child>
99
- </widget>
100
- <packing>
101
- <property name="expand">False</property>
102
- <property name="position">0</property>
103
- </packing>
104
- </child>
105
- <child>
106
- <widget class="GtkNotebook" id="notebook1">
107
- <property name="visible">True</property>
108
- <property name="can_focus">True</property>
109
- <property name="tab_pos">left</property>
110
- <child>
111
- <widget class="GtkAlignment" id="alignment1">
112
- <property name="visible">True</property>
113
- <property name="top_padding">5</property>
114
- <property name="bottom_padding">5</property>
115
- <property name="left_padding">5</property>
116
- <property name="right_padding">5</property>
117
- <child>
118
- <widget class="GtkTable" id="table1">
119
- <property name="visible">True</property>
120
- <property name="n_rows">2</property>
121
- <property name="n_columns">2</property>
122
- <property name="row_spacing">5</property>
123
- <child>
124
- <widget class="GtkLabel" id="label4">
125
- <property name="visible">True</property>
126
- <property name="xalign">0</property>
127
- <property name="label" translatable="yes">Host</property>
128
- </widget>
129
- <packing>
130
- <property name="y_options">GTK_FILL</property>
131
- </packing>
132
- </child>
133
- <child>
134
- <widget class="GtkLabel" id="label5">
135
- <property name="visible">True</property>
136
- <property name="xalign">0</property>
137
- <property name="label" translatable="yes">Port</property>
138
- </widget>
139
- <packing>
140
- <property name="top_attach">1</property>
141
- <property name="bottom_attach">2</property>
142
- <property name="y_options">GTK_FILL</property>
143
- </packing>
144
- </child>
145
- <child>
146
- <widget class="GtkEntry" id="entry_server_host">
147
- <property name="visible">True</property>
148
- <property name="can_focus">True</property>
149
- <property name="invisible_char">&#x25CF;</property>
150
- </widget>
151
- <packing>
152
- <property name="left_attach">1</property>
153
- <property name="right_attach">2</property>
154
- <property name="y_options">GTK_FILL</property>
155
- </packing>
156
- </child>
157
- <child>
158
- <widget class="GtkEntry" id="entry_server_port">
159
- <property name="visible">True</property>
160
- <property name="can_focus">True</property>
161
- <property name="invisible_char">&#x25CF;</property>
162
- </widget>
163
- <packing>
164
- <property name="left_attach">1</property>
165
- <property name="right_attach">2</property>
166
- <property name="top_attach">1</property>
167
- <property name="bottom_attach">2</property>
168
- <property name="y_options">GTK_FILL</property>
169
- </packing>
170
- </child>
171
- </widget>
172
- </child>
173
- </widget>
174
- </child>
175
- <child>
176
- <widget class="GtkLabel" id="label1">
177
- <property name="visible">True</property>
178
- <property name="label" translatable="yes">_Server</property>
179
- <property name="use_underline">True</property>
180
- </widget>
181
- <packing>
182
- <property name="tab_fill">False</property>
183
- <property name="type">tab</property>
184
- </packing>
185
- </child>
186
- <child>
187
- <widget class="GtkAlignment" id="alignment2">
188
- <property name="visible">True</property>
189
- <property name="top_padding">5</property>
190
- <property name="bottom_padding">5</property>
191
- <property name="left_padding">5</property>
192
- <property name="right_padding">5</property>
193
- <child>
194
- <widget class="GtkVBox" id="vbox2">
195
- <property name="visible">True</property>
196
- <property name="orientation">vertical</property>
197
- <property name="spacing">5</property>
198
- <child>
199
- <placeholder/>
200
- </child>
201
- <child>
202
- <widget class="GtkHBox" id="hbox2">
203
- <property name="visible">True</property>
204
- <child>
205
- <widget class="GtkEntry" id="entry_feed_url">
206
- <property name="visible">True</property>
207
- <property name="can_focus">True</property>
208
- <property name="invisible_char">&#x25CF;</property>
209
- </widget>
210
- <packing>
211
- <property name="padding">5</property>
212
- <property name="position">0</property>
213
- </packing>
214
- </child>
215
- <child>
216
- <widget class="GtkButton" id="button1">
217
- <property name="label" translatable="yes">+</property>
218
- <property name="width_request">25</property>
219
- <property name="visible">True</property>
220
- <property name="can_focus">True</property>
221
- <property name="can_default">True</property>
222
- <property name="has_default">True</property>
223
- <property name="receives_default">True</property>
224
- <property name="use_underline">True</property>
225
- <signal name="clicked" handler="on_button_add_feed"/>
226
- </widget>
227
- <packing>
228
- <property name="expand">False</property>
229
- <property name="position">1</property>
230
- </packing>
231
- </child>
232
- <child>
233
- <widget class="GtkButton" id="button2">
234
- <property name="label" translatable="yes">-</property>
235
- <property name="width_request">25</property>
236
- <property name="visible">True</property>
237
- <property name="can_focus">True</property>
238
- <property name="can_default">True</property>
239
- <property name="receives_default">True</property>
240
- <signal name="clicked" handler="on_button_remove_feed"/>
241
- </widget>
242
- <packing>
243
- <property name="expand">False</property>
244
- <property name="fill">False</property>
245
- <property name="position">2</property>
246
- </packing>
247
- </child>
248
- </widget>
249
- <packing>
250
- <property name="expand">False</property>
251
- <property name="pack_type">end</property>
252
- <property name="position">1</property>
253
- </packing>
254
- </child>
255
- </widget>
256
- </child>
257
- </widget>
258
- <packing>
259
- <property name="position">1</property>
260
- </packing>
261
- </child>
262
- <child>
263
- <widget class="GtkLabel" id="label2">
264
- <property name="visible">True</property>
265
- <property name="label" translatable="yes">_Feeds</property>
266
- <property name="use_underline">True</property>
267
- </widget>
268
- <packing>
269
- <property name="position">1</property>
270
- <property name="tab_fill">False</property>
271
- <property name="type">tab</property>
272
- </packing>
273
- </child>
274
- <child>
275
- <widget class="GtkAlignment" id="alignment3">
276
- <property name="visible">True</property>
277
- <property name="top_padding">5</property>
278
- <property name="bottom_padding">5</property>
279
- <property name="left_padding">5</property>
280
- <property name="right_padding">5</property>
281
- <child>
282
- <widget class="GtkVBox" id="vbox5">
283
- <property name="visible">True</property>
284
- <property name="orientation">vertical</property>
285
- <property name="spacing">15</property>
286
- <child>
287
- <widget class="GtkTable" id="table2">
288
- <property name="visible">True</property>
289
- <property name="n_rows">3</property>
290
- <property name="n_columns">2</property>
291
- <property name="row_spacing">15</property>
292
- <child>
293
- <widget class="GtkLabel" id="label7">
294
- <property name="visible">True</property>
295
- <property name="xalign">0</property>
296
- <property name="label" translatable="yes">Update interval (s)</property>
297
- </widget>
298
- </child>
299
- <child>
300
- <widget class="GtkEntry" id="entry_update_interval">
301
- <property name="visible">True</property>
302
- <property name="can_focus">True</property>
303
- <property name="invisible_char">&#x25CF;</property>
304
- <property name="width_chars">5</property>
305
- </widget>
306
- <packing>
307
- <property name="left_attach">1</property>
308
- <property name="right_attach">2</property>
309
- </packing>
310
- </child>
311
- <child>
312
- <widget class="GtkLabel" id="label6">
313
- <property name="visible">True</property>
314
- <property name="xalign">0</property>
315
- <property name="label" translatable="yes">Logging mode</property>
316
- </widget>
317
- <packing>
318
- <property name="top_attach">1</property>
319
- <property name="bottom_attach">2</property>
320
- </packing>
321
- </child>
322
- <child>
323
- <widget class="GtkComboBox" id="combobox_logtype">
324
- <property name="visible">True</property>
325
- <property name="items" translatable="yes">STDERR
326
- File</property>
327
- <signal name="changed" handler="on_combobox_logtype_changed"/>
328
- </widget>
329
- <packing>
330
- <property name="left_attach">1</property>
331
- <property name="right_attach">2</property>
332
- <property name="top_attach">1</property>
333
- <property name="bottom_attach">2</property>
334
- </packing>
335
- </child>
336
- <child>
337
- <widget class="GtkLabel" id="label10">
338
- <property name="visible">True</property>
339
- <property name="xalign">0</property>
340
- <property name="label" translatable="yes"> Logging file path</property>
341
- </widget>
342
- <packing>
343
- <property name="top_attach">2</property>
344
- <property name="bottom_attach">3</property>
345
- </packing>
346
- </child>
347
- <child>
348
- <widget class="GtkEntry" id="entry_log_filepath">
349
- <property name="visible">True</property>
350
- <property name="can_focus">True</property>
351
- <property name="invisible_char">&#x25CF;</property>
352
- </widget>
353
- <packing>
354
- <property name="left_attach">1</property>
355
- <property name="right_attach">2</property>
356
- <property name="top_attach">2</property>
357
- <property name="bottom_attach">3</property>
358
- </packing>
359
- </child>
360
- </widget>
361
- <packing>
362
- <property name="expand">False</property>
363
- <property name="position">0</property>
364
- </packing>
365
- </child>
366
- <child>
367
- <widget class="GtkCheckButton" id="checkbutton_add_paused">
368
- <property name="label" translatable="yes">Do not start torrents when added</property>
369
- <property name="visible">True</property>
370
- <property name="can_focus">True</property>
371
- <property name="receives_default">False</property>
372
- <property name="draw_indicator">True</property>
373
- </widget>
374
- <packing>
375
- <property name="expand">False</property>
376
- <property name="position">1</property>
377
- </packing>
378
- </child>
379
- </widget>
380
- </child>
381
- </widget>
382
- <packing>
383
- <property name="position">2</property>
384
- </packing>
385
- </child>
386
- <child>
387
- <widget class="GtkLabel" id="label3">
388
- <property name="visible">True</property>
389
- <property name="label" translatable="yes">_Options</property>
390
- <property name="use_underline">True</property>
391
- </widget>
392
- <packing>
393
- <property name="position">2</property>
394
- <property name="tab_fill">False</property>
395
- <property name="type">tab</property>
396
- </packing>
397
- </child>
398
- <child>
399
- <widget class="GtkAlignment" id="alignment4">
400
- <property name="visible">True</property>
401
- <property name="top_padding">5</property>
402
- <property name="bottom_padding">5</property>
403
- <property name="left_padding">5</property>
404
- <property name="right_padding">5</property>
405
- <child>
406
- <widget class="GtkVBox" id="vbox3">
407
- <property name="visible">True</property>
408
- <property name="orientation">vertical</property>
409
- <property name="spacing">15</property>
410
- <child>
411
- <widget class="GtkCheckButton" id="checkbutton_drop_privileges">
412
- <property name="label" translatable="yes">Drop privileges after startup</property>
413
- <property name="visible">True</property>
414
- <property name="can_focus">True</property>
415
- <property name="receives_default">False</property>
416
- <property name="draw_indicator">True</property>
417
- <signal name="toggled" handler="on_checkbutton_drop_privileges_toggled"/>
418
- </widget>
419
- <packing>
420
- <property name="expand">False</property>
421
- <property name="position">0</property>
422
- </packing>
423
- </child>
424
- <child>
425
- <widget class="GtkTable" id="table5">
426
- <property name="visible">True</property>
427
- <property name="n_rows">2</property>
428
- <property name="n_columns">2</property>
429
- <property name="row_spacing">15</property>
430
- <child>
431
- <widget class="GtkLabel" id="label15">
432
- <property name="visible">True</property>
433
- <property name="xalign">0</property>
434
- <property name="label" translatable="yes"> User</property>
435
- </widget>
436
- </child>
437
- <child>
438
- <widget class="GtkEntry" id="entry_drop_privileges_user">
439
- <property name="visible">True</property>
440
- <property name="can_focus">True</property>
441
- <property name="invisible_char">&#x25CF;</property>
442
- <property name="width_chars">5</property>
443
- </widget>
444
- <packing>
445
- <property name="left_attach">1</property>
446
- <property name="right_attach">2</property>
447
- </packing>
448
- </child>
449
- <child>
450
- <widget class="GtkLabel" id="label16">
451
- <property name="visible">True</property>
452
- <property name="xalign">0</property>
453
- <property name="label" translatable="yes"> Group</property>
454
- </widget>
455
- <packing>
456
- <property name="top_attach">1</property>
457
- <property name="bottom_attach">2</property>
458
- </packing>
459
- </child>
460
- <child>
461
- <widget class="GtkEntry" id="entry_drop_privileges_group">
462
- <property name="visible">True</property>
463
- <property name="can_focus">True</property>
464
- <property name="invisible_char">&#x25CF;</property>
465
- </widget>
466
- <packing>
467
- <property name="left_attach">1</property>
468
- <property name="right_attach">2</property>
469
- <property name="top_attach">1</property>
470
- <property name="bottom_attach">2</property>
471
- </packing>
472
- </child>
473
- </widget>
474
- <packing>
475
- <property name="expand">False</property>
476
- <property name="position">1</property>
477
- </packing>
478
- </child>
479
- </widget>
480
- </child>
481
- </widget>
482
- <packing>
483
- <property name="position">3</property>
484
- </packing>
485
- </child>
486
- <child>
487
- <widget class="GtkLabel" id="label9">
488
- <property name="visible">True</property>
489
- <property name="label" translatable="yes">_Privileges</property>
490
- <property name="use_underline">True</property>
491
- </widget>
492
- <packing>
493
- <property name="position">3</property>
494
- <property name="tab_fill">False</property>
495
- <property name="type">tab</property>
496
- </packing>
497
- </child>
498
- </widget>
499
- <packing>
500
- <property name="position">1</property>
501
- </packing>
502
- </child>
503
- <child>
504
- <widget class="GtkStatusbar" id="statusbar1">
505
- <property name="visible">True</property>
506
- <property name="spacing">2</property>
507
- </widget>
508
- <packing>
509
- <property name="expand">False</property>
510
- <property name="position">2</property>
511
- </packing>
512
- </child>
513
- </widget>
514
- </child>
515
- </widget>
516
- </glade-interface>