mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
Merged 1.2 into master
This commit is contained in:
commit
61fa0b3435
6 changed files with 25 additions and 10 deletions
|
@ -13,6 +13,7 @@ Bugs Resolved:
|
||||||
* BUG-1655: Greenshot uses the default proxy, even if the "use default proxy" check-box is not checked.
|
* BUG-1655: Greenshot uses the default proxy, even if the "use default proxy" check-box is not checked.
|
||||||
* BUG-1730: File type in the Save-As dialog doesn't default to configured output format.
|
* BUG-1730: File type in the Save-As dialog doesn't default to configured output format.
|
||||||
* BUG-1735: Editor crashed when trying to scale down a screenshot with text element
|
* BUG-1735: Editor crashed when trying to scale down a screenshot with text element
|
||||||
|
* BUG-1741: Fixed a bug in the confluence plug-in, error when searching for nothing, by improving the upload GUI.
|
||||||
|
|
||||||
|
|
||||||
1.2.4.10-RELEASE-94d66e09eb89
|
1.2.4.10-RELEASE-94d66e09eb89
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using Confluence;
|
using Confluence;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace GreenshotConfluencePlugin {
|
namespace GreenshotConfluencePlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -29,9 +30,9 @@ namespace GreenshotConfluencePlugin {
|
||||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluencePagePicker));
|
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluencePagePicker));
|
||||||
private ConfluenceUpload confluenceUpload = null;
|
private ConfluenceUpload confluenceUpload = null;
|
||||||
|
|
||||||
public ConfluencePagePicker(ConfluenceUpload confluenceUpload) {
|
public ConfluencePagePicker(ConfluenceUpload confluenceUpload, List<Page> pagesToPick) {
|
||||||
this.confluenceUpload = confluenceUpload;
|
this.confluenceUpload = confluenceUpload;
|
||||||
this.DataContext = ConfluenceUtils.GetCurrentPages();
|
this.DataContext = pagesToPick;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Space" />
|
<Label Grid.Row="0" Grid.Column="0" Content="Space" />
|
||||||
<ComboBox Grid.Row="0" Grid.Column="1" Name="SpaceComboBox" ItemsSource="{Binding Path=Spaces}" DisplayMemberPath="Name" SelectedValuePath="Key"/>
|
<ComboBox Grid.Row="0" Grid.Column="1" Name="SpaceComboBox" ItemsSource="{Binding Path=Spaces}" DisplayMemberPath="Name" SelectedValuePath="Key"/>
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="{l:Translate search_text}" />
|
<Label Grid.Row="1" Grid.Column="0" Content="{l:Translate search_text}" />
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Name="searchText" Text="" KeyDown="SearchText_KeyDown"/>
|
<TextBox Grid.Row="1" Grid.Column="1" Name="searchText" Text="" KeyDown="SearchText_KeyDown" TextChanged="searchText_TextChanged"/>
|
||||||
<Button Grid.Row="2" Grid.ColumnSpan="2" Name="Search" Content="{l:Translate search}" Click="Search_Click" />
|
<Button Grid.Row="2" Grid.ColumnSpan="2" Name="Search" Content="{l:Translate search}" Click="Search_Click" IsEnabled="False"/>
|
||||||
<ListView Grid.Row="3" Grid.ColumnSpan="2" Name="PageListView" SelectionMode="Single" ItemsSource="{Binding Path=Pages}" SelectionChanged="PageListView_SelectionChanged">
|
<ListView Grid.Row="3" Grid.ColumnSpan="2" Name="PageListView" SelectionMode="Single" ItemsSource="{Binding Path=Pages}" SelectionChanged="PageListView_SelectionChanged">
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
|
|
|
@ -76,6 +76,7 @@ namespace GreenshotConfluencePlugin {
|
||||||
void Search_Click(object sender, RoutedEventArgs e) {
|
void Search_Click(object sender, RoutedEventArgs e) {
|
||||||
doSearch();
|
doSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void doSearch() {
|
void doSearch() {
|
||||||
string spaceKey = (string)SpaceComboBox.SelectedValue;
|
string spaceKey = (string)SpaceComboBox.SelectedValue;
|
||||||
config.SearchSpaceKey = spaceKey;
|
config.SearchSpaceKey = spaceKey;
|
||||||
|
@ -85,8 +86,9 @@ namespace GreenshotConfluencePlugin {
|
||||||
pages.Add(page);
|
pages.Add(page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SearchText_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) {
|
void SearchText_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) {
|
||||||
if (e.Key == System.Windows.Input.Key.Return) {
|
if (e.Key == System.Windows.Input.Key.Return && Search.IsEnabled) {
|
||||||
doSearch();
|
doSearch();
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
@ -95,5 +97,9 @@ namespace GreenshotConfluencePlugin {
|
||||||
void Page_Loaded(object sender, System.Windows.RoutedEventArgs e) {
|
void Page_Loaded(object sender, System.Windows.RoutedEventArgs e) {
|
||||||
SelectionChanged();
|
SelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void searchText_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e) {
|
||||||
|
Search.IsEnabled = !string.IsNullOrEmpty(searchText.Text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,10 +5,10 @@
|
||||||
Title="{l:Translate upload_menu_item}" Height="640" Width="500" Icon="/GreenshotConfluencePlugin;component/Images/Confluence.ico">
|
Title="{l:Translate upload_menu_item}" Height="640" Width="500" Icon="/GreenshotConfluencePlugin;component/Images/Confluence.ico">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TabControl>
|
<TabControl>
|
||||||
<TabItem Header="{l:Translate open_pages}">
|
<TabItem Header="{l:Translate open_pages}" Name="PickerTab">
|
||||||
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=PickerPage}" Height="500"/>
|
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=PickerPage}" Height="500"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="{l:Translate search_pages}">
|
<TabItem Header="{l:Translate search_pages}" Name="SearchTab">
|
||||||
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=SearchPage}" Height="500"/>
|
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=SearchPage}" Height="500"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="{l:Translate browse_pages}">
|
<TabItem Header="{l:Translate browse_pages}">
|
||||||
|
|
|
@ -33,7 +33,10 @@ namespace GreenshotConfluencePlugin {
|
||||||
public Page PickerPage {
|
public Page PickerPage {
|
||||||
get {
|
get {
|
||||||
if (pickerPage == null) {
|
if (pickerPage == null) {
|
||||||
pickerPage = new ConfluencePagePicker(this);
|
List<Confluence.Page> pages = ConfluenceUtils.GetCurrentPages();
|
||||||
|
if (pages != null && pages.Count > 0) {
|
||||||
|
pickerPage = new ConfluencePagePicker(this, pages);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return pickerPage;
|
return pickerPage;
|
||||||
}
|
}
|
||||||
|
@ -101,6 +104,10 @@ namespace GreenshotConfluencePlugin {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.DataContext = this;
|
this.DataContext = this;
|
||||||
updateSpaces();
|
updateSpaces();
|
||||||
|
if (PickerPage == null) {
|
||||||
|
PickerTab.Visibility = System.Windows.Visibility.Collapsed;
|
||||||
|
SearchTab.IsSelected = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateSpaces() {
|
void updateSpaces() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue