~ubuntu-branches/ubuntu/oneiric/kdenetwork/oneiric-updates

« back to all changes in this revision

Viewing changes to kget/ui/mirror/mirrorsettings.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac, Philip Muškovac
  • Date: 2011-07-10 12:36:35 UTC
  • mfrom: (1.1.59 upstream)
  • Revision ID: package-import@ubuntu.com-20110710123635-3db9oyxdswp4sp1e
Tags: 4:4.6.90-0ubuntu1
* New upstream release
 - Bump on kde-sc-dev-latest
 - s/kdebase-runtime-dev/kde-runtime-dev
* Dropped kubuntu_05_samba_sharing.diff <- went upstream
* Added kubuntu_05_make_old_symbols_reappear_and_fix_building.diff
* Refreshed *.install
* Refreshed symbols

[ Philip Muškovac ]
* fix debug package depends on kdebase-runtime-dbg -> kde-runtime-dbg 
  and recommends on kde-workspace-dbg

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
void MirrorAddDlg::init()
43
43
{
44
44
    setCaption(i18n("Add mirror"));
45
 
    showButtonSeparator(true);
46
45
    QWidget *widget = new QWidget(this);
47
46
    ui.setupUi(widget);
48
47
    setMainWidget(widget);
53
52
        ui.location->setCurrentIndex(-1);
54
53
    }
55
54
 
56
 
    ui.successLabel->hide();
57
 
 
58
 
    setButtons(KDialog::Yes | KDialog::User1 | KDialog::Cancel);
 
55
    setButtons(KDialog::Yes | KDialog::Cancel);
59
56
    setButtonGuiItem(KDialog::Yes, KStandardGuiItem::add());
60
 
    setButtonGuiItem(KDialog::User1, KGuiItem(i18nc("Adds the item and reopens the dialog to add a further item", "Add more"), KIcon("list-add")));
61
 
    showButton(KDialog::Yes, true);
62
 
    showButton(KDialog::User1, true);
63
57
 
64
58
    updateButton();
65
59
 
66
60
    connect(ui.url, SIGNAL(textChanged(const QString&)), this, SLOT(updateButton(QString)));
67
61
    connect(this, SIGNAL(yesClicked()), this, SLOT(addMirror()));
68
 
    connect(this, SIGNAL(user1Clicked()), this, SLOT(addMore()));
69
62
}
70
63
 
71
64
void MirrorAddDlg::showItem(MirrorItem::DataType type, bool show)
90
83
        default:
91
84
            break;
92
85
    }
 
86
    update();
93
87
}
94
88
 
95
89
void MirrorAddDlg::updateButton(const QString &text)
116
110
    }
117
111
}
118
112
 
119
 
void MirrorAddDlg::addMore()
120
 
{
121
 
    addMirror();
122
 
    ui.successLabel->setText(i18n("%1 has been successfully added.", ui.url->text()));
123
 
    ui.url->clear();
124
 
    ui.numConnections->setValue(1);
125
 
    ui.priority->setValue(0);
126
 
    if (m_countryModel)
127
 
    {
128
 
        ui.location->setCurrentIndex(-1);
129
 
    }
130
 
    ui.successLabel->show();
131
 
    ui.url->setFocus();
132
 
}
133
 
 
134
113
MirrorSettings::MirrorSettings(QWidget *parent, TransferHandler *handler, const KUrl &file)
135
114
  : KDialog(parent),
136
115
    m_transfer(handler),