Finished translation & fixed configuration issues.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1621 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-02-02 10:49:14 +00:00
commit affbfb0ce6
11 changed files with 165 additions and 94 deletions

View file

@ -4,7 +4,7 @@
xmlns:gscp="clr-namespace:GreenshotConfluencePlugin"
xmlns:l="clr-namespace:TranslationByMarkupExtension"
xmlns:gsc="clr-namespace:GreenshotPlugin.Core;assembly=GreenshotPlugin"
Title="Confluence plugin settings" SizeToContent="WidthAndHeight" Icon="/GreenshotConfluencePlugin;component/Images/Confluence.ico">
Title="{l:Translate plugin_settings}" SizeToContent="WidthAndHeight" Icon="/GreenshotConfluencePlugin;component/Images/Confluence.ico">
<Window.Resources>
<gscp:EnumDisplayer Type="{x:Type gsc:OutputFormat}" x:Key="outputFormats"/>
</Window.Resources>
@ -24,9 +24,9 @@
<Label Content="{l:Translate upload_format}" />
<ComboBox ItemsSource="{Binding Source={StaticResource outputFormats},Path=DisplayNames}" SelectedValue="{Binding UploadFormat, Converter={StaticResource outputFormats}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button IsCancel="True" Content="Cancel"/>
<Button IsDefault="True" Content="OK" Click="Button_Click"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button IsCancel="True" Content="{l:Translate CANCEL}"/>
<Button IsDefault="True" Content="{l:Translate OK}" Click="Button_Click"/>
</StackPanel>
</StackPanel>
</Window>

View file

@ -35,11 +35,6 @@ namespace GreenshotConfluencePlugin {
InitializeComponent();
}
void Upload_Click(object sender, System.Windows.RoutedEventArgs e) {
ConfluenceUpload confluenceUpload = (ConfluenceUpload)Parent;
confluenceUpload.DialogResult = true;
}
void PageListView_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) {
SelectionChanged();
}
@ -47,6 +42,8 @@ namespace GreenshotConfluencePlugin {
void SelectionChanged() {
if (PageListView.HasItems && PageListView.SelectedItems.Count > 0) {
confluenceUpload.SelectedPage = (Page)PageListView.SelectedItem;
// Make sure the uploader knows we selected an already opened page
confluenceUpload.isOpenPageSelected = true;
} else {
confluenceUpload.SelectedPage = null;
}

View file

@ -16,9 +16,9 @@
</Grid.RowDefinitions>
<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="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"/>
<Button Grid.Row="2" Grid.ColumnSpan="2" Name="Search" Content="Search" Click="Search_Click" />
<Button Grid.Row="2" Grid.ColumnSpan="2" Name="Search" Content="{l:Translate search}" Click="Search_Click" />
<ListView Grid.Row="3" Grid.ColumnSpan="2" Name="PageListView" SelectionMode="Single" ItemsSource="{Binding Path=Pages}" SelectionChanged="PageListView_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>

View file

@ -10,7 +10,7 @@
VerticalAlignment="Top" HorizontalAlignment="Left" />
<Border Name="ShowBusy" BorderBrush="Black" BorderThickness="1" Background="#80000000" Visibility="Visible">
<TextBlock Margin="0" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="18" FontWeight="Bold" Foreground="#7EFFFFFF">Loading, please wait...</TextBlock>
FontSize="18" FontWeight="Bold" Foreground="#7EFFFFFF" Text="{l:Translate loading}"/>
</Border>
</Grid>
</Page>

View file

@ -2,16 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:TranslationByMarkupExtension"
Title="Upload to confluence" 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>
<TabControl >
<TabItem Header="Open pages">
<TabItem Header="{l:Translate open_pages}">
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=PickerPage}" Height="500"/>
</TabItem>
<TabItem Header="Search pages">
<TabItem Header="{l:Translate search_pages}">
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=SearchPage}" Height="500"/>
</TabItem>
<TabItem Header="Browse pages">
<TabItem Header="{l:Translate browse_pages}">
<Frame NavigationUIVisibility="Hidden" Content="{Binding Path=BrowsePage}" Height="500"/>
</TabItem>
</TabControl>
@ -26,9 +26,9 @@
<Label Grid.Row="0" Grid.Column="0" Content="{l:Translate filename}" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=Filename}" />
</Grid>
<StackPanel Orientation="Horizontal">
<Button Name="Upload" Content="Upload" IsDefault="True" IsEnabled="False" Click="Upload_Click" />
<Button Name="Cancel" Content="Cancel" IsCancel="True" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Name="Upload" Content="{l:Translate upload}" IsDefault="True" IsEnabled="False" Click="Upload_Click" />
<Button Name="Cancel" Content="{l:Translate CANCEL}" IsCancel="True" />
</StackPanel>
</StackPanel>
</Window>

View file

@ -71,9 +71,14 @@ namespace GreenshotConfluencePlugin {
} else {
Upload.IsEnabled = false;
}
isOpenPageSelected = false;
}
}
public bool isOpenPageSelected {
get;
set;
}
public string Filename {
get;
set;