GNOME Bugzilla – Bug 761158
Filter tool doesn't reflect the previously applied filter when re-activated
Last modified: 2016-02-05 10:28:58 UTC
Ideally, when you apply a filter and click on "Done", it should apply the filter and exit the edit palette. When edit palette is re-activated, the "Filter" tool should reflect the filter which has been applied earlier but currently, it does not do so.
Created attachment 320003 [details] [review] tool-filter: Reflect previously applied filter(if any)
Review of attachment 320003 [details] [review]: Thanks for the nice patch, Umang. It works perfectly. Some cosmetic things: ::: src/photos-tool-filter-button.h @@ +49,3 @@ GtkWidget *image); +void photos_tool_filter_button_set_activated_button (PhotosToolFilterButton *self); It would be slightly better to call it photos_tool_filter_button_set_active to match gtk_toggle_button_set_active. We try to mimic the GtkButton, GtkToggleButton API whenever applicable. ::: src/photos-tool-filters.c @@ +123,3 @@ + NULL)) + { + button = g_list_nth_data (self->buttons, (guint) preset); It would be more robust to iterate over the list of buttons and compare the presets. The fact we order the buttons in increasing order of the preset enum is just a cosmetic thing. Things shouldn't break if we shuffle the buttons around.
Created attachment 320491 [details] [review] tool-filter-button, tool-filters: Select previous filter (if any) Made the above adjustments and pushed.
Created attachment 320492 [details] [review] tool-filter-button, tool-filters: Select previous filter (if any)