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
02d4eb74
Kaydet (Commit)
02d4eb74
authored
Kas 27, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert query delete dialog to .ui
Change-Id: I0ab09c2c54bba4a287ef0f7cc812596958373e15
üst
6aefcb6a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
135 additions
and
144 deletions
+135
-144
fileview.hxx
include/svtools/fileview.hxx
+12
-17
svtools.hrc
include/svtools/svtools.hrc
+0
-2
UIConfig_svt.mk
svtools/UIConfig_svt.mk
+1
-0
fileview.cxx
svtools/source/contnr/fileview.cxx
+23
-45
fileview.hrc
svtools/source/contnr/fileview.hrc
+0
-10
fileview.src
svtools/source/contnr/fileview.src
+0
-70
querydeletedialog.ui
svtools/uiconfig/ui/querydeletedialog.ui
+99
-0
No files found.
include/svtools/fileview.hxx
Dosyayı görüntüle @
02d4eb74
...
...
@@ -25,8 +25,9 @@
#include <vcl/ctrl.hxx>
#include <vcl/image.hxx>
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/layout.hxx>
#include <rtl/ustring.hxx>
// class SvtFileView -----------------------------------------------------
...
...
@@ -216,24 +217,19 @@ namespace svtools {
enum
QueryDeleteResult_Impl
{
QUERYDELETE_
YES
=
0
,
QUERYDELETE_
NO
,
QUERYDELETE_
ALL
,
QUERYDELETE_
CANCEL
QUERYDELETE_
CANCEL
=
RET_CANCEL
,
QUERYDELETE_
YES
=
RET_YES
,
QUERYDELETE_
NO
=
RET_NO
,
QUERYDELETE_
ALL
=
-
1
};
class
SVT_DLLPUBLIC
QueryDeleteDlg_Impl
:
public
M
odal
Dialog
class
SVT_DLLPUBLIC
QueryDeleteDlg_Impl
:
public
M
essage
Dialog
{
FixedText
_aEntryLabel
;
FixedText
_aEntry
;
FixedText
_aQueryMsg
;
PushButton
_aYesButton
;
PushButton
_aAllButton
;
PushButton
_aNoButton
;
CancelButton
_aCancelButton
;
PushButton
*
m_pYesButton
;
PushButton
*
m_pAllButton
;
PushButton
*
m_pNoButton
;
QueryDeleteResult_Impl
_eResult
;
QueryDeleteResult_Impl
m
_eResult
;
private
:
...
...
@@ -244,8 +240,7 @@ public:
QueryDeleteDlg_Impl
(
Window
*
pParent
,
const
OUString
&
rName
);
void
EnableAllButton
()
{
_aAllButton
.
Enable
(
sal_True
);
}
QueryDeleteResult_Impl
GetResult
()
const
{
return
_eResult
;
}
void
EnableAllButton
()
{
m_pAllButton
->
Enable
(
true
);
}
};
}
...
...
include/svtools/svtools.hrc
Dosyayı görüntüle @
02d4eb74
...
...
@@ -27,8 +27,6 @@
//.............................................................................
// various unsorted stuff
#define DLG_SVT_QUERYDELETE (RID_SVTOOLS_START+6)
#define STR_SVT_AUTOMATIC_COLOR (RID_SVTOOLS_START+16)
#define STR_SVT_FILEVIEW_COLUMN_TITLE (RID_SVTOOLS_START + 20)
...
...
svtools/UIConfig_svt.mk
Dosyayı görüntüle @
02d4eb74
...
...
@@ -14,6 +14,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svt,\
svtools/uiconfig/ui/graphicexport \
svtools/uiconfig/ui/placeedit \
svtools/uiconfig/ui/printersetupdialog \
svtools/uiconfig/ui/querydeletedialog \
svtools/uiconfig/ui/restartdialog \
svtools/uiconfig/ui/GraphicExportOptionsDialog \
))
...
...
svtools/source/contnr/fileview.cxx
Dosyayı görüntüle @
02d4eb74
...
...
@@ -59,7 +59,7 @@
#include <unotools/localfilehelper.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/commandenvironment.hxx>
#include <vcl/
msgbox
.hxx>
#include <vcl/
layout
.hxx>
#include <rtl/math.hxx>
#include <tools/config.hxx>
#include <osl/mutex.hxx>
...
...
@@ -536,7 +536,7 @@ protected:
protected
:
// IEnumerationResultHandler overridables
virtual
void
enumerationDone
(
::
svt
::
EnumerationResult
_
eResult
);
virtual
void
enumerationDone
(
::
svt
::
EnumerationResult
eResult
);
void
implEnumerationSuccess
();
// ITimeoutHandler
...
...
@@ -900,7 +900,7 @@ void ViewTabListBox_Impl::ClearAll()
// -----------------------------------------------------------------------
void
ViewTabListBox_Impl
::
DeleteEntries
()
{
s
vtools
::
QueryDeleteResult_Impl
eResult
=
svtools
::
QUERYDELETE_YES
;
s
hort
eResult
=
svtools
::
QUERYDELETE_YES
;
SvTreeListEntry
*
pEntry
=
FirstSelected
();
OUString
aURL
;
...
...
@@ -946,10 +946,7 @@ void ViewTabListBox_Impl::DeleteEntries()
if
(
GetSelectionCount
()
>
1
)
aDlg
.
EnableAllButton
();
if
(
aDlg
.
Execute
()
==
RET_OK
)
eResult
=
aDlg
.
GetResult
();
else
eResult
=
svtools
::
QUERYDELETE_CANCEL
;
eResult
=
aDlg
.
Execute
();
sDialogPosition
=
aDlg
.
GetWindowState
(
);
}
...
...
@@ -2060,7 +2057,7 @@ void SvtFileView_Impl::onTimeout( CallbackTimer* )
}
//-----------------------------------------------------------------------
void
SvtFileView_Impl
::
enumerationDone
(
::
svt
::
EnumerationResult
_
eResult
)
void
SvtFileView_Impl
::
enumerationDone
(
::
svt
::
EnumerationResult
eResult
)
{
SolarMutexGuard
aSolarGuard
;
::
osl
::
MutexGuard
aGuard
(
maMutex
);
...
...
@@ -2074,12 +2071,12 @@ void SvtFileView_Impl::enumerationDone( ::svt::EnumerationResult _eResult )
// this is to prevent race conditions
return
;
m_eAsyncActionResult
=
_
eResult
;
m_eAsyncActionResult
=
eResult
;
m_bRunningAsyncAction
=
false
;
m_aAsyncActionFinished
.
set
();
if
(
svt
::
SUCCESS
==
_
eResult
)
if
(
svt
::
SUCCESS
==
eResult
)
implEnumerationSuccess
();
if
(
m_aCurrentAsyncActionHandler
.
IsSet
()
)
...
...
@@ -2541,53 +2538,34 @@ namespace svtools {
// QueryDeleteDlg_Impl
// -----------------------------------------------------------------------
QueryDeleteDlg_Impl
::
QueryDeleteDlg_Impl
(
Window
*
pParent
,
const
OUString
&
rName
// entry name
)
:
ModalDialog
(
pParent
,
SvtResId
(
DLG_SVT_QUERYDELETE
)
),
_aEntryLabel
(
this
,
SvtResId
(
TXT_ENTRY
)
),
_aEntry
(
this
,
SvtResId
(
TXT_ENTRYNAME
)
),
_aQueryMsg
(
this
,
SvtResId
(
TXT_QUERYMSG
)
),
_aYesButton
(
this
,
SvtResId
(
BTN_YES
)
),
_aAllButton
(
this
,
SvtResId
(
BTN_ALL
)
),
_aNoButton
(
this
,
SvtResId
(
BTN_NO
)
),
_aCancelButton
(
this
,
SvtResId
(
BTN_CANCEL
)
),
_eResult
(
QUERYDELETE_YES
)
QueryDeleteDlg_Impl
::
QueryDeleteDlg_Impl
(
Window
*
pParent
,
const
OUString
&
rName
)
:
MessageDialog
(
pParent
,
"QueryDeleteDialog"
,
"svt/ui/querydeletedialog.ui"
)
,
m_eResult
(
QUERYDELETE_YES
)
{
FreeResource
();
get
(
m_pNoButton
,
"no"
);
get
(
m_pAllButton
,
"all"
);
get
(
m_pYesButton
,
"yes"
);
// Handler
Link
aLink
(
STATIC_LINK
(
this
,
QueryDeleteDlg_Impl
,
ClickLink
)
);
_aYesButton
.
SetClickHdl
(
aLink
);
_aAllButton
.
SetClickHdl
(
aLink
);
_aNoButton
.
SetClickHdl
(
aLink
);
m_pYesButton
->
SetClickHdl
(
aLink
);
m_pAllButton
->
SetClickHdl
(
aLink
);
m_pNoButton
->
SetClickHdl
(
aLink
);
// display specified texts
WinBits
nTmpStyle
=
_aEntry
.
GetStyle
();
nTmpStyle
|=
WB_PATHELLIPSIS
;
_aEntry
.
SetStyle
(
nTmpStyle
);
_aEntry
.
SetText
(
rName
);
set_secondary_text
(
get_secondary_text
().
replaceFirst
(
"%s"
,
rName
));
}
// -----------------------------------------------------------------------
IMPL_STATIC_LINK
(
QueryDeleteDlg_Impl
,
ClickLink
,
PushButton
*
,
pBtn
)
{
if
(
pBtn
==
&
pThis
->
_aYesButton
)
pThis
->
_eResult
=
QUERYDELETE_YES
;
else
if
(
pBtn
==
&
pThis
->
_aNoButton
)
pThis
->
_eResult
=
QUERYDELETE_NO
;
else
if
(
pBtn
==
&
pThis
->
_aAllButton
)
pThis
->
_eResult
=
QUERYDELETE_ALL
;
else
if
(
pBtn
==
&
pThis
->
_aCancelButton
)
pThis
->
_eResult
=
QUERYDELETE_CANCEL
;
if
(
pBtn
==
pThis
->
m_pYesButton
)
pThis
->
m_eResult
=
QUERYDELETE_YES
;
else
if
(
pBtn
==
pThis
->
m_pNoButton
)
pThis
->
m_eResult
=
QUERYDELETE_NO
;
else
if
(
pBtn
==
pThis
->
m_pAllButton
)
pThis
->
m_eResult
=
QUERYDELETE_ALL
;
pThis
->
EndDialog
(
RET_OK
);
...
...
svtools/source/contnr/fileview.hrc
Dosyayı görüntüle @
02d4eb74
...
...
@@ -20,14 +20,4 @@
#define MID_FILEVIEW_DELETE 1
#define MID_FILEVIEW_RENAME 2
// DLG_SFX_QUERYDELETE ********************************************************
#define TXT_ENTRY 1
#define TXT_ENTRYNAME 2
#define TXT_QUERYMSG 3
#define BTN_YES 4
#define BTN_NO 5
#define BTN_ALL 6
#define BTN_CANCEL 7
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svtools/source/contnr/fileview.src
Dosyayı görüntüle @
02d4eb74
...
...
@@ -98,74 +98,4 @@ Menu RID_FILEVIEW_CONTEXTMENU
};
};
ModalDialog DLG_SVT_QUERYDELETE
{
HelpID = "svtools:ModalDialog:DLG_SVT_QUERYDELETE";
SVLook = TRUE ;
OutputSize = TRUE ;
Moveable = TRUE ;
Size = MAP_APPFONT ( 221 , 67 ) ;
Text [ en-US ] = "Confirm Delete" ;
FixedText TXT_ENTRY
{
NoLabel = TRUE;
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 40 , 10 ) ;
Text [ en-US ] = "Entry:" ;
};
FixedText TXT_ENTRYNAME
{
Pos = MAP_APPFONT ( 52 , 6 ) ;
Size = MAP_APPFONT ( 163 , 10 ) ;
NoLabel = TRUE ;
};
FixedText TXT_QUERYMSG
{
NoLabel = TRUE;
WordBreak = TRUE;
Pos = MAP_APPFONT ( 6 , 19 ) ;
Size = MAP_APPFONT ( 209 , 22 ) ;
Text [ en-US ] = "Are you sure you want to delete the selected data?" ;
};
PushButton BTN_YES
{
HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_YES";
Pos = MAP_APPFONT ( 6 , 47 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
Text [ en-US ] = "~Delete" ;
};
PushButton BTN_ALL
{
HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_ALL";
Pos = MAP_APPFONT ( 59 , 47 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
Disable = TRUE ;
Text [ en-US ] = "Delete ~All" ;
};
PushButton BTN_NO
{
HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_NO";
Pos = MAP_APPFONT ( 112 , 47 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Do ~Not Delete" ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 165 , 47 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svtools/uiconfig/ui/querydeletedialog.ui
0 → 100644
Dosyayı görüntüle @
02d4eb74
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkMessageDialog"
id=
"QueryDeleteDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
12
</property>
<property
name=
"title"
translatable=
"yes"
>
Confirm Delete
</property>
<property
name=
"resizable"
>
False
</property>
<property
name=
"type_hint"
>
dialog
</property>
<property
name=
"skip_taskbar_hint"
>
True
</property>
<property
name=
"message_type"
>
question
</property>
<property
name=
"text"
translatable=
"yes"
>
Are you sure you want to delete the selected data?
</property>
<property
name=
"secondary_text"
translatable=
"yes"
>
Entry: %s
</property>
<child
internal-child=
"vbox"
>
<object
class=
"GtkBox"
id=
"messagedialog-vbox"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
24
</property>
<child
internal-child=
"action_area"
>
<object
class=
"GtkButtonBox"
id=
"messagedialog-action_area"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"layout_style"
>
center
</property>
<child>
<object
class=
"GtkButton"
id=
"yes"
>
<property
name=
"label"
translatable=
"yes"
>
_Delete
</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_underline"
>
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=
"all"
>
<property
name=
"label"
translatable=
"yes"
>
Delete _All
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"sensitive"
>
False
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"no"
>
<property
name=
"label"
translatable=
"yes"
>
Do _Not Delete
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
2
</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"
>
3
</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>
</object>
</child>
<action-widgets>
<action-widget
response=
"2"
>
yes
</action-widget>
<action-widget
response=
"-1"
>
all
</action-widget>
<action-widget
response=
"3"
>
no
</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