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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/gtk2notify.rb +10 -5
- metadata +4 -4
- metadata.gz.sig +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83a479aed79887755b89635baded639b87d72f97
|
|
4
|
+
data.tar.gz: d2e5d5bb6a7bb554f8650d8591d9796a28ea76a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d17485f90a0504fa24454798e71759a93af8ed2c5c5d4a6720a527b330b7ea6c7fa370df1feac094e8124f75582eb3c6b8aa1706f2d4fc19c6cdde19c306a3cd
|
|
7
|
+
data.tar.gz: c7c9459881255f85453e3d992a6270830e2d26022e6dd56659519dbb9ec906598e2b4ebee127663cea9208b26926f4f6ecf1e0702405847a0e4d49a6dd423e9b
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/gtk2notify.rb
CHANGED
|
@@ -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
|
-
|
|
15
|
+
timeout: 3.5, offset: {}, align: :topright, fill: 'yellow',
|
|
16
|
+
color: 'green')
|
|
16
17
|
|
|
17
|
-
offset = {x:
|
|
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="
|
|
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
|
-
|
|
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.
|
|
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:
|
|
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@
|
|
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.
|
|
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
|
-
|
|
2
|
-
|
|
1
|
+
��]�G����f-��W�߄%7wه�� ǚ�G:�lf�:����=Ym�@�m"����p���@bY
|
|
2
|
+
��i J�ȫ����l`n�xsH���x/{�I�9X�c�H9�
|
|
3
|
+
�Ǚ6�w
|
|
4
|
+
pc��~�:
|