druzy-little_frame 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/druzy/little_frame/file_chooser.rb +9 -7
- data/lib/druzy/little_frame/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 409d9d3db0a7b0ad381023ad5030b150f78603b9
|
4
|
+
data.tar.gz: 30d510e9466408481060df0925a7aa26c32c9931
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39575a37349d7d6f2f50a478b1c411122de3ce6506f67b9c0da33fa295bbf494221f8640053d92e38cad29225196607b515f33d4c35ffa7e294e2649b8e5f4fb
|
7
|
+
data.tar.gz: ddd5f305bdcf6f555541ee46446501f1896c69674025321f9549027ba6d45e82135981c8b7fec0df9dd0d14230d18c5bf70fcaa17044331ebdd694739a94ec80
|
@@ -15,10 +15,11 @@ module Druzy
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def notify_action(view,action,args={})
|
18
|
-
if action == :
|
18
|
+
if action == :push_cross || action == :push_cancel
|
19
19
|
view.close
|
20
20
|
@model.result = :cancel
|
21
|
-
|
21
|
+
|
22
|
+
elsif action == :push_open
|
22
23
|
view.close
|
23
24
|
@model.files = args[:files]
|
24
25
|
@model.result = :open
|
@@ -67,24 +68,25 @@ module Druzy
|
|
67
68
|
def initialize(controller)
|
68
69
|
super(controller)
|
69
70
|
Gtk.init
|
71
|
+
|
70
72
|
@window =Gtk::Window.new
|
71
|
-
@window.signal_connect('
|
73
|
+
@window.signal_connect('delete-event') do
|
72
74
|
Thread.new do
|
73
|
-
@controller.notify_action(self,:
|
75
|
+
@controller.notify_action(self,:push_cross)
|
74
76
|
end
|
75
77
|
end
|
76
78
|
|
77
79
|
@open = Gtk::Button.new(:label => "Ouvrir")
|
78
80
|
@open.signal_connect("clicked") do
|
79
81
|
Thread.new do
|
80
|
-
@controller.notify_action(self,:
|
82
|
+
@controller.notify_action(self,:push_open, :files => @chooser.filenames)
|
81
83
|
end
|
82
84
|
end
|
83
85
|
|
84
86
|
@cancel = Gtk::Button.new(:label => "Annuler")
|
85
87
|
@cancel.signal_connect("clicked") do
|
86
88
|
Thread.new do
|
87
|
-
@controller.notify_action(self,:
|
89
|
+
@controller.notify_action(self,:push_cancel)
|
88
90
|
end
|
89
91
|
end
|
90
92
|
|
@@ -122,7 +124,7 @@ module Druzy
|
|
122
124
|
|
123
125
|
def close
|
124
126
|
@window.destroy
|
125
|
-
Gtk.main_quit
|
127
|
+
Gtk.main_quit if Gtk.main_level!=0
|
126
128
|
@thread_gtk.join
|
127
129
|
end
|
128
130
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: druzy-little_frame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Le Greneur
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: druzy-mvc
|