diff --git a/Common/Defaults/Defaults/AHK/JLE_Common.ahk b/Common/Defaults/Defaults/AHK/JLE_Common.ahk index 8af34bf..0d64453 100644 --- a/Common/Defaults/Defaults/AHK/JLE_Common.ahk +++ b/Common/Defaults/Defaults/AHK/JLE_Common.ahk @@ -8,6 +8,7 @@ #NoTrayIcon SetTitleMatchMode, 2 +DetectHiddenWindows, On DllCall("Wow64DisableWow64FsRedirection", "uint*", OldValue) ; Disables WOW64 redirection on x64. No more needing Sysnative! IT'S ALL SYSTEM32! @@ -100,7 +101,7 @@ JLE_GetMostRecentWindow(processName, processWindowName = "", processWindowClass WinGet, windowList, List, %processWindowName% } - Loop { ; Loop through each entry of windowList + Loop, %windowList% { ; Loop through each entry of windowList if windowList%A_Index% <= 0 ; Does array entry not exist? break @@ -127,22 +128,72 @@ JLE_GetMostRecentWindow(processName, processWindowName = "", processWindowClass ; Activates window, and then sends keystrokes to it ; Note: Window must be activated to receive keystrokes. ; Params: windowHandle -- Window to receive keystrokes -; keystroke -- Keystrokes in "Send" format, e.g. ^o ==> Ctrl+O; ^!{Del} ==> Ctrl+Alt+Del +; keystroke -- Keystrokes in "Send" format, e.g. ^o ==> Ctrl+O; ^!{Del} ==> Ctrl+Alt+Del +; background -- ; Returns: 1 -- Keystroke successfully sent to window ; 0 -- Window could not be activated -JLE_SendKeystrokeToWindow(windowHandle, keystroke) +JLE_SendKeystrokeToWindow(windowHandle, keystroke, background = 0) { - ; Activate most recent window - WinActivate, ahk_id %windowHandle% - - ; Wait for most recent window to become active. Send keystroke. - ; After 5 seconds, stop trying. - WinWaitActive, ahk_id %windowHandle%, , 5 - if(ErrorLevel) { - return 0 + ; if background = 0 or 2, then activate the normal way + ; if background = 2, minimize afterward. a "psuedo-background" keystroke, if you will + if(background != 1) { + if(background = 2) { + ; Get the hwnd of the currently active window, for background=2. + DetectHiddenWindows, Off + WinGet, windowList, List + DetectHiddenWindows, On + + ; Get windowHandle of array entry. Check its process name for a match + Loop, %windowList% { + if(A_Index < 3) { + continue ; I'm positive that the winList goes Start, Taskbar, Last Active Window. + } + currentWindowHandle := windowList%A_Index% + + WinGet, currentWindowMinimized, MinMax, ahk_id %currentWindowHandle% + ;WinGetTitle, currentWindowTitle, ahk_id %currentWindowHandle% ;debug + ;WinGet, currentWindowProcessName, ProcessName, ahk_id %currentWindowHandle% ;debug, might be useful + ;Msgbox, %currentWindowMinimized%|%currentWindowTitle%|%currentWindowProcessName% + + if(currentWindowMinimized > -1) { + break + } + } + + currentActiveHwnd := currentWindowHandle + } + + ; Also get the minimized state of the program window + WinGet, windowMinimized, MinMax, ahk_id %windowHandle% + + ; Activate most recent window + WinActivate, ahk_id %windowHandle% + + ; Wait for most recent window to become active. Send keystroke. + ; After 5 seconds, stop trying. + WinWaitActive, ahk_id %windowHandle%, , 5 + if(ErrorLevel) { + return 0 + } else { + Send %keystroke% + + if(background = 2) { + if(windowMinimized = -1) { + WinMinimize, ahk_id %windowHandle% + } else if(currentActiveHwnd != windowHandle) { + WinActivate, ahk_id %currentActiveHwnd% + } + } + return 1 + } } else { - Send %keystroke% - return 1 + ; Use ControlSend to send keystroke in background. Hit-and-miss: does not work with all programs. + ControlSend, , %keystroke%, ahk_id %windowHandle% + if(ErrorLevel) { + return 0 + } else { + return 1 + } } return 0 diff --git a/Common/Defaults/Defaults/Templates/Keyboard.ahk b/Common/Defaults/Defaults/Templates/Keyboard.ahk index fc25620..9a53ef4 100644 --- a/Common/Defaults/Defaults/Templates/Keyboard.ahk +++ b/Common/Defaults/Defaults/Templates/Keyboard.ahk @@ -15,6 +15,7 @@ JLE_AppWindowClassName := "{AppWindowClassName}" JLE_StartNewProcess := {KBDStartNewProcess} JLE_KBDIgnoreAbsent := {KBDIgnoreAbsent} JLE_KBDIgnoreCurrent := {KBDIgnoreCurrent} +JLE_KBDSendBackground := {KBDSendBackground} ; Keystroke is below, on JLE_SendKeystrokeToWindow() @@ -31,4 +32,4 @@ if(RecentWindow <= 0) exit ; Send keystroke! -JLE_SendKeystrokeToWindow(RecentWindow, "{Keystroke}") \ No newline at end of file +JLE_SendKeystrokeToWindow(RecentWindow, "{Keystroke}", JLE_KBDSendBackground) \ No newline at end of file diff --git a/NSISInstaller/CHANGELOG.txt b/NSISInstaller/CHANGELOG.txt index 4b6db25..be1c9d9 100644 --- a/NSISInstaller/CHANGELOG.txt +++ b/NSISInstaller/CHANGELOG.txt @@ -1,5 +1,26 @@ If you are upgrading or reinstalling, close the Jumplist Extender tray icon first. +===VERSION 0.4=== +Version 0.4 is a '''MINOR BUG FIX''' release. + +''FIXED:'' +* Command line tasks and EXE shortcuts were being executed with the wrong working directory. +* Jump List Packs could not be imported because the "AppData\...\Icons\Imported" folder was missing. + +''ADDED:'' +* Keystrokes can now be sent to minimized/background windows without activating them. + +''KNOWN ISSUES:'' +* Recent/Frequent lists are not supported (yet). +* Small icons are not extracted from EXE files; only big ones. +* More at http://code.google.com/p/jumplist-extender/issues/list + +===VERSION 0.3-B=== +Version 0.3-B is a '''MINOR BUG FIX''' release. + +''FIXED:'' +* Log files were being made in the desktop by accident. + ===VERSION 0.3=== Version 0.3 is a '''MAJOR BUG FIX''' release. @@ -8,6 +29,9 @@ Version 0.3 is a '''MAJOR BUG FIX''' release. * Broken update check would display weird code in the menus. * Old web links were broken. +''KNOWN ISSUES:'' +* Recent/Frequent lists are not supported (yet). + ===Version 0.2-C=== Version 0.2-C is a '''MINOR BUG FIX''' release. diff --git a/NSISInstaller/MainInstall.iss b/NSISInstaller/MainInstall.iss index 6f86650..7dc5d46 100644 --- a/NSISInstaller/MainInstall.iss +++ b/NSISInstaller/MainInstall.iss @@ -1,11 +1,11 @@ [Setup] -OutputBaseFilename=JumplistExtender_v0.3 -VersionInfoVersion=0.3.0 -VersionInfoProductVersion=0.3.0 -AppVerName=Version 0.3 -AppVersion=0.3 +OutputBaseFilename=JumplistExtender_v0.4 +VersionInfoVersion=0.4.0 +VersionInfoProductVersion=0.4.0 +AppVerName=Jumplist Extender v0.4 +AppVersion=0.4 VersionInfoCompany=Marco Zafra -VersionInfoDescription=A custom jumplist creator for any program on Windows 7 +VersionInfoDescription=A custom jump list creator for any program on Windows 7 VersionInfoCopyright=Released under GPLv3 Compression=lzma/ultra64 VersionInfoProductName=Jumplist Extender diff --git a/NSISInstaller/Primary.cs b/NSISInstaller/Primary.cs index 5f9aa4a..2d6f978 100644 --- a/NSISInstaller/Primary.cs +++ b/NSISInstaller/Primary.cs @@ -235,8 +235,10 @@ private void InstallJLE() } else { + // Do we want to keep prefs for a donate code? Common.WritePref("InstallUpgrade", true.ToString() - , "DonateDialogDisable", false.ToString()); + , "DonateDialogDisable", false.ToString() + , "DonateBalloonDisable", false.ToString()); } // Write library diff --git a/T7EBackground/Primary.Designer.cs b/T7EBackground/Primary.Designer.cs index d4730d4..c70dbca 100644 --- a/T7EBackground/Primary.Designer.cs +++ b/T7EBackground/Primary.Designer.cs @@ -38,6 +38,7 @@ private void InitializeComponent() this.TrayIconContextMenuExit = new System.Windows.Forms.ToolStripMenuItem(); this.UpdateTimer = new System.Windows.Forms.Timer(this.components); this.DonateTimer = new System.Windows.Forms.Timer(this.components); + this.donateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.TrayIconContextMenuStrip.SuspendLayout(); this.SuspendLayout(); // @@ -54,11 +55,12 @@ private void InitializeComponent() this.TrayIconContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.TrayIconContextMenuOpenSettings, this.visitTheOfficialWebsiteToolStripMenuItem, + this.donateToolStripMenuItem, this.updateToVersion0ToolStripMenuItem, this.toolStripSeparator1, this.TrayIconContextMenuExit}); this.TrayIconContextMenuStrip.Name = "TrayIconContextMenuStrip"; - this.TrayIconContextMenuStrip.Size = new System.Drawing.Size(232, 120); + this.TrayIconContextMenuStrip.Size = new System.Drawing.Size(232, 142); // // TrayIconContextMenuOpenSettings // @@ -106,6 +108,13 @@ private void InitializeComponent() this.DonateTimer.Interval = 1800000; this.DonateTimer.Tick += new System.EventHandler(this.DonateTimer_Tick); // + // donateToolStripMenuItem + // + this.donateToolStripMenuItem.Name = "donateToolStripMenuItem"; + this.donateToolStripMenuItem.Size = new System.Drawing.Size(231, 22); + this.donateToolStripMenuItem.Text = "&Donate"; + this.donateToolStripMenuItem.Click += new System.EventHandler(this.donateToolStripMenuItem_Click); + // // Primary // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); @@ -133,5 +142,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem updateToVersion0ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem visitTheOfficialWebsiteToolStripMenuItem; private System.Windows.Forms.Timer DonateTimer; + private System.Windows.Forms.ToolStripMenuItem donateToolStripMenuItem; } } \ No newline at end of file diff --git a/T7EBackground/Primary.cs b/T7EBackground/Primary.cs index da3e74c..d3a307e 100644 --- a/T7EBackground/Primary.cs +++ b/T7EBackground/Primary.cs @@ -120,7 +120,9 @@ public Primary() this.Icon = PrimaryIcon; TrayIcon.Icon = PrimaryIcon; //MessageBox.Show("fucik"); +#if DEBUG LogTxtFile = new StreamWriter(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "T7EBackgroundLog_"+DateTime.Now.Hour.ToString()+DateTime.Now.Minute.ToString()+DateTime.Now.Second.ToString()+".txt")); +#endif //MessageBox.Show("fidld"); CommonLog("Starting T7EBackground Primary Form", 1); @@ -155,12 +157,14 @@ public Primary() HookAppList(); CommonLog("Finished starting hooks"); + TrayIconPath = Common.WebPath_DonateSite; + // Hook the update timer -- every 24 hours CommonLog("Starting update check sequence"); CheckUpdateString(); StartUpdateTimer(); CommonLog("Finished update check sequence"); - + DonateTimer.Start(); CommonLog("Finished Primary Form start-up.", 0); @@ -286,7 +290,7 @@ private void CheckUpdateString(bool download) versionCheckParts.Length >= 3 ? versionCheckParts[2] : versionCheckParts[0].Substring(0, 3)); TrayIcon.BalloonTipText = "Click to download."; - TrayIconPath = Common.WebPath_UpdateUrl; + TrayIconPath = versionCheckParts[1]; UpdatePath = versionCheckParts[1]; TrayIcon.ShowBalloonTip(1000); // Show for 10 seconds; msdn default } @@ -322,13 +326,13 @@ private void ShowDonateBalloon() bool.TryParse(Common.ReadPref("InstallUpgrade"), out installUpgrade); if ((DateTime.Today - installDate).Days >= 3 || installUpgrade == true) { - bool donateDialogDisable = false; - bool.TryParse(Common.ReadPref("DonateDialogDisable"), out donateDialogDisable); - if (!donateDialogDisable) + bool donateBalloonDisable = false; + bool.TryParse(Common.ReadPref("DonateBalloonDisable"), out donateBalloonDisable); + if (!donateBalloonDisable) { TrayIcon.BalloonTipIcon = ToolTipIcon.Info; TrayIcon.BalloonTipTitle = "Please consider donating"; - TrayIcon.BalloonTipText = "Jumplist Extender may have been very helpful to you, and I'm a struggling student who worked hard on it. Why not donate to help me out?\r\n\r\nIt costs less than an average meal, and you'll also help me make Extender even better. Thank you for your help!\r\n(This alert can be disabled in the Settings, under \"Tools\".)"; + TrayIcon.BalloonTipText = "Jumplist Extender may have been very helpful to you, and I'm a struggling student who worked hard on it. Why not donate to help me out?\r\n\r\nIt costs less than an average meal, and you'll also help me make Extender even better. Thank you for your help!"; TrayIconPath = Common.WebPath_DonateSite; TrayIcon.ShowBalloonTip(1000); // Show for 10 seconds; msdn default Common.WritePref("DonateBalloonShown", true.ToString()); @@ -435,8 +439,9 @@ private void Primary_FormClosing(object sender, FormClosingEventArgs e) CommonLog("Received cleanup signal from Primary_FormClosing: Starting cleanup"); CleanUp(); CommonLog("Finished cleanup; passing to FormClosing to close app"); +#if DEBUG LogTxtFile.Close(); - +#endif } /// @@ -485,7 +490,7 @@ static public void CommonLog(string messageString, int logChange) static public void CommonLog(string messageString, int logChange, bool followingLine) { -#if RELEASE +#if (!DEBUG) return; #endif if (messageString.Length > 0) @@ -513,5 +518,10 @@ private void DonateTimer_Tick(object sender, EventArgs e) DonateTimer.Stop(); ShowDonateBalloon(); } + + private void donateToolStripMenuItem_Click(object sender, EventArgs e) + { + Process.Start("explorer.exe", "\"" + Common.WebPath_DonateSite + "\""); + } } } diff --git a/T7EBackground/Properties/AssemblyInfo.cs b/T7EBackground/Properties/AssemblyInfo.cs index dc2ab8d..740f444 100644 --- a/T7EBackground/Properties/AssemblyInfo.cs +++ b/T7EBackground/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Jumplist Extender Background Process")] -[assembly: AssemblyDescription("Assigns custom jumplists to any program on Windows 7.")] +[assembly: AssemblyDescription("Detects user programs and assigns jump lists to them.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Marco Zafra")] [assembly: AssemblyProduct("Jumplist Extender")] @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.3.*")] -[assembly: AssemblyFileVersion("0.3.0.0")] +[assembly: AssemblyVersion("0.4.*")] +[assembly: AssemblyFileVersion("0.4.0.0")] diff --git a/T7ECommon/Logging.cs b/T7ECommon/Logging.cs index afb84f2..1abb3c5 100644 --- a/T7ECommon/Logging.cs +++ b/T7ECommon/Logging.cs @@ -15,7 +15,7 @@ public partial class Common static string MailUserName = "jumplist.extender@gmail.com"; static string MailPassword = ""; //This must be filled in static string MailRecipient = "digimarco35@yahoo.com"; - static string MailVersion = "v0.3"; + static string MailVersion = "v0.4"; static public void SendExceptionLog(Exception e) { @@ -54,7 +54,7 @@ static public void SendExceptionLog(Exception e, string appName, string appPath, MailAddress fromAddress = new MailAddress(Common.MailUserName, "JLE " + MailVersion - + " Exception: " + Environment.UserName); + + ": " + Environment.UserName); MailAddress toAddress = new MailAddress(Common.MailRecipient, "JLE Developer"); string fromPassword = Common.MailPassword; string subject = "JLEx: " + e.Message; @@ -87,8 +87,8 @@ static public void SendExceptionLog(Exception e, string appName, string appPath, MessageBoxIcon.Error); } - MessageBox.Show("Email sent! Thanks for your consideration! If it's a serious bug, feel free to send mail to digimarco35@yahoo.com, to provide more information!" + Environment.NewLine - + "Click \"OK\" to exit.", + MessageBox.Show("Email sent! Thanks for your consideration! If this bug happens repeatedly, please file a bug report at\r\n\r\nhttp://code.google.com/p/jumplist-extender/issues/list\r\n\r\nor email me at digimarco35@yahoo.com." + + "\r\n\r\nClick \"OK\" to exit.", "Email Sent", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); @@ -189,7 +189,7 @@ static public void Log(string messageString, int logChange) static public void Log(string messageString, int logChange, bool followingLine) { -#if RELEASE +#if (!DEBUG) return; #endif if (messageString.Length > 0) diff --git a/T7ECommon/Properties/AssemblyInfo.cs b/T7ECommon/Properties/AssemblyInfo.cs index f17150a..aeb9e55 100644 --- a/T7ECommon/Properties/AssemblyInfo.cs +++ b/T7ECommon/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.*")] -[assembly: AssemblyFileVersion("0.3")] +[assembly: AssemblyVersion("0.4.*")] +[assembly: AssemblyFileVersion("0.4")] diff --git a/T7ECommon/Startup.cs b/T7ECommon/Startup.cs index d952474..5f8373c 100644 --- a/T7ECommon/Startup.cs +++ b/T7ECommon/Startup.cs @@ -13,6 +13,11 @@ public partial class Common // Can't null this out. private static DateTime TimeLockExpiration = DateTime.Today; + public static bool DonateCodeExists = false; + public static void CheckRegistrationCodes() + { + } + public static void CheckTimeLock() { // As of Version 0.2, TimeLock is disabled. @@ -86,6 +91,15 @@ public static void CheckFiles() string appDataOrigPropertiesDir = Path.Combine(appDataDir, "OrigProperties"); if (!Directory.Exists(appDataOrigPropertiesDir)) Directory.CreateDirectory(appDataOrigPropertiesDir); + + // bug 68: fixes jump list imports when appDataDir\Icons\Imported does not exist + string appDataIconsDir = Path.Combine(appDataDir, "Icons"); + if (!Directory.Exists(appDataIconsDir)) + Directory.CreateDirectory(appDataIconsDir); + + string appDataIconsImportedDir = Path.Combine(appDataDir, "Icons\\Imported"); + if (!Directory.Exists(appDataIconsImportedDir)) + Directory.CreateDirectory(appDataIconsImportedDir); #endregion // Check essential files diff --git a/T7EPreferences/Donate.Designer.cs b/T7EPreferences/Donate.Designer.cs index ef476d3..6b91484 100644 --- a/T7EPreferences/Donate.Designer.cs +++ b/T7EPreferences/Donate.Designer.cs @@ -38,8 +38,11 @@ private void InitializeComponent() this.label1 = new System.Windows.Forms.Label(); this.checkBox2 = new System.Windows.Forms.CheckBox(); this.button1 = new System.Windows.Forms.Button(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.shortcutMenuDisable = new System.Windows.Forms.ToolStripMenuItem(); this.WhitePanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // // WhitePanel @@ -118,7 +121,8 @@ private void InitializeComponent() this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(359, 35); this.label2.TabIndex = 1; - this.label2.Text = "Jumplist Extender is my personal project, and I\'m also a struggling student."; + this.label2.Text = "Jumplist Extender may have been very helpful to you, and I\'m a struggling student" + + " who worked hard on it."; // // label1 // @@ -138,9 +142,9 @@ private void InitializeComponent() this.checkBox2.Location = new System.Drawing.Point(14, 232); this.checkBox2.Margin = new System.Windows.Forms.Padding(2); this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(164, 21); + this.checkBox2.Size = new System.Drawing.Size(159, 21); this.checkBox2.TabIndex = 1; - this.checkBox2.Text = "Don\'t show this again"; + this.checkBox2.Text = "Disable balloon alert"; this.checkBox2.UseVisualStyleBackColor = true; this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); // @@ -158,6 +162,26 @@ private void InitializeComponent() this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // + // menuStrip1 + // + this.menuStrip1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.shortcutMenuDisable}); + this.menuStrip1.Location = new System.Drawing.Point(0, 245); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(386, 26); + this.menuStrip1.TabIndex = 3; + this.menuStrip1.Text = "menuStrip1"; + this.menuStrip1.Visible = false; + // + // shortcutMenuDisable + // + this.shortcutMenuDisable.Name = "shortcutMenuDisable"; + this.shortcutMenuDisable.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D))); + this.shortcutMenuDisable.Size = new System.Drawing.Size(65, 22); + this.shortcutMenuDisable.Text = "Disable"; + this.shortcutMenuDisable.Click += new System.EventHandler(this.shortcutMenuDisable_Click); + // // Donate // this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F); @@ -166,16 +190,21 @@ private void InitializeComponent() this.Controls.Add(this.button1); this.Controls.Add(this.checkBox2); this.Controls.Add(this.WhitePanel); + this.Controls.Add(this.menuStrip1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MainMenuStrip = this.menuStrip1; this.Margin = new System.Windows.Forms.Padding(2); this.MaximizeBox = false; this.Name = "Donate"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Donate"; + this.Shown += new System.EventHandler(this.Donate_Shown); this.WhitePanel.ResumeLayout(false); this.WhitePanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -192,6 +221,8 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox checkBox2; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem shortcutMenuDisable; } } \ No newline at end of file diff --git a/T7EPreferences/Donate.cs b/T7EPreferences/Donate.cs index a8d26a5..c7a6abc 100644 --- a/T7EPreferences/Donate.cs +++ b/T7EPreferences/Donate.cs @@ -14,33 +14,27 @@ namespace T7EPreferences { public partial class Donate : Form { + private bool DeliberateShow; + public Donate(bool deliberate) { InitializeComponent(); - /*if (!foreground && parent.Location.Y != null && parent.Location.Y > 0 - && parent.Height != null && parent.Height > 0) - this.Location = new Point( - Screen.PrimaryScreen.WorkingArea.Width - (parent.Location.X - parent.Width) > this.Width ? - (parent.Location.X+parent.Width)+(((Screen.PrimaryScreen.WorkingArea.Width-(parent.Location.X+parent.Width))/2)-(this.Width/2)) - : Screen.PrimaryScreen.WorkingArea.Width - this.Width - , (parent.Location.Y + (parent.Size.Height / 2)) - (this.Height / 2)); - else - CenterToScreen();*/ - - //if (Screen.PrimaryScreen.WorkingArea.Width - Location.X < this.Width) this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width, Location.Y); + DeliberateShow = deliberate; + this.Icon = Primary.PrimaryIcon; - CenterToScreen(); - bool donateDialogDisable = false; - bool.TryParse(Common.ReadPref("DonateDialogDisable"), out donateDialogDisable); - checkBox2.Checked = donateDialogDisable; - if (deliberate) { - bool donateBalloonShown = false; - bool.TryParse(Common.ReadPref("DonateBalloonShown"), out donateBalloonShown); - checkBox2.Enabled = checkBox2.Visible = donateBalloonShown; - checkBox2.Text = "Disable balloon alert"; - } - else { if (donateDialogDisable) { Close(); } } + + // donatedialogdisable handled in show event + + bool donateBalloonDisable = false; + bool.TryParse(Common.ReadPref("DonateBalloonDisable"), out donateBalloonDisable); + + bool donateBalloonShown = false; + bool.TryParse(Common.ReadPref("DonateBalloonShown"), out donateBalloonShown); + checkBox2.Enabled = checkBox2.Visible = donateBalloonShown; + checkBox2.Checked = donateBalloonDisable; + + } private string getDefaultBrowser() @@ -68,36 +62,41 @@ private string getDefaultBrowser() private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - Process.Start(getDefaultBrowser(), "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JEHM8794PVQE"); - button1.Text = "OK :)"; + Process.Start(getDefaultBrowser(), Common.WebPath_DonateSite); } private void pictureBox1_Click(object sender, EventArgs e) { - - Process.Start(getDefaultBrowser(), "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JEHM8794PVQE"); - button1.Text = "OK :)"; + Process.Start(getDefaultBrowser(), Common.WebPath_DonateSite); } - public bool DisableForm = false; - private void checkBox2_CheckedChanged(object sender, EventArgs e) { - DisableForm = checkBox2.Checked; - /*if (DisableForm && button1.Text == "OK") - { - button1.Text = "OK"; - } - else if(!DisableForm && button1.Text == "Aww :(") - { - button1.Text = "OK"; - }*/ - Common.WritePref("DonateDialogDisable", DisableForm.ToString()); + Common.WritePref("DonateBalloonDisable", checkBox2.Checked.ToString()); } private void button1_Click(object sender, EventArgs e) { Close(); } + + private void AskDonateDialogDisable() + { + // Don't deal with codes now. Just confirm disable + Common.WritePref("DonateDialogDisable", true.ToString()); + Common.WritePref("DonateBalloonDisable", true.ToString()); + checkBox2.Checked = true; + MessageBox.Show("Donate window will not pop up until the next update. If you donated, thank you!", "Donate", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); + } + + private void shortcutMenuDisable_Click(object sender, EventArgs e) + { + AskDonateDialogDisable(); + } + + private void Donate_Shown(object sender, EventArgs e) + { + // close should be handled by calling class + } } } diff --git a/T7EPreferences/Donate.resx b/T7EPreferences/Donate.resx index d70c22e..79d7625 100644 --- a/T7EPreferences/Donate.resx +++ b/T7EPreferences/Donate.resx @@ -150,4 +150,7 @@ CAQRCCLwf4/AX4SVED6zZ8sjAAAAAElFTkSuQmCC + + 17, 17 + \ No newline at end of file diff --git a/T7EPreferences/JumpListItemObject.cs b/T7EPreferences/JumpListItemObject.cs index d56bb4e..3bbef76 100644 --- a/T7EPreferences/JumpListItemObject.cs +++ b/T7EPreferences/JumpListItemObject.cs @@ -109,6 +109,13 @@ public Bitmap ItemIconBitmap public bool TaskKBDIgnoreAbsent = false; public bool TaskKBDIgnoreCurrent = false; public bool TaskKBDNew = false; + // These two are saved and pulled up in the UI just like the rest + // but they're codified in the AHK template differently: + // if TaskKBDSendInBackground, then SendBackground = 1 + // if TaskKBDMinimizeAfterward, then SendBackground = 2 + // whether or not SIB is enabled. + public bool TaskKBDSendInBackground = false; + public bool TaskKBDMinimizeAfterward = false; #endregion #region P/Invokes @@ -458,13 +465,13 @@ public void StringToItemIcon(string iconString) { string itemIconPath = ""; int itemIconIndex = 0; - if (iconString.Equals("Use program icon", StringComparison.CurrentCultureIgnoreCase)) + if (iconString.Equals("Use program icon", StringComparison.OrdinalIgnoreCase)) { // Bitmap-ize itemIconPath = PrimaryParent.CurrentAppPath; itemIconIndex = 0; } - else if (iconString.Equals("Don't use an icon", StringComparison.CurrentCultureIgnoreCase) + else if (iconString.Equals("Don't use an icon", StringComparison.OrdinalIgnoreCase) || iconString.Trim().Length <= 0) { // Blank bitmap-ize diff --git a/T7EPreferences/Preferences.cs b/T7EPreferences/Preferences.cs index 5210c4b..1d9b161 100644 --- a/T7EPreferences/Preferences.cs +++ b/T7EPreferences/Preferences.cs @@ -257,6 +257,8 @@ static private void ParseWriteJumpListTask(ref XmlTextWriter xmlWriter, bool isP xmlWriter.WriteAttributeString("type", "T7E_TYPE_KBD"); xmlWriter.WriteAttributeString("ignoreAbsent", jumplistItem.TaskKBDIgnoreAbsent.ToString()); xmlWriter.WriteAttributeString("ignoreCurrent", jumplistItem.TaskKBDIgnoreCurrent.ToString()); + xmlWriter.WriteAttributeString("sendBackground", jumplistItem.TaskKBDSendInBackground.ToString()); + xmlWriter.WriteAttributeString("minimizeAfterward", jumplistItem.TaskKBDMinimizeAfterward.ToString()); xmlWriter.WriteAttributeString("newWindow", jumplistItem.TaskKBDNew.ToString()); xmlWriter.WriteAttributeString("isShortcut", jumplistItem.TaskKBDShortcutMode.ToString()); xmlWriter.WriteCData(jumplistItem.TaskKBDString); @@ -321,6 +323,7 @@ static public bool ApplyJumplistToTaskbar(Primary parent) { JumpList newList = JumpList.CreateJumpListForAppId(parent.CurrentAppId); //newList.KnownCategoryToDisplay = JumpListKnownCategoryType.Recent; + //newList.KnownCategoryOrdinalPosition = 0; ListBox.ObjectCollection jumplistItems = parent.JumplistListBox.Items; for (int i = 0; i < jumplistItems.Count; i++) @@ -354,13 +357,34 @@ static public bool ApplyJumplistToTaskbar(Primary parent) break; case T7EJumplistItem.ItemTypeVar.FileFolder: + // If file is an EXE, just pass the path over. + // TODO: Merge "Command line" and "File/Folder shortcut" into one dialog, based on "Command Line" + JumpListLink link = new JumpListLink { Title = jumplistItem.ItemName, Path = "C:\\Windows\\explorer.exe", Arguments = jumplistItem.FilePath + // working directory here? We don't know what the program is. + // AHK doesn't detect the default program's working dir, either. }; - if (jumplistItem.FileRunWithApp) link.Path = parent.CurrentAppPath; + if (jumplistItem.FileRunWithApp) + { + link.Path = parent.CurrentAppPath; + // we use working dir here because we KNOW the program to use + link.WorkingDirectory = Path.GetDirectoryName(parent.CurrentAppPath); + } + + + if (Path.GetExtension(jumplistItem.FilePath).ToLower() == ".exe") + { + link.Path = jumplistItem.FilePath; + link.Arguments = ""; + // we use working dir here because we KNOW the program to use + link.WorkingDirectory = Path.GetDirectoryName(jumplistItem.FilePath); + } + + // Format icon if (jumplistItem.ItemIconToString().Equals("Don't use an icon") != true) { @@ -442,9 +466,12 @@ static private JumpListLink ParseApplyJumpListTask(Primary parent, T7EJumplistIt { task.Path = "cmd.exe"; task.Arguments = "/k \"" + jumplistItem.ItemCmdToString().Replace("\"", "\"\"") + "\""; + // I'm not sure if this is right, but for any executable, set workingdir to the exe path. + task.WorkingDirectory = Path.GetDirectoryName(jumplistItem.TaskCMDPath); } else { task.Path = jumplistItem.TaskCMDPath; task.Arguments = jumplistItem.TaskCMDArgs; + task.WorkingDirectory = Path.GetDirectoryName(jumplistItem.TaskCMDPath); } break; @@ -452,6 +479,8 @@ static private JumpListLink ParseApplyJumpListTask(Primary parent, T7EJumplistIt string ahkFilename = GetAhkScriptFilename(false, jumplistItem, itemIndex); if (File.Exists(ahkFilename)) // It should have already been made. { + // Working directory info for autohotkey? Probably not, + // since some scripts will use the predefined scripts in appdata. task.Path = Common.Path_ProgramFiles + "\\AutoHotKey.exe"; task.Arguments = "\"" + ahkFilename + "\""; } @@ -542,6 +571,10 @@ static private void FormKeyboardScript(Primary parent, T7EJumplistItem jumplistI templateText = templateText.Replace("{KBDStartNewProcess}", Convert.ToInt32(jumplistItem.TaskKBDNew).ToString()); templateText = templateText.Replace("{KBDIgnoreAbsent}", Convert.ToInt32(jumplistItem.TaskKBDIgnoreAbsent).ToString()); templateText = templateText.Replace("{KBDIgnoreCurrent}", Convert.ToInt32(jumplistItem.TaskKBDIgnoreCurrent).ToString()); + if(jumplistItem.TaskKBDMinimizeAfterward) + templateText = templateText.Replace("{KBDSendBackground}", 2.ToString()); + else + templateText = templateText.Replace("{KBDSendBackground}", Convert.ToInt32(jumplistItem.TaskKBDSendInBackground).ToString()); TextWriter scriptWriter = new StreamWriter(fileName); scriptWriter.Write(templateText); diff --git a/T7EPreferences/Primary.Designer.cs b/T7EPreferences/Primary.Designer.cs index 5860261..ac84136 100644 --- a/T7EPreferences/Primary.Designer.cs +++ b/T7EPreferences/Primary.Designer.cs @@ -51,6 +51,7 @@ private void InitializeComponent() this.keyboardShortcutHelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MenuToolsSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.donateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.disableDonationBalloonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.visitTheOfficialWebsiteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.MenuToolsAbout = new System.Windows.Forms.ToolStripMenuItem(); @@ -133,7 +134,8 @@ private void InitializeComponent() this.ProgramNameTextBox = new System.Windows.Forms.TextBox(); this.ProgramNameLabel = new System.Windows.Forms.Label(); this.TabControl = new System.Windows.Forms.TabControl(); - this.disableDonationBalloonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TaskKBDSendInBackgroundCheckBox = new System.Windows.Forms.CheckBox(); + this.TaskKBDMinimizeAfterwardCheckBox = new System.Windows.Forms.CheckBox(); this.MenuStrip.SuspendLayout(); this.StatusBar.SuspendLayout(); this.AddButtonContextMenuStrip.SuspendLayout(); @@ -197,7 +199,7 @@ private void InitializeComponent() this.MenuFileOpen.Name = "MenuFileOpen"; this.MenuFileOpen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); this.MenuFileOpen.Size = new System.Drawing.Size(301, 22); - this.MenuFileOpen.Text = "&Open"; + this.MenuFileOpen.Text = "&Open and Edit Jump Lists"; this.MenuFileOpen.Click += new System.EventHandler(this.MenuFileOpen_Click); // // MenuFileSave @@ -293,6 +295,13 @@ private void InitializeComponent() this.donateToolStripMenuItem.Text = "&Donate to Jumplist Extender!"; this.donateToolStripMenuItem.Click += new System.EventHandler(this.donateToolStripMenuItem_Click); // + // disableDonationBalloonToolStripMenuItem + // + this.disableDonationBalloonToolStripMenuItem.Name = "disableDonationBalloonToolStripMenuItem"; + this.disableDonationBalloonToolStripMenuItem.Size = new System.Drawing.Size(264, 22); + this.disableDonationBalloonToolStripMenuItem.Text = "D&isable Donation Balloon"; + this.disableDonationBalloonToolStripMenuItem.Click += new System.EventHandler(this.disableDonationBalloonToolStripMenuItem_Click); + // // visitTheOfficialWebsiteToolStripMenuItem // this.visitTheOfficialWebsiteToolStripMenuItem.Name = "visitTheOfficialWebsiteToolStripMenuItem"; @@ -539,6 +548,8 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.TaskKBDSettingsPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.TaskKBDSettingsPanel.BackColor = System.Drawing.Color.Transparent; + this.TaskKBDSettingsPanel.Controls.Add(this.TaskKBDMinimizeAfterwardCheckBox); + this.TaskKBDSettingsPanel.Controls.Add(this.TaskKBDSendInBackgroundCheckBox); this.TaskKBDSettingsPanel.Controls.Add(this.TaskKBDIgnoreCurrentCheckBox); this.TaskKBDSettingsPanel.Controls.Add(this.TaskKBDIgnoreAbsentCheckBox); this.TaskKBDSettingsPanel.Controls.Add(this.TaskKBDNewCheckBox); @@ -553,12 +564,12 @@ private void InitializeComponent() // TaskKBDIgnoreCurrentCheckBox // this.TaskKBDIgnoreCurrentCheckBox.AutoSize = true; - this.TaskKBDIgnoreCurrentCheckBox.Location = new System.Drawing.Point(237, 30); + this.TaskKBDIgnoreCurrentCheckBox.Location = new System.Drawing.Point(10, 5); this.TaskKBDIgnoreCurrentCheckBox.Margin = new System.Windows.Forms.Padding(2); this.TaskKBDIgnoreCurrentCheckBox.Name = "TaskKBDIgnoreCurrentCheckBox"; - this.TaskKBDIgnoreCurrentCheckBox.Size = new System.Drawing.Size(263, 21); + this.TaskKBDIgnoreCurrentCheckBox.Size = new System.Drawing.Size(133, 21); this.TaskKBDIgnoreCurrentCheckBox.TabIndex = 6; - this.TaskKBDIgnoreCurrentCheckBox.Text = "Ignore if program is currently running"; + this.TaskKBDIgnoreCurrentCheckBox.Text = "Ignore if running"; this.TaskKBDIgnoreCurrentCheckBox.UseVisualStyleBackColor = true; this.TaskKBDIgnoreCurrentCheckBox.CheckedChanged += new System.EventHandler(this.TaskKBDIgnoreCurrentCheckBox_CheckedChanged); // @@ -568,9 +579,9 @@ private void InitializeComponent() this.TaskKBDIgnoreAbsentCheckBox.Location = new System.Drawing.Point(10, 30); this.TaskKBDIgnoreAbsentCheckBox.Margin = new System.Windows.Forms.Padding(2); this.TaskKBDIgnoreAbsentCheckBox.Name = "TaskKBDIgnoreAbsentCheckBox"; - this.TaskKBDIgnoreAbsentCheckBox.Size = new System.Drawing.Size(228, 21); + this.TaskKBDIgnoreAbsentCheckBox.Size = new System.Drawing.Size(157, 21); this.TaskKBDIgnoreAbsentCheckBox.TabIndex = 5; - this.TaskKBDIgnoreAbsentCheckBox.Text = "Ignore if program is not running"; + this.TaskKBDIgnoreAbsentCheckBox.Text = "Ignore if not running"; this.TaskKBDIgnoreAbsentCheckBox.UseVisualStyleBackColor = true; this.TaskKBDIgnoreAbsentCheckBox.CheckedChanged += new System.EventHandler(this.TaskKBDIgnoreAbsentCheckBox_CheckedChanged); // @@ -579,12 +590,12 @@ private void InitializeComponent() this.TaskKBDNewCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.TaskKBDNewCheckBox.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.TaskKBDNewCheckBox.Location = new System.Drawing.Point(10, 4); + this.TaskKBDNewCheckBox.Location = new System.Drawing.Point(153, 5); this.TaskKBDNewCheckBox.Margin = new System.Windows.Forms.Padding(2); this.TaskKBDNewCheckBox.Name = "TaskKBDNewCheckBox"; - this.TaskKBDNewCheckBox.Size = new System.Drawing.Size(285, 21); + this.TaskKBDNewCheckBox.Size = new System.Drawing.Size(144, 21); this.TaskKBDNewCheckBox.TabIndex = 0; - this.TaskKBDNewCheckBox.Text = "Open new window if program is running"; + this.TaskKBDNewCheckBox.Text = "Open new window"; this.TaskKBDNewCheckBox.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.TaskKBDNewCheckBox.UseVisualStyleBackColor = true; this.TaskKBDNewCheckBox.CheckedChanged += new System.EventHandler(this.TaskKBDNewCheckBox_CheckedChanged); @@ -1316,13 +1327,27 @@ private void InitializeComponent() this.TabControl.SelectedIndexChanged += new System.EventHandler(this.TabControl_SelectedIndexChanged); this.TabControl.SizeChanged += new System.EventHandler(this.TabControl_SizeChanged); // - // disableDonationBalloonToolStripMenuItem + // TaskKBDSendInBackgroundCheckBox // - this.disableDonationBalloonToolStripMenuItem.CheckOnClick = true; - this.disableDonationBalloonToolStripMenuItem.Name = "disableDonationBalloonToolStripMenuItem"; - this.disableDonationBalloonToolStripMenuItem.Size = new System.Drawing.Size(264, 22); - this.disableDonationBalloonToolStripMenuItem.Text = "Disable Donation Balloon"; - this.disableDonationBalloonToolStripMenuItem.Click += new System.EventHandler(this.disableDonationBalloonToolStripMenuItem_Click); + this.TaskKBDSendInBackgroundCheckBox.AutoSize = true; + this.TaskKBDSendInBackgroundCheckBox.Location = new System.Drawing.Point(333, 30); + this.TaskKBDSendInBackgroundCheckBox.Name = "TaskKBDSendInBackgroundCheckBox"; + this.TaskKBDSendInBackgroundCheckBox.Size = new System.Drawing.Size(157, 21); + this.TaskKBDSendInBackgroundCheckBox.TabIndex = 7; + this.TaskKBDSendInBackgroundCheckBox.Text = "Send in background"; + this.TaskKBDSendInBackgroundCheckBox.UseVisualStyleBackColor = true; + this.TaskKBDSendInBackgroundCheckBox.CheckedChanged += new System.EventHandler(this.TaskKBDSendInBackground_CheckedChanged); + // + // TaskKBDMinimizeAfterwardCheckBox + // + this.TaskKBDMinimizeAfterwardCheckBox.AutoSize = true; + this.TaskKBDMinimizeAfterwardCheckBox.Location = new System.Drawing.Point(170, 30); + this.TaskKBDMinimizeAfterwardCheckBox.Name = "TaskKBDMinimizeAfterwardCheckBox"; + this.TaskKBDMinimizeAfterwardCheckBox.Size = new System.Drawing.Size(153, 21); + this.TaskKBDMinimizeAfterwardCheckBox.TabIndex = 8; + this.TaskKBDMinimizeAfterwardCheckBox.Text = "Minimize/deactivate"; + this.TaskKBDMinimizeAfterwardCheckBox.UseVisualStyleBackColor = true; + this.TaskKBDMinimizeAfterwardCheckBox.CheckedChanged += new System.EventHandler(this.TaskKBDMinimizeAfterwardCheckBox_CheckedChanged); // // Primary // @@ -1476,6 +1501,8 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem visitTheOfficialWebsiteToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripMenuItem disableDonationBalloonToolStripMenuItem; + private System.Windows.Forms.CheckBox TaskKBDSendInBackgroundCheckBox; + private System.Windows.Forms.CheckBox TaskKBDMinimizeAfterwardCheckBox; } } diff --git a/T7EPreferences/Primary.cs b/T7EPreferences/Primary.cs index e654bb2..225bd51 100644 --- a/T7EPreferences/Primary.cs +++ b/T7EPreferences/Primary.cs @@ -154,6 +154,10 @@ public Primary() //but that's because the operation sets our appid to something different. Common.ReadTemplates(); + bool donateBalloonShown = false; + bool.TryParse(Common.ReadPref("DonateBalloonShown"), out donateBalloonShown); + if (!donateBalloonShown) disableDonationBalloonToolStripMenuItem.Visible = false; + TaskKBDKeyboardTextBox.SetParent(this); ReadAppList(); @@ -803,6 +807,8 @@ public void ReadJumpList(string jumplistPath) jumplistItem.TaskAction = T7EJumplistItem.ActionType.Keyboard; bool.TryParse(reader["ignoreAbsent"], out jumplistItem.TaskKBDIgnoreAbsent); bool.TryParse(reader["ignoreCurrent"], out jumplistItem.TaskKBDIgnoreCurrent); + bool.TryParse(reader["sendBackground"], out jumplistItem.TaskKBDSendInBackground); + bool.TryParse(reader["minimizeAfterward"], out jumplistItem.TaskKBDMinimizeAfterward); bool.TryParse(reader["newWindow"], out jumplistItem.TaskKBDNew); bool.TryParse(reader["isShortcut"], out jumplistItem.TaskKBDShortcutMode); reader.Read(); // Read to text node @@ -959,6 +965,8 @@ private void OpenCurrentJumplistItem() // Fires off display of task panel TaskKBDIgnoreAbsentCheckBox.Checked = _CurrentJumplistItem.TaskKBDIgnoreAbsent; TaskKBDIgnoreCurrentCheckBox.Checked = _CurrentJumplistItem.TaskKBDIgnoreCurrent; + TaskKBDSendInBackgroundCheckBox.Checked = _CurrentJumplistItem.TaskKBDSendInBackground; + TaskKBDMinimizeAfterwardCheckBox.Checked = _CurrentJumplistItem.TaskKBDMinimizeAfterward; TaskKBDNewCheckBox.Checked = _CurrentJumplistItem.TaskKBDNew; if (_CurrentJumplistItem.TaskKBDShortcutMode) TaskKBDSwitchToShortcutMode(); @@ -1870,6 +1878,7 @@ private void TaskCMDShowWindowCheckbox_CheckedChanged(object sender, EventArgs e private void FileTextBox_Leave(object sender, EventArgs e) { + // if FileTextBox.Text is an EXE, ??? CurrentJumplistItem.FilePath = FileTextBox.Text; } @@ -2835,10 +2844,7 @@ private void TaskKBDIgnoreAbsentCheckBox_CheckedChanged(object sender, EventArgs private void donateToolStripMenuItem_Click(object sender, EventArgs e) { - ShowDonateDialog(true); - //Process.Start("explorer.exe", "\""+Common.WebPath_DonateSite+"\""); - //this.WindowState = FormWindowState.Minimized; - //ShowDonateDialog(true); + ShowDonateDialog(true); } private void TaskKBDSwitchAHKButton_Click(object sender, EventArgs e) @@ -2898,5 +2904,15 @@ private void disableDonationBalloonToolStripMenuItem_Click(object sender, EventA { ShowDonateDialog(true); } + + private void TaskKBDSendInBackground_CheckedChanged(object sender, EventArgs e) + { + _CurrentJumplistItem.TaskKBDSendInBackground = TaskKBDSendInBackgroundCheckBox.Checked; + } + + private void TaskKBDMinimizeAfterwardCheckBox_CheckedChanged(object sender, EventArgs e) + { + _CurrentJumplistItem.TaskKBDMinimizeAfterward = TaskKBDMinimizeAfterwardCheckBox.Checked; + } } } diff --git a/T7EPreferences/Program.cs b/T7EPreferences/Program.cs index fee5119..2f57e33 100644 --- a/T7EPreferences/Program.cs +++ b/T7EPreferences/Program.cs @@ -28,6 +28,9 @@ static void Main() // Check time-lock Common.CheckTimeLock(); + // Check registration codes + Common.CheckRegistrationCodes(); + // Run T7EBackground, if not running. And not installed. if (Process.GetProcessesByName("T7EBackground").Length <= 0) { diff --git a/T7EPreferences/Properties/AssemblyInfo.cs b/T7EPreferences/Properties/AssemblyInfo.cs index 22945f9..e0da085 100644 --- a/T7EPreferences/Properties/AssemblyInfo.cs +++ b/T7EPreferences/Properties/AssemblyInfo.cs @@ -7,7 +7,7 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Jumplist Extender")] -[assembly: AssemblyDescription("Configures custom jumplists for any program on Windows 7.")] +[assembly: AssemblyDescription("Configures custom jump lists for any program on Windows 7.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Marco Zafra")] [assembly: AssemblyProduct("Jumplist Extender")] @@ -33,5 +33,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.*")] +[assembly: AssemblyVersion("0.4.*")] //[assembly: AssemblyFileVersion("0.5.*")] diff --git a/T7EPreferences/StartForm.Designer.cs b/T7EPreferences/StartForm.Designer.cs index e5895d8..d520e67 100644 --- a/T7EPreferences/StartForm.Designer.cs +++ b/T7EPreferences/StartForm.Designer.cs @@ -202,13 +202,13 @@ private void InitializeComponent() this.StartOpenButton.BackColor = System.Drawing.Color.Transparent; this.StartOpenButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.StartOpenButton.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.StartOpenButton.HelpText = "Open from a list of previously modified programs."; + this.StartOpenButton.HelpText = "Open, toggle, or delete a previous jump list."; this.StartOpenButton.Location = new System.Drawing.Point(11, 122); this.StartOpenButton.Margin = new System.Windows.Forms.Padding(2); this.StartOpenButton.Name = "StartOpenButton"; this.StartOpenButton.Size = new System.Drawing.Size(388, 75); this.StartOpenButton.TabIndex = 1; - this.StartOpenButton.Text = "&Open a previously saved jumplist"; + this.StartOpenButton.Text = "&Edit a previously saved jump list"; this.StartOpenButton.UseVisualStyleBackColor = false; this.StartOpenButton.Click += new System.EventHandler(this.StartOpenButton_Click); // @@ -219,13 +219,13 @@ private void InitializeComponent() this.StartNewButton.BackColor = System.Drawing.Color.Transparent; this.StartNewButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.StartNewButton.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.StartNewButton.HelpText = "Start from a program shortcut or EXE file"; + this.StartNewButton.HelpText = "Start from a program shortcut or executable file"; this.StartNewButton.Location = new System.Drawing.Point(11, 42); this.StartNewButton.Margin = new System.Windows.Forms.Padding(2); this.StartNewButton.Name = "StartNewButton"; this.StartNewButton.Size = new System.Drawing.Size(388, 75); this.StartNewButton.TabIndex = 0; - this.StartNewButton.Text = "Start a &new jumplist"; + this.StartNewButton.Text = "Start a &new jump list"; this.StartNewButton.UseVisualStyleBackColor = false; this.StartNewButton.Click += new System.EventHandler(this.StartNewButton_Click); // diff --git a/T7EPreferences/StartForm.cs b/T7EPreferences/StartForm.cs index 9b7054a..215073c 100644 --- a/T7EPreferences/StartForm.cs +++ b/T7EPreferences/StartForm.cs @@ -162,14 +162,14 @@ private void StartForm_Shown(object sender, EventArgs e) bool.TryParse(Common.ReadPref("InstallUpgrade"), out installUpgrade); if ((DateTime.Today - installDate).Days >= 3 || installUpgrade == true) { - //bool donateDialogDisable = false; - //bool.TryParse(Common.ReadPref("DonateDialogDisable"), out donateDialogDisable); - //if (!donateDialogDisable) - //{ - Donate donationWindow = new Donate(true); - donationWindow.Show(); - //} - + // if disabledialog, then show will hide + bool donateDialogDisable = false; + bool.TryParse(Common.ReadPref("DonateDialogDisable"), out donateDialogDisable); + if (!donateDialogDisable) + { + Donate donationWindow = new Donate(false); + donationWindow.Show(); + } } }