[Libreoffice-commits] core.git: 3 commits - dbaccess/source

Caolán McNamara caolanm at redhat.com
Thu Aug 21 07:02:57 PDT 2014


 dbaccess/source/ui/browser/sbabrw.src                |    5 ++---
 dbaccess/source/ui/dlg/UserAdmin.cxx                 |    3 +--
 dbaccess/source/ui/dlg/UserAdmin.src                 |    5 ++---
 dbaccess/source/ui/inc/dbu_resource.hrc              |    8 ++++----
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx |    6 +++---
 dbaccess/source/ui/tabledesign/TableController.cxx   |    4 ++--
 dbaccess/source/ui/tabledesign/table.src             |    6 ++----
 7 files changed, 16 insertions(+), 21 deletions(-)

New commits:
commit 7e61e4f32aed3822b1f1e08db460085536a0ca28
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 21 14:25:22 2014 +0100

    QueryBox QUERY_SAVE_TABLE_EDIT_INDEXES -> MessageDialog + string
    
    Change-Id: I36e6d376936caa847e68a43f64c8fe892afba1ca

diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 62fc267..dae43c4 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -62,7 +62,7 @@
 #define RID_STR_UNO_END                 RID_STR_UNO_START       + 20    // 414 - 433
 
 #define RID_STR_GEN_START               RID_STR_UNO_END
-#define RID_STR_GEN_END                 RID_STR_GEN_START       + 64    // 434 - 493
+#define RID_STR_GEN_END                 RID_STR_GEN_START       + 65    // 434 - 493
 
 #define RID_STR_APP_START               RID_STR_GEN_END
 #define RID_STR_APP_END                 RID_STR_APP_START       + 40    //   494 - 533
@@ -103,7 +103,6 @@
 #define QUERY_BRW_SAVEMODIFIED          RID_QUERYBOX_START +  1
 #define TABLE_DESIGN_SAVEMODIFIED       RID_QUERYBOX_START +  5
 #define QUERY_SAVE_CURRENT_INDEX        RID_QUERYBOX_START +  7
-#define QUERY_SAVE_TABLE_EDIT_INDEXES   RID_QUERYBOX_START +  8
 #define RELATION_DESIGN_SAVEMODIFIED    RID_QUERYBOX_START +  9
 #define TABLE_DESIGN_ALL_ROWS_DELETED   RID_QUERYBOX_START + 13
 
@@ -223,6 +222,7 @@
 #define STR_QUERY_BRW_DELETE_ROWS           RID_STR_GEN_START + 61
 #define STR_QUERY_CONNECTION_LOST           RID_STR_GEN_START + 62
 #define STR_QUERY_USERADMIN_DELETE_USER     RID_STR_GEN_START + 63
+#define STR_QUERY_SAVE_TABLE_EDIT_INDEXES   RID_STR_GEN_START + 64
 
 // untyped resources
 
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index f95f098..b2565c9 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -65,7 +65,7 @@
 #include <cppuhelper/exc_hlp.hxx>
 #include <sfx2/sfxsids.hrc>
 #include <tools/diagnose_ex.h>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 
 #include <boost/mem_fn.hpp>
 #include <boost/bind.hpp>
