Merge lp:~donadigo/pantheon-files/fix-get-filter-name into lp:~elementary-apps/pantheon-files/trunk

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Jeremy Wootten
Approved revision: 2579
Merged at revision: 2577
Proposed branch: lp:~donadigo/pantheon-files/fix-get-filter-name
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 19 lines (+6/-1)
1 file modified
filechooser-module/FileChooserDialog.vala (+6/-1)
To merge this branch: bzr merge lp:~donadigo/pantheon-files/fix-get-filter-name
Reviewer Review Type Date Requested Status
Jeremy Wootten Approve
Danielle Foré Abstain
Review via email: mp+325257@code.launchpad.net

Commit message

* Fix gtk_file_filter_get_name warnings

Description of the change

Fixes "[Gtk] gtk_file_filter_get_name: assertion 'GTK_IS_FILE_FILTER (filter)' failed" warnings..

There's a missing check if get_filter actually returns non-null value, we check that now.

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

Go fish

review: Needs Fixing
Revision history for this message
Danielle Foré (danrabbit) wrote :

Looks like something else was actually causing the Chrome issue, but this is still a good fix. I withdraw my review ;)

review: Abstain
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

See inline comment. This branch does need to be merged tho'

review: Needs Fixing (code)
2576. By Adam Bieńkowski

Change variable name

2577. By Adam Bieńkowski

Remove unintended changes

2578. By Adam Bieńkowski

Remove more unneded changes

2579. By Adam Bieńkowski

Resolve conflicts

Revision history for this message
Adam Bieńkowski (donadigo) wrote :

jeremywootten: I've changed the variable name to "current_filter". Ready to review again.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Looks good now - thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'filechooser-module/FileChooserDialog.vala'
2--- filechooser-module/FileChooserDialog.vala 2017-06-07 17:33:33 +0000
3+++ filechooser-module/FileChooserDialog.vala 2017-06-10 22:47:21 +0000
4@@ -289,9 +289,14 @@
5
6 private void setup_filter_box () {
7 var filters = chooser_dialog.list_filters ();
8- var current_filter_name = chooser_dialog.get_filter ().get_filter_name ();
9
10 if (filters.length () > 0) {
11+ string? current_filter_name = null;
12+ var current_filter = chooser_dialog.get_filter ();
13+ if (current_filter != null) {
14+ current_filter_name = current_filter.get_filter_name ();
15+ }
16+
17 filters_available = true;
18 var combo_box = new Gtk.ComboBoxText ();
19 combo_box.changed.connect (() => {

Subscribers

People subscribed via source and target branches

to all changes: