Module: KptHandler
- Included in:
- MpdHandler
- Defined in:
- lib/kpt_handler.rb
Overview
encoding: utf-8
Instance Method Summary (collapse)
Instance Method Details
- (Boolean) is_running?
5 6 7 8 |
# File 'lib/kpt_handler.rb', line 5 def is_running? d = DBus::SessionBus.instance d.service("org.kde.kopete").exists? end |
- (Object) set_log_message(msg = nil)
22 23 24 25 26 27 |
# File 'lib/kpt_handler.rb', line 22 def (msg=nil) retval = " - KopeteOK" retval = " - KopeteOff" unless is_running? retval = " - KopeteError '#{msg}'" unless msg.nil? return retval end |
- (Object) set_status_message(msg)
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kpt_handler.rb', line 10 def (msg) if is_running? d = DBus::SessionBus.instance o = d.service("org.kde.kopete").object("/Kopete") o.introspect i = o["org.kde.Kopete"] i.setStatusMessage msg end rescue => e (e) end |