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 <util/rsrandom.h>
|
||||||
#include <retroshare/rsinit.h>
|
#include <retroshare/rsinit.h>
|
||||||
#include <rsserver/rsaccounts.h>
|
#include <rsserver/rsaccounts.h>
|
||||||
|
#include "gui/settings/rsharesettings.h"
|
||||||
|
#include "util/misc.h"
|
||||||
#include "GenCertDialog.h"
|
#include "GenCertDialog.h"
|
||||||
#include <QAbstractEventDispatcher>
|
#include <QAbstractEventDispatcher>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
@ -416,7 +418,9 @@ void GenCertDialog::exportIdentity()
|
|||||||
|
|
||||||
void GenCertDialog::importIdentity()
|
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())
|
if(fname.isNull())
|
||||||
return ;
|
return ;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
#include "PluginManagerWidget.h"
|
#include "PluginManagerWidget.h"
|
||||||
|
#include "gui/settings/rsharesettings.h"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
@ -160,14 +161,10 @@ PluginManagerWidget::registerNewPlugin(QString pluginName)
|
|||||||
void
|
void
|
||||||
PluginManagerWidget::installPluginButtonClicked()
|
PluginManagerWidget::installPluginButtonClicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName(this,
|
QString fileName = misc::getOpenFileName(this, RshareSettings::LASTDIR_PLUGIN, tr("Open Plugin to install"), "./", tr("Plugins (*.so *.dll)"));
|
||||||
tr("Open Plugin to install"),
|
|
||||||
"./",
|
|
||||||
tr("Plugins (*.so *.dll)"));
|
|
||||||
if (!fileName.isNull())
|
if (!fileName.isNull())
|
||||||
{
|
|
||||||
emit installPluginRequested(fileName);
|
emit installPluginRequested(fileName);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gui/settings/rsharesettings.h"
|
||||||
|
#include "util/misc.h"
|
||||||
#include "ConnectFriendWizard.h"
|
#include "ConnectFriendWizard.h"
|
||||||
#include "ui_ConnectFriendWizard.h"
|
#include "ui_ConnectFriendWizard.h"
|
||||||
#include "gui/common/PeerDefs.h"
|
#include "gui/common/PeerDefs.h"
|
||||||
@ -1040,7 +1042,9 @@ void ConnectFriendWizard::saveCert()
|
|||||||
|
|
||||||
void ConnectFriendWizard::loadFriendCert()
|
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()) {
|
if (!fileName.isNull()) {
|
||||||
ui->friendFileNameEdit->setText(fileName);
|
ui->friendFileNameEdit->setText(fileName);
|
||||||
|
@ -24,7 +24,9 @@
|
|||||||
#include <retroshare/rsinit.h>
|
#include <retroshare/rsinit.h>
|
||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
#include "ProfileManager.h"
|
#include "ProfileManager.h"
|
||||||
|
#include "util/misc.h"
|
||||||
#include "gui/GenCertDialog.h"
|
#include "gui/GenCertDialog.h"
|
||||||
|
#include "gui/settings/rsharesettings.h"
|
||||||
#include "gui/common/RSTreeWidgetItem.h"
|
#include "gui/common/RSTreeWidgetItem.h"
|
||||||
|
|
||||||
#include <QAbstractEventDispatcher>
|
#include <QAbstractEventDispatcher>
|
||||||
@ -145,7 +147,10 @@ void ProfileManager::exportIdentity()
|
|||||||
|
|
||||||
void ProfileManager::importIdentity()
|
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())
|
if(fname.isNull())
|
||||||
return ;
|
return ;
|
||||||
|
@ -75,8 +75,9 @@ public:
|
|||||||
LASTDIR_IMAGES,
|
LASTDIR_IMAGES,
|
||||||
LASTDIR_MESSAGES,
|
LASTDIR_MESSAGES,
|
||||||
LASTDIR_BLOGS,
|
LASTDIR_BLOGS,
|
||||||
LASTDIR_SOUNDS
|
LASTDIR_SOUNDS,
|
||||||
};
|
LASTDIR_PLUGIN
|
||||||
|
};
|
||||||
|
|
||||||
enum enumToasterPosition
|
enum enumToasterPosition
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user