aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/theme/libkvitheme.cpp
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2015-08-25 05:09:21 +0200
committerGravatar Szymon Tomasz Stefanek2015-08-25 05:09:21 +0200
commita95bc713e341abf1d28247e22af5f1ca43147c4f (patch)
tree3c68840dd4ec27c09cf018da7b3867d9c3b8426f /src/modules/theme/libkvitheme.cpp
parentFile dialogs seem to always require a parent. Without it Qt5 enters in a kind... (diff)
downloadKVIrc-a95bc713e341abf1d28247e22af5f1ca43147c4f.tar.gz
KVIrc-a95bc713e341abf1d28247e22af5f1ca43147c4f.tar.bz2
KVIrc-a95bc713e341abf1d28247e22af5f1ca43147c4f.zip
More tweaks all around
Diffstat (limited to 'src/modules/theme/libkvitheme.cpp')
-rw-r--r--src/modules/theme/libkvitheme.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/modules/theme/libkvitheme.cpp b/src/modules/theme/libkvitheme.cpp
index 40a0caaeb..ea9b24cf0 100644
--- a/src/modules/theme/libkvitheme.cpp
+++ b/src/modules/theme/libkvitheme.cpp
@@ -32,6 +32,7 @@
#include "KviCommandFormatter.h"
#include "KviError.h"
#include "kvi_out.h"
+#include "KviMainWindow.h"
#include "KviIconManager.h"
#include "KviConfigurationFile.h"
#include "kvi_sourcesdate.h"
@@ -218,14 +219,28 @@ static bool theme_kvs_cmd_screenshot(KviKvsModuleCommandCall * c)
QString szTmp;
c->enterBlockingSection();
- bool bResult = KviFileDialog::askForSaveFileName(szTmp,__tr2qs_ctx("Choose a file to save the screenshot to","theme"),szFileName,"*.png");
+ bool bResult = KviFileDialog::askForSaveFileName(
+ szTmp,
+ __tr2qs_ctx("Choose a file to save the screenshot to","theme"),
+ szFileName,
+ "*.png",
+ false,
+ false,
+ true,
+ g_pMainWindow
+ );
- if(!c->leaveBlockingSection())return false; // need to stop immediately
- if(!bResult)return true;
+ if(!c->leaveBlockingSection())
+ return false; // need to stop immediately
+
+ if(!bResult)
+ return true;
szFileName = szTmp;
- if(szFileName.isEmpty())return true; // done
+ if(szFileName.isEmpty())
+ return true; // done
+
KviFileUtils::adjustFilePath(szFileName);
if(QFileInfo(szFileName).suffix()!="png")
szFileName+=".png";