gtk2_window_settings 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -2
- data/VERSION +1 -1
- data/gtk2_window_settings.gemspec +2 -2
- data/lib/gtk2_window_settings.rb +11 -9
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -5,7 +5,7 @@ GEM
|
|
5
5
|
glib2 (>= 1.1.5)
|
6
6
|
cairo (1.12.2)
|
7
7
|
pkg-config
|
8
|
-
datet (0.0.
|
8
|
+
datet (0.0.20)
|
9
9
|
diff-lcs (1.1.3)
|
10
10
|
gdk_pixbuf2 (1.1.5)
|
11
11
|
glib2 (>= 1.1.5)
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
rake
|
24
24
|
rdoc
|
25
25
|
json (1.7.5)
|
26
|
-
knjrbfw (0.0.
|
26
|
+
knjrbfw (0.0.94)
|
27
27
|
datet
|
28
28
|
http2
|
29
29
|
php4r
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "gtk2_window_settings"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kasper Johansen"]
|
12
|
-
s.date = "2012-09-
|
12
|
+
s.date = "2012-09-08"
|
13
13
|
s.description = "A class for remembering window-settings using the gtk2-extension for Ruby."
|
14
14
|
s.email = "k@spernj.org"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/gtk2_window_settings.rb
CHANGED
@@ -67,16 +67,18 @@ class Gtk2_window_settings
|
|
67
67
|
def on_window_size_request(*args)
|
68
68
|
Gtk.timeout_remove(@size_request_timeout) if @size_request_timeout
|
69
69
|
|
70
|
-
@size_request_timeout = Gtk.timeout_add(500
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
@size_request_timeout = Gtk.timeout_add(500, &lambda{
|
71
|
+
begin
|
72
|
+
@size_request_timeout = nil
|
73
|
+
|
74
|
+
if @window and !@window.destroyed?
|
75
|
+
size = @window.size
|
76
|
+
@db.update(:Gtk2_window_settings, {:width => size[0], :height => size[1]}, {:id => @id}) if size[0].to_i > 0 and size[1].to_i > 0
|
77
|
+
end
|
78
|
+
ensure
|
79
|
+
return false
|
76
80
|
end
|
77
|
-
|
78
|
-
false
|
79
|
-
end
|
81
|
+
})
|
80
82
|
|
81
83
|
#If false isnt returned the event might be canceled, which can lead to very buggy behaviour.
|
82
84
|
return false
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gtk2_window_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kasper Johansen
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-09-
|
13
|
+
date: 2012-09-08 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gtk2
|
@@ -113,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
hash:
|
116
|
+
hash: 1597426902538275770
|
117
117
|
segments:
|
118
118
|
- 0
|
119
119
|
version: "0"
|