Kaydet (Commit) 085852e2 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

tdf#114901 TSCP various advanced TSCP dialog changes

- rename "Part" to "License"
- change Markings from Combo to List box
- minimize whitespace
- move bold and sign paragraph under text area as it is fixed
- remove bold in paragraph dialog

Change-Id: I7ec20460d02d3611a1da325eb7d3de3aef10f03f
Reviewed-on: https://gerrit.libreoffice.org/47632Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
Tested-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst e5404aef
...@@ -66,7 +66,6 @@ private: ...@@ -66,7 +66,6 @@ private:
DECL_LINK(SelectToolboxHdl, ToolBox*, void); DECL_LINK(SelectToolboxHdl, ToolBox*, void);
DECL_LINK(SelectClassificationHdl, ListBox&, void); DECL_LINK(SelectClassificationHdl, ListBox&, void);
DECL_LINK(SelectMarkingHdl, ListBox&, void); DECL_LINK(SelectMarkingHdl, ListBox&, void);
DECL_LINK(LoseFocusMarkingHdl, Control&, void);
DECL_LINK(SelectIPPartNumbersHdl, ListBox&, void); DECL_LINK(SelectIPPartNumbersHdl, ListBox&, void);
DECL_LINK(SelectRecentlyUsedHdl, ListBox&, void); DECL_LINK(SelectRecentlyUsedHdl, ListBox&, void);
DECL_LINK(SelectIPPartHdl, ListBox&, void); DECL_LINK(SelectIPPartHdl, ListBox&, void);
......
...@@ -180,7 +180,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer ...@@ -180,7 +180,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
get(m_pClassificationListBox, "classificationCB"); get(m_pClassificationListBox, "classificationCB");
get(m_pInternationalClassificationListBox, "internationalClassificationCB"); get(m_pInternationalClassificationListBox, "internationalClassificationCB");
get(m_pMarkingLabel, "markingLabel"); get(m_pMarkingLabel, "markingLabel");
get(m_pMarkingListBox, "markingCB"); get(m_pMarkingListBox, "markingLB");
get(m_pIntellectualPropertyPartNumberListBox, "intellectualPropertyPartNumberLB"); get(m_pIntellectualPropertyPartNumberListBox, "intellectualPropertyPartNumberLB");
get(m_pIntellectualPropertyPartListBox, "intellectualPropertyPartLB"); get(m_pIntellectualPropertyPartListBox, "intellectualPropertyPartLB");
get(m_pIntellectualPropertyPartAddButton, "intellectualPropertyPartAddButton"); get(m_pIntellectualPropertyPartAddButton, "intellectualPropertyPartAddButton");
...@@ -190,7 +190,15 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer ...@@ -190,7 +190,15 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pSignButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked)); m_pSignButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked));
m_pSignButton->Show(m_bPerParagraph); m_pSignButton->Show(m_bPerParagraph);
m_pToolBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectToolboxHdl)); // no need for BOLD if we do paragraph classification
if (m_bPerParagraph)
{
m_pToolBox->Show(false);
}
else
{
m_pToolBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectToolboxHdl));
}
m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked)); m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked));
...@@ -206,9 +214,9 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer ...@@ -206,9 +214,9 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
if (!maHelper.GetMarkings().empty()) if (!maHelper.GetMarkings().empty())
{ {
m_pMarkingListBox->setMaxWidthChars(20); m_pMarkingListBox->setMaxWidthChars(10);
m_pMarkingListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectMarkingHdl)); m_pMarkingListBox->SetDropDownLineCount(4);
m_pMarkingListBox->SetLoseFocusHdl(LINK(this, ClassificationDialog, LoseFocusMarkingHdl)); m_pMarkingListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectMarkingHdl));
for (const OUString& rName : maHelper.GetMarkings()) for (const OUString& rName : maHelper.GetMarkings())
m_pMarkingListBox->InsertEntry(rName); m_pMarkingListBox->InsertEntry(rName);
...@@ -220,7 +228,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer ...@@ -220,7 +228,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
} }
m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5); m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5);
m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20); m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(10);
m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl)); m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers()) for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers())
m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName); m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName);
...@@ -621,22 +629,13 @@ IMPL_LINK(ClassificationDialog, SelectClassificationHdl, ListBox&, rBox, void) ...@@ -621,22 +629,13 @@ IMPL_LINK(ClassificationDialog, SelectClassificationHdl, ListBox&, rBox, void)
m_nCurrentSelectedCategory = nSelected; m_nCurrentSelectedCategory = nSelected;
} }
IMPL_LINK_NOARG(ClassificationDialog, LoseFocusMarkingHdl, Control&, void)
{
if (m_nInsertMarkings >= 0)
{
const OUString aString = maHelper.GetMarkings()[m_nInsertMarkings];
insertField(ClassificationType::MARKING, aString, aString);
m_nInsertMarkings = -1;
}
}
IMPL_LINK(ClassificationDialog, SelectMarkingHdl, ListBox&, rBox, void) IMPL_LINK(ClassificationDialog, SelectMarkingHdl, ListBox&, rBox, void)
{ {
sal_Int32 nSelected = rBox.GetSelectedEntryPos(); sal_Int32 nSelected = rBox.GetSelectedEntryPos();
if (nSelected >= 0) if (nSelected >= 0)
{ {
m_nInsertMarkings = nSelected; const OUString aString = maHelper.GetMarkings()[nSelected];
insertField(ClassificationType::MARKING, aString, aString);
} }
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.1 --> <!-- Generated with glade 3.20.2 -->
<interface domain="sfx"> <interface domain="sfx">
<requires lib="gtk+" version="3.4"/> <requires lib="gtk+" version="3.4"/>
<requires lib="LibreOffice" version="1.0"/> <requires lib="LibreOffice" version="1.0"/>
...@@ -74,38 +74,14 @@ ...@@ -74,38 +74,14 @@
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="row_spacing">12</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">6</property>
<child>
<object class="svxlo-ClassificationEditView" id="classificationEditWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="classificationdialog|label-Content">Content</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child> <child>
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="row_spacing">12</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">6</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -152,47 +128,49 @@ ...@@ -152,47 +128,49 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBoxText" id="markingCB"> <object class="GtkLabel" id="markingLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes" context="classificationdialog|label-Marking">Marking:</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">0</property>
<property name="top_attach">3</property> <property name="top_attach">3</property>
<property name="width">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="markingLabel"> <object class="GtkComboBoxText" id="recentlyUsedCB">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes" context="classificationdialog|label-Marking">Marking:</property> <property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="classificationdialog|label-Classification">Recently Used:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">3</property> <property name="top_attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkTreeView" id="markingLB">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">True</property>
<property name="valign">end</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<property name="spacing">6</property> <child internal-child="selection">
<property name="homogeneous">True</property> <object class="GtkTreeSelection"/>
<child>
<object class="GtkButton" id="signButton">
<property name="label" translatable="yes" context="classificationdialog|signButton">Sign Paragraph</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
...@@ -201,18 +179,40 @@ ...@@ -201,18 +179,40 @@
<property name="width">2</property> <property name="width">2</property>
</packing> </packing>
</child> </child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="classificationdialog|label-Content">Content</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="valign">end</property>
<property name="vexpand">True</property>
<property name="spacing">6</property>
<property name="homogeneous">True</property>
<child> <child>
<object class="GtkToolbar" id="toolbox"> <object class="GtkToolbar" id="toolbox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="show_arrow">False</property>
<child> <child>
<object class="GtkToolButton" id="bold"> <object class="GtkToolButton" id="bold">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -234,47 +234,47 @@ ...@@ -234,47 +234,47 @@
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkButton" id="signButton">
<property name="label" translatable="yes" context="classificationdialog|signButton">Sign Paragraph</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">5</property> <property name="top_attach">2</property>
<property name="width">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBoxText" id="recentlyUsedCB"> <object class="svxlo-ClassificationEditView" id="classificationEditWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">True</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
</object> </object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="classificationdialog|label-Classification">Recently Used:</property>
<property name="xalign">0</property>
</object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">0</property> <property name="top_attach">1</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">0</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
<property name="height">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkExpander" id="intellectualPropertyExpander"> <object class="GtkExpander" id="intellectualPropertyExpander">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="hexpand">True</property>
<child> <child>
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -323,7 +323,7 @@ ...@@ -323,7 +323,7 @@
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes" context="classificationdialog|label-PartNumber">Part:</property> <property name="label" translatable="yes" context="classificationdialog|label-PartNumber">License:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
<packing> <packing>
...@@ -376,25 +376,10 @@ ...@@ -376,25 +376,10 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">3</property> <property name="top_attach">1</property>
<property name="width">2</property> <property name="width">2</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment