Skip to content

Commit 7e1a8c2

Browse files
author
subhra74
committed
Minor fixes
1 parent 76f1fbb commit 7e1a8c2

File tree

19 files changed

+225
-517
lines changed

19 files changed

+225
-517
lines changed

app/XDM/XDM.Core/Config.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ private Config()
8585
VideoExtensions = DefaultVideoExtensions;
8686
FileExtensions = DefaultFileExtensions;
8787
BlockedHosts = DefaultBlockedHosts;
88+
if(Environment.OSVersion.Platform == PlatformID.Win32NT)
89+
{
90+
AllowSystemDarkTheme = Environment.OSVersion.Version.Major >= 10;
91+
}
8892
}
8993

9094
public List<string> RecentFolders { get; set; } = new List<string>();

app/XDM/XDM.Core/Util/BrowserLauncher.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,21 @@ public static bool LaunchFirefox(string args, string? executableLocation)
9595
{
9696
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
9797
{
98-
return LaunchBrowser("firefox.exe", args, new string?[]
98+
var list = new List<string>();
99+
if (!string.IsNullOrEmpty(executableLocation))
99100
{
100-
executableLocation,
101-
Path.Combine(Environment.GetEnvironmentVariable("ProgramW6432")!, @"Mozilla Firefox"),
102-
Path.Combine(Environment.GetEnvironmentVariable("LOCALAPPDATA")!, @"Mozilla Firefox"),
103-
Path.Combine(Environment.GetEnvironmentVariable("PROGRAMFILES")!, @"Mozilla Firefox"),
104-
Path.Combine(Environment.GetEnvironmentVariable("PROGRAMFILES(X86)")!, @"Mozilla Firefox")
105-
});
101+
list.Add(executableLocation);
102+
}
103+
foreach (var env in new string[] { "ProgramW6432", "LOCALAPPDATA", "PROGRAMFILES", "PROGRAMFILES(X86)" })
104+
{
105+
var value = Environment.GetEnvironmentVariable(env);
106+
if (!string.IsNullOrEmpty(value))
107+
{
108+
list.Add(Path.Combine(value, "Mozilla Firefox"));
109+
}
110+
}
111+
112+
return LaunchBrowser("firefox.exe", args, list);
106113
}
107114
else if (Environment.OSVersion.Platform == PlatformID.Unix)
108115
{

app/XDM/XDM.Gtk.UI/Dialogs/ChromeIntegrator/RegisterExtensionWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ private void RegisterExtensionWindow_Clicked(object? sender, EventArgs e)
4444
GtkHelper.ShowMessageBox(this, TextResource.GetText("MSG_FIELD_BLANK"));
4545
return;
4646
}
47-
ExtensionRegistrationHelper.AddExtension("chrome-extension://" + TxtExtID.Text);
48-
NativeMessagingHostConfigurer.InstallNativeMessagingHostForLinux(Browser.Chrome);
47+
//ExtensionRegistrationHelper.AddExtension("chrome-extension://" + TxtExtID.Text);
48+
//NativeMessagingHostConfigurer.InstallNativeMessagingHostForLinux(Browser.Chrome);
4949
Close();
5050
}
5151

app/XDM/XDM.Gtk.UI/Dialogs/Settings/SettingsDialog.cs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -362,16 +362,16 @@ private void BtnEdge_Clicked(object? sender, EventArgs e)
362362

