Kaydet (Commit) f188c982 authored tarafından Palenik Mihály's avatar Palenik Mihály Kaydeden (comit) Caolán McNamara

Convert RID_SANE_DIALOG to .ui

Change-Id: I1f08493cdc18f4c0691a8436368432fe4e94dec3
Reviewed-on: https://gerrit.libreoffice.org/9696Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst a533f986
......@@ -26,7 +26,6 @@ $(eval $(call gb_SrsTarget_set_include,scn/res,\
$(eval $(call gb_SrsTarget_add_files,scn/res,\
extensions/source/scanner/grid.src \
extensions/source/scanner/sanedlg.src \
))
# vim:set noet sw=4 ts=4:
......@@ -22,6 +22,7 @@ $(eval $(call gb_Module_add_l10n_targets,extensions,\
AllLangResTarget_scn \
AllLangResTarget_upd \
UIConfig_sabpilot \
UIConfig_scanner \
))
ifneq ($(filter-out IOS ANDROID,$(OS)),)
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_UIConfig_UIConfig,modules/scanner))
$(eval $(call gb_UIConfig_add_uifiles,modules/scanner,\
extensions/uiconfig/scanner/ui/sanedialog \
))
# vim: set noet sw=4 ts=4:
......@@ -19,56 +19,12 @@
#ifndef _SVT_SANEDLG_HRC
#define _SVT_SANEDLG_HRC
#define RID_SANE_DIALOG 1000
#define RID_SCAN_OK 1
#define RID_SCAN_CANCEL 2
#define RID_DEVICEINFO_BTN 3
#define RID_PREVIEW_BOX 4
#define RID_DEVICE_BOX_TXT 5
#define RID_DEVICE_BOX 6
#define RID_SCANAREA_BOX 7
#define RID_SCAN_LEFT_TXT 8
#define RID_SCAN_LEFT_BOX 9
#define RID_SCAN_TOP_BOX 10
#define RID_SCAN_TOP_TXT 11
#define RID_SCAN_RIGHT_TXT 12
#define RID_SCAN_RIGHT_BOX 13
#define RID_SCAN_BOTTOM_TXT 14
#define RID_SCAN_BOTTOM_BOX 15
#define RID_SCAN_RESOLUTION_TXT 16
#define RID_SCAN_RESOLUTION_BOX 17
#define RID_PREVIEW_BTN 18
#define RID_SCAN_OPTION_BOX 19
#define RID_SCAN_OPTIONTITLE_TXT 20
#define RID_SCAN_OPTION_DESC_TXT 21
#define RID_SCAN_BOOL_OPTION_BOX 22
#define RID_SCAN_OPTION_TXT 23
#define RID_SCAN_STRING_OPTION_EDT 24
#define RID_SCAN_QUANTUM_RANGE_BOX 25
#define RID_SCAN_STRING_RANGE_BOX 26
#define RID_SCAN_NUMERIC_OPTION_EDT 27
#define RID_SCAN_BUTTON_OPTION_BTN 28
#define RID_SCAN_NUMERIC_VECTOR_BOX 29
#define RID_SCAN_NUMERIC_VECTOR_TXT 30
#define RID_SCAN_BITMAP_PLUS 31
#define RID_SCAN_BITMAP_MINUS 32
#define RID_SCAN_ADVANCED_BOX 33
#define RID_SCAN_ADVANCED_TXT 34
#define RID_SCAN_BTN 35
#define RID_SANE_DEVICEINFO_TXT 1001
#define RID_SANE_SCANERROR_TXT 1002
#define RID_SANE_NORESOLUTIONOPTION_TXT 1003
#define RID_SANE_NOSANELIB_TXT 1004
#define SCAN_AREA_TOP 17
#define SCAN_AREA_LEFT 8
#define PREVIEW_UPPER_LEFT SCAN_AREA_LEFT
#define PREVIEW_UPPER_TOP SCAN_AREA_TOP + 80
#define PREVIEW_WIDTH 113
#define PREVIEW_HEIGHT 160
#define SECOND_COLUMN PREVIEW_WIDTH + 20
#define THIRD_COLUMN SECOND_COLUMN + 135
#endif
......
......@@ -51,47 +51,38 @@ private:
Link maOldLink;
OKButton maOKButton;
CancelButton maCancelButton;
PushButton maDeviceInfoButton;
PushButton maPreviewButton;
PushButton maScanButton;
PushButton maButtonOption;
FixedText maOptionsTxt;
FixedText maOptionTitle;
FixedText maOptionDescTxt;
FixedText maVectorTxt;
FixedText maScanLeftTxt;
MetricField maLeftField;
FixedText maScanTopTxt;
MetricField maTopField;
FixedText maRightTxt;
MetricField maRightField;
FixedText maBottomTxt;
MetricField maBottomField;
FixedText maDeviceBoxTxt;
ListBox maDeviceBox;
FixedText maReslTxt;
NumericBox maReslBox;
FixedText maAdvancedTxt;
CheckBox maAdvancedBox;
NumericField maVectorBox;
ListBox maQuantumRangeBox;
ListBox maStringRangeBox;
FixedLine maPreviewBox;
FixedLine maAreaBox;
CheckBox maBoolCheckBox;
Edit maStringEdit;
Edit maNumericEdit;
SvTreeListBox maOptionBox;
OKButton* mpOKButton;
CancelButton* mpCancelButton;
PushButton* mpDeviceInfoButton;
PushButton* mpPreviewButton;
PushButton* mpScanButton;
PushButton* mpButtonOption;
FixedText* mpOptionTitle;
FixedText* mpOptionDescTxt;
FixedText* mpVectorTxt;
MetricField* mpLeftField;
MetricField* mpTopField;
MetricField* mpRightField;
MetricField* mpBottomField;
ListBox* mpDeviceBox;
NumericBox* mpReslBox;
CheckBox* mpAdvancedBox;
NumericField* mpVectorBox;
ListBox* mpQuantumRangeBox;
ListBox* mpStringRangeBox;
CheckBox* mpBoolCheckBox;
Edit* mpStringEdit;
Edit* mpNumericEdit;
SvTreeListBox* mpOptionBox;
Window* mpPreview;
int mnCurrentOption;
int mnCurrentElement;
......
/* -*- 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 .
*/
#include <sanedlg.hrc>
ModalDialog RID_SANE_DIALOG
{
HelpID = "extensions:ModalDialog:RID_SANE_DIALOG";
OutputSize = TRUE ;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 10 , 10 ) ;
Size = MAP_APPFONT ( THIRD_COLUMN + 60 , 268 ) ;
Moveable = TRUE ;
Closeable = TRUE ;
OKButton RID_SCAN_OK
{
Pos = MAP_APPFONT ( THIRD_COLUMN , 6 ) ;
Size = MAP_APPFONT ( 55 , 14 ) ;
DefButton = TRUE;
};
CancelButton RID_SCAN_CANCEL
{
Pos = MAP_APPFONT ( THIRD_COLUMN , 25 ) ;
Size = MAP_APPFONT ( 55 , 14 ) ;
};
PushButton RID_DEVICEINFO_BTN
{
HelpID = "extensions:PushButton:RID_SANE_DIALOG:RID_DEVICEINFO_BTN";
Pos = MAP_APPFONT ( THIRD_COLUMN , 44 ) ;
Size = MAP_APPFONT ( 55 , 22 ) ;
Text [ en-US ] = "About\n Dev~ice" ;
};
PushButton RID_PREVIEW_BTN
{
HelpID = "extensions:PushButton:RID_SANE_DIALOG:RID_PREVIEW_BTN";
Pos = MAP_APPFONT ( THIRD_COLUMN , 71 ) ;
Size = MAP_APPFONT ( 55 , 22 ) ;
Text [ en-US ] = "Create\nPreview" ;
};
PushButton RID_SCAN_BTN
{
HelpID = "extensions:PushButton:RID_SANE_DIALOG:RID_SCAN_BTN";
Pos = MAP_APPFONT ( THIRD_COLUMN , 98 ) ;
Size = MAP_APPFONT ( 55 , 14 ) ;
Text [ en-US ] = "Scan" ;
};
FixedLine RID_PREVIEW_BOX
{
Pos = MAP_APPFONT ( PREVIEW_UPPER_LEFT - 5 , PREVIEW_UPPER_TOP - 8 ) ;
Size = MAP_APPFONT ( PREVIEW_WIDTH + 10 , 8 ) ;
Text [ en-US ] = "Preview" ;
};
FixedLine RID_SCANAREA_BOX
{
Pos = MAP_APPFONT ( SCAN_AREA_LEFT - 5 , SCAN_AREA_TOP - 12 ) ;
Size = MAP_APPFONT ( PREVIEW_WIDTH + 10 , 8 ) ;
Text [ en-US ] = "Scan area" ;
};
FixedText RID_SCAN_LEFT_TXT
{
Pos = MAP_APPFONT ( SCAN_AREA_LEFT , SCAN_AREA_TOP ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "Left:" ;
};
MetricField RID_SCAN_LEFT_BOX
{
HelpID = "extensions:MetricField:RID_SANE_DIALOG:RID_SCAN_LEFT_BOX";
Spin = TRUE ;
Repeat = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( SCAN_AREA_LEFT + 50 , SCAN_AREA_TOP - 2 ) ;
Size = MAP_APPFONT ( PREVIEW_WIDTH - 50 , 12 ) ;
};
FixedText RID_SCAN_TOP_TXT
{
Pos = MAP_APPFONT ( SCAN_AREA_LEFT , SCAN_AREA_TOP + 17 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "Top:" ;
};
MetricField RID_SCAN_TOP_BOX
{
HelpID = "extensions:MetricField:RID_SANE_DIALOG:RID_SCAN_TOP_BOX";
Spin = TRUE ;
Repeat = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( SCAN_AREA_LEFT + 50 , SCAN_AREA_TOP + 15 ) ;
Size = MAP_APPFONT ( PREVIEW_WIDTH - 50 , 12 ) ;
};
FixedText RID_SCAN_RIGHT_TXT
{
Pos = MAP_APPFONT ( SCAN_AREA_LEFT , SCAN_AREA_TOP + 34 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "Right:" ;
};
MetricField RID_SCAN_RIGHT_BOX
{
HelpID = "extensions:MetricField:RID_SANE_DIALOG:RID_SCAN_RIGHT_BOX";
Spin = TRUE ;
Repeat = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( SCAN_AREA_LEFT + 50 , SCAN_AREA_TOP + 32 ) ;
Size = MAP_APPFONT ( PREVIEW_WIDTH - 50 , 12 ) ;
};
FixedText RID_SCAN_BOTTOM_TXT
{
Pos = MAP_APPFONT ( SCAN_AREA_LEFT , SCAN_AREA_TOP + 51 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "Bottom:" ;
};
MetricField RID_SCAN_BOTTOM_BOX
{
HelpID = "extensions:MetricField:RID_SANE_DIALOG:RID_SCAN_BOTTOM_BOX";
Spin = TRUE ;
Repeat = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( SCAN_AREA_LEFT + 50 , SCAN_AREA_TOP + 49 ) ;
Size = MAP_APPFONT ( PREVIEW_WIDTH - 50 , 12 ) ;
};
FixedText RID_DEVICE_BOX_TXT
{
Pos = MAP_APPFONT ( SECOND_COLUMN , 8 ) ;
Size = MAP_APPFONT ( 70 , 8 ) ;
Text [ en-US ] = "Device used:" ;
};
ListBox RID_DEVICE_BOX
{
HelpID = "extensions:ListBox:RID_SANE_DIALOG:RID_DEVICE_BOX";
Border = TRUE ;
Dropdown = TRUE ;
Sort = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN + 70 , 6 ) ;
Size = MAP_APPFONT ( 60 , 80 ) ;
};
FixedText RID_SCAN_RESOLUTION_TXT
{
Pos = MAP_APPFONT ( SECOND_COLUMN , 25 ) ;
Size = MAP_APPFONT ( 70 , 8 ) ;
Text [ en-US ] = "Resolution [~DPI]" ;
};
NumericBox RID_SCAN_RESOLUTION_BOX
{
HelpID = "extensions:NumericBox:RID_SANE_DIALOG:RID_SCAN_RESOLUTION_BOX";
Dropdown = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN + 70 , 23 ) ;
Size = MAP_APPFONT ( 60 , 80 ) ;
};
FixedText RID_SCAN_ADVANCED_TXT
{
Pos = MAP_APPFONT ( SECOND_COLUMN , 40 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "Show advanced options" ;
};
CheckBox RID_SCAN_ADVANCED_BOX
{
HelpID = "extensions:CheckBox:RID_SANE_DIALOG:RID_SCAN_ADVANCED_BOX";
Check = FALSE ;
Pos = MAP_APPFONT ( SECOND_COLUMN + 120 , 40 ) ;
Size = MAP_APPFONT ( 8 , 8 ) ;
};
FixedText RID_SCAN_OPTION_TXT
{
Pos = MAP_APPFONT ( SECOND_COLUMN , 54 ) ;
Size = MAP_APPFONT ( 130 , 8 ) ;
Text [ en-US ] = "Options:" ;
};
Control RID_SCAN_OPTION_BOX
{
Border = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN , 63 ) ;
Size = MAP_APPFONT ( 130 , 102 ) ;
};
FixedText RID_SCAN_OPTIONTITLE_TXT
{
WordBreak = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN , 170 ) ;
Size = MAP_APPFONT ( 130 , 50 ) ;
};
FixedText RID_SCAN_OPTION_DESC_TXT
{
Pos = MAP_APPFONT ( SECOND_COLUMN , 225 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
};
CheckBox RID_SCAN_BOOL_OPTION_BOX
{
HelpID = "extensions:CheckBox:RID_SANE_DIALOG:RID_SCAN_BOOL_OPTION_BOX";
Pos = MAP_APPFONT ( SECOND_COLUMN + 120 , 225 ) ;
Size = MAP_APPFONT ( 8 , 8 ) ;
};
Edit RID_SCAN_STRING_OPTION_EDT
{
HelpID = "extensions:Edit:RID_SANE_DIALOG:RID_SCAN_STRING_OPTION_EDT";
Border = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ;
Size = MAP_APPFONT ( 130 , 12 ) ;
};
ListBox RID_SCAN_QUANTUM_RANGE_BOX
{
HelpID = "extensions:ListBox:RID_SANE_DIALOG:RID_SCAN_QUANTUM_RANGE_BOX";
Border = TRUE ;
Dropdown = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ;
Size = MAP_APPFONT ( 130 , 80 ) ;
};
ListBox RID_SCAN_STRING_RANGE_BOX
{
HelpID = "extensions:ListBox:RID_SANE_DIALOG:RID_SCAN_STRING_RANGE_BOX";
Border = TRUE ;
Dropdown = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ;
Size = MAP_APPFONT ( 130 , 80 ) ;
};
Edit RID_SCAN_NUMERIC_OPTION_EDT
{
HelpID = "extensions:Edit:RID_SANE_DIALOG:RID_SCAN_NUMERIC_OPTION_EDT";
Border = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ;
Size = MAP_APPFONT ( 130 , 12 ) ;
};
FixedText RID_SCAN_NUMERIC_VECTOR_TXT
{
Pos = MAP_APPFONT ( SECOND_COLUMN , 253 ) ;
Size = MAP_APPFONT ( 90 , 8 ) ;
Text [ en-US ] = "Vector element" ;
};
NumericField RID_SCAN_NUMERIC_VECTOR_BOX
{
HelpID = "extensions:NumericField:RID_SANE_DIALOG:RID_SCAN_NUMERIC_VECTOR_BOX";
Border = TRUE ;
Spin = TRUE ;
Repeat = TRUE ;
Pos = MAP_APPFONT ( SECOND_COLUMN + 90 , 251 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
};
PushButton RID_SCAN_BUTTON_OPTION_BTN
{
HelpID = "extensions:PushButton:RID_SANE_DIALOG:RID_SCAN_BUTTON_OPTION_BTN";
Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ;
Size = MAP_APPFONT ( 130 , 14 ) ;
Text [ en-US ] = "Set" ;
};
Bitmap RID_SCAN_BITMAP_PLUS
{
File = "plus.bmp" ;
};
Bitmap RID_SCAN_BITMAP_MINUS
{
File = "minus.bmp" ;
};
Text [ en-US ] = "Scanner" ;
};
String RID_SANE_DEVICEINFO_TXT
{
Text [ en-US ] = "Device: %s\nVendor: %s\nModel: %s\nType: %s" ;
};
String RID_SANE_SCANERROR_TXT
{
Text [ en-US ] = "An error occurred while scanning." ;
};
String RID_SANE_NORESOLUTIONOPTION_TXT
{
Text [ en-US ] = "The device does not offer a preview option. Therefore, a normal scan will be used as a preview instead. This may take a considerable amount of time." ;
};
String RID_SANE_NOSANELIB_TXT
{
Text [ en-US ] = "The SANE interface could not be initialized. Scanning is not possible." ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -499,6 +499,7 @@ UI_FILELIST(dbtdata, "UIConfig/modules/dbtdata.filelist")
UI_FILELIST(desktop, "UIConfig/desktop.filelist")
UI_FILELIST(filter, "UIConfig/filter.filelist")
UI_FILELIST(sabpilot, "UIConfig/modules/sabpilot.filelist")
UI_FILELIST(scanner, "UIConfig/modules/scanner.filelist")
#ifdef DBCONNECTIVITY
UI_FILELIST(sbibliography, "UIConfig/modules/sbibliography.filelist")
UI_FILELIST(spropctrlr, "UIConfig/modules/spropctrlr.filelist")
......
......@@ -1420,11 +1420,15 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
}
else if (name == "GtkLabel")
{
WinBits nWinStyle = WB_CENTER|WB_VCENTER|WB_3DLOOK;
OString sBorder = extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
extractMnemonicWidget(id, rMap);
if (extractSelectable(rMap))
pWindow = new SelectableFixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
pWindow = new SelectableFixedText(pParent, nWinStyle);
else
pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
pWindow = new FixedText(pParent, nWinStyle);
}
else if (name == "GtkImage")
{
......
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