Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KBackup
Commits
b98a30ea
Commit
b98a30ea
authored
Jul 24, 2020
by
Martin Koller
Browse files
open home dir after settings are restored, else wrong position visible
parent
9265eead
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/MainWindow.cxx
View file @
b98a30ea
...
...
@@ -122,6 +122,9 @@ MainWindow::MainWindow()
docked
->
setChecked
(
KSharedConfig
::
openConfig
()
->
group
(
"settings"
).
readEntry
<
bool
>
(
"dockInSysTray"
,
false
));
dockInSysTray
(
docked
->
isChecked
());
// for convenience, open the tree at the HOME directory
selector
->
openHomeDir
();
changeSystrayTip
();
}
...
...
src/Selector.cxx
View file @
b98a30ea
...
...
@@ -262,18 +262,6 @@ Selector::Selector(QWidget *parent, KActionCollection *actionCollection)
connect
(
this
,
&
Selector
::
expanded
,
this
,
&
Selector
::
expandedSlot
);
// for convenience, open the tree at the HOME directory
const
char
*
home
=
::
getenv
(
"HOME"
);
if
(
home
)
{
QStandardItem
*
homeItem
=
findItemByPath
(
QFile
::
decodeName
(
home
));
if
(
homeItem
)
{
setExpanded
(
homeItem
->
index
(),
true
);
scrollTo
(
homeItem
->
index
());
}
}
minSize
=
QSize
(
columnWidth
(
0
)
+
columnWidth
(
1
),
-
1
);
resizeColumnToContents
(
0
);
resizeColumnToContents
(
1
);
...
...
@@ -310,6 +298,22 @@ Selector::Selector(QWidget *parent, KActionCollection *actionCollection)
//--------------------------------------------------------------------------------
void
Selector
::
openHomeDir
()
{
const
char
*
home
=
::
getenv
(
"HOME"
);
if
(
home
)
{
QStandardItem
*
homeItem
=
findItemByPath
(
QFile
::
decodeName
(
home
));
if
(
homeItem
)
{
setExpanded
(
homeItem
->
index
(),
true
);
scrollTo
(
homeItem
->
index
());
}
}
}
//--------------------------------------------------------------------------------
QSize
Selector
::
minimumSizeHint
()
const
{
return
minSize
;
...
...
src/Selector.hxx
View file @
b98a30ea
...
...
@@ -31,6 +31,7 @@ class Selector : public QTreeView
void
getBackupList
(
QStringList
&
includes
,
QStringList
&
excludes
)
const
;
void
setBackupList
(
const
QStringList
&
includes
,
const
QStringList
&
excludes
);
void
setShowHiddenFiles
(
bool
show
);
void
openHomeDir
();
QSize
minimumSizeHint
()
const
override
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment