~ubuntu-branches/debian/sid/smplayer/sid

« back to all changes in this revision

Viewing changes to src/helper.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Breuil Cyril
  • Date: 2007-06-24 16:35:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070624163529-hhckbmd24uicada7
Tags: 0.5.20-0ubuntu1
* New upstream release
* Change Maintainer Email

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        if (!path.isEmpty())
84
84
                return path;
85
85
        else
86
 
                return appPath();
 
86
                return appPath() + "/translations";
87
87
#else
88
 
        return appPath();
 
88
        return appPath() + "/translations";
89
89
#endif
90
90
}
91
91
 
179
179
    return tf.sprintf("%02d:%02d:%02d",hours,minutes,seconds);
180
180
}
181
181
 
 
182
QString Helper::timeForJumps(int secs) {
 
183
    int minutes = (int) secs / 60;
 
184
        int seconds = secs % 60;
 
185
 
 
186
        if (minutes==0) {
 
187
                if (seconds==1) 
 
188
                        return QObject::tr("1 second");
 
189
                else
 
190
                        return QObject::tr("%1 seconds").arg(seconds);
 
191
        }
 
192
        else {
 
193
                if (minutes==1) {
 
194
                        if (seconds==0) 
 
195
                                return QObject::tr("1 minute");
 
196
                        else
 
197
                        if (seconds==1) 
 
198
                                return QObject::tr("1 minute and 1 second");
 
199
                        else
 
200
                                return QObject::tr("1 minute and %1 seconds").arg(seconds);
 
201
                } else {
 
202
                        if (seconds==0) 
 
203
                                return QObject::tr("%1 minutes").arg(minutes);
 
204
                        else
 
205
                        if (seconds==1) 
 
206
                                return QObject::tr("%1 minutes and 1 second").arg(minutes);
 
207
                        else
 
208
                                return QObject::tr("%1 minutes and %2 seconds").arg(minutes)
 
209
                                                                   .arg(seconds);
 
210
                }
 
211
        }
 
212
}
 
213
 
182
214
void Helper::finishProcess( QProcess * proc ) {
183
215
        qDebug("Helper::finishProcess: Waiting process to finish...");
184
216
 
307
339
        return valid;
308
340
}
309
341
 
310
 
/*
311
 
QString Helper::textFromCL(QString t) {
312
 
        return QTextCodec::codecForLocale()->toUnicode(t);
313
 
}
314
 
 
315
 
QCString Helper::textForCL(QString t) {
316
 
        return t.local8Bit();
317
 
}
318
 
*/