rgw 0.6.0 → 0.6.2

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: 1d13a2418680d672dfdd84912edc17e1de7e56f5
4
- data.tar.gz: 08b5f0593508f29b92daa8452fba7ba7399d79a8
3
+ metadata.gz: 75cfe5862b12787fb33e005f3089b8189a5c8cb0
4
+ data.tar.gz: f437daad13b9c1626cef73885cee4f3fb120ce1b
5
5
  SHA512:
6
- metadata.gz: 17c080845299133852fc34f4ae2eb3519635a99d14161cabcc461e73a62b095884e7620dd345c4e00de256f14a291b04e9d4eb6c85d57f509d434e385822aadb
7
- data.tar.gz: eef854e034eb971a5a8e6101f38ed929293fa7ee1693af3c7ea3fd2ded9248952ec4defdd674123afa94bf0322d42da1a7b838c75abd3356d66865b50ba470f3
6
+ metadata.gz: 1e087184a20453e453e84596732dc92f252c29fe6b2ab7edfe514c700fe1395f3401994de32f2bc6c738bc42015afa1c9dcb2887ab74a371d2ffc767a5f76c66
7
+ data.tar.gz: 3454f0fd33a298aa4ecf35b60cca710d7dee4697b376f96127debd7f5e100dc77817e5eb1fc04b2e02d78816674da0a862f36d6710b443ff7a33824976cf1ddc
data/lib/rgw/pile.rb CHANGED
@@ -55,7 +55,11 @@ module Rgw
55
55
  # Adds the stacked child to the widget.
56
56
  #
57
57
  # @param child [Gtk::Widget] The widget to add. It has to be added _after_ the child.
58
-
58
+ # @param x [Integer] Horizontal position of the child.
59
+ # @param y [Integer] Vertical position of the child.
60
+ # Both positions are in pixels. If the value is positive it goes from the left
61
+ # respective top border of the container, if it is negative it goes from the
62
+ # right respective bottom border.
59
63
  def set_pile_child child, x=0, y=0
60
64
  raise RuntimeError, 'child has to be set before pile_child' if @child1.nil?
61
65
  raise RuntimeError, 'Rgw::Pile can only contain one pile_child' unless @child2.nil?
@@ -80,14 +80,17 @@ module Rgw
80
80
 
81
81
 
82
82
  def set_child idx, child
83
- raise ArguentError, "invalid index %i" % idx.to_i unless (0..@revealers.length).cover?(idx)
83
+ raise ArgumentError, "invalid type %s for index, expect Integer" % idx.class.to_s unless idx.is_a? Integer
84
+ raise ArgumentError, "invalid index %i" % idx.to_i unless (0..@revealers.length() -1).cover?(idx)
85
+ raise ArgumentError, "invalid type %s for child, expect Gtk::Widget" % child.class.to_s unless child.is_a? Gtk::Widget
84
86
  @revealers[idx].remove @revealers[idx].child unless @revealers[idx].child.nil?
85
87
  @revealers[idx].add child
86
88
  end
87
89
 
88
90
 
89
91
  def set_activate idx
90
- raise ArguentError, "invalid index %i" % idx.to_i unless (0..@revealers.length).cover?(idx)
92
+ raise ArgumentError, "invalid type %s for index" % idx.class.to_s unless idx.is_a? Integer
93
+ raise ArgumentError, "invalid index %i" % idx.to_i unless (0..@revealers.length() -1).cover?(idx)
91
94
  @revealerButtons[idx].active = true
92
95
  end
93
96
  alias_method :active=, :set_activate
@@ -103,7 +106,5 @@ module Rgw
103
106
  label.markup = '<span size="large" weight="bold">' + text + '</span>'
104
107
  label
105
108
  end
106
-
107
-
108
109
  end
109
110
  end
data/lib/rgw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rgw
2
- VERSION = [0, 6, 0]
2
+ VERSION = [0, 6, 2]
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Detlef Reichl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-03 00:00:00.000000000 Z
11
+ date: 2014-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n-toolbox