Git commit 6b3a955c7f43473447e5f9bc9d0ac83f93b66e0c by Thomas Friedrichsmei=
er.
Committed on 31/12/2014 at 19:36.
Pushed by tfry into branch 'development/plugin_management_to_loadlibs'.
Move the "Configure Repositories"-button to the tab it applies to.
M +20 -15 rkward/dialogs/rkloadlibsdialog.cpp
M +1 -0 rkward/dialogs/rkloadlibsdialog.h
http://commits.kde.org/rkward/6b3a955c7f43473447e5f9bc9d0ac83f93b66e0c
diff --git a/rkward/dialogs/rkloadlibsdialog.cpp b/rkward/dialogs/rkloadlib=
sdialog.cpp
index 14c39af..63c6078 100644
--- a/rkward/dialogs/rkloadlibsdialog.cpp
+++ b/rkward/dialogs/rkloadlibsdialog.cpp
@@ -61,7 +61,7 @@ RKLoadLibsDialog::RKLoadLibsDialog (QWidget *parent, RCom=
mandChain *chain, bool
setFaceType (KPageDialog::Tabbed);
setModal (modal);
setCaption (i18n ("Configure Packages"));
- setButtons (KDialog::Ok | KDialog::Apply | KDialog::Cancel | KDialog::Use=
r1);
+ setButtons (KDialog::Ok | KDialog::Apply | KDialog::Cancel);
=
LoadUnloadWidget *luwidget =3D new LoadUnloadWidget (this);
addPage (luwidget, i18n ("Local packages"));
@@ -70,8 +70,6 @@ RKLoadLibsDialog::RKLoadLibsDialog (QWidget *parent, RCom=
mandChain *chain, bool
install_packages_widget =3D new InstallPackagesWidget (this);
install_packages_pageitem =3D addPage (install_packages_widget, i18n ("In=
stall / Update / Remove"));
=
- setButtonText (KDialog::User1, i18n ("Configure Repositories"));
-
addPage (new RKPluginMapSelectionWidget (this), i18n ("Manage Plugins"));
=
connect (this, SIGNAL (currentPageChanged(KPageWidgetItem*,KPageWidgetIte=
m*)), this, SLOT (slotPageChanged()));
@@ -146,9 +144,6 @@ void RKLoadLibsDialog::slotButtonClicked (int button) {
case KDialog::Apply:
emit (applyClicked ());
break;
- case KDialog::User1:
- RKSettings::configureSettings (RKSettings::PageRPackages, this, chain);
- break;
}
}
=
@@ -627,14 +622,14 @@ InstallPackagesWidget::InstallPackagesWidget (RKLoadL=
ibsDialog *dialog) : QWidge
RK_TRACE (DIALOGS);
InstallPackagesWidget::parent =3D dialog;
=
- QVBoxLayout *mvbox =3D new QVBoxLayout (this);
- mvbox->setContentsMargins (0, 0, 0, 0);
- QLabel *label =3D new QLabel (i18n ("Many packages are available on CRAN =
(Comprehensive R Archive Network), and other repositories
(click \"Confi=
gure Repositories\" to add more sources)."), this);
- mvbox->addWidget (label);
- QHBoxLayout *hbox =3D new QHBoxLayout ();
- mvbox->addLayout (hbox);
+ QHBoxLayout *hbox =3D new QHBoxLayout (this);
hbox->setContentsMargins (0, 0, 0, 0);
=
+ QVBoxLayout *vbox =3D new QVBoxLayout ();
+ vbox->setContentsMargins (0, 0, 0, 0);
+ hbox->addLayout (vbox);
+ hbox->setStretchFactor (vbox, 2);
+
packages_status =3D new RKRPackageInstallationStatus (this);
packages_view =3D new QTreeView (this);
packages_view->setSortingEnabled (true);
@@ -645,13 +640,18 @@ InstallPackagesWidget::InstallPackagesWidget (RKLoadL=
ibsDialog *dialog) : QWidge
packages_view->setModel (model);
packages_view->setEnabled (false);
packages_view->setMinimumHeight (packages_view->sizeHintForRow (0) * 15);=
// force a decent height
- hbox->addWidget (packages_view);
- hbox->setStretchFactor (packages_view, 2);
+ packages_view->setMinimumWidth (packages_view->fontMetrics ().width ("Thi=
s is to force a sensible min width for the packages view (empty on construc=
tion)"));
+ vbox->addWidget (packages_view);
+
+ QPushButton *configure_repos_button =3D new QPushButton (i18n ("Configure=
Repositories"), this);
+ RKCommonFunctions::setTips (i18n ("Many packages are available on CRAN (C=
omprehensive R Archive Network), and other repositories.
Click this to a=
dd more sources."), configure_repos_button);
+ connect (configure_repos_button, SIGNAL (clicked()), this, SLOT(configure=
Repositories()));
+ vbox->addWidget (configure_repos_button);
=
QVBoxLayout *buttonvbox =3D new QVBoxLayout ();
hbox->addLayout (buttonvbox);
buttonvbox->setContentsMargins (0, 0, 0, 0);
- label =3D new QLabel (i18n ("Show only packages matching:"), this);
+ QLabel *label =3D new QLabel (i18n ("Show only packages matching:"), this=
);
filter_edit =3D new QLineEdit (QString (), this);
RKCommonFunctions::setTips (i18n ("
You can limit the packages displaye= d in the list to with names or titles matching a filter string.
No= te: To limit the search to matches at the start of the string, start th= e filter with '^', e.g. ('^rk.'). To limit searches to the end of the strin= g, append '$' at the end of the filter.
"), label, filter_edit); connect (filter_edit, SIGNAL (textChanged(QString)), this, SLOT (filterCh= anged())); @@ -785,6 +785,11 @@ void InstallPackagesWidget::cancel () { deleteLater (); } = +void InstallPackagesWidget::configureRepositories () { + RK_TRACE (DIALOGS); + RKSettings::configureSettings (RKSettings::PageRPackages, this, parent->c= hain); +} + /////////////////////// PackageInstallParamsWidget ///////////////////////= /// = #include