Method: Ruber::Plugin#about_data
- Defined in:
- lib/ruber/plugin.rb
#about_data ⇒ KDE::AboutData
Creates a @KDE::AboutData@ object for the plugin
Note: every time this method is called, a new @KDE::AboutData@ object is created
taken from the PSF
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/ruber/plugin.rb', line 100 def about_data about = @plugin_description.about app_name = @plugin_description.name.to_s version = @plugin_description.version license = @plugin_description.about.license license_key, license_text = if about.license.is_a? String then [KDE::AboutData::License_Custom, about.license] else [LICENSES[about.license], nil] end res = KDE::AboutData.new app_name, '', KDE.ki18n(about.human_name), version, KDE.ki18n(about.description), license_key res.license_text = KDE.ki18n(license_text) if license_text @plugin_description.about..each do |a| res. KDE.ki18n(a[0]), KDE.ki18n(''), Qt::ByteArray.new(a[1] || '') end res.bug_address = Qt::ByteArray.new(about.bug_address) unless about.bug_address.empty? res.copyright_statement = KDE.ki18n(about.copyright) unless about.copyright.empty? res.homepage = Qt::ByteArray.new(about.homepage) unless about.homepage.empty? res.program_icon_name = about.icon unless about.icon.empty? res end |