mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-26 09:41:29 -05:00
moved all getOpenFilename to use misc::getOpenFilename
This commit is contained in:
parent
c643d1e672
commit
5fac5a8d76
@ -23,6 +23,8 @@
|
||||
#include <util/rsrandom.h>
|
||||
#include <retroshare/rsinit.h>
|
||||
#include <rsserver/rsaccounts.h>
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/misc.h"
|
||||
#include "GenCertDialog.h"
|
||||
#include <QAbstractEventDispatcher>
|
||||
#include <QFileDialog>
|
||||
@ -416,7 +418,9 @@ void GenCertDialog::exportIdentity()
|
||||
|
||||
void GenCertDialog::importIdentity()
|
||||
{
|
||||
QString fname = QFileDialog::getOpenFileName(this,tr("Import profile"), "",tr("RetroShare profile files (*.asc);;All Files (*)")) ;
|
||||
QString fname ;
|
||||
if(!misc::getOpenFileName(this,RshareSettings::LASTDIR_CERT,tr("Import profile"), tr("RetroShare profile files (*.asc);;All files (*)"),fname))
|
||||
return ;
|
||||
|
||||
if(fname.isNull())
|
||||
return ;
|
||||
|
@ -20,6 +20,7 @@
|
||||
****************************************************************/
|
||||
|
||||
#include "PluginManagerWidget.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
@ -160,14 +161,10 @@ PluginManagerWidget::registerNewPlugin(QString pluginName)
|
||||
void
|
||||
PluginManagerWidget::installPluginButtonClicked()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
tr("Open Plugin to install"),
|
||||
"./",
|
||||
tr("Plugins (*.so *.dll)"));
|
||||
QString fileName = misc::getOpenFileName(this, RshareSettings::LASTDIR_PLUGIN, tr("Open Plugin to install"), "./", tr("Plugins (*.so *.dll)"));
|
||||
|
||||
if (!fileName.isNull())
|
||||
{
|
||||
emit installPluginRequested(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include <QUrlQuery>
|
||||
#endif
|
||||
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/misc.h"
|
||||
#include "ConnectFriendWizard.h"
|
||||
#include "ui_ConnectFriendWizard.h"
|
||||
#include "gui/common/PeerDefs.h"
|
||||
@ -1040,7 +1042,9 @@ void ConnectFriendWizard::saveCert()
|
||||
|
||||
void ConnectFriendWizard::loadFriendCert()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select Certificate"), "", tr("RetroShare Certificate (*.rsc );;All Files (*)"));
|
||||
QString fileName ;
|
||||
if(!misc::getOpenFileName(this, RshareSettings::LASTDIR_CERT, tr("Select Certificate"), tr("RetroShare Certificate (*.rsc );;All Files (*)"),fileName))
|
||||
return ;
|
||||
|
||||
if (!fileName.isNull()) {
|
||||
ui->friendFileNameEdit->setText(fileName);
|
||||
|
@ -24,7 +24,9 @@
|
||||
#include <retroshare/rsinit.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include "ProfileManager.h"
|
||||
#include "util/misc.h"
|
||||
#include "gui/GenCertDialog.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/common/RSTreeWidgetItem.h"
|
||||
|
||||
#include <QAbstractEventDispatcher>
|
||||
@ -145,7 +147,10 @@ void ProfileManager::exportIdentity()
|
||||
|
||||
void ProfileManager::importIdentity()
|
||||
{
|
||||
QString fname = QFileDialog::getOpenFileName(this,tr("Import Identity"), "",tr("RetroShare Identity files (*.asc)")) ;
|
||||
QString fname ;
|
||||
|
||||
if(!misc::getOpenFileName(this,RshareSettings::LASTDIR_CERT,tr("Import Identity"), tr("RetroShare Identity files (*.asc)"),fname))
|
||||
return ;
|
||||
|
||||
if(fname.isNull())
|
||||
return ;
|
||||
|
@ -75,7 +75,8 @@ public:
|
||||
LASTDIR_IMAGES,
|
||||
LASTDIR_MESSAGES,
|
||||
LASTDIR_BLOGS,
|
||||
LASTDIR_SOUNDS
|
||||
LASTDIR_SOUNDS,
|
||||
LASTDIR_PLUGIN
|
||||
};
|
||||
|
||||
enum enumToasterPosition
|
||||
|
Loading…
x
Reference in New Issue
Block a user