363363
private void BtnFirefox_Clicked(object? sender, EventArgs e)
364364
{
365-
try
366-
{
367-
NativeMessagingHostConfigurer.InstallNativeMessagingHostForLinux(Browser.Firefox);
368-
}
369-
catch (Exception ex)
370-
{
371-
Log.Debug(ex, "Error installing native host");
372-
GtkHelper.ShowMessageBox(this, TextResource.GetText("MSG_NATIVE_HOST_FAILED"));
373-
return;
374-
}
365+
//try
366+
//{
367+
// NativeMessagingHostConfigurer.InstallNativeMessagingHostForLinux(Browser.Firefox);
368+
//}
369+
//catch (Exception ex)
370+
//{
371+
// Log.Debug(ex, "Error installing native host");
372+
// GtkHelper.ShowMessageBox(this, TextResource.GetText("MSG_NATIVE_HOST_FAILED"));
373+
// return;
374+
//}
375375

376376
try
377377
{
@@ -393,30 +393,30 @@ private void ShowIntegrationWindow(Browser browser)
393393
private void KillExistingSessions(Browser browser, out string? exeLocation)
394394
{
395395
exeLocation = null;
396-
if (!GtkHelper.ShowConfirmMessageBox(this, TextResource.GetText("MSG_KILL_BROWSER"), "XDM"))
397-
{
398-
return;
399-
}
400-
foreach (var exeName in NativeMessagingHostConfigurer.GetBrowserExecutableName(browser))
401-
{
402-
PlatformHelper.KillAll($"{exeName}", out exeLocation);
403-
}
396+
//if (!GtkHelper.ShowConfirmMessageBox(this, TextResource.GetText("MSG_KILL_BROWSER"), "XDM"))
397+
//{
398+
// return;
399+
//}
400+
//foreach (var exeName in NativeMessagingHostConfigurer.GetBrowserExecutableName(browser))
401+
//{
402+
// PlatformHelper.KillAll($"{exeName}", out exeLocation);
403+
//}
404404
}
405405

406406
private void BrowserButtonClick(Browser browser)
407407
{
408408
//KillExistingSessions(browser, out string? exeLocation);
409409

410-
try
411-
{
412-
NativeMessagingHostConfigurer.InstallNativeMessagingHostForLinux(browser);
413-
}
414-
catch (Exception ex)
415-
{
416-
Log.Debug(ex, "Error installing native host");
417-
GtkHelper.ShowMessageBox(this, TextResource.GetText("MSG_NATIVE_HOST_FAILED"));
418-
return;
419-
}
410+
//try
411+
//{
412+
// NativeMessagingHostConfigurer.InstallNativeMessagingHostForLinux(browser);
413+
//}
414+
//catch (Exception ex)
415+
//{
416+
// Log.Debug(ex, "Error installing native host");
417+
// GtkHelper.ShowMessageBox(this, TextResource.GetText("MSG_NATIVE_HOST_FAILED"));
418+
// return;
419+
//}
420420

421421
try
422422
{

app/XDM/XDM.Gtk.UI/MainWindow.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ private void CreateMenu()
215215
var menuExport = new MenuItem(TextResource.GetText("MENU_EXPORT"));
216216
var menuImport = new MenuItem(TextResource.GetText("MENU_IMPORT"));
217217
var menuLanguage = new MenuItem(TextResource.GetText("MENU_LANG"));
218-
var menuRegExt = new MenuItem(TextResource.GetText("MSG_REGISTER_EXT"));
219218
var menuHelpAndSupport = new MenuItem(TextResource.GetText("LBL_SUPPORT_PAGE"));
220219
var menuReportProblem = new MenuItem(TextResource.GetText("LBL_REPORT_PROBLEM"));
221220
var menuCheckForUpdate = new MenuItem(TextResource.GetText("MENU_UPDATE"));
@@ -226,7 +225,6 @@ private void CreateMenu()
226225
menuExport.Activated += MenuExport_Activated;
227226
menuImport.Activated += MenuImport_Activated;
228227
menuLanguage.Activated += MenuLanguage_Activated;
229-
menuRegExt.Activated += MenuRegExt_Activated;
230228
menuBrowserMonitor.Activated += MenuBrowserMonitor_Activated;
231229
menuHelpAndSupport.Activated += MenuHelpAndSupport_Activated;
232230
menuReportProblem.Activated += MenuReportProblem_Activated;
@@ -241,7 +239,6 @@ private void CreateMenu()
241239
mainMenu.Append(menuExport);
242240
mainMenu.Append(menuImport);
243241
mainMenu.Append(menuLanguage);
244-
mainMenu.Append(menuRegExt);
245242
mainMenu.Append(menuHelpAndSupport);
246243
mainMenu.Append(menuReportProblem);
247244
mainMenu.Append(menuCheckForUpdate);
@@ -250,11 +247,6 @@ private void CreateMenu()
250247
mainMenu.ShowAll();
251248
}
252249

253-
private void MenuRegExt_Activated(object? sender, EventArgs e)
254-
{
255-
ApplicationContext.PlatformUIService.ShowExtensionRegistrationWindow();
256-
}
257-
258250
private void MenuMediaGrabber_Activated(object? sender, EventArgs e)
259251
{
260252
ApplicationContext.PlatformUIService.CreateAndShowMediaGrabber();

app/XDM/XDM.Gtk.UI/NativeMessaging/xdm_messaging_host.py

Lines changed: 0 additions & 144 deletions
This file was deleted.

app/XDM/XDM.Gtk.UI/XDM.Gtk.UI.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@
9393
</ItemGroup>
9494

9595
<ItemGroup>
96-
<None Update="NativeMessaging\xdm_messaging_host.py">
97-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
98-
</None>
9996
<None Update="source_pkg.txt">
10097
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
10198
</None>
@@ -110,6 +107,12 @@
110107

111108
<Import Project="..\XDM.Compatibility\XDM.Compatibility.projitems" Label="Shared" />
112109

110+
111+
<ItemGroup>
112+
<Content Include="..\chrome-extension\**" CopyToOutputDirectory="Always" LinkBase="chrome-extension\" />
113+
</ItemGroup>
114+
115+
113116
<!--<ItemGroup>
114117
<Content Update="glade\download-complete-window.glade">
115118
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

app/XDM/XDM.Gtk.UI/glade/settings-dialog.glade

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@
334334
</packing>
335335
</child>
336336
<child>
337-
<!-- n-columns=2 n-rows=4 -->
337+
<!-- n-columns=2 n-rows=3 -->
338338
<object class="GtkGrid">
339339
<property name="visible">True</property>
340340
<property name="can-focus">False</property>
@@ -416,30 +416,6 @@
416416
<property name="top-attach">2</property>
417417
</packing>
418418
</child>
419-
<child>
420-
<object class="GtkButton" id="BtnChromium">
421-
<property name="label" translatable="yes">Chromium</property>
422-
<property name="visible">True</property>
423-
<property name="can-focus">True</property>
424-
<property name="receives-default">True</property>
425-
</object>
426-
<packing>
427-
<property name="left-attach">0</property>
428-
<property name="top-attach">3</property>
429-
</packing>
430-
</child>
431-
<child>
432-
<object class="GtkButton" id="BtnYandex">
433-
<property name="label" translatable="yes">Yandex</property>
434-
<property name="visible">True</property>
435-
<property name="can-focus">True</property>
436-
<property name="receives-default">True</property>
437-
</object>
438-
<packing>
439-
<property name="left-attach">1</property>
440-
<property name="top-attach">3</property>
441-
</packing>
442-
</child>
443419
</object>
444420
<packing>
445421
<property name="expand">False</property>

app/XDM/XDM.Linux.Installer/make-arch-pkg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#Please place all the published files under ./binary-source directory
44

5-
VERSION=8.0.18
5+
VERSION=8.0.25
66
SRC_DIR=binary-source
77
SOURCE_NAME="src"
88

@@ -54,7 +54,6 @@ cp "${SOURCE_NAME}/opt/xdman/xdm-app.desktop" "${SOURCE_NAME}/usr/share/applicat
5454

5555
chmod 755 "${SOURCE_NAME}/usr/bin/xdman"
5656
chmod 755 "${SOURCE_NAME}/opt/xdman/xdm-app"
57-
chmod 755 "${SOURCE_NAME}/opt/xdman/XDM.App.Host/xdm-app-host"
5857

5958
#tar --create --file "${SOURCE_NAME}.tar.gz" -C "${SOURCE_NAME}" .
6059

0 commit comments

Comments
 (0)