~ubuntu-branches/ubuntu/lucid/mythtv/lucid

« back to all changes in this revision

Viewing changes to programs/mythfrontend/mythcontrols.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello, Mario Limonciello, John Baab
  • Date: 2009-09-29 01:33:23 UTC
  • mfrom: (1.1.35 upstream)
  • Revision ID: james.westby@ubuntu.com-20090929013323-6pvn8encm757zbxw
Tags: 0.22.0~trunk22101-0ubuntu1
[ Mario Limonciello ]
* New upstream checkout (r22101)
* Try to guard and make sure that ~mythtv is read from /etc/passwd 
  rather than assuming it's /home/mythtv.

[ John Baab ]
* debian/mythtv-common.postinst:
  - Added symlink for /home/mythtv/.mythtv/config.xml

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 * @brief Main mythcontrols class.
6
6
 *
7
7
 * Note that the keybindings are fetched all at once, and cached for
8
 
 * this host.  This avoids pelting the database everytime the user
 
8
 * this host.  This avoids pelting the database every time the user
9
9
 * changes their selection.  This makes a HUGE difference in delay.
10
10
 *
11
11
 * Copyright (C) 2005 Micah Galizia
26
26
 * 02111-1307, USA
27
27
 */
28
28
 
 
29
#include "mythcontrols.h"
 
30
 
29
31
// Qt headers
30
32
#include <QStringList>
31
33
#include <QApplication>
41
43
#include <mythdialogbox.h>
42
44
 
43
45
// MythControls headers
44
 
#include "mythcontrols.h"
45
46
#include "keygrabber.h"
46
47
 
47
48
#define LOC QString("MythControls: ")
423
424
        return m_leftList->GetItemCurrent()->GetText();
424
425
 
425
426
    if (GetFocusWidget() == m_leftList)
426
 
        return QString::null;
 
427
        return QString();
427
428
 
428
429
    QString desc = m_rightList->GetItemCurrent()->GetText();
429
430
    int loc = desc.indexOf(" => ");
430
431
    if (loc == -1)
431
 
        return QString::null; // Should not happen
 
432
        return QString(); // Should not happen
432
433
 
433
434
    if (m_rightListType == kContextList)
434
435
        return desc.left(loc);
453
454
            tmp.detach();
454
455
            return tmp;
455
456
        }
456
 
        return QString::null;
 
457
        return QString();
457
458
    }
458
459
 
459
460
    if (GetFocusWidget() == m_leftList)
460
 
        return QString::null;
 
461
        return QString();
461
462
 
462
463
    if (!m_rightList || !m_rightList->GetItemCurrent())
463
 
        return QString::null;
 
464
        return QString();
464
465
 
465
466
    QString desc = m_rightList->GetItemCurrent()->GetText();
466
467
    if (kContextList == m_leftListType &&
472
473
 
473
474
    int loc = desc.indexOf(" => ");
474
475
    if (loc == -1)
475
 
        return QString::null; // should not happen..
 
476
        return QString(); // should not happen..
476
477
 
477
478
    if (m_rightListType == kActionList)
478
479
        return desc.left(loc);
479
480
 
480
481
    QString rv = desc.mid(loc+4);
481
482
    if (rv == "<none>")
482
 
        return QString::null;
 
483
        return QString();
483
484
 
484
485
    return rv;
485
486
}
514
515
        return m_leftList->GetItemCurrent()->GetText();
515
516
 
516
517
    if (GetFocusWidget() == m_leftList)
517
 
        return QString::null;
 
518
        return QString();
518
519
 
519
520
    if ((m_leftListType == kContextList) && (m_rightListType == kActionList))
520
521
    {
526
527
        if (b < (uint)keys.count())
527
528
            return keys[b];
528
529
 
529
 
        return QString::null;
 
530
        return QString();
530
531
    }
531
532
 
532
533
    QString desc = m_rightList->GetItemCurrent()->GetText();
533
534
    int loc = desc.indexOf(" => ");
534
535
    if (loc == -1)
535
 
        return QString::null; // Should not happen
 
536
        return QString(); // Should not happen
536
537
 
537
538
 
538
539
    if (m_rightListType == kKeyList)