Skip to content

Commit ce6b829

Browse files
authored
Merge branch 'dremin:master' into master
2 parents 5e8a618 + ac27a43 commit ce6b829

32 files changed

Lines changed: 824 additions & 75 deletions

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RetroBar
44
[![Current release](https://img.shields.io/github/v/release/dremin/RetroBar)](https://github.com/dremin/RetroBar/releases/latest) ![Build status](https://github.com/dremin/RetroBar/workflows/RetroBar/badge.svg)
55

6-
Pining for simpler times? RetroBar teleports you back in time by replacing your modern Windows taskbar with the classic Windows 95, 98, Me, 2000, or XP style.
6+
Pining for simpler times? RetroBar teleports you back in time by replacing your modern Windows taskbar with the classic Windows 95, 98, Me, 2000, XP, or Vista style.
77

88
RetroBar is based on the [ManagedShell](https://github.com/cairoshell/ManagedShell) library for great compatibility and performance.
99

@@ -20,6 +20,7 @@ RetroBar is based on the [ManagedShell](https://github.com/cairoshell/ManagedShe
2020
- Ability to show or hide the clock
2121
- Display taskbar on any side of the screen (even on Windows 11)
2222
- Option to display the taskbar, notification area, and clock on multiple monitors
23+
- Ability to show Vista-style window thumbnails
2324
- Customizable XP-style collapsible notification area
2425
- Custom theme support
2526

@@ -59,6 +60,7 @@ RetroBar is based on the [ManagedShell](https://github.com/cairoshell/ManagedShe
5960
- Greek (ελληνικά)
6061
- Hebrew (עברית)
6162
- Hungarian (magyar)
63+
- Indonesian
6264
- Italian (italiano)
6365
- Japanese (日本語)
6466
- Korean (한국어)
@@ -68,10 +70,15 @@ RetroBar is based on the [ManagedShell](https://github.com/cairoshell/ManagedShe
6870
- Romanian (Română)
6971
- Russian (русский)
7072
- Spanish (español)
73+
- Swedish (svenska)
7174
- Turkish (Türkçe)
7275
- Vietnamese (Tiếng Việt)
7376

74-
## Custom themes
75-
RetroBar supports custom themes. To use custom themes, create a `Themes` directory in the same directory as `RetroBar.exe`, and place valid `.xaml` theme files there.
77+
## Custom languages and themes
78+
RetroBar supports custom languages and themes. To use custom languages or themes, create a `Languages` or a `Themes` directory and place valid `.xaml` language or theme files there.
79+
80+
Valid locations to create a `Languages` or a `Themes` directory:
81+
- In the same directory as `RetroBar.exe`
82+
- In `%localappdata%\RetroBar`
7683

7784
Themes use the XAML `ResourceDictionary` format. [View the included example themes](https://github.com/dremin/RetroBar/tree/master/RetroBar/Themes) to get started.

RetroBar/App.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
<setting name="UseSoftwareRendering" serializeAs="String">
4141
<value>False</value>
4242
</setting>
43+
<setting name="MiddleMouseToClose" serializeAs="String">
44+
<value>False</value>
45+
</setting>
4346
<setting name="PinnedNotifyIcons" serializeAs="String">
4447
<value>7820ae76-23e3-4229-82c1-e41cb67d5b9c|7820ae75-23e3-4229-82c1-e41cb67d5b9c|7820ae74-23e3-4229-82c1-e41cb67d5b9c|7820ae73-23e3-4229-82c1-e41cb67d5b9c</value>
4548
</setting>

RetroBar/App.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
ShutdownMode="OnExplicitShutdown"
55
Startup="App_OnStartup"
66
Exit="App_OnExit"
7-
SessionEnding="App_OnSessionEnding">
7+
SessionEnding="App_OnSessionEnding"
8+
DispatcherUnhandledException="App_DispatcherUnhandledException">
89
<Application.Resources>
910
<ResourceDictionary>
1011
<ResourceDictionary.MergedDictionaries>

RetroBar/App.xaml.cs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
using System.Windows.Interop;
99
using System.Windows.Media;
1010
using ManagedShell.Common.Enums;
11+
using System.Diagnostics;
12+
using System.Reflection;
13+
using ManagedShell.Common.Logging;
1114

1215
namespace RetroBar
1316
{
@@ -18,6 +21,7 @@ public partial class App : Application
1821
{
1922
public DictionaryManager DictionaryManager { get; }
2023

24+
private bool _errorVisible;
2125
private ManagedShellLogger _logger;
2226
private WindowManager _windowManager;
2327

@@ -111,6 +115,22 @@ private ShellManager SetupManagedShell()
111115
return new ShellManager(config);
112116
}
113117

118+
public void RestartApp()
119+
{
120+
try
121+
{
122+
// run the program again
123+
Process current = new Process();
124+
current.StartInfo.FileName = ExePath.GetExecutablePath();
125+
current.Start();
126+
127+
// close this instance
128+
ExitGracefully();
129+
}
130+
catch
131+
{ }
132+
}
133+
114134
private void ExitApp()
115135
{
116136
Settings.Instance.PropertyChanged -= Settings_PropertyChanged;
@@ -122,5 +142,60 @@ private void ExitApp()
122142
_updater.Dispose();
123143
_logger.Dispose();
124144
}
145+
146+
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
147+
{
148+
Assembly assembly = Assembly.GetExecutingAssembly();
149+
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
150+
string version = fvi.FileVersion;
151+
152+
string inner = "";
153+
if (e.Exception.InnerException != null)
154+
inner = "\r\n\r\nInner exception:\r\nMessage: " + e.Exception.InnerException.Message + "\r\nTarget Site: " + e.Exception.InnerException.TargetSite + "\r\n\r\n" + e.Exception.InnerException.StackTrace;
155+
156+
string msg = "Would you like to restart RetroBar?\r\n\r\nPlease submit a bug report with a screenshot of this error. Thanks! \r\nMessage: " + e.Exception.Message + "\r\nTarget Site: " + e.Exception.TargetSite + "\r\nVersion: " + version + "\r\n\r\n" + e.Exception.StackTrace + inner;
157+
158+
ShellLogger.Error(msg, e.Exception);
159+
160+
string dMsg;
161+
162+
if (msg.Length > 1000)
163+
dMsg = msg.Substring(0, 999) + "...";
164+
else
165+
dMsg = msg;
166+
167+
try
168+
{
169+
if (!_errorVisible)
170+
{
171+
_errorVisible = true;
172+
173+
// Automatically restart for known render thread failure messages.
174+
if (e.Exception.Message.StartsWith("UCEERR_RENDERTHREADFAILURE"))
175+
{
176+
RestartApp();
177+
Environment.FailFast("Automatically restarted RetroBar due to a render thread failure.");
178+
}
179+
else
180+
{
181+
if (MessageBox.Show(dMsg, "RetroBar Error", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
182+
{
183+
// it's like getting a morning coffee.
184+
RestartApp();
185+
Environment.FailFast("User restarted RetroBar due to an exception.");
186+
}
187+
}
188+
189+
_errorVisible = false;
190+
}
191+
}
192+
catch
193+
{
194+
// If this fails we're probably up the creek. Abandon ship!
195+
ExitGracefully();
196+
}
197+
198+
e.Handled = true;
199+
}
125200
}
126201
}

RetroBar/Controls/TaskButton.xaml.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,14 @@ private void AppButton_OnMouseUp(object sender, MouseButtonEventArgs e)
182182
{
183183
return;
184184
}
185-
186-
ShellHelper.StartProcess(Window.IsUWP ? "appx:" + Window.AppUserModelID : Window.WinFileName);
185+
if (Settings.Instance.MiddleMouseToClose)
186+
{
187+
Window?.Close();
188+
}
189+
else
190+
{
191+
ShellHelper.StartProcess(Window.IsUWP ? "appx:" + Window.AppUserModelID : Window.WinFileName);
192+
}
187193
}
188194
}
189195

RetroBar/Controls/TaskList.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
dd:DragDrop.DragDropContext="TaskList">
2626
<ItemsControl.ItemsPanel>
2727
<ItemsPanelTemplate>
28-
<WrapPanel>
28+
<WrapPanel Style="{DynamicResource TaskListWrapPanel}">
2929
<WrapPanel.Orientation>
3030
<Binding Converter="{StaticResource orientationConverter}"
3131
Path="Orientation"

RetroBar/Languages/English (United Kingdom).xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,6 @@
7272
<FlowDirection x:Key="flow_direction">LeftToRight</FlowDirection>
7373

7474
<FontFamily x:Key="start_text_xp_font_family">Franklin Gothic</FontFamily>
75+
76+
<s:String x:Key="middle_mouse_to_close">_Middle mouse click to close Taskbar Items</s:String>
7577
</ResourceDictionary>

RetroBar/Languages/English.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<s:String x:Key="retrobar_properties">RetroBar Properties</s:String>
66
<s:String x:Key="taskbar_options">Taskbar Options</s:String>
7+
<s:String x:Key="advanced">Advanced</s:String>
78
<s:String x:Key="taskbar_appearance">Taskbar appearance</s:String>
89
<s:String x:Key="notification_area">Notification area</s:String>
910
<s:String x:Key="autostart">Automatically start at _logon</s:String>
@@ -29,6 +30,7 @@
2930
<s:String x:Key="quick_launch_folder">Quick Launch - Choose a folder</s:String>
3031
<s:String x:Key="show_window_previews">Show _window previews (thumbnails)</s:String>
3132
<s:String x:Key="use_software_rendering">_Use software rendering</s:String>
33+
<s:String x:Key="middle_mouse_to_close">_Middle-click to close taskbar items</s:String>
3234
<s:String x:Key="multiple_displays">Multiple displays</s:String>
3335
<s:String x:Key="show_tasks_on">S_how tasks on:</s:String>
3436
<x:Array x:Key="show_tasks_on_values" Type="s:String">
@@ -79,7 +81,7 @@
7981

8082
<s:String x:Key="open_folder">&amp;Open Folder</s:String>
8183

84+
<!-- Items below are settings, and should always be in English -->
8285
<FlowDirection x:Key="flow_direction">LeftToRight</FlowDirection>
83-
8486
<FontFamily x:Key="start_text_xp_font_family">Franklin Gothic</FontFamily>
8587
</ResourceDictionary>

RetroBar/Languages/Melayu.xaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
xmlns:s="clr-namespace:System;assembly=mscorlib">
4+
5+
<s:String x:Key="retrobar_properties">Hartabenda Retrobar</s:String>
6+
<s:String x:Key="taskbar_options">Pilihan Lintangan Tugasan</s:String>
7+
<s:String x:Key="taskbar_appearance">Paparan Lintangan Tugasan</s:String>
8+
<s:String x:Key="notification_area">Bahagian Pemberitahuan</s:String>
9+
<s:String x:Key="autostart">Buka secara automatik semasa _log masuk</s:String>
10+
<s:String x:Key="language_text">Baha_sa:</s:String>
11+
<s:String x:Key="language_tip">Pilih bahasa untuk diguna.</s:String>
12+
<s:String x:Key="theme_text">_Tema:</s:String>
13+
<s:String x:Key="theme_tip">Pasangkan tema di lipatan Tema.</s:String>
14+
<s:String x:Key="location_text">Tem_pat:</s:String>
15+
<s:String x:Key="location_tip">Tukar kedudukan lintangan tugasan di paparan.</s:String>
16+
<x:Array x:Key="location_values" Type="s:String">
17+
<s:String>Kiri</s:String>
18+
<s:String>Atas</s:String>
19+
<s:String>Kanan</s:String>
20+
<s:String>Bawah</s:String>
21+
</x:Array>
22+
<s:String x:Key="allow_font_smoothing">_Benarkan kelicinan fon</s:String>
23+
<s:String x:Key="collapse_tray_icons">Jatuhkan kawasan ikon _pemberitahuan </s:String>
24+
<s:String x:Key="customize">Ubahsua_i...</s:String>
25+
<s:String x:Key="show_clock">Paparkan _jam</s:String>
26+
<s:String x:Key="show_multi_mon">Paparkan pada paparan yang _berbilang</s:String>
27+
<s:String x:Key="show_quick_launch">Paparkan lancar _segera</s:String>
28+
<s:String x:Key="select_location">_Pilih tempat...</s:String>
29+
<s:String x:Key="quick_launch_folder">Lancar Segera - Pilih lipatan</s:String>
30+
<s:String x:Key="use_software_rendering">_Gunakan terapan dari perisian (software render)</s:String>
31+
<s:String x:Key="ok_dialog">Okey</s:String>
32+
33+
<s:String x:Key="customize_notifications">Ubahsuai Pemberitahuan</s:String>
34+
<s:String x:Key="customize_notifications_info">RetroBar memaparkan ikon untuk pemberitahuan yang aktif dan penting, dan sembunyikan yang tidak aktif. Anda juga boleh menetapkan keadaan ini untuk perkara yang disenaraikan dibawah.</s:String>
35+
<s:String x:Key="customize_notifications_instruction">Pilih perkara, dan pilih keadaan pemberitahuan:</s:String>
36+
<s:String x:Key="hide_when_inactive">Sembunyikan jika tidak aktif</s:String>
37+
<s:String x:Key="always_show">Paparkan sentiasa</s:String>
38+
<s:String x:Key="name_heading">Nama</s:String>
39+
<s:String x:Key="behavior_heading">Keadaan</s:String>
40+
41+
<s:String x:Key="start_text">Mula</s:String>
42+
<s:String x:Key="start_text_xp">mula</s:String>
43+
<s:String x:Key="start_button_tip_98">Ketik disini untuk mula.</s:String>
44+
<s:String x:Key="start_button_tip">Ketik disini untuk mula</s:String>
45+
<s:String x:Key="start_button_tip_vista">Mula</s:String>
46+
47+
<s:String x:Key="retrobar_title">Lintangan Tugasan RetroBar</s:String>
48+
<s:String x:Key="toolbars">_Lintangan Peralatan</s:String>
49+
<s:String x:Key="quick_launch">_Lancar Segera</s:String>
50+
<s:String x:Key="new_toolbar">_Lintangan Peralatan Baru...</s:String>
51+
<s:String x:Key="show_taskman_2k">Pengurus _Tugasan...</s:String>
52+
<s:String x:Key="show_taskman">Pengurus _Tugasan</s:String>
53+
<s:String x:Key="tray_properties">Hartab_enda</s:String>
54+
<s:String x:Key="update_available">_Pengemaskini tersedia...</s:String>
55+
<s:String x:Key="exit_retrobar">_Keluarkan RetroBar</s:String>
56+
<s:String x:Key="customize_notifications_menu">_Ubahsuai Pemberitahuan...</s:String>
57+
58+
<s:String x:Key="restore">_Kembalikan Semula</s:String>
59+
<s:String x:Key="move">_Gerakkan</s:String>
60+
<s:String x:Key="size">_Saiz</s:String>
61+
<s:String x:Key="minimize">_Turunkan</s:String>
62+
<s:String x:Key="maximize">_Naikkan</s:String>
63+
<s:String x:Key="close">_Tutup</s:String>
64+
65+
<s:String x:Key="show_hidden">Paparkan ikon tersembunyi</s:String>
66+
<s:String x:Key="hide">Sembunyi</s:String>
67+
68+
<s:String x:Key="set_time">_Ubahkan Tarikh/Masa</s:String>
69+
70+
<s:String x:Key="open_folder">&amp;Buka Lipatan</s:String>
71+
72+
<FlowDirection x:Key="flow_direction">KiriKeKanan</FlowDirection>
73+
74+
<FontFamily x:Key="start_text_xp_font_family">Franklin Gothic</FontFamily>
75+
</ResourceDictionary>

RetroBar/Languages/Persian.xaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
xmlns:s="clr-namespace:System;assembly=mscorlib">
4+
5+
<s:String x:Key="retrobar_properties">تنظیمات رتروبار</s:String>
6+
<s:String x:Key="taskbar_options">تنظیمات تسکبار</s:String>
7+
<s:String x:Key="taskbar_appearance">تم تسکبار</s:String>
8+
<s:String x:Key="notification_area">قسمت نوتیفیکیشن</s:String>
9+
<s:String x:Key="autostart">در روشن شدن باز شود</s:String>
10+
<s:String x:Key="language_text">زبان:</s:String>
11+
<s:String x:Key="language_tip">زبان را انتخاب کنید.</s:String>
12+
<s:String x:Key="theme_text">_تم:</s:String>
13+
<s:String x:Key="theme_tip">نصب تم در فولدر تم خودی</s:String>
14+
<s:String x:Key="location_text">کجا:</s:String>
15+
<s:String x:Key="location_tip">مکان تسکبار</s:String>
16+
<x:Array x:Key="location_values" Type="s:String">
17+
<s:String>چپ</s:String>
18+
<s:String>بالا</s:String>
19+
<s:String>راست</s:String>
20+
<s:String>پایین</s:String>
21+
</x:Array>
22+
<s:String x:Key="allow_font_smoothing">_فونت اسموفینگ</s:String>
23+
<s:String x:Key="collapse_tray_icons">جمع شدن در مکان نوتیفیکیشن</s:String>
24+
<s:String x:Key="customize">کاستومایز</s:String>
25+
<s:String x:Key="show_clock">نشان دادن ساعت</s:String>
26+
<s:String x:Key="show_multi_mon">در چند مانیتور نشان داده شود</s:String>
27+
<s:String x:Key="show_quick_launch">کوییک لانچ</s:String>
28+
<s:String x:Key="select_location">_کجا...</s:String>
29+
<s:String x:Key="quick_launch_folder">کوییک لانچ - کدام فلدر</s:String>
30+
<s:String x:Key="show_window_previews">نشان دادن _نمایه ویندوز ها (thumbnails)</s:String>
31+
<s:String x:Key="use_software_rendering">_رندر نرم افزاری</s:String>
32+
<s:String x:Key="multiple_displays">چند مانیتور</s:String>
33+
<s:String x:Key="show_tasks_on">نشان دادن تسک ها:</s:String>
34+
<x:Array x:Key="show_tasks_on_values" Type="s:String">
35+
<s:String>همه تسکبارا جمعند</s:String>
36+
<s:String>تسکبار توی مانیتور 1</s:String>
37+
<s:String>تسکبار توی مانیتور های دیگر</s:String>
38+
</x:Array>
39+
<s:String x:Key="version">Version {0}</s:String>
40+
<s:String x:Key="visit_on_github">مراجعه به گیتهاب</s:String>
41+
<s:String x:Key="ok_dialog">اوکی</s:String>
42+
43+
<s:String x:Key="customize_notifications">تنظیمات نوتیفیکیشن ها</s:String>
44+
<s:String x:Key="customize_notifications_info">رتروبار همیشه اعلان های جمع شده را نشان میدهد، آهرا در آینده می توانید تغییر دهید</s:String>
45+
<s:String x:Key="customize_notifications_instruction">آپشن رو انتخاب کن, بعد بگو در اعلان ها چگونه نمایش داده شود:</s:String>
46+
<s:String x:Key="hide_when_inactive">گم شود وقتی استفاده نمیشود</s:String>
47+
<s:String x:Key="always_show">همیشه نشان داده شود</s:String>
48+
<s:String x:Key="name_heading">نام</s:String>
49+
<s:String x:Key="behavior_heading">نشانی</s:String>
50+
51+
<s:String x:Key="start_text">منو</s:String>
52+
<s:String x:Key="start_text_xp">منو</s:String>
53+
<s:String x:Key="start_button_tip_98">بزن منو تا جغ زده شوی</s:String>
54+
<s:String x:Key="start_button_tip">بزن تا شروع شه</s:String>
55+
<s:String x:Key="start_button_tip_vista">منو</s:String>
56+
57+
<s:String x:Key="retrobar_title">تسکبار رتروبار</s:String>
58+
<s:String x:Key="toolbars">_ابزارالات</s:String>
59+
<s:String x:Key="quick_launch">_کوییک لانچ</s:String>
60+
<s:String x:Key="new_toolbar">_ابزار جدید...</s:String>
61+
<s:String x:Key="show_taskman_2k">تسک منیجر...</s:String>
62+
<s:String x:Key="show_taskman">تسک منیجیر</s:String>
63+
<s:String x:Key="tray_properties">تنظیمات</s:String>
64+
<s:String x:Key="update_available">_!آپدیت موجوده...</s:String>
65+
<s:String x:Key="exit_retrobar">_گم شو</s:String>
66+
<s:String x:Key="customize_notifications_menu">_تنظیمات اعلان ها...</s:String>
67+
68+
<s:String x:Key="restore">_Restore</s:String>
69+
<s:String x:Key="move">_Move</s:String>
70+
<s:String x:Key="size">_Size</s:String>
71+
<s:String x:Key="minimize">Mi_nimize</s:String>
72+
<s:String x:Key="maximize">Ma_ximize</s:String>
73+
<s:String x:Key="close">_Close</s:String>
74+
75+
<s:String x:Key="show_hidden">آیکون های جغ زده</s:String>
76+
<s:String x:Key="hide">پنهان سازی</s:String>
77+
78+
<s:String x:Key="set_time">_تنظیمات ساعت</s:String>
79+
80+
<s:String x:Key="open_folder">&amp;فولدرش</s:String>
81+
82+
<FlowDirection x:Key="flow_direction">LeftToRight</FlowDirection>
83+
84+
<FontFamily x:Key="start_text_xp_font_family">Franklin Gothic</FontFamily>
85+
86+
<s:String x:Key="middle_mouse_to_close">_Middle mouse click to close Taskbar Items</s:String>
87+
</ResourceDictionary>

0 commit comments

Comments
 (0)