Le 29/10/2010 07:47, Thom Brown a écrit :
> On 29 October 2010 15:34, Guillaume Lelarge <[email protected]> wrote:
> 
>> Le 29/10/2010 06:16, Thom Brown a écrit :
>>> On 28 October 2010 13:57, Thom Brown <[email protected]> wrote:
>>>
>>>> Could you change the OK button on the Restore database form to
>>>> Restore?  I still press OK even after restoring a database as I see
>>>> the log messages, and naturally assume OK will close the window.
>>>>
>>>>
>>> Actually, I've noticed the restore form isn't consistent with the backup
>>> form.  When a backup has completed, the OK button changes to Done.  Maybe
>>> the restore form should exhibit the same behaviour.
>>>
>>
>> And actually, it does. Did you do something specific for your restore?
>> (I didn't change anything in the restore dialog, so it could be a
>> specific option but I don't really see how that could be)
>>
>>
> The scenario is using a custom backup (which happens to have the file
> extention .sql), using 4 jobs, and not changing any other options.  The
> messages from this restore shows:
> 
> WARNING: errors ignored on restore: 43
> 
> Process returned exit code 1.
> 
> All the warnings appear to be the result of attempting to set the owner of
> objects to a role which doesn't exist, but as it happens, I don't
> particularly care about that in this case.  After this, the OK button
> doesn't change to Restore or Done.  Just stays as OK.
> 
> Just retried it having created the role, and the button indeed changes to
> Done.
> 
> But at no point do I see a Restore button, which I'd like to see instead of
> OK.
> 

If we do this, we need to do the same on the other dump/restore dialogs.
Dave, any objection? if no, I'll commit this patch. Oh, BTW, Thom, can
you test it?


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com
From 8428014789dc1327eda5e744cb40c9410cbf19e9 Mon Sep 17 00:00:00 2001
From: Guillaume Lelarge <[email protected]>
Date: Fri, 29 Oct 2010 21:24:59 -0700
Subject: [PATCH] Change the label of the OK button

Dump for backups, Restore for restores.
---
 pgadmin/ui/frmBackup.xrc        |    2 +-
 pgadmin/ui/frmBackupGlobals.xrc |    2 +-
 pgadmin/ui/frmBackupServer.xrc  |    2 +-
 pgadmin/ui/frmRestore.xrc       |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pgadmin/ui/frmBackup.xrc b/pgadmin/ui/frmBackup.xrc
index c02fec8..51467d5 100644
--- a/pgadmin/ui/frmBackup.xrc
+++ b/pgadmin/ui/frmBackup.xrc
@@ -355,7 +355,7 @@
           </object>
           <object class="sizeritem">
             <object class="wxButton" name="wxID_OK">
-              <label>&amp;OK</label>
+              <label>&amp;Dump</label>
               <default>1</default>
             </object>
             <flag>wxEXPAND|wxALL</flag>
diff --git a/pgadmin/ui/frmBackupGlobals.xrc b/pgadmin/ui/frmBackupGlobals.xrc
index 99f7db7..9e3bfef 100644
--- a/pgadmin/ui/frmBackupGlobals.xrc
+++ b/pgadmin/ui/frmBackupGlobals.xrc
@@ -81,7 +81,7 @@
           </object>
           <object class="sizeritem">
             <object class="wxButton" name="wxID_OK">
-              <label>&amp;OK</label>
+              <label>&amp;Dump</label>
               <default>1</default>
               <pos>93,135d</pos>
             </object>
diff --git a/pgadmin/ui/frmBackupServer.xrc b/pgadmin/ui/frmBackupServer.xrc
index fb4f2a7..2bd3452 100644
--- a/pgadmin/ui/frmBackupServer.xrc
+++ b/pgadmin/ui/frmBackupServer.xrc
@@ -81,7 +81,7 @@
           </object>
           <object class="sizeritem">
             <object class="wxButton" name="wxID_OK">
-              <label>&amp;OK</label>
+              <label>&amp;Dump</label>
               <default>1</default>
               <pos>93,135d</pos>
             </object>
diff --git a/pgadmin/ui/frmRestore.xrc b/pgadmin/ui/frmRestore.xrc
index faa4ba4..8e6ef2f 100644
--- a/pgadmin/ui/frmRestore.xrc
+++ b/pgadmin/ui/frmRestore.xrc
@@ -305,7 +305,7 @@
           </object>
           <object class="sizeritem">
             <object class="wxButton" name="wxID_OK">
-              <label>&amp;OK</label>
+              <label>&amp;Restore</label>
               <default>1</default>
             </object>
             <flag>wxEXPAND|wxALL</flag>
-- 
1.7.1

-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to