mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Changed destinations to have the picker as a separate check box.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1729 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
9a6bc91c00
commit
55f3f3b342
4 changed files with 59 additions and 36 deletions
1
Greenshot/Forms/ImageEditorForm.Designer.cs
generated
1
Greenshot/Forms/ImageEditorForm.Designer.cs
generated
|
@ -1475,7 +1475,6 @@ namespace Greenshot {
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.ClientSize = new System.Drawing.Size(785, 485);
|
this.ClientSize = new System.Drawing.Size(785, 485);
|
||||||
this.Controls.Add(this.toolStripContainer1);
|
this.Controls.Add(this.toolStripContainer1);
|
||||||
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
|
|
||||||
this.KeyPreview = true;
|
this.KeyPreview = true;
|
||||||
this.Name = "ImageEditorForm";
|
this.Name = "ImageEditorForm";
|
||||||
this.Activated += new System.EventHandler(this.ImageEditorFormActivated);
|
this.Activated += new System.EventHandler(this.ImageEditorFormActivated);
|
||||||
|
|
|
@ -93,6 +93,8 @@ namespace Greenshot {
|
||||||
// The InitializeComponent() call is required for Windows Forms designer support.
|
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||||
//
|
//
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
|
||||||
|
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorForm));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorForm));
|
||||||
Image backgroundForTransparency = (Image)resources.GetObject("checkerboard.Image");
|
Image backgroundForTransparency = (Image)resources.GetObject("checkerboard.Image");
|
||||||
surface.TransparencyBackgroundBrush = new TextureBrush(backgroundForTransparency, WrapMode.Tile);
|
surface.TransparencyBackgroundBrush = new TextureBrush(backgroundForTransparency, WrapMode.Tile);
|
||||||
|
|
66
Greenshot/Forms/SettingsForm.Designer.cs
generated
66
Greenshot/Forms/SettingsForm.Designer.cs
generated
|
@ -104,6 +104,7 @@ namespace Greenshot {
|
||||||
this.numericUpDownWaitTime = new System.Windows.Forms.NumericUpDown();
|
this.numericUpDownWaitTime = new System.Windows.Forms.NumericUpDown();
|
||||||
this.label_waittime = new System.Windows.Forms.Label();
|
this.label_waittime = new System.Windows.Forms.Label();
|
||||||
this.tab_output = new System.Windows.Forms.TabPage();
|
this.tab_output = new System.Windows.Forms.TabPage();
|
||||||
|
this.tab_destinations = new System.Windows.Forms.TabPage();
|
||||||
this.tab_printer = new System.Windows.Forms.TabPage();
|
this.tab_printer = new System.Windows.Forms.TabPage();
|
||||||
this.groupbox_printoptions = new System.Windows.Forms.GroupBox();
|
this.groupbox_printoptions = new System.Windows.Forms.GroupBox();
|
||||||
this.checkboxPrintInverted = new System.Windows.Forms.CheckBox();
|
this.checkboxPrintInverted = new System.Windows.Forms.CheckBox();
|
||||||
|
@ -117,7 +118,7 @@ namespace Greenshot {
|
||||||
this.groupbox_plugins = new System.Windows.Forms.GroupBox();
|
this.groupbox_plugins = new System.Windows.Forms.GroupBox();
|
||||||
this.listview_plugins = new System.Windows.Forms.ListView();
|
this.listview_plugins = new System.Windows.Forms.ListView();
|
||||||
this.button_pluginconfigure = new System.Windows.Forms.Button();
|
this.button_pluginconfigure = new System.Windows.Forms.Button();
|
||||||
this.tab_destinations = new System.Windows.Forms.TabPage();
|
this.checkbox_picker = new System.Windows.Forms.CheckBox();
|
||||||
this.groupbox_preferredfilesettings.SuspendLayout();
|
this.groupbox_preferredfilesettings.SuspendLayout();
|
||||||
this.groupbox_applicationsettings.SuspendLayout();
|
this.groupbox_applicationsettings.SuspendLayout();
|
||||||
this.groupbox_jpegsettings.SuspendLayout();
|
this.groupbox_jpegsettings.SuspendLayout();
|
||||||
|
@ -135,6 +136,7 @@ namespace Greenshot {
|
||||||
this.groupbox_capture.SuspendLayout();
|
this.groupbox_capture.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWaitTime)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWaitTime)).BeginInit();
|
||||||
this.tab_output.SuspendLayout();
|
this.tab_output.SuspendLayout();
|
||||||
|
this.tab_destinations.SuspendLayout();
|
||||||
this.tab_printer.SuspendLayout();
|
this.tab_printer.SuspendLayout();
|
||||||
this.groupbox_printoptions.SuspendLayout();
|
this.groupbox_printoptions.SuspendLayout();
|
||||||
this.tab_plugins.SuspendLayout();
|
this.tab_plugins.SuspendLayout();
|
||||||
|
@ -346,6 +348,7 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// groupbox_destination
|
// groupbox_destination
|
||||||
//
|
//
|
||||||
|
this.groupbox_destination.Controls.Add(this.checkbox_picker);
|
||||||
this.groupbox_destination.Controls.Add(this.checkedDestinationsListBox);
|
this.groupbox_destination.Controls.Add(this.checkedDestinationsListBox);
|
||||||
this.groupbox_destination.Location = new System.Drawing.Point(2, 6);
|
this.groupbox_destination.Location = new System.Drawing.Point(2, 6);
|
||||||
this.groupbox_destination.Name = "groupbox_destination";
|
this.groupbox_destination.Name = "groupbox_destination";
|
||||||
|
@ -357,10 +360,10 @@ namespace Greenshot {
|
||||||
// checkedDestinationsListBox
|
// checkedDestinationsListBox
|
||||||
//
|
//
|
||||||
this.checkedDestinationsListBox.FormattingEnabled = true;
|
this.checkedDestinationsListBox.FormattingEnabled = true;
|
||||||
this.checkedDestinationsListBox.Location = new System.Drawing.Point(5, 20);
|
this.checkedDestinationsListBox.Location = new System.Drawing.Point(5, 50);
|
||||||
this.checkedDestinationsListBox.Name = "checkedDestinationsListBox";
|
this.checkedDestinationsListBox.Name = "checkedDestinationsListBox";
|
||||||
this.checkedDestinationsListBox.ScrollAlwaysVisible = true;
|
this.checkedDestinationsListBox.ScrollAlwaysVisible = true;
|
||||||
this.checkedDestinationsListBox.Size = new System.Drawing.Size(401, 284);
|
this.checkedDestinationsListBox.Size = new System.Drawing.Size(401, 244);
|
||||||
this.checkedDestinationsListBox.TabIndex = 0;
|
this.checkedDestinationsListBox.TabIndex = 0;
|
||||||
this.checkedDestinationsListBox.SelectedValueChanged += new System.EventHandler(this.DestinationsCheckStateChanged);
|
this.checkedDestinationsListBox.SelectedValueChanged += new System.EventHandler(this.DestinationsCheckStateChanged);
|
||||||
//
|
//
|
||||||
|
@ -674,16 +677,16 @@ namespace Greenshot {
|
||||||
// numericUpDownWaitTime
|
// numericUpDownWaitTime
|
||||||
//
|
//
|
||||||
this.numericUpDownWaitTime.Increment = new decimal(new int[] {
|
this.numericUpDownWaitTime.Increment = new decimal(new int[] {
|
||||||
100,
|
100,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.numericUpDownWaitTime.Location = new System.Drawing.Point(11, 69);
|
this.numericUpDownWaitTime.Location = new System.Drawing.Point(11, 69);
|
||||||
this.numericUpDownWaitTime.Maximum = new decimal(new int[] {
|
this.numericUpDownWaitTime.Maximum = new decimal(new int[] {
|
||||||
10000,
|
10000,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.numericUpDownWaitTime.Name = "numericUpDownWaitTime";
|
this.numericUpDownWaitTime.Name = "numericUpDownWaitTime";
|
||||||
this.numericUpDownWaitTime.Size = new System.Drawing.Size(57, 20);
|
this.numericUpDownWaitTime.Size = new System.Drawing.Size(57, 20);
|
||||||
this.numericUpDownWaitTime.TabIndex = 24;
|
this.numericUpDownWaitTime.TabIndex = 24;
|
||||||
|
@ -710,6 +713,16 @@ namespace Greenshot {
|
||||||
this.tab_output.Text = "Output";
|
this.tab_output.Text = "Output";
|
||||||
this.tab_output.UseVisualStyleBackColor = true;
|
this.tab_output.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// tab_destinations
|
||||||
|
//
|
||||||
|
this.tab_destinations.Controls.Add(this.groupbox_destination);
|
||||||
|
this.tab_destinations.Location = new System.Drawing.Point(4, 22);
|
||||||
|
this.tab_destinations.Name = "tab_destinations";
|
||||||
|
this.tab_destinations.Size = new System.Drawing.Size(423, 320);
|
||||||
|
this.tab_destinations.TabIndex = 4;
|
||||||
|
this.tab_destinations.Text = "Destinations";
|
||||||
|
this.tab_destinations.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// tab_printer
|
// tab_printer
|
||||||
//
|
//
|
||||||
this.tab_printer.Controls.Add(this.groupbox_printoptions);
|
this.tab_printer.Controls.Add(this.groupbox_printoptions);
|
||||||
|
@ -721,16 +734,6 @@ namespace Greenshot {
|
||||||
this.tab_printer.Text = "Printer";
|
this.tab_printer.Text = "Printer";
|
||||||
this.tab_printer.UseVisualStyleBackColor = true;
|
this.tab_printer.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// tab_destinations
|
|
||||||
//
|
|
||||||
this.tab_destinations.Location = new System.Drawing.Point(4, 22);
|
|
||||||
this.tab_destinations.Controls.Add(this.groupbox_destination);
|
|
||||||
this.tab_destinations.Name = "tab_destinations";
|
|
||||||
this.tab_destinations.Size = new System.Drawing.Size(423, 320);
|
|
||||||
this.tab_destinations.TabIndex = 4;
|
|
||||||
this.tab_destinations.Text = "Destinations";
|
|
||||||
this.tab_destinations.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// groupbox_printoptions
|
// groupbox_printoptions
|
||||||
//
|
//
|
||||||
this.groupbox_printoptions.Controls.Add(this.checkboxPrintInverted);
|
this.groupbox_printoptions.Controls.Add(this.checkboxPrintInverted);
|
||||||
|
@ -840,9 +843,9 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// groupbox_plugins
|
// groupbox_plugins
|
||||||
//
|
//
|
||||||
this.groupbox_plugins.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.groupbox_plugins.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.groupbox_plugins.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
this.groupbox_plugins.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||||
this.groupbox_plugins.Controls.Add(this.listview_plugins);
|
this.groupbox_plugins.Controls.Add(this.listview_plugins);
|
||||||
this.groupbox_plugins.Controls.Add(this.button_pluginconfigure);
|
this.groupbox_plugins.Controls.Add(this.button_pluginconfigure);
|
||||||
|
@ -879,6 +882,16 @@ namespace Greenshot {
|
||||||
this.button_pluginconfigure.UseVisualStyleBackColor = true;
|
this.button_pluginconfigure.UseVisualStyleBackColor = true;
|
||||||
this.button_pluginconfigure.Click += new System.EventHandler(this.Button_pluginconfigureClick);
|
this.button_pluginconfigure.Click += new System.EventHandler(this.Button_pluginconfigureClick);
|
||||||
//
|
//
|
||||||
|
// checkbox_picker
|
||||||
|
//
|
||||||
|
this.checkbox_picker.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.checkbox_picker.Name = "checkbox_picker";
|
||||||
|
this.checkbox_picker.Size = new System.Drawing.Size(394, 24);
|
||||||
|
this.checkbox_picker.TabIndex = 19;
|
||||||
|
this.checkbox_picker.Text = "Destination picker";
|
||||||
|
this.checkbox_picker.UseVisualStyleBackColor = true;
|
||||||
|
this.checkbox_picker.CheckStateChanged += new System.EventHandler(this.DestinationsCheckStateChanged);
|
||||||
|
//
|
||||||
// SettingsForm
|
// SettingsForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
|
@ -888,11 +901,9 @@ namespace Greenshot {
|
||||||
this.Controls.Add(this.settings_okay);
|
this.Controls.Add(this.settings_okay);
|
||||||
this.Controls.Add(this.settings_cancel);
|
this.Controls.Add(this.settings_cancel);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
|
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "SettingsForm";
|
this.Name = "SettingsForm";
|
||||||
this.Text = "SettingsForm";
|
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SettingsFormFormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SettingsFormFormClosing);
|
||||||
this.Shown += new System.EventHandler(this.SettingsFormShown);
|
this.Shown += new System.EventHandler(this.SettingsFormShown);
|
||||||
this.groupbox_preferredfilesettings.ResumeLayout(false);
|
this.groupbox_preferredfilesettings.ResumeLayout(false);
|
||||||
|
@ -916,14 +927,15 @@ namespace Greenshot {
|
||||||
this.groupbox_capture.ResumeLayout(false);
|
this.groupbox_capture.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWaitTime)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWaitTime)).EndInit();
|
||||||
this.tab_output.ResumeLayout(false);
|
this.tab_output.ResumeLayout(false);
|
||||||
|
this.tab_destinations.ResumeLayout(false);
|
||||||
this.tab_printer.ResumeLayout(false);
|
this.tab_printer.ResumeLayout(false);
|
||||||
this.groupbox_printoptions.ResumeLayout(false);
|
this.groupbox_printoptions.ResumeLayout(false);
|
||||||
this.tab_plugins.ResumeLayout(false);
|
this.tab_plugins.ResumeLayout(false);
|
||||||
this.groupbox_plugins.ResumeLayout(false);
|
this.groupbox_plugins.ResumeLayout(false);
|
||||||
this.groupbox_plugins.PerformLayout();
|
this.groupbox_plugins.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private System.Windows.Forms.CheckBox checkbox_picker;
|
||||||
private System.Windows.Forms.CheckedListBox checkedDestinationsListBox;
|
private System.Windows.Forms.CheckedListBox checkedDestinationsListBox;
|
||||||
private System.Windows.Forms.GroupBox groupbox_editor;
|
private System.Windows.Forms.GroupBox groupbox_editor;
|
||||||
private System.Windows.Forms.CheckBox checkbox_editor_match_capture_size;
|
private System.Windows.Forms.CheckBox checkbox_editor_match_capture_size;
|
||||||
|
|
|
@ -47,6 +47,9 @@ namespace Greenshot {
|
||||||
|
|
||||||
public SettingsForm() {
|
public SettingsForm() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
|
||||||
|
|
||||||
// Fix for Vista/XP differences
|
// Fix for Vista/XP differences
|
||||||
if(Environment.OSVersion.Version.Major >= 6) {
|
if(Environment.OSVersion.Version.Major >= 6) {
|
||||||
this.trackBarJpegQuality.BackColor = System.Drawing.SystemColors.Window;
|
this.trackBarJpegQuality.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
@ -275,9 +278,15 @@ namespace Greenshot {
|
||||||
checkbox_alwaysshowjpegqualitydialog.Checked = coreConfiguration.OutputFilePromptQuality;
|
checkbox_alwaysshowjpegqualitydialog.Checked = coreConfiguration.OutputFilePromptQuality;
|
||||||
checkbox_playsound.Checked = coreConfiguration.PlayCameraSound;
|
checkbox_playsound.Checked = coreConfiguration.PlayCameraSound;
|
||||||
|
|
||||||
|
checkbox_picker.Checked = false;
|
||||||
checkedDestinationsListBox.Items.Clear();
|
checkedDestinationsListBox.Items.Clear();
|
||||||
foreach(IDestination destination in DestinationHelper.GetAllDestinations()) {
|
foreach(IDestination destination in DestinationHelper.GetAllDestinations()) {
|
||||||
checkedDestinationsListBox.Items.Add(destination, coreConfiguration.OutputDestinations.Contains(destination.Designation));
|
if (PickerDestination.DESIGNATION.Equals(destination.Designation)) {
|
||||||
|
checkbox_picker.Checked = true;
|
||||||
|
checkbox_picker.Text = destination.Description;
|
||||||
|
} else {
|
||||||
|
checkedDestinationsListBox.Items.Add(destination, coreConfiguration.OutputDestinations.Contains(destination.Designation));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// checkbox_clipboard.Checked = coreConfiguration.OutputDestinations.Contains("Clipboard");
|
// checkbox_clipboard.Checked = coreConfiguration.OutputDestinations.Contains("Clipboard");
|
||||||
// checkbox_file.Checked = coreConfiguration.OutputDestinations.Contains("File");
|
// checkbox_file.Checked = coreConfiguration.OutputDestinations.Contains("File");
|
||||||
|
@ -340,6 +349,9 @@ namespace Greenshot {
|
||||||
coreConfiguration.PlayCameraSound = checkbox_playsound.Checked;
|
coreConfiguration.PlayCameraSound = checkbox_playsound.Checked;
|
||||||
|
|
||||||
List<string> destinations = new List<string>();
|
List<string> destinations = new List<string>();
|
||||||
|
if (checkbox_picker.Checked) {
|
||||||
|
destinations.Add(PickerDestination.DESIGNATION);
|
||||||
|
}
|
||||||
foreach(int index in checkedDestinationsListBox.CheckedIndices) {
|
foreach(int index in checkedDestinationsListBox.CheckedIndices) {
|
||||||
IDestination destination = (IDestination)checkedDestinationsListBox.Items[index];
|
IDestination destination = (IDestination)checkedDestinationsListBox.Items[index];
|
||||||
if (checkedDestinationsListBox.GetItemCheckState(index) == CheckState.Checked) {
|
if (checkedDestinationsListBox.GetItemCheckState(index) == CheckState.Checked) {
|
||||||
|
@ -486,21 +498,19 @@ namespace Greenshot {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void CheckDestinationSettings() {
|
void CheckDestinationSettings() {
|
||||||
bool clipboardDestinationChecked = false;
|
bool clipboardDestinationChecked = false;
|
||||||
bool pickerSelected = false;
|
bool pickerSelected = checkbox_picker.Checked;
|
||||||
|
|
||||||
foreach(IDestination destination in checkedDestinationsListBox.CheckedItems) {
|
foreach(IDestination destination in checkedDestinationsListBox.CheckedItems) {
|
||||||
if (destination.Designation.Equals(ClipboardDestination.DESIGNATION)) {
|
if (destination.Designation.Equals(ClipboardDestination.DESIGNATION)) {
|
||||||
clipboardDestinationChecked = true;
|
clipboardDestinationChecked = true;
|
||||||
}
|
break;
|
||||||
if (destination.Designation.Equals(PickerDestination.DESIGNATION)) {
|
|
||||||
pickerSelected = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pickerSelected) {
|
if (pickerSelected) {
|
||||||
foreach(int index in checkedDestinationsListBox.CheckedIndices) {
|
foreach(int index in checkedDestinationsListBox.CheckedIndices) {
|
||||||
IDestination destination = (IDestination)checkedDestinationsListBox.Items[index];
|
IDestination destination = (IDestination)checkedDestinationsListBox.Items[index];
|
||||||
if (!destination.Designation.Equals(PickerDestination.DESIGNATION)) {
|
checkedDestinationsListBox.SetItemCheckState(index, CheckState.Indeterminate);
|
||||||
checkedDestinationsListBox.SetItemCheckState(index, CheckState.Indeterminate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach(int index in checkedDestinationsListBox.CheckedIndices) {
|
foreach(int index in checkedDestinationsListBox.CheckedIndices) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue