Class: Messaging

Inherits:
Gtk::Button
  • Object
show all
Includes:
Singleton
Defined in:
lib/SB/Messaging.rb

Overview

this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint([email protected])

Defined Under Namespace

Classes: MessageReader

Instance Method Summary collapse

Constructor Details

#initializeMessaging

Returns a new instance of Messaging.



70
71
72
73
74
75
76
77
# File 'lib/SB/Messaging.rb', line 70

def initialize
	super()
	set_can_focus(false)
	set_relief(Gtk::ReliefStyle::NONE)
	signal_connect('clicked'){|me|
		MessageReader.new.populate.show_all
	}
end

Instance Method Details

#check_messagesObject



79
80
81
82
83
84
85
86
87
# File 'lib/SB/Messaging.rb', line 79

def check_messages
	um="unknown"
	begin
		um=ManqodDB.instance.manqod_db.unread_messages(Nick.instance.get_nick)
	rescue => err
		ewarn("Can't check for messages")
	end
	set_label(um==0?"no":"#{um}" + " messages")
end