@@ -447,7 +447,7 @@ void OTableController::doEditIndexes()
     // table needs to be saved before editing indexes
     if (m_bNew || isModified())
     {
-        QueryBox aAsk(getView(), ModuleRes(QUERY_SAVE_TABLE_EDIT_INDEXES));
+        MessageDialog aAsk(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
         if (RET_YES != aAsk.Execute())
             return;
 
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
index ffe5403..dcc6d51 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -343,11 +343,9 @@ String STR_TABLEDESIGN_DATASOURCE_DELETED
     Text [ en-US ] = "The table filter could not be adjusted because the data source has been deleted.";
 };
 
-QueryBox QUERY_SAVE_TABLE_EDIT_INDEXES
+String STR_QUERY_SAVE_TABLE_EDIT_INDEXES
 {
-    Message [ en-US ] = "Before you can edit the indexes of a table, you have to save it.\nDo you want to save the changes now?";
-
-    Buttons = WB_YES_NO ;
+    Text [ en-US ] = "Before you can edit the indexes of a table, you have to save it.\nDo you want to save the changes now?";
 };
 
 String STR_TABLEDESIGN_NO_PRIM_KEY_HEAD
commit 650bdfb2df1c0cb908b48d7f8419cafbc06447aa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 21 14:20:31 2014 +0100

    QueryBox QUERY_USERADMIN_DELETE_USER -> MessageDialog + string
    
    Change-Id: Iedccb1ace9f74d92f09cc6ca23f9aaf004fa05f2

diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 83be777..d6dc4f2 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -37,7 +37,6 @@
 #include "dbadmin.hxx"
 #include "moduledbu.hxx"
 #include <vcl/layout.hxx>
-#include <vcl/msgbox.hxx>
 #include <sfx2/passwd.hxx>
 
 using namespace ::com::sun::star::container;
@@ -239,7 +238,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
                 Reference<XDrop> xDrop(m_xUsers,UNO_QUERY);
                 if(xDrop.is())
                 {
-                    QueryBox aQry(this, ModuleRes(QUERY_USERADMIN_DELETE_USER));
+                    MessageDialog aQry(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
                     if(aQry.Execute() == RET_YES)
                         xDrop->dropByName(GetUser());
                 }
diff --git a/dbaccess/source/ui/dlg/UserAdmin.src b/dbaccess/source/ui/dlg/UserAdmin.src
index d9216fa..a5a3695 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.src
+++ b/dbaccess/source/ui/dlg/UserAdmin.src
@@ -20,10 +20,9 @@
 #include "dbu_dlg.hrc"
 #include "dbaccess_helpid.hrc"
 
-QueryBox QUERY_USERADMIN_DELETE_USER
+String STR_QUERY_USERADMIN_DELETE_USER
 {
-    Buttons = WB_YES_NO ;
-    Message [ en-US ] = "Do you really want to delete the user?";
+    Text[ en-US ] = "Do you really want to delete the user?";
 };
 
 String STR_USERADMIN_NOT_AVAILABLE
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 26817de..62fc267 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -62,7 +62,7 @@
 #define RID_STR_UNO_END                 RID_STR_UNO_START       + 20    // 414 - 433
 
 #define RID_STR_GEN_START               RID_STR_UNO_END
-#define RID_STR_GEN_END                 RID_STR_GEN_START       + 63    // 434 - 493
+#define RID_STR_GEN_END                 RID_STR_GEN_START       + 64    // 434 - 493
 
 #define RID_STR_APP_START               RID_STR_GEN_END
 #define RID_STR_APP_END                 RID_STR_APP_START       + 40    //   494 - 533
@@ -105,7 +105,6 @@
 #define QUERY_SAVE_CURRENT_INDEX        RID_QUERYBOX_START +  7
 #define QUERY_SAVE_TABLE_EDIT_INDEXES   RID_QUERYBOX_START +  8
 #define RELATION_DESIGN_SAVEMODIFIED    RID_QUERYBOX_START +  9
-#define QUERY_USERADMIN_DELETE_USER     RID_QUERYBOX_START + 12
 #define TABLE_DESIGN_ALL_ROWS_DELETED   RID_QUERYBOX_START + 13
 
 // images
@@ -223,6 +222,7 @@
 #define STR_QUERY_CLOSEDOCUMENTS            RID_STR_GEN_START + 60
 #define STR_QUERY_BRW_DELETE_ROWS           RID_STR_GEN_START + 61
 #define STR_QUERY_CONNECTION_LOST           RID_STR_GEN_START + 62
+#define STR_QUERY_USERADMIN_DELETE_USER     RID_STR_GEN_START + 63
 
 // untyped resources
 
commit 718648db591b3d04b24e9437b6139b1490aad870
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 21 14:11:52 2014 +0100

    QueryBox QUERY_CONNECTION_LOST -> MessageDialog + string
    
    Change-Id: Id2bd1b509236f40fcb658933cfe6edd687330ac5

diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src
index ba326e0..4e304e2 100644
--- a/dbaccess/source/ui/browser/sbabrw.src
+++ b/dbaccess/source/ui/browser/sbabrw.src
@@ -117,10 +117,9 @@ String STR_QUERY_DELETE_TABLE
     Text [ en-US ] = "Do you want to delete the table '%1'?" ;
 };
 
-QueryBox QUERY_CONNECTION_LOST
+String STR_QUERY_CONNECTION_LOST
 {
-    Buttons = WB_YES_NO ;
-    Message [ en-US ] = "The connection to the database has been lost. Do you want to reconnect?" ;
+    Text [ en-US ] = "The connection to the database has been lost. Do you want to reconnect?" ;
 };
 
 String STR_OPENTABLES_WARNINGS
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 3c099f0..26817de 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -62,7 +62,7 @@
 #define RID_STR_UNO_END                 RID_STR_UNO_START       + 20    // 414 - 433
 
 #define RID_STR_GEN_START               RID_STR_UNO_END
-#define RID_STR_GEN_END                 RID_STR_GEN_START       + 62    // 434 - 493
+#define RID_STR_GEN_END                 RID_STR_GEN_START       + 63    // 434 - 493
 
 #define RID_STR_APP_START               RID_STR_GEN_END
 #define RID_STR_APP_END                 RID_STR_APP_START       + 40    //   494 - 533
@@ -101,7 +101,6 @@
 // query boxes
 
 #define QUERY_BRW_SAVEMODIFIED          RID_QUERYBOX_START +  1
-#define QUERY_CONNECTION_LOST           RID_QUERYBOX_START +  2
 #define TABLE_DESIGN_SAVEMODIFIED       RID_QUERYBOX_START +  5
 #define QUERY_SAVE_CURRENT_INDEX        RID_QUERYBOX_START +  7
 #define QUERY_SAVE_TABLE_EDIT_INDEXES   RID_QUERYBOX_START +  8
@@ -223,6 +222,7 @@
 #define STR_NEED_INDEX_FIELDS               RID_STR_GEN_START + 59
 #define STR_QUERY_CLOSEDOCUMENTS            RID_STR_GEN_START + 60
 #define STR_QUERY_BRW_DELETE_ROWS           RID_STR_GEN_START + 61
+#define STR_QUERY_CONNECTION_LOST           RID_STR_GEN_START + 62
 
 // untyped resources
 
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index e7608d5..a9cc5e1 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -45,7 +45,7 @@
 #include <toolkit/helper/vclunohelper.hxx>
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 
 namespace dbaui
 {
@@ -308,7 +308,7 @@ namespace dbaui
         bool bReConnect = true;
         if ( _bUI )
         {
-            QueryBox aQuery( getView(), ModuleRes(QUERY_CONNECTION_LOST) );
+            MessageDialog aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
             bReConnect = ( RET_YES == aQuery.Execute() );
         }
 
@@ -457,7 +457,7 @@ namespace dbaui
         if ( !pWin )
             pWin = getView()->Window::GetParent();
 
-        InfoBox(pWin, aMessage).Execute();
+        MessageDialog(pWin, aMessage, VCL_MESSAGE_INFO).Execute();
     }
     const Reference< XConnection >& DBSubComponentController::getConnection() const
     {


More information about the Libreoffice-commits mailing list