[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - cui/uiconfig solenv/bin sw/uiconfig vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 29 07:13:54 PDT 2012
cui/uiconfig/ui/10000.ui | 18 ++++++++++++++----
solenv/bin/uilangfilter.xslt | 4 ++--
sw/uiconfig/sw/ui/20872.ui | 18 ++++++------------
sw/uiconfig/swriter/ui/linenumbering.ui | 3 +--
vcl/source/window/builder.cxx | 21 ++++++++++++++++++++-
5 files changed, 43 insertions(+), 21 deletions(-)
New commits:
commit db7d5e00ab9d5e86180c10afa377c40b5006a274
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 29 15:06:48 2012 +0100
We need to distinguish NumericFields from MetricFields
In the future I'm hoping we can get some gtk3-side support
for patterns for GtkSpinButtons or such such. In the meamtime
overload that info into the name
Change-Id: I20464e3ddafb710dd7330fc038bb9330b852410a
diff --git a/cui/uiconfig/ui/10000.ui b/cui/uiconfig/ui/10000.ui
index a14db03..fe84aea 100644
--- a/cui/uiconfig/ui/10000.ui
+++ b/cui/uiconfig/ui/10000.ui
@@ -17,6 +17,7 @@
<child>
<object class="GtkButton" id="28">
<property name="label">gtk-ok</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -32,6 +33,7 @@
<child>
<object class="GtkButton" id="29">
<property name="label">gtk-cancel</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -47,6 +49,7 @@
<child>
<object class="GtkButton" id="30">
<property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -91,6 +94,7 @@
<child>
<object class="GtkRadioButton" id="15">
<property name="label" translatable="yes">Optimal</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -108,6 +112,7 @@
<child>
<object class="GtkRadioButton" id="16">
<property name="label" translatable="yes">Fit width and height</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -126,6 +131,7 @@
<child>
<object class="GtkRadioButton" id="17">
<property name="label" translatable="yes">Fit width</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -144,6 +150,7 @@
<child>
<object class="GtkRadioButton" id="18">
<property name="label" translatable="yes">100%</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -166,6 +173,7 @@
<child>
<object class="GtkRadioButton" id="19">
<property name="label" translatable="yes">Variable</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -182,11 +190,10 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="20">
+ <object class="GtkSpinButton" id="20:0%">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
- <property name="pattern">0%</property>
</object>
<packing>
<property name="expand">False</property>
@@ -239,6 +246,7 @@
<child>
<object class="GtkRadioButton" id="22">
<property name="label" translatable="yes">Automatic</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -256,6 +264,7 @@
<child>
<object class="GtkRadioButton" id="23">
<property name="label" translatable="yes">Single page</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -278,6 +287,7 @@
<child>
<object class="GtkRadioButton" id="24">
<property name="label" translatable="yes">Columns</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -294,11 +304,10 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="25">
+ <object class="GtkSpinButton" id="25:0">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
- <property name="pattern">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -321,6 +330,7 @@
<child>
<object class="GtkCheckButton" id="26">
<property name="label" translatable="yes">Book mode</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
diff --git a/solenv/bin/uilangfilter.xslt b/solenv/bin/uilangfilter.xslt
index c003210..8f4b1c5 100644
--- a/solenv/bin/uilangfilter.xslt
+++ b/solenv/bin/uilangfilter.xslt
@@ -19,7 +19,7 @@
<xsl:template match="*/*[not(self::col)][@translatable]">
<xsl:text> </xsl:text>
- <t r="string" g="{../@id}" l="{@name}">
+ <t r="string" g="{substring-before(../@id,':')}" l="{@name}">
<xsl:copy-of select="text()" />
</t><xsl:text>
</xsl:text>
</xsl:template>
@@ -27,7 +27,7 @@
<xsl:template match="col">
<xsl:text> </xsl:text>
<xsl:variable name="groupid" select="../../../@id"/>
- <t r="stringlist" g="{$groupid}" l="{count(preceding::col[../../../@id=$groupid])}">
+ <t r="stringlist" g="{substring-before($groupid. ':')}" l="{count(preceding::col[../../../@id=$groupid])}">
<xsl:copy-of select="text()" />
</t><xsl:text>
</xsl:text>
</xsl:template>
diff --git a/sw/uiconfig/sw/ui/20872.ui b/sw/uiconfig/sw/ui/20872.ui
index d30d99b..a06270d 100644
--- a/sw/uiconfig/sw/ui/20872.ui
+++ b/sw/uiconfig/sw/ui/20872.ui
@@ -165,12 +165,11 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="26">
+ <object class="GtkSpinButton" id="26:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
<property name="invisible_char_set">True</property>
- <property name="pattern">0.00cm</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -194,12 +193,11 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="20">
+ <object class="GtkSpinButton" id="20:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
<property name="invisible_char_set">True</property>
- <property name="pattern">0.00cm</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -209,12 +207,11 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="24">
+ <object class="GtkSpinButton" id="24:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
<property name="invisible_char_set">True</property>
- <property name="pattern">0.00cm</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -282,13 +279,12 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="5">
+ <object class="GtkSpinButton" id="5:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
- <property name="pattern">0.00cm</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -330,13 +326,12 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="8">
+ <object class="GtkSpinButton" id="8:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
<property name="adjustment">adjustment1</property>
<property name="digits">2</property>
- <property name="pattern">0.00cm</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -346,13 +341,12 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="10">
+ <object class="GtkSpinButton" id="10:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
<property name="adjustment">adjustment1</property>
<property name="digits">2</property>
- <property name="pattern">0.00cm</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/sw/uiconfig/swriter/ui/linenumbering.ui b/sw/uiconfig/swriter/ui/linenumbering.ui
index 045bf88..e4d3edf 100644
--- a/sw/uiconfig/swriter/ui/linenumbering.ui
+++ b/sw/uiconfig/swriter/ui/linenumbering.ui
@@ -235,7 +235,7 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spacingspin">
+ <object class="GtkSpinButton" id="spacingspin:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
@@ -243,7 +243,6 @@
<property name="invisible_char_set">True</property>
<property name="adjustment">spacingadjustment</property>
<property name="digits">2</property>
- <property name="pattern">0.00cm</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index fdf6a49..c2f987d 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -170,6 +170,9 @@ void VclBuilder::handleTranslations(xmlreader::XmlReader &reader)
{
name = reader.getAttributeValue(false);
sID = rtl::OString(name.begin, name.length);
+ sal_Int32 nDelim = sID.indexOf(':');
+ if (nDelim != -1)
+ sID = sID.copy(nDelim);
}
else if (name.equals(RTL_CONSTASCII_STRINGPARAM("i")))
{
@@ -613,6 +616,13 @@ void VclBuilder::handleTabChild(Window *pParent, xmlreader::XmlReader &reader)
{
name = reader.getAttributeValue(false);
sID = rtl::OString(name.begin, name.length);
+ sal_Int32 nDelim = sID.indexOf(':');
+ if (nDelim != -1)
+ {
+ rtl::OString sPattern = sID.copy(nDelim+1);
+ aProperties[rtl::OString("pattern")] = sPattern;
+ sID = sID.copy(0, nDelim);
+ }
}
}
}
@@ -825,6 +835,7 @@ Window* VclBuilder::handleObject(Window *pParent, xmlreader::XmlReader &reader)
{
rtl::OString sClass;
rtl::OString sID;
+ rtl::OString sPattern;
xmlreader::Span name;
int nsId;
@@ -840,8 +851,13 @@ Window* VclBuilder::handleObject(Window *pParent, xmlreader::XmlReader &reader)
{
name = reader.getAttributeValue(false);
sID = rtl::OString(name.begin, name.length);
+ sal_Int32 nDelim = sID.indexOf(':');
+ if (nDelim != -1)
+ {
+ sPattern = sID.copy(nDelim+1);
+ sID = sID.copy(0, nDelim);
+ }
}
-
}
if (sClass.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkListStore")))
@@ -854,6 +870,9 @@ Window* VclBuilder::handleObject(Window *pParent, xmlreader::XmlReader &reader)
stringmap aProperties;
+ if (!sPattern.isEmpty())
+ aProperties[rtl::OString("pattern")] = sPattern;
+
Window *pCurrentChild = NULL;
while(1)
{
More information about the Libreoffice-commits
mailing list