-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add filtering by summary in commit log
- Loading branch information
1 parent
2d81fa6
commit 405db9e
Showing
12 changed files
with
550 additions
and
243 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
use crate::commit_log_text_filter_widgets::{CommitLogTextFilterWidgets, WidgetData}; | ||
use crate::event::{Event, handleUnknown, IEventHandler, Sender, Source}; | ||
use crate::gui_element_provider::GuiElementProvider; | ||
|
||
|
||
pub(crate) struct CommitLogAuthorFilterWidgets | ||
{ | ||
inner: CommitLogTextFilterWidgets | ||
} | ||
|
||
impl IEventHandler for CommitLogAuthorFilterWidgets | ||
{ | ||
fn handle(&mut self, source: Source, event: &Event) | ||
{ | ||
match event { | ||
Event::InvalidAuthorTextInputted(e) => self.onInvalidTextInputted(e), | ||
Event::ValidAuthorTextInputted => self.onValidTextInputted(), | ||
_ => handleUnknown(source, event) | ||
} | ||
} | ||
} | ||
|
||
impl CommitLogAuthorFilterWidgets | ||
{ | ||
pub fn new(guiElementProvider: &GuiElementProvider, sender: Sender) -> Self | ||
{ | ||
Self{inner: CommitLogTextFilterWidgets::new( | ||
&WidgetData{name: "Commit log author filter entry", source: Source::CommitLogAuthorFilterEntry}, | ||
&WidgetData{name: "Commit log author filter case button", source: Source::CommitLogAuthorFilterCaseButton}, | ||
&WidgetData{name: "Commit log author filter regex button", source: Source::CommitLogAuthorFilterRegexButton}, | ||
guiElementProvider, | ||
sender) | ||
} | ||
} | ||
|
||
fn onInvalidTextInputted(&mut self, error: ®ex::Error) | ||
{ | ||
self.inner.handle(Source::CommitLogAuthorFilterEntry, &Event::InvalidTextInputted(error.clone())); | ||
} | ||
|
||
fn onValidTextInputted(&mut self) | ||
{ | ||
self.inner.handle(Source::CommitLogAuthorFilterEntry, &Event::ValidTextInputted); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.