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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72baa4b9dad7ffdd95df1feccd07d55422f73cd7
4
- data.tar.gz: c13bd7aa11ddd604f399cf9f54985c285b430152
3
+ metadata.gz: 409d9d3db0a7b0ad381023ad5030b150f78603b9
4
+ data.tar.gz: 30d510e9466408481060df0925a7aa26c32c9931
5
5
  SHA512:
6
- metadata.gz: 44758fa3ccac4ca2953f94517896be2c6218c6249f9675c803feb13499749845a50b6ef41872bb69e22eb9dc19598a3f6dc7801de7d989ca8c1c4dc1f5f1c85b
7
- data.tar.gz: b175efaeac50f69744e0054bae984360722ea3837f88724776bf3b43e8a5ed2e9b663c22fccab689975c8bc87b8fdd44d94ab5ec415f73f3bce82e3a74a1c8b0
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 == :destroy
18
+ if action == :push_cross || action == :push_cancel
19
19
  view.close
20
20
  @model.result = :cancel
21
- elsif action == :open_clicked
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('destroy') do
73
+ @window.signal_connect('delete-event') do
72
74
  Thread.new do
73
- @controller.notify_action(self,:destroy)
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,:open_clicked, :files => @chooser.filenames)
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,:destroy)
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
@@ -1,5 +1,5 @@
1
1
  module Druzy
2
2
  module LittleFrame
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  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.3
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-26 00:00:00.000000000 Z
11
+ date: 2016-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: druzy-mvc