manqod 1.1505.0 → 1.1510.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/About.rb +16 -64
- data/lib/SB/Messaging.rb +25 -12
- metadata +7 -5
data/lib/About.rb
CHANGED
@@ -7,83 +7,35 @@ class About < Gtk::VBox
|
|
7
7
|
class Versions < Gtk::HBox
|
8
8
|
def initialize
|
9
9
|
super(true,3)
|
10
|
+
@progs=Hash.new
|
10
11
|
end
|
11
|
-
def add(text)
|
12
|
-
pack_start(Gtk::Label.new(text),true,true,2)
|
12
|
+
def add(text,ver)
|
13
|
+
pack_start(@progs[text]=Gtk::VBox.new.pack_start(Gtk::Label.new(text),true,true,2)) unless @progs.has_key?(text)
|
14
|
+
@progs[text].pack_start(Gtk::Label.new(ver.to_s),true,true,2)
|
13
15
|
self
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
17
|
-
class Svn
|
18
|
-
def initialize(dir)
|
19
|
-
@dir=dir
|
20
|
-
@efilename="#{dir}/.svn/entries"
|
21
|
-
@svn = `which svn`.strip
|
22
|
-
end
|
23
|
-
attr_accessor :entries, :efilename, :revision, :format, :source, :last_update
|
24
|
-
def load
|
25
|
-
if FileTest.exists?(efilename)
|
26
|
-
@entries=Array.new
|
27
|
-
@entries=File.new(efilename,"r").readlines
|
28
|
-
return false if entries.nil?
|
29
|
-
@format=entries[0]
|
30
|
-
i=0
|
31
|
-
while entries[i].index("dir")!=0 and i<entries.size do i=i+1;end
|
32
|
-
@revision=entries[i+1]
|
33
|
-
while entries[i].index("svn://")!=0 and i<entries.size do i=i+1;end
|
34
|
-
@source=entries[i]
|
35
|
-
while entries[i]!="\n" and i<entries.size do i=i+1;end
|
36
|
-
while entries[i]=="\n" and i<entries.size do i=i+1;end
|
37
|
-
@last_update=entries[i]
|
38
|
-
true
|
39
|
-
else
|
40
|
-
einfo("file not found: #{efilename}")
|
41
|
-
false
|
42
|
-
end
|
43
|
-
end
|
44
|
-
def up
|
45
|
-
cr=revision
|
46
|
-
`cd #{@dir} && #{@svn} up`
|
47
|
-
self.load
|
48
|
-
cr!=revision
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
19
|
def initialize
|
53
20
|
@title="about"
|
54
|
-
|
55
|
-
path=File::expand_path(File.join(File.dirname(__FILE__),".."))
|
56
|
-
svn=Svn.new(path)
|
21
|
+
super(false,3)
|
57
22
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
)
|
64
|
-
pack_start(Gtk::Label.new("manqod subversion source #{svn.source}"))
|
65
|
-
pack_start(lu=Gtk::Label.new("manqod subversion last update #{svn.last_update}"))
|
66
|
-
upb.signal_connect("clicked"){|me|
|
67
|
-
if svn.up
|
68
|
-
rev.set_text("#{rev.text} -> #{svn.revision}")
|
69
|
-
lu.set_text("#{lu.text} -> #{svn.last_update}")
|
70
|
-
warn("Manqod has been updated, please restart manqod!")
|
71
|
-
else
|
72
|
-
warn("No updates available!")
|
73
|
-
end
|
74
|
-
}
|
75
|
-
else
|
76
|
-
pack_start(Gtk::Label.new("manqod version unknown"))
|
77
|
-
end
|
78
|
-
pack_start(Gtk::Label.new("Logged in: #{nick}"))
|
79
|
-
pack_start(Gtk::Label.new("LICENCE"))
|
80
|
-
pack_start(Gtk::Label.new("
|
23
|
+
pack_start(v=Versions.new,false,false)
|
24
|
+
Gem.cache.gems.each_pair{|key,gem| v.add(gem.name,gem.version) if gem.name.include?("manqod") }
|
25
|
+
pack_start(Gtk::Label.new("User logged in: #{nick}"))
|
26
|
+
pack_start(Gtk::Label.new("Homepage of manqod: http://manqod.sourceforge.net"))
|
27
|
+
pack_start(Gtk::Label.new("LICENCE: CDDL
|
81
28
|
the author of this program(manqod) is Dobai-Pataky Balint(dpblnt@gmail.com)
|
82
29
|
manqod is released under the CDDL licence(http://www.opensource.org/licenses/cddl1.php) don't worry this only means the following:
|
83
30
|
* you can use it, copy it, modify it
|
84
31
|
* if you want your modifications to be distributed send them back to me, i'll merge them in
|
85
32
|
* nobody can sell it"))
|
86
|
-
|
33
|
+
pack_end(Versions.new.
|
34
|
+
add("GTK+",Gtk::VERSION.join(".")).
|
35
|
+
add("Ruby",RUBY_VERSION).
|
36
|
+
add("GLib",GLib::VERSION.join(".")).
|
37
|
+
add("Ruby/GLib",GLib::BINDING_VERSION.join(".")).
|
38
|
+
add("Ruby/GTK",Gtk::BINDING_VERSION.join(".")),false,false)
|
87
39
|
end
|
88
40
|
attr_accessor :title
|
89
41
|
|
data/lib/SB/Messaging.rb
CHANGED
@@ -34,7 +34,11 @@ class Messaging < Gtk::Button
|
|
34
34
|
@body.buffer.delete(@body.buffer.bounds[0],@body.buffer.bounds[1])
|
35
35
|
@body.buffer.insert_at_cursor(si[5])
|
36
36
|
if si[3] == "n"
|
37
|
-
|
37
|
+
begin
|
38
|
+
ManqodDB.instance.manqod_db.set_message_read(item[6],Nick.instance.get_nick)
|
39
|
+
rescue => err
|
40
|
+
ewarn("Can't set message read for all clients")
|
41
|
+
end
|
38
42
|
si[3]="n"
|
39
43
|
si[4]="Verdana 10"
|
40
44
|
end
|
@@ -45,16 +49,20 @@ class Messaging < Gtk::Button
|
|
45
49
|
attr_reader :list, :body
|
46
50
|
def populate
|
47
51
|
@mmodel.clear
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
52
|
+
begin
|
53
|
+
ManqodDB.instance.manqod_db.messages(Nick.instance.get_nick).each{|message|
|
54
|
+
i=@mmodel.append
|
55
|
+
i[0]=message["date"]
|
56
|
+
i[1]=message["sender"]
|
57
|
+
i[2]=message["subject"]
|
58
|
+
i[3]=message["state"]
|
59
|
+
i[4]=(message["state"] == "n" ? "Verdana Bold 10" : "Verdana 10")
|
60
|
+
i[5]=message["body"]
|
61
|
+
i[6]=message["id"]
|
62
|
+
}
|
63
|
+
rescue => err
|
64
|
+
ewarn("Can't read messages from server")
|
65
|
+
end
|
58
66
|
self
|
59
67
|
end
|
60
68
|
end
|
@@ -69,7 +77,12 @@ class Messaging < Gtk::Button
|
|
69
77
|
end
|
70
78
|
|
71
79
|
def check_messages
|
72
|
-
um=
|
80
|
+
um="unknown"
|
81
|
+
begin
|
82
|
+
um=ManqodDB.instance.manqod_db.unread_messages(Nick.instance.get_nick)
|
83
|
+
rescue => err
|
84
|
+
ewarn("Can't check for messages")
|
85
|
+
end
|
73
86
|
set_label(um==0?"no":"#{um}" + " messages")
|
74
87
|
end
|
75
88
|
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 1
|
7
|
-
-
|
7
|
+
- 1510
|
8
8
|
- 0
|
9
|
-
version: 1.
|
9
|
+
version: 1.1510.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Dobai-Pataky Balint
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-02-
|
17
|
+
date: 2011-02-23 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -36,11 +36,13 @@ dependencies:
|
|
36
36
|
requirement: &id002 !ruby/object:Gem::Requirement
|
37
37
|
none: false
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ~>
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
segments:
|
42
42
|
- 0
|
43
|
-
|
43
|
+
- 90
|
44
|
+
- 7
|
45
|
+
version: 0.90.7
|
44
46
|
type: :runtime
|
45
47
|
version_requirements: *id002
|
46
48
|
description: Manqod is a desktop application for small companies to organize their data on an interface customised for them by themselves
|