diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs
index e791dba..dac50bb 100644
--- a/SourceGen/MainController.cs
+++ b/SourceGen/MainController.cs
@@ -2071,13 +2071,13 @@ namespace SourceGen {
}
}
- public void EditProjectProperties() {
+ public void EditProjectProperties(WpfGui.EditProjectProperties.Tab initialTab) {
string projectDir = string.Empty;
if (!string.IsNullOrEmpty(mProjectPathName)) {
projectDir = Path.GetDirectoryName(mProjectPathName);
}
EditProjectProperties dlg = new EditProjectProperties(mMainWin, mProject.ProjectProps,
- projectDir, mOutputFormatter);
+ projectDir, mOutputFormatter, initialTab);
dlg.ShowDialog();
ProjectProperties newProps = dlg.NewProps;
diff --git a/SourceGen/RuntimeData/Help/settings.html b/SourceGen/RuntimeData/Help/settings.html
index 486b09b..1cfca81 100644
--- a/SourceGen/RuntimeData/Help/settings.html
+++ b/SourceGen/RuntimeData/Help/settings.html
@@ -294,6 +294,9 @@ run the importer multiple times. Labels that aren't found will not be
removed, so you can safely import from multiple projects, but will need
to manually delete any symbols that are no longer being exported.
+Shortcut: you can open the project properties window with the
+Project Symbols tab selected by hitting F6 from the main code list.
+
From here, you can add and remove platform symbol files, or change
diff --git a/SourceGen/WpfGui/EditAppSettings.xaml.cs b/SourceGen/WpfGui/EditAppSettings.xaml.cs
index be9bde7..3acd45e 100644
--- a/SourceGen/WpfGui/EditAppSettings.xaml.cs
+++ b/SourceGen/WpfGui/EditAppSettings.xaml.cs
@@ -171,7 +171,6 @@ namespace SourceGen.WpfGui {
default:
Debug.Assert(false);
break;
-
}
// The various control initializers probably triggered events. Reset the dirty flag.
diff --git a/SourceGen/WpfGui/EditProjectProperties.xaml.cs b/SourceGen/WpfGui/EditProjectProperties.xaml.cs
index 0b1f6a9..011a7f4 100644
--- a/SourceGen/WpfGui/EditProjectProperties.xaml.cs
+++ b/SourceGen/WpfGui/EditProjectProperties.xaml.cs
@@ -78,15 +78,39 @@ namespace SourceGen.WpfGui {
private string mProjectDir;
public bool HasProjectDir { get { return !string.IsNullOrEmpty(mProjectDir); } }
+ ///
+ /// Tab page enumeration.
+ ///
+ public enum Tab {
+ Unknown = 0,
+ General,
+ ProjectSymbols,
+ SymbolFiles,
+ ExtensionScripts
+ }
+
+ ///
+ /// Tab to show when dialog is first opened.
+ ///
+ private Tab mInitialTab;
+
+ // INotifyPropertyChanged implementation
+ public event PropertyChangedEventHandler PropertyChanged;
+ private void OnPropertyChanged([CallerMemberName] string propertyName = "") {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+
///
/// Constructor. Initial state is configured from an existing ProjectProperties object.
///
+ /// Parent window.
/// Property holder to clone.
/// Project directory, if known.
/// Text formatter.
+ /// Tab to open initially. Pass "Unknown" for default.
public EditProjectProperties(Window owner, ProjectProperties props, string projectDir,
- Formatter formatter) {
+ Formatter formatter, Tab initialTab) {
InitializeComponent();
Owner = owner;
DataContext = this;
@@ -94,6 +118,7 @@ namespace SourceGen.WpfGui {
mWorkProps = new ProjectProperties(props);
mProjectDir = projectDir;
mFormatter = formatter;
+ mInitialTab = initialTab;
// Construct arrays used as item sources for combo boxes.
CpuItems = new CpuItem[] {
@@ -133,12 +158,6 @@ namespace SourceGen.WpfGui {
};
}
- // INotifyPropertyChanged implementation
- public event PropertyChangedEventHandler PropertyChanged;
- private void OnPropertyChanged([CallerMemberName] string propertyName = "") {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
-
private void Window_Loaded(object sender, RoutedEventArgs e) {
Loaded_General();
@@ -146,6 +165,26 @@ namespace SourceGen.WpfGui {
LoadPlatformSymbolFiles();
LoadExtensionScriptNames();
+ switch (mInitialTab) {
+ case Tab.General:
+ tabControl.SelectedItem = generalTab;
+ break;
+ case Tab.ProjectSymbols:
+ tabControl.SelectedItem = projectSymbolsTab;
+ break;
+ case Tab.SymbolFiles:
+ tabControl.SelectedItem = symbolFilesTab;
+ break;
+ case Tab.ExtensionScripts:
+ tabControl.SelectedItem = extensionScriptsTab;
+ break;
+ case Tab.Unknown:
+ break;
+ default:
+ Debug.Assert(false);
+ break;
+ }
+
UpdateControls();
}
diff --git a/SourceGen/WpfGui/MainWindow.xaml b/SourceGen/WpfGui/MainWindow.xaml
index b70e0b9..4efd755 100644
--- a/SourceGen/WpfGui/MainWindow.xaml
+++ b/SourceGen/WpfGui/MainWindow.xaml
@@ -99,6 +99,11 @@ limitations under the License.
Ctrl+N
+
+
+ F6
+
+
@@ -222,6 +227,8 @@ limitations under the License.
CanExecute="CanEditNote" Executed="EditNoteCmd_Executed"/>
+
-
+
diff --git a/SourceGen/WpfGui/MainWindow.xaml.cs b/SourceGen/WpfGui/MainWindow.xaml.cs
index 84ab973..756b749 100644
--- a/SourceGen/WpfGui/MainWindow.xaml.cs
+++ b/SourceGen/WpfGui/MainWindow.xaml.cs
@@ -1180,7 +1180,11 @@ namespace SourceGen.WpfGui {
}
private void EditProjectPropertiesCmd_Executed(object sender, ExecutedRoutedEventArgs e) {
- mMainCtrl.EditProjectProperties();
+ mMainCtrl.EditProjectProperties(WpfGui.EditProjectProperties.Tab.Unknown);
+ }
+
+ private void EditProjectPropertiesSymbolsCmd_Executed(object sender, ExecutedRoutedEventArgs e) {
+ mMainCtrl.EditProjectProperties(WpfGui.EditProjectProperties.Tab.ProjectSymbols);
}
private void EditProjectSymbolCmd_Executed(object sender, ExecutedRoutedEventArgs e) {