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
=== modified file 'extensions/open-with.vala'
--- extensions/open-with.vala 2015-07-18 05:56:02 +0000
+++ extensions/open-with.vala 2016-02-17 20:36:51 +0000
@@ -489,6 +489,7 @@
489 column.set_sizing (Gtk.TreeViewColumnSizing.AUTOSIZE);489 column.set_sizing (Gtk.TreeViewColumnSizing.AUTOSIZE);
490 Gtk.CellRendererText renderer_type_text = new Gtk.CellRendererText ();490 Gtk.CellRendererText renderer_type_text = new Gtk.CellRendererText ();
491 column.pack_start (renderer_type_text, true);491 column.pack_start (renderer_type_text, true);
492 column.set_expand (true);
492 column.set_cell_data_func (renderer_type_text, on_render_type_text);493 column.set_cell_data_func (renderer_type_text, on_render_type_text);
493 treeview.append_column (column);494 treeview.append_column (column);
494495
@@ -559,9 +560,8 @@
559 desc, mime_type),560 desc, mime_type),
560#if HAVE_GTK3561#if HAVE_GTK3
561 "max-width-chars", 30,562 "max-width-chars", 30,
562#else563#endif
563 "width-chars", 30,564 "width-chars", 30,
564#endif
565 "ellipsize", Pango.EllipsizeMode.END);565 "ellipsize", Pango.EllipsizeMode.END);
566 }566 }
567567
@@ -582,6 +582,10 @@
582 AppInfo app_info;582 AppInfo app_info;
583 model.get (iter, 1, out app_info);583 model.get (iter, 1, out app_info);
584 renderer.set ("markup", describe_app_info (app_info),584 renderer.set ("markup", describe_app_info (app_info),
585#if HAVE_GTK3
586 "max-width-chars", 30,
587#endif
588 "width-chars", 30,
585 "ellipsize", Pango.EllipsizeMode.END);589 "ellipsize", Pango.EllipsizeMode.END);
586 }590 }
587591

Subscribers

People subscribed via source and target branches

to all changes: