diff --git a/Core/Bridge/TweetDeckBridge.cs b/Core/Bridge/TweetDeckBridge.cs index 8669e62e..dca05a77 100644 --- a/Core/Bridge/TweetDeckBridge.cs +++ b/Core/Bridge/TweetDeckBridge.cs @@ -102,7 +102,7 @@ public void Alert(string type, string contents){ default: icon = MessageBoxIcon.None; break; } - FormMessage.Show(Program.BrandName+" Browser Message", contents, icon, FormMessage.OK); + FormMessage.Show("TweetDuck Browser Message", contents, icon, FormMessage.OK); } public void CrashDebug(string message){ diff --git a/Core/Handling/ContextMenuBase.cs b/Core/Handling/ContextMenuBase.cs index 1d146d22..f5d950ec 100644 --- a/Core/Handling/ContextMenuBase.cs +++ b/Core/Handling/ContextMenuBase.cs @@ -81,7 +81,7 @@ public virtual bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser br if (saveTarget != null){ BrowserUtils.DownloadFileAsync(parameters.SourceUrl, saveTarget, null, ex => { - FormMessage.Error(Program.BrandName+" Has Failed :(", "An error occurred while downloading the image: "+ex.Message, FormMessage.OK); + FormMessage.Error("Image Download", "An error occurred while downloading the image: "+ex.Message, FormMessage.OK); }); } diff --git a/Core/Handling/JavaScriptDialogHandler.cs b/Core/Handling/JavaScriptDialogHandler.cs index 989f1744..e5daef1a 100644 --- a/Core/Handling/JavaScriptDialogHandler.cs +++ b/Core/Handling/JavaScriptDialogHandler.cs @@ -9,17 +9,20 @@ namespace TweetDuck.Core.Handling { class JavaScriptDialogHandler : IJsDialogHandler{ bool IJsDialogHandler.OnJSDialog(IWebBrowser browserControl, IBrowser browser, string originUrl, CefJsDialogType dialogType, string messageText, string defaultPromptText, IJsDialogCallback callback, ref bool suppressMessage){ ((ChromiumWebBrowser)browserControl).InvokeSafe(() => { - FormMessage form = new FormMessage(Program.BrandName, messageText, MessageBoxIcon.None); + FormMessage form; TextBox input = null; if (dialogType == CefJsDialogType.Alert){ + form = new FormMessage("TweetDuck Browser Message", messageText, MessageBoxIcon.None); form.AddButton(FormMessage.OK, ControlType.Accept | ControlType.Focused); } else if (dialogType == CefJsDialogType.Confirm){ + form = new FormMessage("TweetDuck Browser Confirmation", messageText, MessageBoxIcon.None); form.AddButton(FormMessage.No, DialogResult.No, ControlType.Cancel); form.AddButton(FormMessage.Yes, ControlType.Focused); } else if (dialogType == CefJsDialogType.Prompt){ + form = new FormMessage("TweetDuck Browser Prompt", messageText, MessageBoxIcon.None); form.AddButton(FormMessage.Cancel, DialogResult.Cancel, ControlType.Cancel); form.AddButton(FormMessage.OK, ControlType.Accept | ControlType.Focused); @@ -33,6 +36,10 @@ bool IJsDialogHandler.OnJSDialog(IWebBrowser browserControl, IBrowser browser, s form.ActiveControl = input; form.Height += input.Size.Height+input.Margin.Vertical; } + else{ + callback.Continue(false); + return; + } bool success = form.ShowDialog() == DialogResult.OK; diff --git a/Core/Other/FormAbout.cs b/Core/Other/FormAbout.cs index d669aa22..c6acc8ad 100644 --- a/Core/Other/FormAbout.cs +++ b/Core/Other/FormAbout.cs @@ -11,7 +11,7 @@ public FormAbout(){ Text = "About "+Program.BrandName+" "+Program.VersionTag; - labelDescription.Text = Program.BrandName+" was created by chylex as a replacement to the discontinued official TweetDeck client for Windows.\n\nThe program is available for free under the open source MIT license."; + labelDescription.Text = "TweetDuck was created by chylex as a replacement to the discontinued official TweetDeck client for Windows.\n\nThe program is available for free under the open source MIT license."; labelWebsite.Links.Add(new LinkLabel.Link(0, labelWebsite.Text.Length, Program.Website)); labelTips.Links.Add(new LinkLabel.Link(0, labelTips.Text.Length, TipsLink)); diff --git a/Core/Other/Settings/BaseTabSettings.cs b/Core/Other/Settings/BaseTabSettings.cs index 68ad42fa..30c96ba3 100644 --- a/Core/Other/Settings/BaseTabSettings.cs +++ b/Core/Other/Settings/BaseTabSettings.cs @@ -25,7 +25,7 @@ public virtual void OnReady(){} public virtual void OnClosing(){} protected static void PromptRestart(){ - if (FormMessage.Information(Program.BrandName+" Options", "The application must restart for the option to take place. Do you want to restart now?", FormMessage.Yes, FormMessage.No)){ + if (FormMessage.Information("TweetDuck Options", "The application must restart for the option to take place. Do you want to restart now?", FormMessage.Yes, FormMessage.No)){ Program.Restart(); } } diff --git a/Core/Other/Settings/Dialogs/DialogSettingsManage.cs b/Core/Other/Settings/Dialogs/DialogSettingsManage.cs index 13ae3a6b..c33bfa79 100644 --- a/Core/Other/Settings/Dialogs/DialogSettingsManage.cs +++ b/Core/Other/Settings/Dialogs/DialogSettingsManage.cs @@ -58,7 +58,7 @@ private void btnContinue_Click(object sender, EventArgs e){ case State.Deciding: // Reset if (radioReset.Checked){ - if (FormMessage.Warning("Reset "+Program.BrandName+" Options", "This will reset all of your program options. Plugins will not be affected. Do you want to proceed?", FormMessage.Yes, FormMessage.No)){ + if (FormMessage.Warning("Reset TweetDuck Options", "This will reset all of your program options. Plugins will not be affected. Do you want to proceed?", FormMessage.Yes, FormMessage.No)){ Program.ResetConfig(); ShouldReloadUI = true; @@ -74,8 +74,8 @@ private void btnContinue_Click(object sender, EventArgs e){ using(OpenFileDialog dialog = new OpenFileDialog{ AutoUpgradeEnabled = true, DereferenceLinks = true, - Title = "Import "+Program.BrandName+" Profile", - Filter = Program.BrandName+" Profile (*.tdsettings)|*.tdsettings" + Title = "Import TweetDuck Profile", + Filter = "TweetDuck Profile (*.tdsettings)|*.tdsettings" }){ if (dialog.ShowDialog() != DialogResult.OK){ return; @@ -116,7 +116,7 @@ private void btnContinue_Click(object sender, EventArgs e){ } } else{ - Program.Reporter.HandleException("Profile Import Error", "An exception happened while importing "+Program.BrandName+" profile.", true, importManager.LastException); + Program.Reporter.HandleException("Profile Import Error", "An exception happened while importing TweetDuck profile.", true, importManager.LastException); } DialogResult = DialogResult.OK; @@ -129,9 +129,9 @@ private void btnContinue_Click(object sender, EventArgs e){ AutoUpgradeEnabled = true, OverwritePrompt = true, DefaultExt = "tdsettings", - FileName = Program.BrandName+".tdsettings", - Title = "Export "+Program.BrandName+" Profile", - Filter = Program.BrandName+" Profile (*.tdsettings)|*.tdsettings" + FileName = "TweetDuck.tdsettings", + Title = "Export TweetDuck Profile", + Filter = "TweetDuck Profile (*.tdsettings)|*.tdsettings" }){ if (dialog.ShowDialog() != DialogResult.OK){ return; @@ -144,7 +144,7 @@ private void btnContinue_Click(object sender, EventArgs e){ ExportManager manager = new ExportManager(file, plugins); if (!manager.Export(Flags)){ - Program.Reporter.HandleException("Profile Export Error", "An exception happened while exporting "+Program.BrandName+" profile.", true, manager.LastException); + Program.Reporter.HandleException("Profile Export Error", "An exception happened while exporting TweetDuck profile.", true, manager.LastException); } DialogResult = DialogResult.OK; diff --git a/Core/Other/Settings/Export/ExportManager.cs b/Core/Other/Settings/Export/ExportManager.cs index e0c4f8eb..e1b8b37d 100644 --- a/Core/Other/Settings/Export/ExportManager.cs +++ b/Core/Other/Settings/Export/ExportManager.cs @@ -138,7 +138,7 @@ public bool Import(ExportFileFlags flags){ } if (missingPlugins.Count > 0){ - FormMessage.Information("Importing "+Program.BrandName+" Profile", "Detected missing plugins when importing plugin data:\n"+string.Join("\n", missingPlugins), FormMessage.OK); + FormMessage.Information("Importing TweetDuck Profile", "Detected missing plugins when importing plugin data:\n"+string.Join("\n", missingPlugins), FormMessage.OK); } if (IsRestarting){ diff --git a/Core/Other/Settings/TabSettingsAdvanced.cs b/Core/Other/Settings/TabSettingsAdvanced.cs index 1ca4fddf..4e415e35 100644 --- a/Core/Other/Settings/TabSettingsAdvanced.cs +++ b/Core/Other/Settings/TabSettingsAdvanced.cs @@ -56,7 +56,7 @@ public override void OnReady(){ private void btnClearCache_Click(object sender, EventArgs e){ btnClearCache.Enabled = false; BrowserCache.SetClearOnExit(); - FormMessage.Information("Clear Cache", "Cache will be automatically cleared when "+Program.BrandName+" exits.", FormMessage.OK); + FormMessage.Information("Clear Cache", "Cache will be automatically cleared when TweetDuck exits.", FormMessage.OK); } private void checkHardwareAcceleration_CheckedChanged(object sender, EventArgs e){ diff --git a/Core/Other/Settings/TabSettingsGeneral.cs b/Core/Other/Settings/TabSettingsGeneral.cs index c2dcea15..e430b5ff 100644 --- a/Core/Other/Settings/TabSettingsGeneral.cs +++ b/Core/Other/Settings/TabSettingsGeneral.cs @@ -102,7 +102,7 @@ private void updates_CheckFinished(object sender, UpdateCheckEventArgs e){ btnCheckUpdates.Enabled = true; if (!e.UpdateAvailable){ - FormMessage.Information("No Updates Available", "Your version of "+Program.BrandName+" is up to date.", FormMessage.OK); + FormMessage.Information("No Updates Available", "Your version of TweetDuck is up to date.", FormMessage.OK); } } }); diff --git a/Core/Other/Settings/TabSettingsNotifications.cs b/Core/Other/Settings/TabSettingsNotifications.cs index 6cec96b6..aff1c437 100644 --- a/Core/Other/Settings/TabSettingsNotifications.cs +++ b/Core/Other/Settings/TabSettingsNotifications.cs @@ -1,5 +1,4 @@ using System; -using System.Globalization; using System.Windows.Forms; using TweetDuck.Core.Controls; using TweetDuck.Core.Notification; @@ -52,7 +51,7 @@ public TabSettingsNotifications(FormNotificationMain notification){ comboBoxIdlePause.Items.Add("5 minutes"); comboBoxIdlePause.SelectedIndex = Math.Max(0, Array.FindIndex(IdlePauseSeconds, val => val == Config.NotificationIdlePauseSeconds)); - comboBoxDisplay.Items.Add("(Same As "+Program.BrandName+")"); + comboBoxDisplay.Items.Add("(Same as TweetDuck)"); foreach(Screen screen in Screen.AllScreens){ comboBoxDisplay.Items.Add(screen.DeviceName.TrimStart('\\', '.')+" ("+screen.Bounds.Width+"x"+screen.Bounds.Height+")"); diff --git a/Core/Utils/WindowsUtils.cs b/Core/Utils/WindowsUtils.cs index 793effde..e9763148 100644 --- a/Core/Utils/WindowsUtils.cs +++ b/Core/Utils/WindowsUtils.cs @@ -125,7 +125,7 @@ private static void SetClipboardData(DataObject obj){ try{ Clipboard.SetDataObject(obj); }catch(ExternalException e){ - Program.Reporter.HandleException("Clipboard Error", Program.BrandName+" could not access the clipboard as it is currently used by another process.", true, e); + Program.Reporter.HandleException("Clipboard Error", "TweetDuck could not access the clipboard as it is currently used by another process.", true, e); } } } diff --git a/Plugins/Controls/PluginControl.cs b/Plugins/Controls/PluginControl.cs index eea41101..fb61842c 100644 --- a/Plugins/Controls/PluginControl.cs +++ b/Plugins/Controls/PluginControl.cs @@ -25,7 +25,7 @@ public PluginControl(PluginManager pluginManager, Plugin plugin) : this(){ this.dpiScale = this.GetDPIScale(); this.labelName.Text = plugin.Name; - this.labelDescription.Text = plugin.CanRun ? plugin.Description : "This plugin requires "+Program.BrandName+" "+plugin.RequiredVersion+" or newer."; + this.labelDescription.Text = plugin.CanRun ? plugin.Description : "This plugin requires TweetDuck "+plugin.RequiredVersion+" or newer."; this.labelVersion.Text = plugin.Version; this.labelAuthor.Text = plugin.Author; this.labelWebsite.Text = plugin.Website; diff --git a/Plugins/PluginBridge.cs b/Plugins/PluginBridge.cs index e2f6665d..05c4f4ca 100644 --- a/Plugins/PluginBridge.cs +++ b/Plugins/PluginBridge.cs @@ -49,7 +49,7 @@ private string GetFullPathOrThrow(int token, PluginFolder folder, string path){ switch(folder){ case PluginFolder.Data: throw new ArgumentException("File path has to be relative to the plugin data folder."); case PluginFolder.Root: throw new ArgumentException("File path has to be relative to the plugin root folder."); - default: throw new ArgumentException("Invalid folder type "+folder+", this is a "+Program.BrandName+" error."); + default: throw new ArgumentException("Invalid folder type "+folder+", this is a TweetDuck error."); } } else{ diff --git a/Program.cs b/Program.cs index 40a3a74f..83e61e85 100644 --- a/Program.cs +++ b/Program.cs @@ -63,7 +63,7 @@ static Program(){ CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture; Reporter = new Reporter(ErrorLogFilePath); - Reporter.SetupUnhandledExceptionHandler(BrandName+" Has Failed :("); + Reporter.SetupUnhandledExceptionHandler("TweetDuck Has Failed :("); } [STAThread] @@ -75,7 +75,7 @@ private static void Main(){ SubProcessMessage = NativeMethods.RegisterWindowMessage("TweetDuckSubProcess"); if (!WindowsUtils.CheckFolderWritePermission(StoragePath)){ - FormMessage.Warning("Permission Error", BrandName+" does not have write permissions to the storage folder: "+StoragePath, FormMessage.OK); + FormMessage.Warning("Permission Error", "TweetDuck does not have write permissions to the storage folder: "+StoragePath, FormMessage.OK); return; } @@ -87,11 +87,11 @@ private static void Main(){ break; } else if (lockResult == LockManager.Result.Fail){ - FormMessage.Error(BrandName+" Has Failed :(", "An unknown error occurred accessing the data folder. Please, make sure "+BrandName+" is not already running. If the problem persists, try restarting your system.", FormMessage.OK); + FormMessage.Error("TweetDuck Has Failed :(", "An unknown error occurred accessing the data folder. Please, make sure TweetDuck is not already running. If the problem persists, try restarting your system.", FormMessage.OK); return; } else if (attempt == 20){ - if (FormMessage.Warning(BrandName+" Cannot Restart", BrandName+" is taking too long to close.", FormMessage.Retry, FormMessage.Exit)){ + if (FormMessage.Warning("TweetDuck Cannot Restart", "TweetDuck is taking too long to close.", FormMessage.Retry, FormMessage.Exit)){ attempt /= 2; continue; } @@ -116,9 +116,9 @@ private static void Main(){ } } - if (FormMessage.Error(BrandName+" is Already Running", "Another instance of "+BrandName+" is already running.\nDo you want to close it?", FormMessage.Yes, FormMessage.No)){ + if (FormMessage.Error("TweetDuck is Already Running", "Another instance of TweetDuck is already running.\nDo you want to close it?", FormMessage.Yes, FormMessage.No)){ if (!LockManager.CloseLockingProcess(10000, 5000)){ - FormMessage.Error(BrandName+" Has Failed :(", "Could not close the other process.", FormMessage.OK); + FormMessage.Error("TweetDuck Has Failed :(", "Could not close the other process.", FormMessage.OK); return; } @@ -127,7 +127,7 @@ private static void Main(){ else return; } else if (lockResult != LockManager.Result.Success){ - FormMessage.Error(BrandName+" Has Failed :(", "An unknown error occurred accessing the data folder. Please, make sure "+BrandName+" is not already running. If the problem persists, try restarting your system.", BrandName+" Has Failed :(", FormMessage.OK); + FormMessage.Error("TweetDuck Has Failed :(", "An unknown error occurred accessing the data folder. Please, make sure TweetDuck is not already running. If the problem persists, try restarting your system.", FormMessage.OK); return; } } diff --git a/Resources/ScriptLoader.cs b/Resources/ScriptLoader.cs index cd383301..0d28abd8 100644 --- a/Resources/ScriptLoader.cs +++ b/Resources/ScriptLoader.cs @@ -14,7 +14,7 @@ public static string LoadResource(string name, bool silent = false){ return File.ReadAllText(Path.Combine(Program.ScriptPath, name), Encoding.UTF8); }catch(Exception ex){ if (!silent){ - FormMessage.Error(Program.BrandName+" Has Failed :(", "Unfortunately, "+Program.BrandName+" could not load the "+name+" file. The program will continue running with limited functionality.\n\n"+ex.Message, FormMessage.OK); + FormMessage.Error("TweetDuck Has Failed :(", "Unfortunately, TweetDuck could not load the "+name+" file. The program will continue running with limited functionality.\n\n"+ex.Message, FormMessage.OK); } return null;