From 8198c69d68b9f12149fc7d462cd86c6491aa7902 Mon Sep 17 00:00:00 2001 From: RKrom Date: Thu, 2 Feb 2012 08:57:37 +0000 Subject: [PATCH] Fixed DestinationPicker "issue", the context menu was still shown if the e.g. Jira upload window was shown. Also fixed an issue with the jira upload window that the last used jira was displayed but the upload button was disabled. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1619 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Destinations/PickerDestination.cs | 4 ++-- GreenshotJiraPlugin/Forms/JiraForm.cs | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Greenshot/Destinations/PickerDestination.cs b/Greenshot/Destinations/PickerDestination.cs index 4c699c37f..75631b219 100644 --- a/Greenshot/Destinations/PickerDestination.cs +++ b/Greenshot/Destinations/PickerDestination.cs @@ -92,6 +92,8 @@ namespace Greenshot.Destinations { if (clickedDestination == null) { return; } + // Make sure the menu is closed + menu.Close(); bool result = clickedDestination.ExportCapture(surface, captureDetails); // TODO: Find some better way to detect that we exported to the editor if (!EditorDestination.DESIGNATION.Equals(clickedDestination.Designation) || result == false) { @@ -99,8 +101,6 @@ namespace Greenshot.Destinations { // Cleanup surface surface.Dispose(); } - // Make sure the menu is closed - menu.Close(); } ); if (item != null) { diff --git a/GreenshotJiraPlugin/Forms/JiraForm.cs b/GreenshotJiraPlugin/Forms/JiraForm.cs index 86f9d7cba..cb8545c21 100644 --- a/GreenshotJiraPlugin/Forms/JiraForm.cs +++ b/GreenshotJiraPlugin/Forms/JiraForm.cs @@ -53,9 +53,8 @@ namespace GreenshotJiraPlugin { } catch (Exception e) { MessageBox.Show(language.GetFormattedString(LangKey.login_error, e.Message)); } - updateForm(); - uploadButton.Enabled = false; + updateForm(); } private void initializeComponentText() { @@ -74,7 +73,11 @@ namespace GreenshotJiraPlugin { jiraFilterBox.SelectedIndex = 0; } changeModus(true); - jiraKey.Text = config.LastUsedJira; + selectedIssue = jiraConnector.getIssue(config.LastUsedJira); + if (selectedIssue != null) { + jiraKey.Text = config.LastUsedJira; + uploadButton.Enabled = true; + } } } @@ -199,7 +202,7 @@ namespace GreenshotJiraPlugin { // Perform the sort with these new sort options. this.jiraListView.Sort(); } - + void JiraKeyTextChanged(object sender, EventArgs e) { string jiranumber = jiraKey.Text; uploadButton.Enabled = false;