mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
When creating a new style sheet, make sure the name for it is non-empty.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19902 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a3d0888ed7
commit
8b43258ac6
@ -212,6 +212,13 @@ gnc_style_sheet_new (StyleSheetDialog * ssd)
|
|||||||
{
|
{
|
||||||
template_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(template_combo));
|
template_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(template_combo));
|
||||||
name_str = gtk_entry_get_text(GTK_ENTRY(name_entry));
|
name_str = gtk_entry_get_text(GTK_ENTRY(name_entry));
|
||||||
|
if (name_str && strlen(name_str) == 0)
|
||||||
|
{
|
||||||
|
/* If the name is empty, we display an error dialog but
|
||||||
|
* refuse to create the new style sheet. */
|
||||||
|
gnc_error_dialog (ssd->toplevel, "%s", _("You must provide a name for the new style sheet."));
|
||||||
|
name_str = NULL;
|
||||||
|
}
|
||||||
if (template_str && name_str)
|
if (template_str && name_str)
|
||||||
{
|
{
|
||||||
new_ss = scm_call_2(make_ss,
|
new_ss = scm_call_2(make_ss,
|
||||||
|
Loading…
Reference in New Issue
Block a user