BUG-1741: Improvements of the Confluence plug-in: don't show the page-picker if no pages are currently shown (in IE) and disable the search button while there is nothing to search for.

This commit is contained in:
Robin 2015-01-30 13:24:24 +01:00
commit 026241f160
5 changed files with 24 additions and 10 deletions

View file

@ -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() {