Skip to content

Commit

Permalink
- BugFix: openFile always left a running file manager even after program
Browse files Browse the repository at this point in the history
close.
  • Loading branch information
aarnt committed Sep 8, 2023
1 parent 2064716 commit cdb9600
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Actions tab shows a counter feedback for inserts (with a plus signal) and
removals (with a minus signal) and does not steal focus anymore.
Changed "Sync packages" string to "Check updates".
BugFix: openFile always left a running file manager even after program close.
BugFix: Disable refreshing of Info and File tabs while searching for a pkg.
BugFix: Prefer bash shell when running actions.
BugFix: Disable Info/Files tab refresh while typing in filter/search line edit.
Expand Down
38 changes: 19 additions & 19 deletions src/wmhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,84 +256,84 @@ void WMHelper::openFile(const QString& fileName){
{
s << fileToOpen;
if (UnixCommand::hasTheExecutable(ctn_XFCE_EDITOR))
p->startDetached(ctn_XFCE_EDITOR, s);
p->start(ctn_XFCE_EDITOR, s);
else if (UnixCommand::hasTheExecutable(ctn_XFCE_EDITOR_ALT))
p->startDetached(ctn_XFCE_EDITOR_ALT, s);
p->start(ctn_XFCE_EDITOR_ALT, s);
}
else
{
s << fileToOpen;
p->startDetached(ctn_XFCE_FILE_MANAGER, s);
p->start(ctn_XFCE_FILE_MANAGER, s);
}
}
else if (isKDERunning() && UnixCommand::hasTheExecutable(ctn_KDE_FILE_MANAGER)){
s << "exec";
s << "file:" + fileToOpen;
p->startDetached( ctn_KDE_FILE_MANAGER, s );
p->start( ctn_KDE_FILE_MANAGER, s);
}
else if (UnixCommand::hasTheExecutable(ctn_KDE4_FILE_MANAGER)){
s << fileToOpen;
p->startDetached( getKDEOpenHelper(), s );
p->start( getKDEOpenHelper(), s);
}
else if (isTDERunning() && UnixCommand::hasTheExecutable(ctn_TDE_FILE_MANAGER)){
s << "exec";
s << "file:" + fileToOpen;
p->startDetached( ctn_TDE_FILE_MANAGER, s );
p->start(ctn_TDE_FILE_MANAGER, s);
}
else if (isMATERunning() && UnixCommand::hasTheExecutable(ctn_MATE_FILE_MANAGER)){
s << fileToOpen;
p->startDetached( ctn_MATE_FILE_MANAGER, s );
p->start(ctn_MATE_FILE_MANAGER, s);
}
else if (isCinnamonRunning() && UnixCommand::hasTheExecutable(ctn_CINNAMON_FILE_MANAGER)){
s << fileToOpen;
p->startDetached( ctn_CINNAMON_FILE_MANAGER, s );
p->start(ctn_CINNAMON_FILE_MANAGER, s);
}
else if (isLXQTRunning() && UnixCommand::hasTheExecutable(ctn_LXQT_FILE_MANAGER)){
s << fileToOpen;
p->startDetached( ctn_LXQT_FILE_MANAGER, s );
p->start(ctn_LXQT_FILE_MANAGER, s);
}
else if (isLuminaRunning() && UnixCommand::hasTheExecutable(ctn_LUMINA_OPEN)){
s << fileToOpen;
p->startDetached( ctn_LUMINA_OPEN, s );
p->start(ctn_LUMINA_OPEN, s);
}
else if (UnixCommand::hasTheExecutable(ctn_ARCHBANG_FILE_MANAGER)){
s << fileToOpen;
p->startDetached( ctn_ARCHBANG_FILE_MANAGER, s );
p->start(ctn_ARCHBANG_FILE_MANAGER, s);
}
else if (UnixCommand::hasTheExecutable(ctn_LXQT_FILE_MANAGER)){
s << fileToOpen;
p->startDetached(ctn_LXQT_FILE_MANAGER, s );
p->start(ctn_LXQT_FILE_MANAGER, s);
}
else if (UnixCommand::hasTheExecutable(ctn_LXDE_FILE_MANAGER)){
s << fileToOpen;
p->startDetached( ctn_LXDE_FILE_MANAGER, s );
p->start(ctn_LXDE_FILE_MANAGER, s);
}
else if (UnixCommand::hasTheExecutable(ctn_XFCE_FILE_MANAGER))
{
if (isTextFile)
{
s << fileToOpen;
if (UnixCommand::hasTheExecutable(ctn_XFCE_EDITOR))
p->startDetached(ctn_XFCE_EDITOR, s);
p->start(ctn_XFCE_EDITOR, s);
else if (UnixCommand::hasTheExecutable(ctn_XFCE_EDITOR_ALT))
p->startDetached(ctn_XFCE_EDITOR_ALT, s);
p->start(ctn_XFCE_EDITOR_ALT, s);
}
else
{
s << fileToOpen;
p->startDetached( ctn_XFCE_FILE_MANAGER, s );
p->start( ctn_XFCE_FILE_MANAGER, s);
}
}
else if (UnixCommand::hasTheExecutable(ctn_GNOME_FILE_MANAGER)){
s << fileToOpen;
if (isTextFile)
p->startDetached( ctn_GNOME_EDITOR, s );
p->start(ctn_GNOME_EDITOR, s);
else
p->startDetached( ctn_GNOME_FILE_MANAGER, s );
p->start(ctn_GNOME_FILE_MANAGER, s);
}
else if (UnixCommand::hasTheExecutable(ctn_XDG_OPEN)){
s << fileToOpen;
p->startDetached( ctn_XDG_OPEN, s );
p->start(ctn_XDG_OPEN, s);
}
}

Expand Down

0 comments on commit cdb9600

Please sign in to comment.