[Libreoffice-commits] core.git: sw/source sw/uiconfig sw/UIConfig_swriter.mk
Caolán McNamara
caolanm at redhat.com
Sun Sep 1 04:54:51 PDT 2013
sw/UIConfig_swriter.mk | 1
sw/source/ui/docvw/SidebarTxtControl.cxx | 4 ++-
sw/source/ui/docvw/docvw.hrc | 2 -
sw/source/ui/docvw/docvw.src | 5 ---
sw/source/ui/docvw/edtwin.cxx | 9 ++++---
sw/uiconfig/swriter/ui/inforeadonlydialog.ui | 34 +++++++++++++++++++++++++++
6 files changed, 44 insertions(+), 11 deletions(-)
New commits:
commit 7a64fe91db5fb231b3d980fb5d41fcdc87f86794
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 1 10:42:47 2013 +0100
convert readonly info to .ui
Change-Id: Ib0c7f47ceae35e7255f6ed6fbbcc12e59e0bd956
Reviewed-on: https://gerrit.libreoffice.org/5728
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 5f73cd9..4d22eea 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -112,6 +112,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/inputfielddialog \
sw/uiconfig/swriter/ui/indentpage \
+ sw/uiconfig/swriter/ui/inforeadonlydialog \
sw/uiconfig/swriter/ui/insertautotextdialog \
sw/uiconfig/swriter/ui/insertbookmark \
sw/uiconfig/swriter/ui/insertbreak \
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
index efa8fb8..4db10d0 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -36,6 +36,7 @@
#include <vcl/svapp.hxx>
#include <vcl/help.hxx>
+#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/gradient.hxx>
#include <vcl/scrbar.hxx>
@@ -203,7 +204,8 @@ void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt )
}
else
{
- InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
+ MessageDialog(this, "InfoReadonlyDialog",
+ "modules/swriter/ui/inforeadonlydialog.ui").Execute();
}
}
if (bDone)
diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc
index fd6cd8e..7f5e5b6 100644
--- a/sw/source/ui/docvw/docvw.hrc
+++ b/sw/source/ui/docvw/docvw.hrc
@@ -79,8 +79,6 @@
#define STR_DELETE_FOOTER (RC_DOCVW_BEGIN + 26)
#define STR_FORMAT_FOOTER (RC_DOCVW_BEGIN + 27)
-#define MSG_READONLY_CONTENT (RC_DOCVW_BEGIN + 1)
-
#define DOCVW_ACT_END STR_SMARTTAG_CLICK
#if DOCVW_ACT_END > RC_DOCVW_END
diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src
index 130750e..0451ad1 100644
--- a/sw/source/ui/docvw/docvw.src
+++ b/sw/source/ui/docvw/docvw.src
@@ -248,11 +248,6 @@ String STR_FTNNOTE
Text [ en-US ] = "Footnote: " ;
};
-InfoBox MSG_READONLY_CONTENT
-{
- Message [ en-US ] = "Readonly content cannot be changed.\nNo modifications will be accepted";
-};
-
String STR_TABLE_COL_ADJUST
{
Text [ en-US ] = "Adjust table column" ;
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 3321d28..a49e789 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -1832,7 +1832,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
+ MessageDialog(this, "InfoReadonlyDialog",
+ "modules/swriter/ui/inforeadonlydialog.ui").Execute();
eKeyState = KS_End;
}
break;
@@ -1992,7 +1993,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
+ MessageDialog(this, "InfoReadonlyDialog",
+ "modules/swriter/ui/inforeadonlydialog.ui").Execute();
eKeyState = KS_End;
}
break;
@@ -2397,7 +2399,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
+ MessageDialog(this, "InfoReadonlyDialog",
+ "modules/swriter/ui/inforeadonlydialog.ui").Execute();
eKeyState = KS_End;
}
break;
diff --git a/sw/uiconfig/swriter/ui/inforeadonlydialog.ui b/sw/uiconfig/swriter/ui/inforeadonlydialog.ui
new file mode 100644
index 0000000..d96c668
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/inforeadonlydialog.ui
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="InfoReadonlyDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Readonly Content</property>
+ <property name="resizable">False</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="buttons">ok</property>
+ <property name="text" translatable="yes">Readonly content cannot be changed.</property>
+ <property name="secondary_text" translatable="yes">No modifications will be accepted.</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>
+ </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>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list