[Xfce4-commits] <xfce4-settings:master> Give first column an initial size.

Nick Schermer noreply at xfce.org
Sat Jan 21 22:16:08 CET 2012


Updating branch refs/heads/master
         to 791987d9f0f19424cf2beaead737309be6d9b89d (commit)
       from 6c9c62b4aff94d74928a2f12bdb744c52cc11b0a (commit)

commit 791987d9f0f19424cf2beaead737309be6d9b89d
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Jan 21 18:45:38 2012 +0100

    Give first column an initial size.

 dialogs/mime-settings/xfce-mime-window.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/dialogs/mime-settings/xfce-mime-window.c b/dialogs/mime-settings/xfce-mime-window.c
index bc44d00..8b77728 100644
--- a/dialogs/mime-settings/xfce-mime-window.c
+++ b/dialogs/mime-settings/xfce-mime-window.c
@@ -218,11 +218,17 @@ xfce_mime_window_init (XfceMimeWindow *window)
     gtk_tree_view_column_set_clickable (column, TRUE);
     gtk_tree_view_column_set_sort_indicator (column, TRUE);
     gtk_tree_view_column_set_resizable (column, TRUE);
-    gtk_tree_view_column_set_expand (column, TRUE);
     g_signal_connect (G_OBJECT (column), "clicked",
         G_CALLBACK (xfce_mime_window_column_clicked), window);
     gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
 
+    /* HACK, wont work in gtk3 */
+    /* give the first column some initial size that doesn't restrict anything
+     * later. Expanding this column will resize the view when a setting
+     * is changed */
+    column->resized_width = 300;
+    column->use_resized_width = TRUE;
+
     renderer = gtk_cell_renderer_text_new ();
     gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, TRUE);
     g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
@@ -233,6 +239,7 @@ xfce_mime_window_init (XfceMimeWindow *window)
     column = gtk_tree_view_column_new ();
     gtk_tree_view_column_set_title (column, _("Status"));
     gtk_tree_view_column_set_clickable (column, TRUE);
+    gtk_tree_view_column_set_resizable (column, TRUE);
     g_signal_connect (G_OBJECT (column), "clicked",
         G_CALLBACK (xfce_mime_window_column_clicked), window);
     gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);


More information about the Xfce4-commits mailing list