Changeset c0559b6


Ignore:
Timestamp:
09/06/11 23:17:01 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
40849d7
Parents:
1006c4f
Message:

Now the progress bar is shown immediately after clicking the refresh conference button. Closes ticket #25.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/conferenceeditor.cpp

    r1006c4f rc0559b6  
    131131void ConferenceEditor::changeUrlClicked()
    132132{
    133     if (selected_id < 0) {
    134         return;
    135     }
    136     const Conference& selected = Conference::getById(selected_id);
     133    if (selected_id < 0) return;
     134    const Conference& selectedConf = Conference::getById(selected_id);
    137135
    138136    bool ok;
    139     QString url = QInputDialog::getText(this, "URL Input", "Enter schedule URL", QLineEdit::Normal, selected.url(), &ok);
     137    QString url = QInputDialog::getText(this, "URL Input", "Enter schedule URL", QLineEdit::Normal, selectedConf.url(), &ok);
    140138
    141139    if (ok) {
     
    146144void ConferenceEditor::refreshClicked()
    147145{
    148     if (selected_id < 0) {
    149         return;
    150     }
    151     const Conference& selected = Conference::getById(selected_id);
    152 
    153     QString url = selected.url();
    154 
    155     if (!url.isEmpty()) {
    156         emit haveConferenceUrl(url);
    157     } else {
     146    if (selected_id < 0) return;
     147    const Conference& selectedConf = Conference::getById(selected_id);
     148    QString url = selectedConf.url();
     149
     150    if (url.isEmpty()) {
    158151        static const QString format("Schedule URL for %1 is not set. Enter the schedule URL:");
    159152        bool ok;
    160         QString url = QInputDialog::getText(this, "URL Input", format.arg(selected.title()), QLineEdit::Normal, QString(), &ok);
    161 
    162         if (ok) {
    163             // first save it, to remain if fetch fails
    164             emit changeUrlRequested(selected_id, url);
    165             // then fetch
    166             emit haveConferenceUrl(url);
    167         }
    168     }
     153        QString url = QInputDialog::getText(this, "URL Input", format.arg(selectedConf.title()), QLineEdit::Normal, QString(), &ok);
     154        if (!ok) return;
     155        // first save it, to remain if fetch fails
     156        emit changeUrlRequested(selected_id, url);
     157    }
     158    // fetch
     159    importStarted(); // just to show the progress bar
     160    emit haveConferenceUrl(url);
    169161}
    170162
Note: See TracChangeset for help on using the changeset viewer.