From 437b2cfb405a795feb17a8f6a2895aa7805e44c0 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 2 Feb 2011 20:00:31 -0500 Subject: [PATCH] keyboard: improve the layout of the bindings page Limit size of sections view and keep the key column the same size. --- panels/keyboard/gnome-keyboard-panel.ui | 4 ++++ panels/keyboard/keyboard-shortcuts.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/panels/keyboard/gnome-keyboard-panel.ui b/panels/keyboard/gnome-keyboard-panel.ui index cd1483216..95d6fe352 100644 --- a/panels/keyboard/gnome-keyboard-panel.ui +++ b/panels/keyboard/gnome-keyboard-panel.ui @@ -642,6 +642,7 @@ False 2 2 + 5 True @@ -730,12 +731,15 @@ + + True False 1 2 + 0 GTK_FILL diff --git a/panels/keyboard/keyboard-shortcuts.c b/panels/keyboard/keyboard-shortcuts.c index ae92aa3f3..5505b3848 100644 --- a/panels/keyboard/keyboard-shortcuts.c +++ b/panels/keyboard/keyboard-shortcuts.c @@ -1908,6 +1908,11 @@ setup_dialog (CcPanel *panel, GtkBuilder *builder) renderer, "text", SECTION_DESCRIPTION_COLUMN, NULL); + g_object_set (renderer, + "width-chars", 20, + "ellipsize", PANGO_ELLIPSIZE_END, + NULL); + gtk_tree_view_append_column (treeview, column); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT); @@ -1954,6 +1959,7 @@ setup_dialog (CcPanel *panel, GtkBuilder *builder) NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, description_set_func, NULL, NULL); gtk_tree_view_column_set_resizable (column, FALSE); + gtk_tree_view_column_set_expand (column, TRUE); gtk_tree_view_append_column (treeview, column); gtk_tree_view_column_set_sort_column_id (column, DETAIL_DESCRIPTION_COLUMN); @@ -1973,6 +1979,7 @@ setup_dialog (CcPanel *panel, GtkBuilder *builder) column = gtk_tree_view_column_new_with_attributes (_("Shortcut"), renderer, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, accel_set_func, NULL, NULL); gtk_tree_view_column_set_resizable (column, FALSE); + gtk_tree_view_column_set_expand (column, FALSE); gtk_tree_view_append_column (treeview, column); gtk_tree_view_column_set_sort_column_id (column, DETAIL_KEYENTRY_COLUMN);