mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
Updated the Dapplo.Jira dependency, as this finally was usable without getting a huge list of dependencies with it.
This commit is contained in:
parent
ea0174c9c3
commit
bc2e991a2d
4 changed files with 37 additions and 37 deletions
|
@ -1,20 +1,20 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@ -57,12 +57,12 @@ namespace Greenshot {
|
|||
|
||||
private Surface _surface;
|
||||
private GreenshotToolStripButton[] _toolbarButtons;
|
||||
|
||||
|
||||
private static readonly string[] SupportedClipboardFormats = {typeof(string).FullName, "Text", typeof(IDrawableContainerList).FullName};
|
||||
|
||||
private bool _originalBoldCheckState;
|
||||
private bool _originalItalicCheckState;
|
||||
|
||||
|
||||
// whether part of the editor controls are disabled depending on selected item(s)
|
||||
private bool _controlsDisabledDueToConfirmable;
|
||||
|
||||
|
@ -216,7 +216,7 @@ namespace Greenshot {
|
|||
panel1.Height = 10;
|
||||
|
||||
fontFamilyComboBox.PropertyChanged += FontPropertyChanged;
|
||||
|
||||
|
||||
obfuscateModeButton.DropDownItemClicked += FilterPresetDropDownItemClicked;
|
||||
highlightModeButton.DropDownItemClicked += FilterPresetDropDownItemClicked;
|
||||
|
||||
|
@ -224,7 +224,7 @@ namespace Greenshot {
|
|||
//toolbarDropDownButtons = new ToolStripDropDownButton[]{btnBlur, btnPixeliate, btnTextHighlighter, btnAreaHighlighter, btnMagnifier};
|
||||
|
||||
pluginToolStripMenuItem.Visible = pluginToolStripMenuItem.DropDownItems.Count > 0;
|
||||
|
||||
|
||||
// Workaround: for the MouseWheel event which doesn't get to the panel
|
||||
MouseWheel += PanelMouseWheel;
|
||||
|
||||
|
@ -264,7 +264,7 @@ namespace Greenshot {
|
|||
/// </summary>
|
||||
private void AddDestinations() {
|
||||
Invoke((MethodInvoker)delegate {
|
||||
// Create export buttons
|
||||
// Create export buttons
|
||||
foreach(IDestination destination in DestinationHelper.GetAllDestinations()) {
|
||||
if (destination.Priority <= 2) {
|
||||
continue;
|
||||
|
@ -304,12 +304,12 @@ namespace Greenshot {
|
|||
defaultItem.Click += delegate {
|
||||
toolstripDestination.ExportCapture(true, _surface, _surface.CaptureDetails);
|
||||
};
|
||||
|
||||
|
||||
// The ButtonClick, this is for the icon, gets the current default item
|
||||
destinationButton.ButtonClick += delegate {
|
||||
toolstripDestination.ExportCapture(true, _surface, _surface.CaptureDetails);
|
||||
};
|
||||
|
||||
|
||||
// Generate the entries for the drop down
|
||||
destinationButton.DropDownOpening += delegate
|
||||
{
|
||||
|
@ -336,7 +336,7 @@ namespace Greenshot {
|
|||
};
|
||||
|
||||
destinationsToolStrip.Items.Insert(destinationsToolStrip.Items.IndexOf(toolStripSeparator16), destinationButton);
|
||||
|
||||
|
||||
} else {
|
||||
ToolStripButton destinationButton = new ToolStripButton();
|
||||
destinationsToolStrip.Items.Insert(destinationsToolStrip.Items.IndexOf(toolStripSeparator16), destinationButton);
|
||||
|
@ -349,7 +349,7 @@ namespace Greenshot {
|
|||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// According to some information I found, the clear doesn't work correctly when the shortcutkeys are set?
|
||||
/// This helper method takes care of this.
|
||||
|
@ -375,7 +375,7 @@ namespace Greenshot {
|
|||
if (!destination.IsActive) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
ToolStripMenuItem item = destination.GetMenuItem(true, null, DestinationToolStripMenuItemClick);
|
||||
if (item != null) {
|
||||
item.ShortcutKeys = destination.EditorShortcutKeys;
|
||||
|
@ -503,11 +503,11 @@ namespace Greenshot {
|
|||
/**
|
||||
* Interfaces for plugins, see GreenshotInterface for more details!
|
||||
*/
|
||||
|
||||
|
||||
public Image GetImageForExport() {
|
||||
return _surface.GetImageForExport();
|
||||
}
|
||||
|
||||
|
||||
public ICaptureDetails CaptureDetails => _surface.CaptureDetails;
|
||||
|
||||
public ToolStripMenuItem GetPluginMenuItem() {
|
||||
|
@ -605,7 +605,7 @@ namespace Greenshot {
|
|||
UncheckAllToolButtons();
|
||||
btn.Checked = true;
|
||||
}
|
||||
|
||||
|
||||
private void UncheckAllToolButtons() {
|
||||
if (_toolbarButtons != null) {
|
||||
foreach (GreenshotToolStripButton butt in _toolbarButtons) {
|
||||
|
@ -776,7 +776,7 @@ namespace Greenshot {
|
|||
// persist our geometry string.
|
||||
EditorConfiguration.SetEditorPlacement(new WindowDetails(Handle).WindowPlacement);
|
||||
IniConfig.Save();
|
||||
|
||||
|
||||
// remove from the editor list
|
||||
EditorList.Remove(this);
|
||||
|
||||
|
@ -958,7 +958,7 @@ namespace Greenshot {
|
|||
// check dependencies for the Surface
|
||||
bool hasItems = _surface.HasSelectedElements;
|
||||
bool actionAllowedForSelection = hasItems && !_controlsDisabledDueToConfirmable;
|
||||
|
||||
|
||||
// buttons
|
||||
btnCut.Enabled = actionAllowedForSelection;
|
||||
btnCopy.Enabled = actionAllowedForSelection;
|
||||
|
@ -1051,13 +1051,13 @@ namespace Greenshot {
|
|||
}
|
||||
propertiesToolStrip.ResumeLayout();
|
||||
}
|
||||
|
||||
|
||||
private void HideToolstripItems() {
|
||||
foreach(ToolStripItem toolStripItem in propertiesToolStrip.Items) {
|
||||
toolStripItem.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// refreshes all editor controls depending on selected elements and their fields
|
||||
/// </summary>
|
||||
|
@ -1095,11 +1095,11 @@ namespace Greenshot {
|
|||
ToolStripItemEndisabler.Enable(toolsToolStrip);
|
||||
_controlsDisabledDueToConfirmable = false;
|
||||
}
|
||||
|
||||
|
||||
// en/disable controls depending on whether an element is selected at all
|
||||
UpdateClipboardSurfaceDependencies();
|
||||
UpdateUndoRedoSurfaceDependencies();
|
||||
|
||||
|
||||
// en/disablearrage controls depending on hierarchy of selected elements
|
||||
bool actionAllowedForSelection = _surface.HasSelectedElements && !_controlsDisabledDueToConfirmable;
|
||||
bool push = actionAllowedForSelection && _surface.CanPushSelectionDown();
|
||||
|
@ -1111,7 +1111,7 @@ namespace Greenshot {
|
|||
downToBottomToolStripMenuItem.Enabled = push;
|
||||
downOneLevelToolStripMenuItem.Enabled = push;
|
||||
}
|
||||
|
||||
|
||||
// finally show/hide field controls depending on the fields of selected elements
|
||||
RefreshFieldControls();
|
||||
}
|
||||
|
@ -1136,9 +1136,9 @@ namespace Greenshot {
|
|||
{
|
||||
fontItalicButton.Checked = _originalItalicCheckState;
|
||||
}
|
||||
|
||||
|
||||
var fontFamily = fontFamilyComboBox.FontFamily;
|
||||
|
||||
|
||||
bool boldAvailable = fontFamily.IsStyleAvailable(FontStyle.Bold);
|
||||
if (fontBoldButton != null)
|
||||
{
|
||||
|
@ -1251,7 +1251,7 @@ namespace Greenshot {
|
|||
_surface.Modified = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void FilterPresetDropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) {
|
||||
RefreshFieldControls();
|
||||
Invalidate(true);
|
||||
|
@ -1275,7 +1275,7 @@ namespace Greenshot {
|
|||
private void Insert_window_toolstripmenuitemMouseEnter(object sender, EventArgs e) {
|
||||
ToolStripMenuItem captureWindowMenuItem = (ToolStripMenuItem)sender;
|
||||
var mainForm = SimpleServiceProvider.Current.GetInstance<MainForm>();
|
||||
mainForm.AddCaptureWindowMenuItems(captureWindowMenuItem, Contextmenu_window_Click);
|
||||
mainForm.AddCaptureWindowMenuItems(captureWindowMenuItem, Contextmenu_window_Click);
|
||||
}
|
||||
|
||||
private void Contextmenu_window_Click(object sender, EventArgs e) {
|
||||
|
@ -1366,7 +1366,7 @@ namespace Greenshot {
|
|||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (apply)
|
||||
{
|
||||
_surface.ApplyBitmapEffect(dropShadowEffect);
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
|
||||
*
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@ -33,7 +33,7 @@ namespace GreenshotFlickrPlugin {
|
|||
/// <summary>
|
||||
/// Description of FlickrUtils.
|
||||
/// </summary>
|
||||
public class FlickrUtils {
|
||||
public static class FlickrUtils {
|
||||
private static readonly ILog LOG = LogManager.GetLogger(typeof(FlickrUtils));
|
||||
private static readonly FlickrConfiguration config = IniConfig.GetIniSection<FlickrConfiguration>();
|
||||
private const string FLICKR_API_BASE_URL = "https://api.flickr.com/services/";
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GreenshotPlugin\GreenshotPlugin.csproj" />
|
||||
<PackageReference Include="Dapplo.Jira" version="0.6.50" />
|
||||
<PackageReference Include="Dapplo.Jira" version="0.9.19" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -38,7 +38,7 @@ namespace GreenshotJiraPlugin {
|
|||
/// <summary>
|
||||
/// This encapsulates the JiraClient to make it possible to change as less old Greenshot code as needed
|
||||
/// </summary>
|
||||
public class JiraConnector : IDisposable {
|
||||
public sealed class JiraConnector : IDisposable {
|
||||
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(JiraConnector));
|
||||
private static readonly JiraConfiguration JiraConfig = IniConfig.GetIniSection<JiraConfiguration>();
|
||||
private static readonly CoreConfiguration CoreConfig = IniConfig.GetIniSection<CoreConfiguration>();
|
||||
|
@ -256,7 +256,7 @@ namespace GreenshotJiraPlugin {
|
|||
public async Task<IList<Issue>> SearchAsync(Filter filter, CancellationToken cancellationToken = default)
|
||||
{
|
||||
await CheckCredentialsAsync(cancellationToken);
|
||||
var searchResult = await _jiraClient.Issue.SearchAsync(filter.Jql, 20, new[] { "summary", "reporter", "assignee", "created", "issuetype" }, cancellationToken).ConfigureAwait(false);
|
||||
var searchResult = await _jiraClient.Issue.SearchAsync(filter.Jql, null, new[] { "summary", "reporter", "assignee", "created", "issuetype" }, null, cancellationToken).ConfigureAwait(false);
|
||||
return searchResult.Issues;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue