summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2014-09-24 10:30:32 +0200
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-09-24 19:08:31 +0000
commit16ea2665cdfa0b3d7b0d7abcdaae8d60f7654d24 (patch)
tree2bdb0a49ca0095caafb710c0dacbd2dd69940074
parent2f59a1c8169f1492c00d884b6eb3ce954645546f (diff)
fdo#64302: Writer’s Special Character dialog could be simpler
Change-Id: Ia321a9df77a8741245378e5b995b3bc6922266e8 Reviewed-on: https://gerrit.libreoffice.org/11621 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
-rw-r--r--cui/source/dialogs/cuicharmap.cxx31
-rw-r--r--cui/source/inc/cuicharmap.hxx6
-rw-r--r--cui/uiconfig/ui/specialcharacters.ui247
3 files changed, 103 insertions, 181 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index ca9ca03a15c4..5227bcf92cfb 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -53,8 +53,6 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte
m_pShowChar->SetCentered(true);
get(m_pShowText, "showtext");
get(m_pOKBtn, "ok");
- get(m_pDeleteBtn, "delete");
- get(m_pDeleteLastBtn, "deletelast");
get(m_pFontText, "fontft");
get(m_pFontLB, "fontlb");
m_pFontLB->SetStyle(m_pFontLB->GetStyle() | WB_SORT);
@@ -67,8 +65,6 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte
//lock the size request of this widget to the width of the original .ui string
m_pCharCodeText->set_width_request(m_pCharCodeText->get_preferred_size().Width());
get(m_pSymbolText, "symboltext");
- //lock the size request of this widget to double the height of the label
- m_pShowText->set_height_request(m_pSymbolText->get_preferred_size().Height() * 3);
SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, FN_PARAM_1, false );
if ( pItem )
@@ -318,8 +314,6 @@ void SvxCharacterMap::init()
{
m_pSymbolText->Hide();
m_pShowText->Hide();
- m_pDeleteBtn->Hide();
- m_pDeleteLastBtn->Hide();
}
OUString aDefStr( aFont.GetName() );
@@ -368,8 +362,6 @@ void SvxCharacterMap::init()
m_pShowSet->SetSelectHdl( LINK( this, SvxCharacterMap, CharSelectHdl ) );
m_pShowSet->SetHighlightHdl( LINK( this, SvxCharacterMap, CharHighlightHdl ) );
m_pShowSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, CharPreSelectHdl ) );
- m_pDeleteLastBtn->SetClickHdl( LINK( this, SvxCharacterMap, DeleteLastHdl ) );
- m_pDeleteBtn->SetClickHdl( LINK( this, SvxCharacterMap, DeleteHdl ) );
if( SvxShowCharSet::getSelectedChar() == ' ')
m_pOKBtn->Disable();
@@ -526,7 +518,6 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharSelectHdl)
}
m_pOKBtn->Enable();
- m_pDeleteLastBtn->Enable();
return 0;
}
@@ -586,26 +577,4 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharPreSelectHdl)
return 0;
}
-
-
-IMPL_LINK_NOARG(SvxCharacterMap, DeleteLastHdl)
-{
- OUString aCurrentText = m_pShowText->GetText();
- m_pShowText->SetText( aCurrentText.copy( 0, aCurrentText.getLength() - 1 ) );
- if ( m_pShowText->GetText() == "" )
- {
- m_pOKBtn->Disable();
- m_pDeleteLastBtn->Disable();
- }
- return 0;
-}
-
-IMPL_LINK_NOARG(SvxCharacterMap, DeleteHdl)
-{
- m_pShowText->SetText( OUString() );
- m_pOKBtn->Disable();
- m_pDeleteLastBtn->Disable();
- return 0;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index a4d95279c2ac..ebc6df7e86e5 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -69,10 +69,8 @@ private:
void init();
SvxShowCharSet* m_pShowSet;
- SvxShowText* m_pShowText;
+ Edit* m_pShowText;
OKButton* m_pOKBtn;
- PushButton* m_pDeleteLastBtn;
- PushButton* m_pDeleteBtn;
FixedText* m_pFontText;
ListBox* m_pFontLB;
FixedText* m_pSubsetText;
@@ -91,8 +89,6 @@ private:
DECL_LINK(CharSelectHdl, void *);
DECL_LINK(CharHighlightHdl, void *);
DECL_LINK(CharPreSelectHdl, void *);
- DECL_LINK(DeleteLastHdl, void *);
- DECL_LINK(DeleteHdl, void *);
void fillAllSubsets(ListBox &rListBox);
diff --git a/cui/uiconfig/ui/specialcharacters.ui b/cui/uiconfig/ui/specialcharacters.ui
index 961021fdae58..edfbc30fa40b 100644
--- a/cui/uiconfig/ui/specialcharacters.ui
+++ b/cui/uiconfig/ui/specialcharacters.ui
@@ -59,35 +59,6 @@
<property name="position">2</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="deletelast">
- <property name="label" translatable="yes">Delete _Last</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">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="delete">
- <property name="label">gtk-delete</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">4</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -97,80 +68,26 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box1">
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkLabel" id="fontft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkLabel" id="fontft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Font</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">fontlb</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="GtkLabel" id="subsetft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Subset</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">subsetlb</property>
- </object>
- <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>
- <child>
- <object class="GtkComboBox" id="fontlb">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <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>
- <object class="GtkComboBox" id="subsetlb">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">Font</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">fontlb</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -180,57 +97,66 @@
</packing>
</child>
<child>
- <object class="GtkGrid" id="grid3">
+ <object class="GtkLabel" id="subsetft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Subset</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">subsetlb</property>
+ </object>
+ <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>
+ <child>
+ <object class="GtkComboBox" id="fontlb">
<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" id="charcodeft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="no"> U+FFFF(65535) </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>
- <child>
- <object class="cuilo-SvxShowText" id="showchar">
- <property name="width_request">100</property>
- <property name="height_request">150</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">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>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="svxlo-SvxShowCharSet" id="showcharset">
- <property name="width_request">400</property>
- <property name="height_request">250</property>
+ <object class="GtkComboBox" id="subsetlb">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </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="GtkGrid" id="grid3">
+ <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" id="charcodeft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label"> U+FFFF(65535) </property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -240,13 +166,43 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="cuilo-SvxShowText" id="showchar">
+ <property name="width_request">100</property>
+ <property name="height_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">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>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxlo-SvxShowCharSet" id="showcharset">
+ <property name="width_request">400</property>
+ <property name="height_request">250</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">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>
<child>
@@ -268,27 +224,29 @@
</packing>
</child>
<child>
- <object class="cuilo-SvxShowText" id="showtext">
+ <object class="GtkEntry" id="showtext">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="valign">center</property>
+ <property name="invisible_char">•</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@@ -299,7 +257,6 @@
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">help</action-widget>
- <action-widget response="0">delete</action-widget>
</action-widgets>
</object>
</interface>