aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-06-01 20:11:07 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-06-01 20:11:07 +0200
commitb60555997cd355a1e44ca357b2b3da71de8909c7 (patch)
tree66a65940c3494b56e48872d8407e5d5fce8963c2 /src
parentProfiles dialog (diff)
downloadsmolbote-b60555997cd355a1e44ca357b2b3da71de8909c7.tar.xz
Hiding ProfileView until a profile is selected
Diffstat (limited to 'src')
-rw-r--r--src/forms/profilesdialog.cpp11
-rw-r--r--src/widgets/mainwindowmenubar.cpp1
2 files changed, 11 insertions, 1 deletions
diff --git a/src/forms/profilesdialog.cpp b/src/forms/profilesdialog.cpp
index cf6791c..ed4c871 100644
--- a/src/forms/profilesdialog.cpp
+++ b/src/forms/profilesdialog.cpp
@@ -32,6 +32,16 @@ ProfilesDialog::ProfilesDialog(MainWindow *window, QWidget *parent) :
m_window = window;
m_view = new ProfileView(0, this);
+
+ // Hide the profile view because we're fancy
+ // Give focus to the widget because otherwise the listwidget gains focus
+ // this causes it to select the first item in it, which in turn triggers the signal
+ // and so the profile view gets shown even though the user hasn't selected anything
+ // and so we get to be less fancy, defeating the point of the exercise
+ // [on linux; other OS's not checked]
+ m_view->hide();
+ this->setFocus();
+
ui->setupUi(this);
ui->horizontalLayout->addWidget(m_view);
@@ -62,4 +72,5 @@ void ProfilesDialog::loadSelectedProfile()
void ProfilesDialog::viewProfile(int index)
{
m_view->setProfile(qApp->profile(ui->listWidget->item(index)->data(Qt::UserRole).toString()));
+ m_view->show();
}
diff --git a/src/widgets/mainwindowmenubar.cpp b/src/widgets/mainwindowmenubar.cpp
index a3ec497..0770a8d 100644
--- a/src/widgets/mainwindowmenubar.cpp
+++ b/src/widgets/mainwindowmenubar.cpp
@@ -58,7 +58,6 @@ MainWindowMenuBar::MainWindowMenuBar(MainWindow *parent) :
profileMenu->addAction(tr("Profiles"), this, SLOT(handleLoadProfile()));
profileMenu->addSeparator();
profileMenu->addAction(tr("View profile"), parent, SLOT(profileAction()));
- profileMenu->addAction(tr("Settings"));
profileMenu->addAction(tr("Cookies"), parent, SLOT(cookiesAction()));
// Page menu