<commit_before>#
#    2007 by <EMAIL>
#
require "mylibs.rb"


#--------------------------------------------------------------------------
#
# select from traders, system menu, arbitarary file.
#
class SelectServiceDlg < KDE::Dialog
    def initialize(parent, defaultName=nil)
        super(parent)
        @message = i18n('Select Application')
        userInitialize
        self.windowTitle = @message
        @selectedName = @services[0].name
        createWidget
        connect(self, SIGNAL(:accepted), self, SLOT(:selected))
        setSelected(defaultName)
    end

    def userInitialize
        @message = i18n('Select Application for .html file.')
        @services = Mime.services('.html')
    end

    def name
        @selectedName
    end

    def iconName
        SelectServiceDlg.exeName2IconName(serviceFromName(name).exec)
        parent.accept
    end

    slots :selected
    def selected
        @selectedName = @serviceList.selectedItems.first.text
    end

    def commandFromName(name)
        i = serviceFromName(name)
        i && i.exec
    end<commit_msg>fix accidentally inserted line.<commit_after>#
#    2007 by <EMAIL>
#
require "mylibs.rb"


#--------------------------------------------------------------------------
#
# select from traders, system menu, arbitarary file.
#
class SelectServiceDlg < KDE::Dialog
    def initialize(parent, defaultName=nil)
        super(parent)
        @message = i18n('Select Application')
        userInitialize
        self.windowTitle = @message
        @selectedName = @services[0].name
        createWidget
        connect(self, SIGNAL(:accepted), self, SLOT(:selected))
        setSelected(defaultName)
    end

    def userInitialize
        @message = i18n('Select Application for .html file.')
        @services = Mime.services('.html')
    end

    def name
        @selectedName
    end

    def iconName
        SelectServiceDlg.exeName2IconName(serviceFromName(name).exec)
    end

    slots :selected
    def selected
        @selectedName = @serviceList.selectedItems.first.text
    end

    def commandFromName(name)
        i = serviceFromName(name)
        i && i.exec
    end
{'fraction_non_alphanumeric': 0.15555555555555556, 'fraction_numerical': 0.009259259259259259, 'mean_word_length': 2.0055632823365785, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1625843', 'n_tokens_mistral': 605, 'n_tokens_neox': 586, 'n_words': 139}