Hi,
Contents of the bug ticket:
When you try to restore some database from backup file pgadmin3 pops up
FileSelection dialog from gtk. I can choose here between showing "*.backup"
or "*.*" files.
The second filter howerver doesn't show all files. To show all files in this
dialog there muste be "*" filter.
Right now you cannot open files named: "my-cool-backup", "something"
"coolDatabase"... etc..
You can have it all here :
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=451038
So here is a patch to fix this.
PS : btw, I'm working with pgAdmin's Debian package maintainer, Gerfried
Fuchs, so that we can get a package for our last release. I hope to have good
news soon.
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
Index: pgadmin/frm/frmOptions.cpp
===================================================================
--- pgadmin/frm/frmOptions.cpp (révision 7978)
+++ pgadmin/frm/frmOptions.cpp (copie de travail)
@@ -540,7 +540,7 @@
void frmOptions::OnBrowseLogFile(wxCommandEvent &ev)
{
- wxFileDialog logFile(this, _("Select log file"), wxT(""), wxT(""), _("Log files (*.log)|*.log|All files (*.*)|*.*"));
+ wxFileDialog logFile(this, _("Select log file"), wxT(""), wxT(""), _("Log files (*.log)|*.log|All files (*.*;*)|*.*;*"));
logFile.SetDirectory(wxGetHomeDir());
if (logFile.ShowModal() == wxID_OK)
Index: pgadmin/frm/frmBackupServer.cpp
===================================================================
--- pgadmin/frm/frmBackupServer.cpp (révision 7978)
+++ pgadmin/frm/frmBackupServer.cpp (copie de travail)
@@ -92,7 +92,7 @@
wxString title, prompt, FilenameOnly;
title = _("Select output file");
- prompt = _("Query files (*.sql)|*.sql|All files (*.*)|*.*");
+ prompt = _("Query files (*.sql)|*.sql|All files (*.*;*)|*.*;*");
wxFileName::SplitPath(txtFilename->GetValue(), NULL, NULL, &FilenameOnly, NULL);
wxFileDialog file(this, title, ::wxPathOnly(txtFilename->GetValue()), FilenameOnly, prompt, wxFD_SAVE);
Index: pgadmin/frm/events.cpp
===================================================================
--- pgadmin/frm/events.cpp (révision 7978)
+++ pgadmin/frm/events.cpp (copie de travail)
@@ -779,7 +779,7 @@
wxString file;
settings->Read(wxT("frmMain/LastFile"), &file, wxEmptyString);
- wxFileDialog filename(this, _("Select output file"), ::wxPathOnly(file), file, _("SQL Scripts (*.sql)|*.sql|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
+ wxFileDialog filename(this, _("Select output file"), ::wxPathOnly(file), file, _("SQL Scripts (*.sql)|*.sql|All files (*.*;*)|*.*;*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
// Show the dialogue
if (filename.ShowModal() == wxID_OK)
Index: pgadmin/frm/frmConfig.cpp
===================================================================
--- pgadmin/frm/frmConfig.cpp (révision 7978)
+++ pgadmin/frm/frmConfig.cpp (copie de travail)
@@ -261,7 +261,7 @@
return;
wxFileDialog dlg(this, _("Open configuration file"), lastDir, wxT(""),
- _("Configuration files (*.conf)|*.conf|All files (*.*)|*.*"), wxFD_OPEN);
+ _("Configuration files (*.conf)|*.conf|All files (*.*;*)|*.*;*"), wxFD_OPEN);
if (dlg.ShowModal() == wxID_OK)
{
lastFilename=dlg.GetFilename();
@@ -294,7 +294,7 @@
void frmConfig::OnSaveAs(wxCommandEvent& event)
{
wxFileDialog *dlg=new wxFileDialog(this, _("Save configuration file as"), lastDir, lastFilename,
- _("Configuration files (*.conf)|*.conf|All files (*.*)|*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
+ _("Configuration files (*.conf)|*.conf|All files (*.*;*)|*.*;*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
if (dlg->ShowModal() == wxID_OK)
{
lastFilename=dlg->GetFilename();
Index: pgadmin/frm/frmBackup.cpp
===================================================================
--- pgadmin/frm/frmBackup.cpp (révision 7978)
+++ pgadmin/frm/frmBackup.cpp (copie de travail)
@@ -120,12 +120,12 @@
if (rbxFormat->GetSelection() == 2) // plain
{
title = _("Select output file");
- prompt = _("Query files (*.sql)|*.sql|All files (*.*)|*.*");
+ prompt = _("Query files (*.sql)|*.sql|All files (*.*;*)|*.*;*");
}
else
{
title = _("Select backup filename");
- prompt = _("Backup files (*.backup)|*.backup|All files (*.*)|*.*");
+ prompt = _("Backup files (*.backup)|*.backup|All files (*.*;*)|*.*;*");
}
wxFileName::SplitPath(txtFilename->GetValue(), NULL, NULL, &FilenameOnly, NULL);
Index: pgadmin/frm/frmQuery.cpp
===================================================================
--- pgadmin/frm/frmQuery.cpp (révision 7978)
+++ pgadmin/frm/frmQuery.cpp (copie de travail)
@@ -969,7 +969,7 @@
void frmQuery::OnSaveHistory(wxCommandEvent& event)
{
wxFileDialog *dlg=new wxFileDialog(this, _("Save history"), lastDir, wxEmptyString,
- _("Log files (*.log)|*.log|All files (*.*)|*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
+ _("Log files (*.log)|*.log|All files (*.*;*)|*.*;*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
if (dlg->ShowModal() == wxID_OK)
{
if (!FileWrite(dlg->GetPath(), msgHistory->GetValue(), false))
@@ -1479,7 +1479,7 @@
return;
wxFileDialog dlg(this, _("Open query file"), lastDir, wxT(""),
- _("Query files (*.sql)|*.sql|pgScript files (*.pgs)|*.pgs|All files (*.*)|*.*"), wxFD_OPEN);
+ _("Query files (*.sql)|*.sql|pgScript files (*.pgs)|*.pgs|All files (*.*;*)|*.*;*"), wxFD_OPEN);
if (dlg.ShowModal() == wxID_OK)
{
lastFilename=dlg.GetFilename();
@@ -1644,7 +1644,7 @@
void frmQuery::OnSaveAs(wxCommandEvent& event)
{
wxFileDialog *dlg=new wxFileDialog(this, _("Save query file as"), lastDir, lastFilename,
- _("Query files (*.sql)|*.sql|All files (*.*)|*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
+ _("Query files (*.sql)|*.sql|All files (*.*;*)|*.*;*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
if (dlg->ShowModal() == wxID_OK)
{
lastFilename=dlg->GetFilename();
Index: pgadmin/frm/frmBackupGlobals.cpp
===================================================================
--- pgadmin/frm/frmBackupGlobals.cpp (révision 7978)
+++ pgadmin/frm/frmBackupGlobals.cpp (copie de travail)
@@ -103,7 +103,7 @@
wxString title, prompt, FilenameOnly;
title = _("Select output file");
- prompt = _("Query files (*.sql)|*.sql|All files (*.*)|*.*");
+ prompt = _("Query files (*.sql)|*.sql|All files (*.*;*)|*.*;*");
wxFileName::SplitPath(txtFilename->GetValue(), NULL, NULL, &FilenameOnly, NULL);
wxFileDialog file(this, title, ::wxPathOnly(txtFilename->GetValue()), FilenameOnly, prompt, wxFD_SAVE);
Index: pgadmin/frm/frmMainConfig.cpp
===================================================================
--- pgadmin/frm/frmMainConfig.cpp (révision 7978)
+++ pgadmin/frm/frmMainConfig.cpp (copie de travail)
@@ -641,7 +641,7 @@
return;
wxFileDialog dlg(this, _("Open configuration file"), lastDir, wxT(""),
- _("Configuration files (*.conf)|*.conf|All files (*.*)|*.*"), wxFD_OPEN);
+ _("Configuration files (*.conf)|*.conf|All files (*.*;*)|*.*;*"), wxFD_OPEN);
if (dlg.ShowModal() == wxID_OK)
{
Init();
Index: pgadmin/frm/frmReport.cpp
===================================================================
--- pgadmin/frm/frmReport.cpp (révision 7978)
+++ pgadmin/frm/frmReport.cpp (copie de travail)
@@ -440,7 +440,7 @@
if (!wxFile::Exists(def))
def.Empty();
- wxFileDialog file(this, _("Select stylesheet filename"), wxGetHomeDir(), def, _("HTML Stylesheet files (*.css)|*.css|All files (*.*)|*.*"), wxFD_OPEN);
+ wxFileDialog file(this, _("Select stylesheet filename"), wxGetHomeDir(), def, _("HTML Stylesheet files (*.css)|*.css|All files (*.*;*)|*.*;*"), wxFD_OPEN);
if (file.ShowModal() == wxID_OK)
{
@@ -455,7 +455,7 @@
if (!wxFile::Exists(def))
def.Empty();
- wxFileDialog file(this, _("Select stylesheet filename"), wxGetHomeDir(), def, _("XML Stylesheet files (*.xsl)|*.xsl|All files (*.*)|*.*"), wxFD_OPEN);
+ wxFileDialog file(this, _("Select stylesheet filename"), wxGetHomeDir(), def, _("XML Stylesheet files (*.xsl)|*.xsl|All files (*.*;*)|*.*;*"), wxFD_OPEN);
if (file.ShowModal() == wxID_OK)
{
@@ -470,7 +470,7 @@
if (rbHtml->GetValue())
{
wxFileDialog file(this, _("Select output filename"), wxGetHomeDir(), txtHtmlFile->GetValue(),
- _("HTML files (*.html)|*.html|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
+ _("HTML files (*.html)|*.html|All files (*.*;*)|*.*;*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (file.ShowModal() == wxID_OK)
{
@@ -481,7 +481,7 @@
else
{
wxFileDialog file(this, _("Select output filename"), wxGetHomeDir(), txtXmlFile->GetValue(),
- _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
+ _("XML files (*.xml)|*.xml|All files (*.*;*)|*.*;*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (file.ShowModal() == wxID_OK)
{
Index: pgadmin/frm/frmExport.cpp
===================================================================
--- pgadmin/frm/frmExport.cpp (révision 7978)
+++ pgadmin/frm/frmExport.cpp (copie de travail)
@@ -320,7 +320,7 @@
}
wxFileDialog file(this, _("Select export filename"), directory, filename,
- _("CSV files (*.csv)|*.csv|Data files (*.dat)|*.dat|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
+ _("CSV files (*.csv)|*.csv|Data files (*.dat)|*.dat|All files (*.*;*)|*.*;*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (file.ShowModal() == wxID_OK)
{
Index: pgadmin/frm/frmRestore.cpp
===================================================================
--- pgadmin/frm/frmRestore.cpp (révision 7978)
+++ pgadmin/frm/frmRestore.cpp (copie de travail)
@@ -142,7 +142,7 @@
wxFileName::SplitPath(txtFilename->GetValue(), NULL, NULL, &FilenameOnly, NULL);
wxFileDialog file(this, _("Select backup filename"), ::wxPathOnly(txtFilename->GetValue()), FilenameOnly,
- _("Backup files (*.backup)|*.backup|All files (*.*)|*.*"));
+ _("Backup files (*.backup)|*.backup|All files (*.*;*)|*.*;*"));
if (file.ShowModal() == wxID_OK)
{
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers