~ubuntu-branches/ubuntu/trusty/manaplus/trusty-proposed

« back to all changes in this revision

Viewing changes to src/gui/updaterwindow.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi, Andrei Karas, Patrick Matthäi
  • Date: 2013-05-18 21:06:29 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130518210629-3trtowluum0tekob
Tags: 1.3.5.12-1
[ Andrei Karas ]
* Add new files to copyright file.

[ Patrick Matthäi ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
 
78
78
    for_each_xml_child_node(fileNode, rootNode)
79
79
    {
80
 
        // Ignore all tags except for the "update" tags
81
80
        if (!xmlNameEqual(fileNode, "update"))
82
81
            continue;
83
82
 
 
83
        if (XML::getProperty(fileNode, "group", "default") != "default")
 
84
            continue;
 
85
 
84
86
        UpdateFile file;
85
87
        file.name = XML::getProperty(fileNode, "file", "");
86
88
        file.hash = XML::getProperty(fileNode, "hash", "");
87
89
        file.type = XML::getProperty(fileNode, "type", "data");
88
90
        file.desc = XML::getProperty(fileNode, "description", "");
 
91
        const std::string version = XML::getProperty(
 
92
            fileNode, "version", "");
 
93
        if (!version.empty())
 
94
        {
 
95
            if (version > CHECK_VERSION)
 
96
                continue;
 
97
        }
 
98
        const std::string notVersion = XML::getProperty(
 
99
            fileNode, "notVersion", "");
 
100
        if (!notVersion.empty())
 
101
        {
 
102
            if (notVersion <= CHECK_VERSION)
 
103
                continue;
 
104
        }
89
105
        if (XML::getProperty(fileNode, "required", "yes") == "yes")
90
106
            file.required = true;
91
107
        else
136
152
                             const std::string &updatesDir,
137
153
                             const bool applyUpdates,
138
154
                             const int updateType):
 
155
    // TRANSLATORS: updater window name
139
156
    Window(_("Updating..."), false, nullptr, "update.xml"),
140
157
    gcn::ActionListener(),
141
158
    gcn::KeyListener(),
160
177
    mUpdateIndexOffset(0),
161
178
    mLoadUpdates(applyUpdates),
162
179
    mUpdateType(updateType),
 
180
    // TRANSLATORS: updater window label
163
181
    mLabel(new Label(this, _("Connecting..."))),
 
182
    // TRANSLATORS: updater window button
164
183
    mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
 
184
    // TRANSLATORS: updater window button
165
185
    mPlayButton(new Button(this, _("Play"), "play", this)),
166
186
    mProgressBar(new ProgressBar(this, 0.0, 310, 0)),
167
187
    mBrowserBox(new BrowserBox(this)),
648
668
    {
649
669
        case UPDATE_ERROR:
650
670
            mBrowserBox->addRow("");
 
671
            // TRANSLATORS: update message
651
672
            mBrowserBox->addRow(_("##1  The update process is incomplete."));
652
 
            // TRANSLATORS: Continues "you try again later.".
 
673
            // TRANSLATORS: Continues "The update process is incomplete.".
653
674
            mBrowserBox->addRow(_("##1  It is strongly recommended that"));
654
675
            // TRANSLATORS: Begins "It is strongly recommended that".
655
676
            mBrowserBox->addRow(_("##1  you try again later."));
830
851
        case UPDATE_COMPLETE:
831
852
            mUpdatesDir = mUpdatesDirReal;
832
853
            enable();
 
854
            // TRANSLATORS: updater window label
833
855
            setLabel(_("Completed"));
834
856
            break;
835
857
        case UPDATE_IDLE: