~ubuntu-branches/ubuntu/lucid/mythplugins/lucid

« back to all changes in this revision

Viewing changes to mythzoneminder/mythzoneminder/zmconsole.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello
  • Date: 2009-09-08 23:35:10 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: james.westby@ubuntu.com-20090908233510-uvcvmvbn73khqark
Tags: 0.22.0~trunk21742-0ubuntu1
* New upstream checkout (r21742)
* debian/rules, debian/mythvideo.cron.daily:
  - Install jamu cron job
* debian/control:
  - Depends on python-imdbpy for mythvideo's new jamu cron job.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    if (!LoadWindowFromXML("zoneminder-ui.xml", "functionpopup", this))
42
42
        return false;
43
43
 
44
 
    m_captionText = dynamic_cast<MythUIText *> (GetChild("caption_text"));
45
 
    m_functionList = dynamic_cast<MythUIButtonList *> (GetChild("function_list"));
46
 
    m_enabledCheck = dynamic_cast<MythUICheckBox *> (GetChild("enable_check"));
47
 
    m_okButton = dynamic_cast<MythUIButton *> (GetChild("ok_button"));
 
44
    bool err = false;
 
45
    UIUtilE::Assign(this, m_captionText,  "caption_text", &err);
 
46
    UIUtilE::Assign(this, m_functionList, "function_list", &err);
 
47
    UIUtilE::Assign(this, m_enabledCheck, "enable_check", &err);
 
48
    UIUtilE::Assign(this, m_okButton,     "ok_button", &err);
48
49
 
49
 
    if (!m_captionText || !m_functionList || !m_enabledCheck || !m_okButton)
 
50
    if (err)
50
51
    {
51
 
        VERBOSE(VB_IMPORTANT, "Theme is missing critical theme elements.");
 
52
        VERBOSE(VB_IMPORTANT, "Cannot load screen 'functionpopup'");
52
53
        return false;
53
54
    }
54
55
 
148
149
    if (!foundtheme)
149
150
        return false;
150
151
 
151
 
    m_monitor_list = dynamic_cast<MythUIButtonList *> (GetChild("monitor_list"));
152
 
 
153
 
    m_status_text = dynamic_cast<MythUIText *> (GetChild("status_text"));
154
 
    m_time_text = dynamic_cast<MythUIText *> (GetChild("time_text"));
155
 
    m_date_text = dynamic_cast<MythUIText *> (GetChild("date_text"));
156
 
    m_load_text = dynamic_cast<MythUIText *> (GetChild("load_text"));
157
 
    m_disk_text = dynamic_cast<MythUIText *> (GetChild("disk_text"));
158
 
 
159
 
    if (!m_monitor_list || !m_status_text || !m_time_text ||
160
 
        !m_date_text || !m_load_text || !m_disk_text)
 
152
    bool err = false;
 
153
    UIUtilE::Assign(this, m_monitor_list, "monitor_list", &err);
 
154
    UIUtilE::Assign(this, m_status_text,  "status_text", &err);
 
155
    UIUtilE::Assign(this, m_time_text,    "time_text", &err);
 
156
    UIUtilE::Assign(this, m_date_text,    "date_text", &err);
 
157
    UIUtilE::Assign(this, m_load_text,    "load_text", &err);
 
158
    UIUtilE::Assign(this, m_disk_text,    "disk_text", &err);
 
159
 
 
160
    if (err)
161
161
    {
162
 
        VERBOSE(VB_IMPORTANT, "Theme is missing critical theme elements.");
 
162
        VERBOSE(VB_IMPORTANT, "Cannot load screen 'zmconsole'");
163
163
        return false;
164
164
    }
165
165