Merge lp:~gue5t/midori/gtk3-file-types into lp:midori

Proposed by gue5t gue5t
Status: Merged
Approved by: Cris Dywan
Approved revision: 7103
Merged at revision: 7104
Proposed branch: lp:~gue5t/midori/gtk3-file-types
Merge into: lp:midori
Diff against target: 32 lines (+6/-2)
1 file modified
extensions/open-with.vala (+6/-2)
To merge this branch: bzr merge lp:~gue5t/midori/gtk3-file-types
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+286405@code.launchpad.net

Commit message

fix illegible (3-char-wide) filetype column in "file types" preference pane under GTK3 to sane initial size and make it grow with the window

Description of the change

Right now under GTK3 the "file type" column of the "Filetypes" preference pane is ellipsized to three characters wide and can't be read. It doesn't grow if the preferences window is enlarged, so there's no way to read the ellipsized content.

This fixes both bugs, and makes the column grow like the application column. This improves GTK2 as well where the longest filetypes were ellipsized and couldn't be read in any fashion; now the window can be enlarged to read them and the extra space is split between the two text columns.

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

Nice tweak. Figuring out the desired mechanics of cell renderers always seems a bit arbitrary so glad that it works, but I won't claim that it makes sense to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/open-with.vala'
2--- extensions/open-with.vala 2015-07-18 05:56:02 +0000
3+++ extensions/open-with.vala 2016-02-17 20:36:51 +0000
4@@ -489,6 +489,7 @@
5 column.set_sizing (Gtk.TreeViewColumnSizing.AUTOSIZE);
6 Gtk.CellRendererText renderer_type_text = new Gtk.CellRendererText ();
7 column.pack_start (renderer_type_text, true);
8+ column.set_expand (true);
9 column.set_cell_data_func (renderer_type_text, on_render_type_text);
10 treeview.append_column (column);
11
12@@ -559,9 +560,8 @@
13 desc, mime_type),
14 #if HAVE_GTK3
15 "max-width-chars", 30,
16-#else
17+#endif
18 "width-chars", 30,
19-#endif
20 "ellipsize", Pango.EllipsizeMode.END);
21 }
22
23@@ -582,6 +582,10 @@
24 AppInfo app_info;
25 model.get (iter, 1, out app_info);
26 renderer.set ("markup", describe_app_info (app_info),
27+#if HAVE_GTK3
28+ "max-width-chars", 30,
29+#endif
30+ "width-chars", 30,
31 "ellipsize", Pango.EllipsizeMode.END);
32 }
33

Subscribers

People subscribed via source and target branches

to all changes: