From 5178dac9acc7c9639603a2922dbd221803342847 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Fri, 28 Dec 2018 12:28:41 +0100 Subject: [PATCH] KDE-Support: KDE-JobViewer-DBUS-Service. Registration and usable-checks for progressbar-handler. --- lib/progress-bar.rb | 88 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 75 insertions(+), 13 deletions(-) diff --git a/lib/progress-bar.rb b/lib/progress-bar.rb index 2954633..6fe5a68 100644 --- a/lib/progress-bar.rb +++ b/lib/progress-bar.rb @@ -1,13 +1,20 @@ require 'dbus' module ProgressBar - def self.new *a - if STDERR.tty? - Console.new *a - elsif 'KDE' == ENV['XDG_CURRENT_DESKTOP'] - KDialog.new *a - else - KDialog.new *a + @klasses ||= [] + class <