~ubuntu-branches/ubuntu/wily/smplayer/wily

« back to all changes in this revision

Viewing changes to src/actionseditor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-03-31 23:05:43 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20090331230543-0h2hfwpwlu9opbv2
* New upstream release. (Closes: #523791)
  - Reworked subtitle font preferences. (Closes: #503295)
  - No longer installs qt_fr.qm. (Closes: #486314)
* debian/control:
  - Bumped Standards-Version to 3.8.1.
  - Changed maintainer name (still the same person and GPG key).
  - Changed section to video.
  - Build-depend on zlib1g-dev for findsubtitles.
  - Require Qt >= 4.3 per readme.
  - Added ${misc:Depends}.
  - Make smplayer-translations depend on smplayer and smplayer recommend
    smplayer-translations, not the other way round. (Closes: #489375)
* debian/copyright:
  - Significantly expanded per-file with new upstream authors.
* debian/rules:
  - Make make use correct uic in install.
  - Clean svn_revision.
  - Removed get-orig-source - not needed with uscan --repack.
* debian/patches/01_gl_translation.patch:
  - Added patch to fix lrelease error on smplayer_gl.ts.
* Added debian/README.source for simple-patchsys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2008 Ricardo Villalba <rvm@escomposlinux.org>
 
2
    Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
3
3
 
4
4
    This program is free software; you can redistribute it and/or modify
5
5
    it under the terms of the GNU General Public License as published by
39
39
 
40
40
#include "images.h"
41
41
#include "filedialog.h"
42
 
#include "helper.h"
 
42
#include "paths.h"
43
43
 
44
44
#include "shortcutgetter.h"
45
45
 
112
112
 
113
113
        for (int n=0; n < l.count(); n++) {
114
114
                //qDebug("%s", l[n].toUtf8().data());
 
115
#if QT_VERSION >= 0x040300
 
116
                // Qt 4.3 and 4.4 (at least on linux) seems to have a problem when using Traditional Chinese
 
117
                // QKeysequence deletes the arrow key names from the shortcut
 
118
                // so this is a work-around.
 
119
                QString s = l[n].simplified();
 
120
#else
115
121
                QString s = QKeySequence( l[n].simplified() );
 
122
#endif
116
123
                
117
124
                //Work-around for Simplified-Chinese
118
125
                s.replace( QString::fromUtf8("左"), "Left");
137
144
ActionsEditor::ActionsEditor(QWidget * parent, Qt::WindowFlags f)
138
145
        : QWidget(parent, f)
139
146
{
140
 
        latest_dir = Helper::shortcutsPath();
 
147
        latest_dir = Paths::shortcutsPath();
141
148
 
142
149
    actionsTable = new QTableWidget(0, COL_NAME +1, this);
143
150
        actionsTable->setSelectionMode( QAbstractItemView::SingleSelection );
226
233
        QList<QAction *> actions = widget->findChildren<QAction *>();
227
234
        for (int n=0; n < actions.count(); n++) {
228
235
                action = static_cast<QAction*> (actions[n]);
229
 
                if (!action->objectName().isEmpty())
 
236
                if (!action->objectName().isEmpty() && !action->inherits("QWidgetAction"))
230
237
                actionsList.append(action);
231
238
    }
232
239
 
350
357
void ActionsEditor::editShortcut() {
351
358
        QTableWidgetItem * i = actionsTable->item( actionsTable->currentRow(), COL_SHORTCUT );
352
359
        if (i) {
353
 
                ShortcutGetter d;
 
360
                ShortcutGetter d(this);
354
361
                QString result = d.exec( i->text() );
355
362
 
356
363
                if (!result.isNull()) {
536
543
        QList<QAction *> actions = o->findChildren<QAction *>();
537
544
        for (int n=0; n < actions.count(); n++) {
538
545
                action = static_cast<QAction*> (actions[n]);
539
 
                if (!action->objectName().isEmpty()) {
 
546
                if (!action->objectName().isEmpty() && !action->inherits("QWidgetAction")) {
540
547
#if USE_MULTIPLE_SHORTCUTS
541
548
                        QString accelText = shortcutsToString(action->shortcuts());
542
549
#else
561
568
        QList<QAction *> actions = o->findChildren<QAction *>();
562
569
        for (int n=0; n < actions.count(); n++) {
563
570
                action = static_cast<QAction*> (actions[n]);
564
 
                if (!action->objectName().isEmpty()) {
 
571
                if (!action->objectName().isEmpty() && !action->inherits("QWidgetAction")) {
565
572
#if USE_MULTIPLE_SHORTCUTS
566
573
                        QString current = shortcutsToString(action->shortcuts());
567
574
                        accelText = set->value(action->objectName(), current).toString();