Skip to content

Commit d602b47

Browse files
committed
-added file name display when importing
1 parent 25fe6e2 commit d602b47

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

.Source/GTweak/Languages/en/Lang.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
<v:String x:Key="title_win_import">Importing tweaks</v:String>
9797
<v:String x:Key="wait_win_import">It takes some time...</v:String>
9898
<v:String x:Key="warning_win_import">It is not necessary to close the window forcibly</v:String>
99+
<v:String x:Key="file_import">File</v:String>
99100
<!--#endregion-->
100101

101102
<!--#region Reboot Window -->

.Source/GTweak/Languages/ru/Lang.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
<v:String x:Key="title_win_import">Импорт твиков</v:String>
9797
<v:String x:Key="wait_win_import">Это занимает некоторое время...</v:String>
9898
<v:String x:Key="warning_win_import">Принудительно закрывать окно нет необходимости</v:String>
99+
<v:String x:Key="file_import">Файл</v:String>
99100
<!--#endregion-->
100101

101102
<!--#region Reboot Window -->

.Source/GTweak/Utilities/Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ internal static void OpenFileConfig()
164164
if (iniManager.Read("GTweak", "Author").Contains("Greedeks") && iniManager.Read("GTweak", "Release").Contains("v4"))
165165
{
166166
if (File.ReadLines(PathConfig).Any(line => line.Contains("TglButton")) || File.ReadLines(PathConfig).Any(line => line.Contains("Slider")))
167-
new ImportWindow().ShowDialog();
167+
new ImportWindow(openFileDialog.SafeFileName).ShowDialog();
168168
else
169169
new ViewNotification().Show("", (string)Application.Current.Resources["title1_notification"], (string)Application.Current.Resources["import_empty_notification"]);
170170
}

.Source/GTweak/Windows/ImportWindow.xaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Height="160" Width="390" MinHeight="160" MinWidth="390" MaxHeight="160" MaxWidth="390"
1010
Background="Transparent" AllowsTransparency="True" WindowStartupLocation="CenterScreen" Topmost="True" ResizeMode="CanMinimize"
1111
ShowInTaskbar="False" IsTabStop="False" Loaded="Window_Loaded">
12+
1213
<Grid MouseDown="TitleBar_MouseDown">
1314
<Border Background="{StaticResource Color_Background}" BorderThickness="1" CornerRadius="7" Opacity="0.98">
1415
<Border.BorderBrush>
@@ -68,6 +69,10 @@
6869
<TextBlock Text="{DynamicResource wait_win_import}" Foreground="{StaticResource Color_Highlighted}" Height="auto" Width="auto" FontFamily="{StaticResource Jura}" FontSize="13px" HorizontalAlignment="Left" TextAlignment="Center" Margin="10,5,0,0"/>
6970
</StackPanel>
7071
</Border>
72+
<TextBlock Foreground="{StaticResource Color_Inactive}" Height="auto" Width="auto" MaxWidth="350" FontFamily="{StaticResource Jura}" FontSize="12px" HorizontalAlignment="Left" TextAlignment="Center" Margin="0,12,0,0">
73+
<Run Text="{DynamicResource file_import}"/>
74+
<Run Text=""/><Run x:Name="ImportedFile" Text="The imported file" Foreground="{StaticResource Color_Accent}"/><Run Text=""/>
75+
</TextBlock>
7176
</StackPanel>
7277
</Grid>
7378

.Source/GTweak/Windows/ImportWindow.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ private struct SectionName
2424

2525
private bool isRestartNeed = false, isLogoutNeed = false;
2626
private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
27-
public ImportWindow()
27+
28+
public ImportWindow(in string importedFile)
2829
{
2930
InitializeComponent();
31+
ImportedFile.Text = importedFile;
3032
}
3133

3234
private void TitleBar_MouseDown(object sender, MouseButtonEventArgs e)

0 commit comments

Comments
 (0)