~ubuntu-branches/ubuntu/lucid/kdewebdev-kde4/lucid

« back to all changes in this revision

Viewing changes to kommander/widgets/aboutdialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-02-27 16:13:02 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20090227161302-1wc2m5nyuthzuxrv
Tags: 4:4.2.1-0ubuntu1
* New upstream release:
  - Bump versions of build-depends
  - Update an install file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
2
// C++ Implementation: aboutdialog
3
3
//
4
 
// Description: 
 
4
// Description:
5
5
//
6
6
//
7
7
// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
55
55
  else
56
56
    setHidden(true);
57
57
 
58
 
  m_aboutData = 0L; 
 
58
  m_aboutData = 0L;
59
59
  KommanderPlugin::setDefaultGroup(Group::DBUS);
60
60
  KommanderPlugin::registerFunction(Initialize, "initialize(QString widget, QString appName, QString icon, QString version, QString copyright)",
61
61
         i18n("Sets information about the application. This is the first method that must be called, any addition to the dialog done before initialization will be ignored."), 5);
109
109
 
110
110
void AboutDialog::initialize(const QString& appName, const QString &icon, const QString& version, const QString& copyright)
111
111
{
112
 
  delete m_aboutData;  
 
112
  delete m_aboutData;
113
113
  m_authors.clear();
114
114
  m_emails.clear();
115
115
  m_tasks.clear();
124
124
  m_aboutData = new KAboutData(m_appName.toLatin1(), m_appName.toLatin1(), ki18n(m_appName.toUtf8()), m_version.toLatin1());
125
125
  m_aboutData->setCopyrightStatement(ki18n(m_copyright.toUtf8()));
126
126
  if (!m_icon.isEmpty())
127
 
    m_aboutData->setProgramLogo(KIconLoader::global()->loadIcon(m_icon, KIconLoader::NoGroup, KIconLoader::SizeMedium).convertToImage());  
 
127
    m_aboutData->setProgramLogo(KIconLoader::global()->loadIcon(m_icon, KIconLoader::NoGroup, KIconLoader::SizeMedium).convertToImage());
128
128
}
129
129
 
130
130
void AboutDialog::addAuthor(const QString& author, const QString &task, const QString& email, const QString &webAddress)
183
183
  } else
184
184
  if (key == "LGPL_V2")
185
185
  {
186
 
    file = KStandardDirs::locate("data", "LICENSES/LGPL_V2");    
 
186
    file = KStandardDirs::locate("data", "LICENSES/LGPL_V2");
187
187
  } else
188
188
  if (key == "BSD")
189
189
  {
206
206
        file = key;
207
207
    }
208
208
    m_aboutData->setLicenseTextFile(file);
209
 
  } 
210
 
  
 
209
  }
 
210
 
211
211
}
212
212
 
213
213
void AboutDialog::setPopulationText(const QString& a_text)
240
240
    }
241
241
    case AddAuthor:
242
242
    {
243
 
      addAuthor(args[0], args[1], args[2], args[3]);
 
243
      QString author = args[0];
 
244
      QString task;
 
245
      QString email;
 
246
      QString webAddress;
 
247
      if (args.size() > 1) task = args[1];
 
248
      if (args.size() > 2) task = args[2];
 
249
      if (args.size() > 3) task = args[3];
 
250
      addAuthor(author, task, email, webAddress);
244
251
      break;
245
252
    }
246
253
    case AddTranslator:
272
279
    case DBUS::execute:
273
280
    {
274
281
      if (m_aboutData)
275
 
      {        
 
282
      {
276
283
        K3AboutApplication dialog(m_aboutData, this);
277
284
        dialog.exec();
278
285
      }