summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/dlgname.cxx5
-rw-r--r--cui/uiconfig/ui/namedialog.ui5
2 files changed, 7 insertions, 3 deletions
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 88b768ad974e..cedbf7e14f6c 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -60,8 +60,11 @@ void SvxNameDialog::dispose()
IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, Edit&, void)
{
+ // Do not allow empty names
if(aCheckNameHdl.IsSet())
- pBtnOK->Enable(aCheckNameHdl.Call(*this));
+ pBtnOK->Enable(!pEdtName->GetText().isEmpty() && aCheckNameHdl.Call(*this));
+ else
+ pBtnOK->Enable(!pEdtName->GetText().isEmpty());
}
diff --git a/cui/uiconfig/ui/namedialog.ui b/cui/uiconfig/ui/namedialog.ui
index 4d7bef034e56..541b795f1a8a 100644
--- a/cui/uiconfig/ui/namedialog.ui
+++ b/cui/uiconfig/ui/namedialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="NameDialog">
@@ -20,6 +20,7 @@
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
@@ -80,10 +81,10 @@
<object class="GtkLabel" id="description_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="use_underline">True</property>
<property name="wrap">True</property>
<property name="mnemonic_widget">name_entry</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>