diff --git a/App.config b/App.config
index cd606889..a7aaca76 100644
--- a/App.config
+++ b/App.config
@@ -53,19 +53,28 @@
True
-
+
UTF-8
-
+
-
+
-
+
+
+
+ Visible
+
+
+ Visible
+
+
+ Visible
diff --git a/MainWindow.xaml b/MainWindow.xaml
index 51217815..863c2b71 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -13,12 +13,17 @@
Width="{Binding Source={x:Static p:Settings.Default}, Path=winWidth, Mode=TwoWay}"
WindowState="{Binding Source={x:Static p:Settings.Default}, Path=winState, Mode=TwoWay}">
+
+
+
+
+
@@ -40,9 +45,27 @@
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -294,6 +353,9 @@
+
+
+
@@ -309,6 +371,9 @@
+
+
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 6d1614d2..20aa0669 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -64,7 +64,7 @@ namespace GARbro.GUI
if (null == Settings.Default.appRecentFiles)
Settings.Default.appRecentFiles = new StringCollection();
- m_recent_files = new LinkedList (Settings.Default.appRecentFiles.Cast());
+ m_recent_files = new LinkedList (Settings.Default.appRecentFiles.Cast().Take (MaxRecentFiles));
RecentFilesMenu.ItemsSource = RecentFiles;
FormatCatalog.Instance.ParametersRequest += OnParametersRequest;
@@ -145,7 +145,7 @@ namespace GARbro.GUI
Dispatcher.Invoke (() => MessageBox.Show (this, message, title, MessageBoxButton.OK, MessageBoxImage.Error));
}
- const int MaxRecentFiles = 10;
+ const int MaxRecentFiles = 9;
LinkedList m_recent_files;
// Item1 = file name, Item2 = menu item string
@@ -154,7 +154,7 @@ namespace GARbro.GUI
get
{
int i = 1;
- return m_recent_files.Select (f => new Tuple (f, string.Format ("{0} {1}", i++, f)));
+ return m_recent_files.Select (f => new Tuple (f, string.Format ("_{0} {1}", i++, f)));
}
}
@@ -165,7 +165,7 @@ namespace GARbro.GUI
return;
if (null == node)
{
- if (MaxRecentFiles == m_recent_files.Count)
+ while (MaxRecentFiles < m_recent_files.Count)
m_recent_files.RemoveLast();
m_recent_files.AddFirst (file);
}
@@ -631,6 +631,10 @@ namespace GARbro.GUI
SetStatusText (m_app.CurrentArchive.Description);
lv_SelectItem (0);
}
+ catch (OperationCanceledException X)
+ {
+ SetStatusText (X.Message);
+ }
catch (Exception X)
{
PopupError (string.Format("{0}:\n{1}", filename, X.Message), guiStrings.MsgErrorOpening);
@@ -997,6 +1001,33 @@ namespace GARbro.GUI
{
e.CanExecute = PreviewPane.Source != null;
}
+
+ private void HideStatusBarExec (object sender, ExecutedRoutedEventArgs e)
+ {
+ var status = AppStatusBar.Visibility;
+ if (Visibility.Visible == status)
+ AppStatusBar.Visibility = Visibility.Collapsed;
+ else
+ AppStatusBar.Visibility = Visibility.Visible;
+ }
+
+ private void HideMenuBarExec (object sender, ExecutedRoutedEventArgs e)
+ {
+ var status = MainMenuBar.Visibility;
+ if (Visibility.Visible == status)
+ MainMenuBar.Visibility = Visibility.Collapsed;
+ else
+ MainMenuBar.Visibility = Visibility.Visible;
+ }
+
+ private void HideToolBarExec (object sender, ExecutedRoutedEventArgs e)
+ {
+ var status = MainToolBar.Visibility;
+ if (Visibility.Visible == status)
+ MainToolBar.Visibility = Visibility.Collapsed;
+ else
+ MainToolBar.Visibility = Visibility.Visible;
+ }
}
///
@@ -1093,5 +1124,8 @@ namespace GARbro.GUI
public static readonly RoutedCommand Refresh = new RoutedCommand();
public static readonly RoutedCommand Browse = new RoutedCommand();
public static readonly RoutedCommand FitWindow = new RoutedCommand();
+ public static readonly RoutedCommand HideStatusBar = new RoutedCommand();
+ public static readonly RoutedCommand HideMenuBar = new RoutedCommand();
+ public static readonly RoutedCommand HideToolBar = new RoutedCommand();
}
}
diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs
index 63ff8bdf..bf402948 100644
--- a/Properties/Settings.Designer.cs
+++ b/Properties/Settings.Designer.cs
@@ -261,5 +261,41 @@ namespace GARbro.GUI.Properties {
this["appLastCreatedArchive"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("Visible")]
+ public global::System.Windows.Visibility winMenuBarVisibility {
+ get {
+ return ((global::System.Windows.Visibility)(this["winMenuBarVisibility"]));
+ }
+ set {
+ this["winMenuBarVisibility"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("Visible")]
+ public global::System.Windows.Visibility winToolBarVisibility {
+ get {
+ return ((global::System.Windows.Visibility)(this["winToolBarVisibility"]));
+ }
+ set {
+ this["winToolBarVisibility"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("Visible")]
+ public global::System.Windows.Visibility winStatusBarVisibility {
+ get {
+ return ((global::System.Windows.Visibility)(this["winStatusBarVisibility"]));
+ }
+ set {
+ this["winStatusBarVisibility"] = value;
+ }
+ }
}
}
diff --git a/Properties/Settings.settings b/Properties/Settings.settings
index e201a32f..3b4f1e7b 100644
--- a/Properties/Settings.settings
+++ b/Properties/Settings.settings
@@ -62,5 +62,14 @@
+
+ Visible
+
+
+ Visible
+
+
+ Visible
+
\ No newline at end of file
diff --git a/Strings/guiStrings.Designer.cs b/Strings/guiStrings.Designer.cs
index 2219801b..ea83118c 100644
--- a/Strings/guiStrings.Designer.cs
+++ b/Strings/guiStrings.Designer.cs
@@ -330,6 +330,15 @@ namespace GARbro.GUI.Strings {
}
}
+ ///
+ /// Looks up a localized string similar to Fit preview _window to image.
+ ///
+ public static string MenuFitWindow {
+ get {
+ return ResourceManager.GetString("MenuFitWindow", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to _Help.
///
@@ -357,6 +366,42 @@ namespace GARbro.GUI.Strings {
}
}
+ ///
+ /// Looks up a localized string similar to Show/hide main _menu bar.
+ ///
+ public static string MenuToggleMenuBar {
+ get {
+ return ResourceManager.GetString("MenuToggleMenuBar", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Show/hide _status bar.
+ ///
+ public static string MenuToggleStatusBar {
+ get {
+ return ResourceManager.GetString("MenuToggleStatusBar", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Show/hide _toolbar.
+ ///
+ public static string MenuToggleToolBar {
+ get {
+ return ResourceManager.GetString("MenuToggleToolBar", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to _View.
+ ///
+ public static string MenuView {
+ get {
+ return ResourceManager.GetString("MenuView", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Choose files to extract.
///
diff --git a/Strings/guiStrings.resx b/Strings/guiStrings.resx
index d84c4031..c7937fbe 100644
--- a/Strings/guiStrings.resx
+++ b/Strings/guiStrings.resx
@@ -363,4 +363,19 @@ Overwrite?
Deleted {0} files
+
+ Fit preview _window to image
+
+
+ Show/hide main _menu bar
+
+
+ Show/hide _status bar
+
+
+ Show/hide _toolbar
+
+
+ _View
+
\ No newline at end of file
diff --git a/Strings/guiStrings.ru-RU.resx b/Strings/guiStrings.ru-RU.resx
index 6b82b020..15089c5f 100644
--- a/Strings/guiStrings.ru-RU.resx
+++ b/Strings/guiStrings.ru-RU.resx
@@ -381,4 +381,19 @@
Удалено {0} файлов
+
+ Подогнать размер окна под изображение
+
+
+ Вкл/выкл главное меню
+
+
+ Вкл/выкл полосу статуса
+
+
+ Вкл/выкл панель инструментов
+
+
+ Просмотр
+
\ No newline at end of file