mirror of
https://github.com/greenshot/greenshot
synced 2025-07-15 01:23:47 -07:00
Changes for feature request #3547158, although the feature was already there it wasn't clear.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1977 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
7fa34e04e9
commit
d51f4fbcc1
2 changed files with 52 additions and 43 deletions
1
Greenshot/Forms/SettingsForm.Designer.cs
generated
1
Greenshot/Forms/SettingsForm.Designer.cs
generated
|
@ -171,6 +171,7 @@ namespace Greenshot {
|
||||||
this.textbox_storagelocation.Name = "textbox_storagelocation";
|
this.textbox_storagelocation.Name = "textbox_storagelocation";
|
||||||
this.textbox_storagelocation.Size = new System.Drawing.Size(233, 20);
|
this.textbox_storagelocation.Size = new System.Drawing.Size(233, 20);
|
||||||
this.textbox_storagelocation.TabIndex = 12;
|
this.textbox_storagelocation.TabIndex = 12;
|
||||||
|
this.textbox_storagelocation.TextChanged += new System.EventHandler(StorageLocationChanged);
|
||||||
//
|
//
|
||||||
// label_storagelocation
|
// label_storagelocation
|
||||||
//
|
//
|
||||||
|
|
|
@ -55,7 +55,6 @@ namespace Greenshot {
|
||||||
|
|
||||||
protected override void OnLoad(EventArgs e) {
|
protected override void OnLoad(EventArgs e) {
|
||||||
base.OnLoad(e);
|
base.OnLoad(e);
|
||||||
|
|
||||||
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
|
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
|
||||||
|
|
||||||
// Fix for Vista/XP differences
|
// Fix for Vista/XP differences
|
||||||
|
@ -65,50 +64,51 @@ namespace Greenshot {
|
||||||
this.trackBarJpegQuality.BackColor = System.Drawing.SystemColors.Control;
|
this.trackBarJpegQuality.BackColor = System.Drawing.SystemColors.Control;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This makes it possible to still capture the settings screen
|
// This makes it possible to still capture the settings screen
|
||||||
this.fullscreen_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
this.fullscreen_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
||||||
this.fullscreen_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
this.fullscreen_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
||||||
this.window_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
this.window_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
||||||
this.window_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
this.window_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
||||||
this.region_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
this.region_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
||||||
this.region_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
this.region_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
||||||
this.ie_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
this.ie_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
||||||
this.ie_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
this.ie_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
||||||
this.lastregion_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
this.lastregion_hotkeyControl.Enter += delegate { EnterHotkeyControl(); };
|
||||||
this.lastregion_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
this.lastregion_hotkeyControl.Leave += delegate { LeaveHotkeyControl(); };
|
||||||
|
|
||||||
DisplayPluginTab();
|
DisplayPluginTab();
|
||||||
UpdateUI();
|
UpdateUI();
|
||||||
ExpertSettingsEnableState(false);
|
ExpertSettingsEnableState(false);
|
||||||
DisplaySettings();
|
DisplaySettings();
|
||||||
CheckSettings();
|
CheckSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnterHotkeyControl() {
|
private void EnterHotkeyControl() {
|
||||||
GreenshotPlugin.Controls.HotkeyControl.UnregisterHotkeys();
|
GreenshotPlugin.Controls.HotkeyControl.UnregisterHotkeys();
|
||||||
inHotkey = true;
|
inHotkey = true;
|
||||||
}
|
}
|
||||||
private void LeaveHotkeyControl() {
|
|
||||||
MainForm.RegisterHotkeys();
|
|
||||||
inHotkey = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
|
private void LeaveHotkeyControl() {
|
||||||
switch (keyData) {
|
MainForm.RegisterHotkeys();
|
||||||
case Keys.Escape:
|
inHotkey = false;
|
||||||
if (!inHotkey) {
|
}
|
||||||
DialogResult = DialogResult.Cancel;
|
|
||||||
} else {
|
|
||||||
return base.ProcessCmdKey(ref msg, keyData);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return base.ProcessCmdKey(ref msg, keyData);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
|
||||||
|
switch (keyData) {
|
||||||
|
case Keys.Escape:
|
||||||
|
if (!inHotkey) {
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
} else {
|
||||||
|
return base.ProcessCmdKey(ref msg, keyData);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return base.ProcessCmdKey(ref msg, keyData);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
/// This is a method to popululate the ComboBox
|
/// This is a method to popululate the ComboBox
|
||||||
/// with the items from the enumeration
|
/// with the items from the enumeration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -203,9 +203,9 @@ namespace Greenshot {
|
||||||
/// Update the UI to reflect the language and other text settings
|
/// Update the UI to reflect the language and other text settings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void UpdateUI() {
|
private void UpdateUI() {
|
||||||
if (coreConfiguration.HideExpertSettings) {
|
if (coreConfiguration.HideExpertSettings) {
|
||||||
tabcontrol.Controls.Remove(tab_expert);
|
tabcontrol.Controls.Remove(tab_expert);
|
||||||
}
|
}
|
||||||
toolTip.SetToolTip(label_language, Language.GetString(LangKey.settings_tooltip_language));
|
toolTip.SetToolTip(label_language, Language.GetString(LangKey.settings_tooltip_language));
|
||||||
toolTip.SetToolTip(label_storagelocation, Language.GetString(LangKey.settings_tooltip_storagelocation));
|
toolTip.SetToolTip(label_storagelocation, Language.GetString(LangKey.settings_tooltip_storagelocation));
|
||||||
toolTip.SetToolTip(label_screenshotname, Language.GetString(LangKey.settings_tooltip_filenamepattern));
|
toolTip.SetToolTip(label_screenshotname, Language.GetString(LangKey.settings_tooltip_filenamepattern));
|
||||||
|
@ -236,11 +236,20 @@ namespace Greenshot {
|
||||||
textbox_storagelocation.BackColor = Color.Red;
|
textbox_storagelocation.BackColor = Color.Red;
|
||||||
settingsOk = false;
|
settingsOk = false;
|
||||||
} else {
|
} else {
|
||||||
textbox_storagelocation.BackColor = Control.DefaultBackColor;
|
// "Added" feature #3547158
|
||||||
|
if (Environment.OSVersion.Version.Major >= 6) {
|
||||||
|
this.textbox_storagelocation.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
} else {
|
||||||
|
this.textbox_storagelocation.BackColor = System.Drawing.SystemColors.Control;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return settingsOk;
|
return settingsOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void StorageLocationChanged(object sender, System.EventArgs e) {
|
||||||
|
CheckSettings();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show all destination descriptions in the current language
|
/// Show all destination descriptions in the current language
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -429,7 +438,6 @@ namespace Greenshot {
|
||||||
this.textbox_storagelocation.Text = this.folderBrowserDialog1.SelectedPath;
|
this.textbox_storagelocation.Text = this.folderBrowserDialog1.SelectedPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CheckSettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackBarJpegQualityScroll(object sender, System.EventArgs e) {
|
void TrackBarJpegQualityScroll(object sender, System.EventArgs e) {
|
||||||
|
@ -552,7 +560,7 @@ namespace Greenshot {
|
||||||
ExpertSettingsEnableState(checkBox.Checked);
|
ExpertSettingsEnableState(checkBox.Checked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ListviewWithDestinationComparer : System.Collections.IComparer {
|
public class ListviewWithDestinationComparer : System.Collections.IComparer {
|
||||||
public int Compare(object x, object y) {
|
public int Compare(object x, object y) {
|
||||||
if (!(x is ListViewItem)) {
|
if (!(x is ListViewItem)) {
|
||||||
|
@ -561,7 +569,7 @@ namespace Greenshot {
|
||||||
if (!(y is ListViewItem)) {
|
if (!(y is ListViewItem)) {
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ListViewItem l1 = (ListViewItem)x;
|
ListViewItem l1 = (ListViewItem)x;
|
||||||
ListViewItem l2 = (ListViewItem)y;
|
ListViewItem l2 = (ListViewItem)y;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue