dynamically change New Dialog caption depending on whether it's a New Project or New Document - broken in UWT

This commit is contained in:
Michael Becker 2021-03-23 14:54:09 -04:00
parent c9d880b602
commit c655e4baab
No known key found for this signature in database
GPG Key ID: 98C333A81F18C22C
2 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,7 @@ along with Universal Editor. If not, see <http://www.gnu.org/licenses/>.
</object>
<object class="GtkDialog">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Create New</property>
<property name="default_width">600</property>
<property name="default_height">400</property>
<property name="type_hint">dialog</property>

View File

@ -391,16 +391,19 @@ namespace UniversalEditor.UserInterface.Dialogs
private void InitializeTreeView()
{
// setting Text does not work because the ControlImplementation is not a WindowImplementation
switch (this.Mode)
{
case NewDialogMode.File:
{
InitializeDocumentTemplateTreeView();
Text = "Create New Document";
break;
}
case NewDialogMode.Project:
{
InitializeProjectTemplateTreeView();
Text = "Create New Project";
break;
}
}