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
cd841115
Kaydet (Commit)
cd841115
authored
May 01, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use new MessageDialog
Change-Id: I4fdc54d5a6e0f133c53588e255274b9f103269b4
üst
9e5c3545
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
100 additions
and
37 deletions
+100
-37
QuerySaveDocument.hxx
include/sfx2/QuerySaveDocument.hxx
+4
-4
sfx.hrc
include/sfx2/sfx.hrc
+2
-2
UIConfig_sfx.mk
sfx2/UIConfig_sfx.mk
+1
-0
QuerySaveDocument.cxx
sfx2/source/doc/QuerySaveDocument.cxx
+9
-17
doc.hrc
sfx2/source/doc/doc.hrc
+1
-1
doc.src
sfx2/source/doc/doc.src
+0
-13
querysavedialog.ui
sfx2/uiconfig/ui/querysavedialog.ui
+83
-0
No files found.
include/sfx2/QuerySaveDocument.hxx
Dosyayı görüntüle @
cd841115
...
...
@@ -19,11 +19,11 @@
#ifndef SFX_QUERYSAVEDOCUMENT_HXX
#define SFX_QUERYSAVEDOCUMENT_HXX
#include
"sal/config.h"
#include
"sfx2/dllapi.h"
#include
<rtl/ustring.hxx>
#include
<sfx2/dllapi.h>
class
Window
;
class
String
;
/** Opens the general query save document dialog.
@param _pParent
The parent window.
...
...
@@ -31,7 +31,7 @@ class String;
The title of the document.
*/
SFX2_DLLPUBLIC
short
ExecuteQuerySaveDocument
(
Window
*
_pParent
,
const
String
&
_rTitle
);
Window
*
_pParent
,
const
OU
String
&
_rTitle
);
#endif //SFX_QUERYSAVEDOCUMENT_HXX
...
...
include/sfx2/sfx.hrc
Dosyayı görüntüle @
cd841115
...
...
@@ -152,12 +152,12 @@
#define STR_SFX_FILTERNAME_ALL (RID_SFX_START+106)
#define STR_EDIT (RID_SFX_START+108)
#define STR_QUERY_SAVE_DOCUMENT (RID_SFX_START+110)
#define STR_BYTES (RID_SFX_START+111)
#define STR_KB (RID_SFX_START+112)
#define STR_MB (RID_SFX_START+113)
#define STR_GB (RID_SFX_START+114)
#define STR_QUERY_SAVE_DOCUMENT_TITLE (RID_SFX_START+115)
#define STR_STANDARD_SHORTCUT (RID_SFX_START+117)
#define STR_REPAIREDDOCUMENT (RID_SFX_START+118)
...
...
sfx2/UIConfig_sfx.mk
Dosyayı görüntüle @
cd841115
...
...
@@ -20,6 +20,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/optprintpage \
sfx2/uiconfig/ui/password \
sfx2/uiconfig/ui/printeroptionsdialog \
sfx2/uiconfig/ui/querysavedialog \
sfx2/uiconfig/ui/securityinfopage \
sfx2/uiconfig/ui/singletabdialog \
sfx2/uiconfig/ui/documentfontspage \
...
...
sfx2/source/doc/QuerySaveDocument.cxx
Dosyayı görüntüle @
cd841115
...
...
@@ -17,29 +17,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "sfx2/QuerySaveDocument.hxx"
#include <sfx2/sfx.hrc>
#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
#include "doc.hrc"
#include <vcl/msgbox.hxx>
#include <sfx2/QuerySaveDocument.hxx>
#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
// -----------------------------------------------------------------------------
short
ExecuteQuerySaveDocument
(
Window
*
_pParent
,
const
String
&
_rTitle
)
short
ExecuteQuerySaveDocument
(
Window
*
_pParent
,
const
OU
String
&
_rTitle
)
{
if
(
Application
::
IsHeadlessModeEnabled
())
{
// don't block Desktop::terminate() if there's no user to ask
{
// don't block Desktop::terminate() if there's no user to ask
return
RET_NO
;
}
OUString
aText
(
SfxResId
(
STR_QUERY_SAVE_DOCUMENT
).
toString
()
);
aText
=
aText
.
replaceFirst
(
"$(DOC)"
,
_rTitle
);
QueryBox
aQBox
(
_pParent
,
WB_YES_NO_CANCEL
|
WB_DEF_YES
,
aText
);
aQBox
.
SetText
(
SfxResId
(
STR_QUERY_SAVE_DOCUMENT_TITLE
).
toString
());
// Window title
aQBox
.
SetButtonText
(
BUTTONID_NO
,
SfxResId
(
STR_NOSAVEANDCLOSE
).
toString
()
);
aQBox
.
SetButtonText
(
BUTTONID_YES
,
SfxResId
(
STR_SAVEDOC
).
toString
()
);
MessageDialog
aQBox
(
_pParent
,
"QuerySaveDialog"
,
"sfx/ui/querysavedialog.ui"
);
aQBox
.
set_primary_text
(
aQBox
.
get_primary_text
().
replaceFirst
(
"$(DOC)"
,
_rTitle
));
return
aQBox
.
Execute
();
}
// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sfx2/source/doc/doc.hrc
Dosyayı görüntüle @
cd841115
...
...
@@ -114,7 +114,7 @@
#define STR_DOCTYPENAME_MESSAGE (RID_SFX_DOC_START+ 75)
#define RID_STR_NEW_TASK (RID_SFX_DOC_START+ 76)
#define STR_NOSAVEANDCLOSE (RID_SFX_DOC_START+ 78)
#define STR_PACKNGO_NOACCESS (RID_SFX_DOC_START+ 79)
#define STR_PACKNGO_NEWMEDIUM (RID_SFX_DOC_START+ 80)
...
...
sfx2/source/doc/doc.src
Dosyayı görüntüle @
cd841115
...
...
@@ -47,14 +47,6 @@ QueryBox MSG_REGION_NOTEMPTY
DefButton = WB_DEF_NO ;
Message [ en-US ] = "The category is not empty.\nDelete anyway?" ;
};
String STR_QUERY_SAVE_DOCUMENT_TITLE
{
Text [ en-US ] = "Save document" ;
};
String STR_QUERY_SAVE_DOCUMENT
{
Text [ en-US ] = "Save changes to document \"$(DOC)\" before closing?" ;
};
Bitmap BMP_STYLES_CLOSED { File = "newex.bmp" ; };
Bitmap BMP_STYLES_OPENED { File = "newex.bmp" ; };
...
...
@@ -314,11 +306,6 @@ String STR_DOCTYPENAME_MESSAGE
Text [ en-US ] = "Message";
};
String STR_NOSAVEANDCLOSE
{
Text [ en-US ] = "Close ~without saving" ;
};
String STR_PACKNGO_NOACCESS
{
Text [ en-US ] = "Access to the current data medium not possible." ;
...
...
sfx2/uiconfig/ui/querysavedialog.ui
0 → 100644
Dosyayı görüntüle @
cd841115
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkMessageDialog"
id=
"QuerySaveDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
12
</property>
<property
name=
"title"
translatable=
"yes"
>
Save document
</property>
<property
name=
"type_hint"
>
dialog
</property>
<property
name=
"skip_taskbar_hint"
>
True
</property>
<property
name=
"message_type"
>
warning
</property>
<property
name=
"text"
translatable=
"yes"
>
Save changes to document "$(DOC)" before closing?
</property>
<property
name=
"secondary_text"
translatable=
"yes"
>
Your changes will be lost if you don't save them.
</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"
>
end
</property>
<child>
<object
class=
"GtkButton"
id=
"button3"
>
<property
name=
"label"
translatable=
"yes"
>
Close _without saving
</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"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"button1"
>
<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>
<property
name=
"image_position"
>
bottom
</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=
"button2"
>
<property
name=
"label"
>
gtk-save
</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"
>
2
</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=
"3"
>
button3
</action-widget>
<action-widget
response=
"0"
>
button1
</action-widget>
<action-widget
response=
"2"
>
button2
</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