summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-12-22 13:12:23 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2016-01-12 12:46:31 -0600
commit677197b3459df2c89be32595e0cb1b8b3e144c69 (patch)
tree370561ff6bb70aa54052d1cf95081792f894de19 /cui
parentfeebc5953fb416c5dc8cdf8c7e924a9ff9c70f17 (diff)
New saving behavior
Changes in this commit: - AlwaysAllowSave config is gone. Saving is always permitted, unless in a read only document. Also changed the behavior in dbaccess to match sfx2. - The toolbar save button is always enabled, to always give access to the dropdown. That's the case even in a read only document, except that it changes to DROPDOWNONLY, and the save as command icon+tooltip. In table/query designers we still disable the button in read only state. - When the document is modified, the toolbar button gets a special icon to indicate that. Reviewed-on: https://gerrit.libreoffice.org/20839 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit 22328a224df4619218b88205838307f70612207e) loplugin:unreffun (cherry picked from commit ea708936c4684668f9aefc3ce9ec2001dbd4bdf2) Change-Id: I56c169bf48b78faaf53c2989ce8624f8297ffb6e Tango: Update Save icons and support “savemodified” status Change-Id: I03589895437907b9048542f07128801577fe62dc (cherry picked from commit a7198d38f0294ab5db04a7f4457565ea8b2c32f1) Reviewed-on: https://gerrit.libreoffice.org/21260 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx11
-rw-r--r--cui/source/options/optgdlg.hxx1
-rw-r--r--cui/uiconfig/ui/optgeneralpage.ui70
3 files changed, 9 insertions, 73 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index dfb517f93667..52fc00c996a0 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -273,7 +273,6 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
get(m_pFileDlgROImage, "lockimage");
get(m_pPrintDlgCB, "printdlg");
get(m_pDocStatusCB, "docstatus");
- get(m_pSaveAlwaysCB, "savealways");
get(m_pYearFrame, "yearframe");
get(m_pYearValueField, "year");
get(m_pToYearFT, "toyear");
@@ -309,7 +308,6 @@ void OfaMiscTabPage::dispose()
m_pFileDlgCB.clear();
m_pPrintDlgCB.clear();
m_pDocStatusCB.clear();
- m_pSaveAlwaysCB.clear();
m_pYearFrame.clear();
m_pYearValueField.clear();
m_pToYearFT.clear();
@@ -352,13 +350,6 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
bModified = true;
}
- if ( m_pSaveAlwaysCB->IsValueChangedFromSaved() )
- {
- SvtMiscOptions aMiscOpt;
- aMiscOpt.SetSaveAlwaysAllowed( m_pSaveAlwaysCB->IsChecked() );
- bModified = true;
- }
-
const SfxUInt16Item* pUInt16Item = dynamic_cast< const SfxUInt16Item* >( GetOldItem( *rSet, SID_ATTR_YEAR2000 ) );
sal_uInt16 nNum = (sal_uInt16)m_pYearValueField->GetText().toInt32();
if ( pUInt16Item && pUInt16Item->GetValue() != nNum )
@@ -389,8 +380,6 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
m_pFileDlgCB->SaveValue();
m_pPrintDlgCB->Check( !aMiscOpt.UseSystemPrintDialog() );
m_pPrintDlgCB->SaveValue();
- m_pSaveAlwaysCB->Check( aMiscOpt.IsSaveAlwaysAllowed() );
- m_pSaveAlwaysCB->SaveValue();
SvtPrintWarningOptions aPrintOptions;
m_pDocStatusCB->Check(aPrintOptions.IsModifyDocumentOnPrintingAllowed());
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 6bd50151566e..e3274d1b9f99 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -48,7 +48,6 @@ private:
VclPtr<CheckBox> m_pPrintDlgCB;
VclPtr<CheckBox> m_pDocStatusCB;
- VclPtr<CheckBox> m_pSaveAlwaysCB;
VclPtr<VclContainer> m_pYearFrame;
VclPtr<NumericField> m_pYearValueField;
diff --git a/cui/uiconfig/ui/optgeneralpage.ui b/cui/uiconfig/ui/optgeneralpage.ui
index c17ac99f9d83..ac98e80ba79b 100644
--- a/cui/uiconfig/ui/optgeneralpage.ui
+++ b/cui/uiconfig/ui/optgeneralpage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.19.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
@@ -53,8 +53,6 @@
<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>
@@ -87,8 +85,6 @@
<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>
<child>
@@ -102,8 +98,6 @@
<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>
</object>
@@ -124,8 +118,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -167,8 +159,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -184,44 +174,14 @@
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkCheckButton" id="docstatus">
+ <property name="label" translatable="yes">_Printing sets "document modified" status</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkCheckButton" id="docstatus">
- <property name="label" translatable="yes">_Printing sets "document modified" status</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</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="GtkCheckButton" id="savealways">
- <property name="label" translatable="yes">_Allow to save document even when the document is not modified </property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
</object>
</child>
</object>
@@ -240,8 +200,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -265,16 +223,14 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">_Interpret as years between </property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">year</property>
+ <property name="xalign">0</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>
@@ -287,8 +243,6 @@
<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>
<child>
@@ -300,8 +254,6 @@
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -322,8 +274,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -365,8 +315,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>