mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -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-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-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
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
using System;
|
||||
using Confluence;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GreenshotConfluencePlugin {
|
||||
/// <summary>
|
||||
|
@ -29,9 +30,9 @@ namespace GreenshotConfluencePlugin {
|
|||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluencePagePicker));
|
||||
private ConfluenceUpload confluenceUpload = null;
|
||||
|
||||
public ConfluencePagePicker(ConfluenceUpload confluenceUpload) {
|
||||
public ConfluencePagePicker(ConfluenceUpload confluenceUpload, List<Page> pagesToPick) {
|
||||
this.confluenceUpload = confluenceUpload;
|
||||
this.DataContext = ConfluenceUtils.GetCurrentPages();
|
||||
this.DataContext = pagesToPick;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
<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"/>
|
||||
<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"/>
|
||||
<Button Grid.Row="2" Grid.ColumnSpan="2" Name="Search" Content="{l:Translate search}" Click="Search_Click" />
|
||||
<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" IsEnabled="False"/>
|
||||
<ListView Grid.Row="3" Grid.ColumnSpan="2" Name="PageListView" SelectionMode="Single" ItemsSource="{Binding Path=Pages}" SelectionChanged="PageListView_SelectionChanged">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
|
|
@ -76,6 +76,7 @@ namespace GreenshotConfluencePlugin {
|
|||
void Search_Click(object sender, RoutedEventArgs e) {
|
||||
doSearch();
|
||||
}
|
||||
|
||||
void doSearch() {
|
||||
string spaceKey = (string)SpaceComboBox.SelectedValue;
|
||||
config.SearchSpaceKey = spaceKey;
|
||||
|
@ -85,15 +86,20 @@ namespace GreenshotConfluencePlugin {
|
|||
pages.Add(page);
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Page_Loaded(object sender, System.Windows.RoutedEventArgs e) {
|
||||
SelectionChanged();
|
||||
}
|
||||
|
||||
private void searchText_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e) {
|
||||
Search.IsEnabled = !string.IsNullOrEmpty(searchText.Text);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,11 +4,11 @@
|
|||
xmlns:l="clr-namespace:TranslationByMarkupExtension"
|
||||
Title="{l:Translate upload_menu_item}" Height="640" Width="500" Icon="/GreenshotConfluencePlugin;component/Images/Confluence.ico">
|
||||
<StackPanel>
|
||||
<TabControl >
|
||||
<TabItem Header="{l:Translate open_pages}">
|
||||
<TabControl>
|
||||
<TabItem Header="{l:Translate open_pages}" Name="PickerTab">
|
||||
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=PickerPage}" Height="500"/>
|
||||
</TabItem>
|
||||
<TabItem Header="{l:Translate search_pages}">
|
||||
<TabItem Header="{l:Translate search_pages}" Name="SearchTab">
|
||||
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=SearchPage}" Height="500"/>
|
||||
</TabItem>
|
||||
<TabItem Header="{l:Translate browse_pages}">
|
||||
|
|
|
@ -33,7 +33,10 @@ namespace GreenshotConfluencePlugin {
|
|||
public Page PickerPage {
|
||||
get {
|
||||
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;
|
||||
}
|
||||
|
@ -101,6 +104,10 @@ namespace GreenshotConfluencePlugin {
|
|||
InitializeComponent();
|
||||
this.DataContext = this;
|
||||
updateSpaces();
|
||||
if (PickerPage == null) {
|
||||
PickerTab.Visibility = System.Windows.Visibility.Collapsed;
|
||||
SearchTab.IsSelected = true;
|
||||
}
|
||||
}
|
||||
|
||||
void updateSpaces() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue