Added a small change for the confluence plugin build, debug-info was included in the release. Also added a ExtendedWebBrowser, which suppresses Script-error messages when using the WebBrowser. (For this a the IOleCommandTarget was introduced). Had to update the readme.txt to make the version consistent.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2176 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-10-20 12:56:55 +00:00
commit 4713847d2e
12 changed files with 208 additions and 17 deletions

View file

@ -135,14 +135,28 @@ Global
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Any CPU.Build.0 = Release|Any CPU {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Any CPU.Build.0 = Release|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|x86.ActiveCfg = Release|x86 {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|x86.ActiveCfg = Release|x86
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.ActiveCfg = Debug|x86
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.Build.0 = Debug|x86 {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.Build.0 = Debug|x86
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Any CPU.ActiveCfg = Release|Any CPU {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.ActiveCfg = Debug|x86
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Any CPU.Build.0 = Release|Any CPU {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Any CPU.Build.0 = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Mixed Platforms.Build.0 = Release|Any CPU {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.Build.0 = Release|x86
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.ActiveCfg = Release|x86 {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.ActiveCfg = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution

View file

@ -4,7 +4,7 @@ Greenshot: A screenshot tool optimized for productivity. Save a screenshot or a
CHANGE LOG: CHANGE LOG:
We changed the version to 1.0 after 5 years it should no longer have a "beta" feeling! We changed the version to 1.0 after 5 years it should no longer have a "beta" feeling!
1.0.4 build 2172 Release Candidate 4 1.0.4 build 2176 Release Candidate 4
Bugs resolved: Bugs resolved:
* Fixed error during OAuth process due to authorization dialog not opening, see bug #3578480 * Fixed error during OAuth process due to authorization dialog not opening, see bug #3578480

View file

@ -96,9 +96,6 @@ namespace GreenshotConfluencePlugin {
host = pluginHost; host = pluginHost;
ConfluencePluginAttributes = myAttributes; ConfluencePluginAttributes = myAttributes;
// Force exception when there is no Full Profile, this will make sure the plugin isn't loaded
HttpUtility.UrlEncode("bla");
// Register configuration (don't need the configuration itself) // Register configuration (don't need the configuration itself)
config = IniConfig.GetIniSection<ConfluenceConfiguration>(); config = IniConfig.GetIniSection<ConfluenceConfiguration>();
if(config.IsDirty) { if(config.IsDirty) {

View file

@ -47,8 +47,6 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework> <RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference> </Reference>
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Services" /> <Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
@ -237,8 +235,8 @@ copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)bin\$(Configuration)\Languag
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>True</Optimize> <Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DebugType>Full</DebugType> <DebugType>None</DebugType>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>false</DebugSymbols>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>

View file

@ -46,6 +46,7 @@
<Reference Include="System.XML" /> <Reference Include="System.XML" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Interop\IOleCommandTarget.cs" />
<Compile Include="RemedyInterop\RemedyExporter.cs" /> <Compile Include="RemedyInterop\RemedyExporter.cs" />
<Compile Include="RemedyInterop\RemedyInterop.cs" /> <Compile Include="RemedyInterop\RemedyInterop.cs" />
<Compile Include="IEInterop\IHTMLBodyElement.cs" /> <Compile Include="IEInterop\IHTMLBodyElement.cs" />

View file

@ -0,0 +1,35 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2012 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/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/>.
*/
using System;
using System.Runtime.InteropServices;
namespace GreenshotInterop.Interop {
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComVisible(true), Guid("B722BCCB-4E68-101B-A2BC-00AA00404770")]
public interface IOleCommandTarget {
[return: MarshalAs(UnmanagedType.I4)]
[PreserveSig]
int QueryStatus([In, MarshalAs(UnmanagedType.LPStruct)] Guid pguidCmdGroup, int cCmds, IntPtr prgCmds, IntPtr pCmdText);
[return: MarshalAs(UnmanagedType.I4)]
[PreserveSig]
int Exec([In, MarshalAs(UnmanagedType.LPStruct)] Guid pguidCmdGroup, int nCmdID, int nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut);
}
}

View file

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Text;
using Greenshot.Interop;
using Greenshot.Interop.Office;
namespace GreenshotInterop.OfficeInterop {
// See: http://msdn.microsoft.com/en-us/library/bb758788%28v=office.12%29
[ComProgId("Communicator.UIAutomation")]
public interface IMessenger : Common {
void AutoSignin();
string MyServiceId {
get;
}
IMessengerContact GetContact(string signinName, string serviceId);
IMessengerWindow InstantMessage(string contact);
}
// See: http://msdn.microsoft.com/en-us/library/bb787250%28v=office.12%29
public interface IMessengerContact : Common {
string FriendlyName {
get;
}
string ServiceName {
get;
}
string ServiceId {
get;
}
string SigninName {
get;
}
MISTATUS Status {
get;
}
}
// See: http://msdn.microsoft.com/en-us/library/bb787207%28v=office.12%29
public enum MISTATUS {
MISTATUS_UNKNOWN = 0x0000,
MISTATUS_OFFLINE = 0x0001,
MISTATUS_ONLINE = 0x0002,
MISTATUS_INVISIBLE = 0x0006,
MISTATUS_BUSY = 0x000A,
MISTATUS_BE_RIGHT_BACK = 0x000E,
MISTATUS_IDLE = 0x0012,
MISTATUS_AWAY = 0x0022,
MISTATUS_ON_THE_PHONE = 0x0032,
MISTATUS_OUT_TO_LUNCH = 0x0042,
MISTATUS_IN_A_MEETING = 0x0052,
MISTATUS_OUT_OF_OFFICE = 0x0062,
MISTATUS_DO_NOT_DISTURB = 0x0072,
MISTATUS_IN_A_CONFERENCE = 0x0082,
MISTATUS_ALLOW_URGENT_INTERRUPTIONS = 0x0092,
MISTATUS_MAY_BE_AVAILABLE = 0x00A2,
MISTATUS_CUSTOM = 0x00B2,
MISTATUS_LOCAL_FINDING_SERVER = 0x0100,
MISTATUS_LOCAL_CONNECTING_TO_SERVER = 0x0200,
MISTATUS_LOCAL_SYNCHRONIZING_WITH_SERVER = 0x0300,
MISTATUS_LOCAL_DISCONNECTING_FROM_SERVER = 0x0400
} ;
// See: http://msdn.microsoft.com/en-us/library/bb758816%28v=office.12%29
public interface IMessengerWindow : Common {
bool IsClosed {
get;
}
void Show();
}
}

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{D14382D5-D870-4B55-AC21-6E64A8A68420}</ProjectGuid> <ProjectGuid>{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>

View file

@ -0,0 +1,68 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2012 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/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/>.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using GreenshotInterop.Interop;
namespace GreenshotPlugin.Controls {
public class ExtendedWebBrowser : WebBrowser {
protected class ExtendedWebBrowserSite : WebBrowserSite, IOleCommandTarget {
const int OLECMDID_SHOWSCRIPTERROR = 40;
const int OLECMDID_SHOWMESSAGE = 41;
static Guid CGID_DocHostCommandHandler = new Guid("F38BC242-B950-11D1-8918-00C04FC2C836");
const int S_OK = 0;
const int OLECMDERR_E_NOTSUPPORTED = (-2147221248);
const int OLECMDERR_E_UNKNOWNGROUP = (-2147221244);
public ExtendedWebBrowserSite(WebBrowser wb) : base(wb) {
}
#region IOleCommandTarget Members
public int QueryStatus(Guid pguidCmdGroup, int cCmds, IntPtr prgCmds, IntPtr pCmdText) {
return OLECMDERR_E_NOTSUPPORTED;
}
public int Exec(Guid pguidCmdGroup, int nCmdID, int nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) {
if (pguidCmdGroup == CGID_DocHostCommandHandler) {
if (nCmdID == OLECMDID_SHOWSCRIPTERROR) {
// do not need to alter pvaOut as the docs says, enough to return S_OK here
return S_OK;
}
}
return OLECMDERR_E_NOTSUPPORTED;
}
#endregion
}
protected override WebBrowserSiteBase CreateWebBrowserSiteBase() {
return new ExtendedWebBrowserSite(this);
}
public ExtendedWebBrowser() {
}
}
}

View file

@ -45,7 +45,7 @@ namespace GreenshotPlugin.Controls {
/// </summary> /// </summary>
private void InitializeComponent() { private void InitializeComponent() {
this.addressTextBox = new System.Windows.Forms.TextBox(); this.addressTextBox = new System.Windows.Forms.TextBox();
this.browser = new System.Windows.Forms.WebBrowser(); this.browser = new ExtendedWebBrowser();
this.SuspendLayout(); this.SuspendLayout();
// //
// addressTextBox // addressTextBox
@ -81,12 +81,12 @@ namespace GreenshotPlugin.Controls {
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
#endregion #endregion
private System.Windows.Forms.TextBox addressTextBox; private System.Windows.Forms.TextBox addressTextBox;
private System.Windows.Forms.WebBrowser browser; private ExtendedWebBrowser browser;
} }
} }

View file

@ -55,7 +55,8 @@ namespace GreenshotPlugin.Controls {
this.Text = browserTitle; this.Text = browserTitle;
this.addressTextBox.Text = authorizationLink; this.addressTextBox.Text = authorizationLink;
browser.ScriptErrorsSuppressed = true; // The script errors are suppressed by using the ExtendedWebBrowser
browser.ScriptErrorsSuppressed = false;
browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(browser_DocumentCompleted); browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(browser_DocumentCompleted);
browser.Navigate(new Uri(authorizationLink)); browser.Navigate(new Uri(authorizationLink));

View file

@ -113,9 +113,15 @@
<Compile Include="..\GreenshotInterop\Interop\IOleWindow.cs"> <Compile Include="..\GreenshotInterop\Interop\IOleWindow.cs">
<Link>Interop\IOleWindow.cs</Link> <Link>Interop\IOleWindow.cs</Link>
</Compile> </Compile>
<Compile Include="..\GreenshotInterop\Interop\IOleCommandTarget.cs">
<Link>Interop\IOleCommandTarget.cs</Link>
</Compile>
<Compile Include="..\GreenshotInterop\Interop\IServiceProvider.cs"> <Compile Include="..\GreenshotInterop\Interop\IServiceProvider.cs">
<Link>Interop\IServiceProvider.cs</Link> <Link>Interop\IServiceProvider.cs</Link>
</Compile> </Compile>
<Compile Include="Controls\ExtendedWebBrowser.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\FormWithoutActivation.cs"> <Compile Include="Controls\FormWithoutActivation.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>