Kaydet (Commit) 33ad001f authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Convert connpooloptions to .ui + adapt code.

Change-Id: Idf76635180f73716f3d476975d9738edad464348
üst b84c89bb
......@@ -37,6 +37,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/formatnumberdialog \
cui/uiconfig/ui/gradientpage \
cui/uiconfig/ui/colorconfigwin \
cui/uiconfig/ui/connpooloptions \
cui/uiconfig/ui/dbregisterpage \
cui/uiconfig/ui/effectspage \
cui/uiconfig/ui/hatchpage \
......
......@@ -448,6 +448,12 @@
#define RID_SVXSTR_TYPE (RID_SVX_START + 1244)
#define RID_SVXSTR_PATH (RID_SVX_START + 1245)
#define RID_SVXSTR_DRIVER_NAME (RID_SVX_START + 1246)
#define RID_SVXSTR_POOLED_FLAG (RID_SVX_START + 1247)
#define RID_SVXSTR_POOL_TIMEOUT (RID_SVX_START + 1248)
#define RID_SVXSTR_YES (RID_SVX_START + 1249)
#define RID_SVXSTR_NO (RID_SVX_START + 1250)
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _OFFAPP_CONNPOOLOPTIONS_HRC_
#define _OFFAPP_CONNPOOLOPTIONS_HRC_
#define FL_POOLING 1
#define CB_POOL_CONNS 2
#define FT_DRIVERS 3
#define CTRL_DRIVER_LIST 4
#define FT_DRIVERLABEL 5
#define FT_DRIVER 6
#define CB_DRIVERPOOLING 7
#define FT_TIMEOUT 8
#define NF_TIMEOUT 9
#define STR_DRIVER_NAME 1
#define STR_POOLED_FLAG 2
#define STR_POOL_TIMEOUT 3
#define STR_YES 4
#define STR_NO 5
#endif // _OFFAPP_CONNPOOLOPTIONS_HRC_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -27,11 +27,8 @@
#include <vcl/field.hxx>
#include <svx/databaseregistrationui.hxx>
//........................................................................
namespace offapp
{
//........................................................................
//====================================================================
//= ConnectionPoolOptionsPage
//====================================================================
......@@ -41,15 +38,14 @@ namespace offapp
using TabPage::ActivatePage;
protected:
FixedLine m_aFrame;
CheckBox m_aEnablePooling;
FixedText m_aDriversLabel;
CheckBox* m_pEnablePooling;
FixedText* m_pDriversLabel;
DriverListControl* m_pDriverList;
FixedText m_aDriverLabel;
FixedText m_aDriver;
CheckBox m_aDriverPoolingEnabled;
FixedText m_aTimeoutLabel;
NumericField m_aTimeout;
FixedText* m_pDriverLabel;
FixedText* m_pDriver;
CheckBox* m_pDriverPoolingEnabled;
FixedText* m_pTimeoutLabel;
NumericField* m_pTimeout;
protected:
ConnectionPoolOptionsPage(Window* _pParent, const SfxItemSet& _rAttrSet);
......@@ -57,12 +53,10 @@ namespace offapp
public:
static SfxTabPage* Create(Window* _pParent, const SfxItemSet& _rAttrSet);
~ConnectionPoolOptionsPage();
protected:
virtual long Notify( NotifyEvent& _rNEvt );
virtual sal_Bool FillItemSet(SfxItemSet& _rSet);
virtual sal_Bool FillItemSet(SfxItemSet& _rSet);
virtual void Reset(const SfxItemSet& _rSet);
virtual void ActivatePage( const SfxItemSet& _rSet);
......@@ -75,11 +69,8 @@ namespace offapp
void commitTimeoutField();
};
//........................................................................
} // namespace offapp
//........................................................................
} // namespace offapp
#endif // _OFFAPP_CONNPOOLOPTIONS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,111 +17,27 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "connpooloptions.hrc"
#include <cuires.hrc>
#define PAGE_SIZE_X TP_WIDTH
#define PAGE_SIZE_Y TP_HEIGHT
#define LIST_SIZE_Y 100
TabPage RID_OFAPAGE_CONNPOOLOPTIONS
String RID_SVXSTR_DRIVER_NAME
{
HelpID = "cui:TabPage:RID_OFAPAGE_CONNPOOLOPTIONS";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( PAGE_SIZE_X, PAGE_SIZE_Y ) ;
SVLook = TRUE ;
Hide = TRUE ;
FixedLine FL_POOLING
{
Pos = MAP_APPFONT( 4, 3 );
Size = MAP_APPFONT( PAGE_SIZE_X - 8, 8 );
Text [ en-US ] = "Connection pool";
};
CheckBox CB_POOL_CONNS
{
HelpID = "cui:CheckBox:RID_OFAPAGE_CONNPOOLOPTIONS:CB_POOL_CONNS";
Pos = MAP_APPFONT( 7, 15 );
Size = MAP_APPFONT( PAGE_SIZE_X - 14, 10 );
Text [ en-US ] = "Connection pooling enabled";
};
FixedText FT_DRIVERS
{
Pos = MAP_APPFONT( 17, 28 );
Size = MAP_APPFONT( PAGE_SIZE_X - 14 - 8, 8 );
Text [ en-US ] = "Drivers known in %PRODUCTNAME";
};
Control CTRL_DRIVER_LIST
{
Pos = MAP_APPFONT( 17, 39 );
Size = MAP_APPFONT( PAGE_SIZE_X - 14 - 8, LIST_SIZE_Y );
TabStop = TRUE;
Border = TRUE;
SVLook = TRUE;
};
FixedText FT_DRIVERLABEL
{
Pos = MAP_APPFONT( 17, 39 + LIST_SIZE_Y + 4 );
Size = MAP_APPFONT( 70, 8 );
Text [ en-US ] = "Current driver:";
};
FixedText FT_DRIVER
{
Pos = MAP_APPFONT( 17 + 70 + 3, 39 + LIST_SIZE_Y + 4 );
Size = MAP_APPFONT( PAGE_SIZE_X - ( 15 + 70 + 3 ) - 7, 8 );
};
CheckBox CB_DRIVERPOOLING
{
HelpID = "cui:CheckBox:RID_OFAPAGE_CONNPOOLOPTIONS:CB_DRIVERPOOLING";
Pos = MAP_APPFONT( 17, 39 + LIST_SIZE_Y + 4 + 8 + 3 );
Size = MAP_APPFONT( PAGE_SIZE_X - 23, 10 );
Text [ en-US ] = "Enable pooling for this driver";
};
FixedText FT_TIMEOUT
{
Pos = MAP_APPFONT( 27, 39 + LIST_SIZE_Y + 4 + 8 + 3 + 10 + 3 + 2 );
Size = MAP_APPFONT( 100, 8 );
Text [ en-US ] = "Timeout (seconds)";
};
NumericField NF_TIMEOUT
{
HelpID = "cui:NumericField:RID_OFAPAGE_CONNPOOLOPTIONS:NF_TIMEOUT";
Pos = MAP_APPFONT( 27 + 100 + 3, 39 + LIST_SIZE_Y + 4 + 8 + 3 + 10 + 3 );
Size = MAP_APPFONT( 40, 12 );
SvLook = TRUE;
Border = TRUE;
Right = TRUE;
Spin = TRUE;
Repeat = TRUE;
Minimum = 30;
Maximum = 600;
StrictFormat = TRUE;
DecimalDigits = 0;
SpinSize = 1;
};
String STR_DRIVER_NAME
{
Text [ en-US ] = "Driver name";
};
String STR_POOLED_FLAG
{
Text [ en-US ] = "Pool";
};
String STR_POOL_TIMEOUT
{
Text [ en-US ] = "Timeout";
};
String STR_YES
{
Text [ en-US ] = "Yes";
};
String STR_NO
{
Text [ en-US ] = "No";
};
Text [ en-US ] = "Driver name";
};
String RID_SVXSTR_POOLED_FLAG
{
Text [ en-US ] = "Pool";
};
String RID_SVXSTR_POOL_TIMEOUT
{
Text [ en-US ] = "Timeout";
};
String RID_SVXSTR_YES
{
Text [ en-US ] = "Yes";
};
String RID_SVXSTR_NO
{
Text [ en-US ] = "No";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
......@@ -527,5 +527,9 @@
generic-name="Template Icon View" parent="GtkIconView"
icon-name="widget-gtk-iconview"/>
<glade-widget-class title="Driver List Control" name="cuilo-DriverListControl"
generic-name="DriverListControl" parent="GtkEntry"
icon-name="widget-gtk-combobox"/>
</glade-widget-classes>
</glade-catalog>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment