gtk2notify 0.2.3 → 0.2.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: 75dbcfc3b3314ee348e42c5b330e4f2abffb89b3
4
- data.tar.gz: 1a7386893981186e502dfd7ec3d9f8179c746c2f
3
+ metadata.gz: 83a479aed79887755b89635baded639b87d72f97
4
+ data.tar.gz: d2e5d5bb6a7bb554f8650d8591d9796a28ea76a6
5
5
  SHA512:
6
- metadata.gz: 35e052cb6c4d4ba31193e76f4b48ee9fbb7071d4101e26a47e327df7542b28e6adb9aed76decb4cb937dbe0cd69ecacfa73cd3fe70ff398dafb7be4b061a72cc
7
- data.tar.gz: 66e55b20db99ba9c525fe03d73fc9bfbdf633a59bb5362b985deba34db22e34292694d07bad216bfba47f2cce1ccbb2ce1bd786100ec5d35eb58eb5cd4137443
6
+ metadata.gz: d17485f90a0504fa24454798e71759a93af8ed2c5c5d4a6720a527b330b7ea6c7fa370df1feac094e8124f75582eb3c6b8aa1706f2d4fc19c6cdde19c306a3cd
7
+ data.tar.gz: c7c9459881255f85453e3d992a6270830e2d26022e6dd56659519dbb9ec906598e2b4ebee127663cea9208b26926f4f6ecf1e0702405847a0e4d49a6dd423e9b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -12,15 +12,16 @@ require 'gtk2svg'
12
12
  class GtkNotify
13
13
 
14
14
  def self.show(svg: nil, body: 'message body goes here', summary: '',
15
- timeout: 3.5, offset: {})
15
+ timeout: 3.5, offset: {}, align: :topright, fill: 'yellow',
16
+ color: 'green')
16
17
 
17
- offset = {x: 100, y: 10}.merge offset
18
+ offset = {x: 20, y: 10}.merge offset
18
19
 
19
20
  window = Gtk::Window.new
20
21
  area = Gtk::DrawingArea.new
21
22
 
22
23
  svg ||= <<SVG
23
- <svg width="350" height="80" fill="yellow">
24
+ <svg width="350" height="80" fill="#{fill}">
24
25
  <text x="20" y="10" fill="green" style="font-size: 14">
25
26
  #{body.gsub(/<\/?\w+[^>]*>/,'')}
26
27
  </text>
@@ -48,8 +49,12 @@ SVG
48
49
  window.gravity = Gdk::Window::GRAVITY_NORTH_EAST
49
50
  width, height = window.size
50
51
  x,y = offset[:x], offset[:y]
51
- window.move(Gdk.screen_width - (width + x), y)
52
-
52
+
53
+ h = {
54
+ topright: [Gdk.screen_width - (width + x), y],
55
+ topleft: [x, y]
56
+ }
57
+ window.move(*h[align])
53
58
  window.show_all
54
59
  Thread.new {sleep timeout; window.hide_all; Gtk.main_quit}
55
60
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2notify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  xddnbWj01muld4X43+JppbD4RtFvQbM5sE4dmNRleGC7mj/Y+A37s8ZlZ+vetIjX
32
32
  u56gX5ZBzmwCWg==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-12-10 00:00:00.000000000 Z
34
+ date: 2017-04-30 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: gtk2svg
@@ -54,7 +54,7 @@ dependencies:
54
54
  - !ruby/object:Gem::Version
55
55
  version: 0.3.12
56
56
  description:
57
- email: james@r0bertson.co.uk
57
+ email: james@jamesrobertson.eu
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.5.1
83
+ rubygems_version: 2.6.8
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Similar in functionality to libnotify
metadata.gz.sig CHANGED
@@ -1,2 +1,4 @@
1
- �`u"��G`h��1е)�5�,m�;�pD/������b��@��܋�_�4i�r��~R�s�ӺI�y�)��VO�7򕢑N�k�8)7��F}E�E��A�jÿ2��?�gGlb7�q���8b)�8��$��� � ���I�a�3�M##�Ř�� b#)���TX���G
2
- �םN��A,�C�l�墠�� ��a)9 �5�Qp�J�0�+�˺��>b Q3}K���fUd�d�:�����:�?
1
+ ��]�G����f-��W�߄%7wه�� ǚ�G:�lf�:����=Ym�@�m"����p���@bY
2
+ ��i J�ȫ����l`n�xsH���x/{I�9XcH9
3
+ �Ǚ6�w
4
+ pc��~�: