diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-21 14:11:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-21 15:02:26 +0100 |
commit | 718648db591b3d04b24e9437b6139b1490aad870 (patch) | |
tree | 91f505e91dd71a5dfccc878e3a231f4ade8ac7cb | |
parent | Avoid possible memory leaks in case of exceptions (diff) | |
download | core-718648db591b3d04b24e9437b6139b1490aad870.tar.gz core-718648db591b3d04b24e9437b6139b1490aad870.zip |
QueryBox QUERY_CONNECTION_LOST -> MessageDialog + string
Change-Id: Id2bd1b509236f40fcb658933cfe6edd687330ac5
-rw-r--r-- | dbaccess/source/ui/browser/sbabrw.src | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbu_resource.hrc | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src index ba326e0aef64..4e304e2ddd30 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 3c099f0c1838..26817dee8a48 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 e7608d57f4de..a9cc5e19de5c 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 { |