Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
23ac39f9
Kaydet (Commit)
23ac39f9
authored
Ara 20, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert input dialog to .ui
Change-Id: I7b4dc43bfed39c852692dabebfc1bd196625c333
üst
3d26d938
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
125 additions
and
130 deletions
+125
-130
AllLangResTarget_sfx2.mk
sfx2/AllLangResTarget_sfx2.mk
+0
-1
UIConfig_sfx.mk
sfx2/UIConfig_sfx.mk
+1
-0
inputdlg.cxx
sfx2/source/dialog/inputdlg.cxx
+12
-54
inputdlg.hrc
sfx2/source/dialog/inputdlg.hrc
+0
-16
inputdlg.src
sfx2/source/dialog/inputdlg.src
+0
-51
inputdlg.hxx
sfx2/source/inc/inputdlg.hxx
+4
-8
inputdialog.ui
sfx2/uiconfig/ui/inputdialog.ui
+108
-0
No files found.
sfx2/AllLangResTarget_sfx2.mk
Dosyayı görüntüle @
23ac39f9
...
...
@@ -45,7 +45,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/dialog.src \
sfx2/source/dialog/dinfdlg.src \
sfx2/source/dialog/filedlghelper.src \
sfx2/source/dialog/inputdlg.src \
sfx2/source/dialog/newstyle.src \
sfx2/source/dialog/recfloat.src \
sfx2/source/dialog/taskpane.src \
...
...
sfx2/UIConfig_sfx.mk
Dosyayı görüntüle @
23ac39f9
...
...
@@ -19,6 +19,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/documentinfopage \
sfx2/uiconfig/ui/documentpropertiesdialog \
sfx2/uiconfig/ui/errorfindemaildialog \
sfx2/uiconfig/ui/inputdialog \
sfx2/uiconfig/ui/licensedialog \
sfx2/uiconfig/ui/managestylepage \
sfx2/uiconfig/ui/newstyle \
...
...
sfx2/source/dialog/inputdlg.cxx
Dosyayı görüntüle @
23ac39f9
...
...
@@ -9,73 +9,31 @@
#include "inputdlg.hxx"
#include "inputdlg.hrc"
#include <sfx2/sfxresid.hxx>
#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
#define LABEL_TEXT_SPACE 5
InputDialog
::
InputDialog
(
const
OUString
&
rLabelText
,
Window
*
pParent
)
:
ModalDialog
(
pParent
,
SfxResId
(
DLG_INPUT_BOX
)),
mpEntry
(
new
Edit
(
this
,
SfxResId
(
EDT_INPUT_FIELD
))),
mpLabel
(
new
FixedText
(
this
,
SfxResId
(
LABEL_INPUT_TEXT
))),
mpOK
(
new
PushButton
(
this
,
SfxResId
(
BTN_INPUT_OK
))),
mpCancel
(
new
PushButton
(
this
,
SfxResId
(
BTN_INPUT_CANCEL
)))
{
SetStyle
(
GetStyle
()
|
WB_CENTER
|
WB_VCENTER
);
mpLabel
->
SetText
(
rLabelText
);
// Fit label size to text and reposition edit box
Size
aLabelSize
=
mpLabel
->
CalcMinimumSize
();
Size
aEditSize
=
mpEntry
->
GetSizePixel
();
Size
aBtnSize
=
mpOK
->
GetSizePixel
();
Point
aLabelPos
=
mpLabel
->
GetPosPixel
();
Point
aEditPos
=
mpEntry
->
GetPosPixel
();
aEditPos
.
setX
(
aLabelPos
.
getX
()
+
aLabelSize
.
getWidth
()
+
LABEL_TEXT_SPACE
);
mpLabel
->
SetPosSizePixel
(
aLabelPos
,
aLabelSize
);
mpEntry
->
SetPosSizePixel
(
aEditPos
,
aEditSize
);
// Resize window if needed
Size
aWinSize
=
GetOutputSize
();
aWinSize
.
setWidth
(
aEditPos
.
getX
()
+
aEditSize
.
getWidth
()
+
LABEL_TEXT_SPACE
);
SetSizePixel
(
aWinSize
);
// Align buttons
Point
aBtnPos
=
mpCancel
->
GetPosPixel
();
aBtnPos
.
setX
(
aWinSize
.
getWidth
()
-
aBtnSize
.
getWidth
()
-
LABEL_TEXT_SPACE
);
mpCancel
->
SetPosPixel
(
aBtnPos
);
aBtnPos
.
setX
(
aBtnPos
.
getX
()
-
aBtnSize
.
getWidth
()
-
LABEL_TEXT_SPACE
);
mpOK
->
SetPosPixel
(
aBtnPos
);
mpOK
->
SetClickHdl
(
LINK
(
this
,
InputDialog
,
ClickHdl
));
mpCancel
->
SetClickHdl
(
LINK
(
this
,
InputDialog
,
ClickHdl
));
}
InputDialog
::~
InputDialog
()
InputDialog
::
InputDialog
(
const
OUString
&
rLabelText
,
Window
*
pParent
)
:
ModalDialog
(
pParent
,
"InputDialog"
,
"sfx/ui/inputdialog.ui"
)
{
delete
mpEntry
;
delete
mpLabel
;
delete
mpOK
;
delete
mpCancel
;
get
(
m_pEntry
,
"entry"
);
get
(
m_pLabel
,
"label"
);
get
(
m_pOK
,
"ok"
);
get
(
m_pCancel
,
"cancel"
);
m_pLabel
->
SetText
(
rLabelText
);
m_pOK
->
SetClickHdl
(
LINK
(
this
,
InputDialog
,
ClickHdl
));
m_pCancel
->
SetClickHdl
(
LINK
(
this
,
InputDialog
,
ClickHdl
));
}
OUString
InputDialog
::
getEntryText
()
const
OUString
InputDialog
::
getEntryText
()
const
{
return
mpEntry
->
GetText
();
return
m
_
pEntry
->
GetText
();
}
IMPL_LINK
(
InputDialog
,
ClickHdl
,
PushButton
*
,
pButton
)
{
EndDialog
(
pButton
==
mpOK
?
true
:
false
);
EndDialog
(
pButton
==
m
_
pOK
?
true
:
false
);
return
0
;
}
...
...
sfx2/source/dialog/inputdlg.hrc
deleted
100644 → 0
Dosyayı görüntüle @
3d26d938
/* -*- 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/.
*/
#define DLG_INPUT_BOX 256
#define LABEL_INPUT_TEXT 2
#define EDT_INPUT_FIELD 3
#define BTN_INPUT_OK 4
#define BTN_INPUT_CANCEL 5
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/dialog/inputdlg.src
deleted
100644 → 0
Dosyayı görüntüle @
3d26d938
/* -*- 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/.
*/
#include "inputdlg.hrc"
ModalDialog DLG_INPUT_BOX
{
OutputSize = TRUE;
SVLook = TRUE;
Moveable = TRUE;
Closeable = TRUE;
Size = MAP_APPFONT ( 215, 40 );
FixedText LABEL_INPUT_TEXT
{
Pos = MAP_APPFONT(5,6);
Size = MAP_APPFONT(80,10);
};
Edit EDT_INPUT_FIELD
{
Border = TRUE;
Pos = MAP_APPFONT(90,5);
Size = MAP_APPFONT(120,10);
};
PushButton BTN_INPUT_OK
{
Pos = MAP_APPFONT(125,20);
Size = MAP_APPFONT(40,15);
TabStop = TRUE;
DefButton = TRUE;
Text [en-US] = "OK";
};
PushButton BTN_INPUT_CANCEL
{
Pos = MAP_APPFONT(170,20);
Size = MAP_APPFONT(40,15);
TabStop = TRUE;
Text [en-US] = "Cancel";
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/inc/inputdlg.hxx
Dosyayı görüntüle @
23ac39f9
...
...
@@ -19,11 +19,7 @@ class PushButton;
class
InputDialog
:
public
ModalDialog
{
public
:
InputDialog
(
const
OUString
&
labelText
,
Window
*
pParent
=
NULL
);
virtual
~
InputDialog
();
OUString
getEntryText
()
const
;
private
:
...
...
@@ -32,10 +28,10 @@ private:
private
:
Edit
*
mpEntry
;
FixedText
*
mpLabel
;
PushButton
*
mpOK
;
PushButton
*
mpCancel
;
Edit
*
m
_
pEntry
;
FixedText
*
m
_
pLabel
;
PushButton
*
m
_
pOK
;
PushButton
*
m
_
pCancel
;
};
#endif // INCLUDED_SFX2_SOURCE_INC_INPUTDLG_HXX
...
...
sfx2/uiconfig/ui/inputdialog.ui
0 → 100644
Dosyayı görüntüle @
23ac39f9
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkDialog"
id=
"InputDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"type_hint"
>
dialog
</property>
<child
internal-child=
"vbox"
>
<object
class=
"GtkBox"
id=
"dialog-vbox1"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
12
</property>
<child
internal-child=
"action_area"
>
<object
class=
"GtkButtonBox"
id=
"dialog-action_area1"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"layout_style"
>
end
</property>
<child>
<object
class=
"GtkButton"
id=
"ok"
>
<property
name=
"label"
>
gtk-ok
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_default"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"cancel"
>
<property
name=
"label"
>
gtk-cancel
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkGrid"
id=
"grid2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"valign"
>
start
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<property
name=
"row_spacing"
>
6
</property>
<property
name=
"column_spacing"
>
12
</property>
<child>
<object
class=
"GtkLabel"
id=
"label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Height
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"mnemonic_widget"
>
entry
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"entry"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"invisible_char"
>
•
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget
response=
"0"
>
ok
</action-widget>
<action-widget
response=
"0"
>
cancel
</action-widget>
</action-widgets>
</object>
</interface>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment