[gnome-control-center] user-accounts: Fix sizing problems in user list
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Fix sizing problems in user list
- Date: Thu, 1 Mar 2012 17:16:29 +0000 (UTC)
commit 74450e3acdf65d728ecbba9f82085e406040f2d0
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 1 17:11:14 2012 +0000
user-accounts: Fix sizing problems in user list
About half-way through the user list, vertically, the user's name
would get cut off. Showing the treeview headers showed that the
"automatic login" pixbuf was added in a separate column.
To make sizing easier, and avoid the user's name being cut off
half-way through, add the "automatic-login" icon in the first column.
https://bugzilla.gnome.org/show_bug.cgi?id=659998
panels/user-accounts/um-user-panel.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index c4777ab..f5aa4f4 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -1155,7 +1155,7 @@ setup_main_window (UmUserPanelPrivate *d)
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (column), cell, "pixbuf", FACE_COL);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (column), cell, "visible", USER_ROW_COL);
cell = gtk_cell_renderer_text_new ();
- g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, "width-chars", 18, NULL);
+ g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), cell, TRUE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (column), cell, "markup", NAME_COL);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (column), cell, "visible", USER_ROW_COL);
@@ -1163,19 +1163,17 @@ setup_main_window (UmUserPanelPrivate *d)
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), cell, TRUE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (column), cell, "markup", TITLE_COL);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (column), cell, "visible", HEADING_ROW_COL);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (userlist), column);
-
cell = gtk_cell_renderer_pixbuf_new ();
- column = gtk_tree_view_column_new ();
gtk_tree_view_column_pack_start (column, cell, FALSE);
- gtk_tree_view_append_column (GTK_TREE_VIEW (userlist), column);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (column), cell, "visible", USER_ROW_COL);
gtk_tree_view_column_set_cell_data_func (column,
cell,
(GtkTreeCellDataFunc) autologin_cell_data_func,
d,
NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (userlist), column);
+
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (userlist));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
g_signal_connect (selection, "changed", G_CALLBACK (selected_user_changed), d);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]