mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
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:
parent
2c26d287ff
commit
026241f160
5 changed files with 24 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue