Fixed some clipboard issues, with these fixes more formats are supported and this makes Greenshot better usable.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2407 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-01-05 22:45:47 +00:00
commit 5a93c10c79
2 changed files with 59 additions and 47 deletions

View file

@ -56,7 +56,7 @@ namespace Greenshot {
private Surface surface;
private GreenshotPlugin.Controls.GreenshotToolStripButton[] toolbarButtons;
private static string[] SUPPORTED_CLIPBOARD_FORMATS = {typeof(string).FullName, "Text", "DeviceIndependentBitmap", "Bitmap", typeof(DrawableContainerList).FullName};
private static string[] SUPPORTED_CLIPBOARD_FORMATS = {typeof(string).FullName, "Text", typeof(DrawableContainerList).FullName};
private bool originalBoldCheckState = false;
private bool originalItalicCheckState = false;
@ -891,7 +891,7 @@ namespace Greenshot {
this.duplicateToolStripMenuItem.Enabled = actionAllowedForSelection;
// check dependencies for the Clipboard
bool hasClipboard = ClipboardHelper.ContainsFormat(SUPPORTED_CLIPBOARD_FORMATS);
bool hasClipboard = ClipboardHelper.ContainsFormat(SUPPORTED_CLIPBOARD_FORMATS) || ClipboardHelper.ContainsImage();
this.btnPaste.Enabled = hasClipboard && !controlsDisabledDueToConfirmable;
this.pasteToolStripMenuItem.Enabled = hasClipboard && !controlsDisabledDueToConfirmable;
}