diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-11-24 06:43:36 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-11-24 06:43:36 +0000 |
commit | f8be9a8de873457250feb8126a652490538f578f (patch) | |
tree | cafea7cb8757fa94ff10e0cc71e10a6d1cc1c60b /src | |
parent | 86051e4d314d3aa4689feefd8314ced7aeea6444 (diff) |
src/addressbook.c: addressbook_create(): create renderer for each column.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2351 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/addressbook.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/addressbook.c b/src/addressbook.c index 4f5e1871..598d52fd 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -632,12 +632,11 @@ static void addressbook_create(void) "pixbuf-expander-closed", COL_PIXBUF, NULL); renderer = gtk_cell_renderer_text_new(); + g_object_set(renderer, #if GTK_CHECK_VERSION(2, 6, 0) - g_object_set(renderer, "ellipsize", PANGO_ELLIPSIZE_END, "ypad", 0, - NULL); -#else - g_object_set(renderer, "ypad", 0, NULL); + "ellipsize", PANGO_ELLIPSIZE_END, #endif + "ypad", 0, NULL); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "text", COL_FOLDER_NAME, NULL); @@ -708,12 +707,11 @@ static void addressbook_create(void) "pixbuf", COL_L_PIXBUF, NULL); renderer = gtk_cell_renderer_text_new(); + g_object_set(renderer, #if GTK_CHECK_VERSION(2, 6, 0) - g_object_set(renderer, "ellipsize", PANGO_ELLIPSIZE_END, "ypad", 0, - NULL); -#else - g_object_set(renderer, "ypad", 0, NULL); + "ellipsize", PANGO_ELLIPSIZE_END, #endif + "ypad", 0, NULL); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "text", COL_NAME, NULL); @@ -722,6 +720,12 @@ static void addressbook_create(void) gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column); gtk_tree_view_set_expander_column(GTK_TREE_VIEW(listview), column); + renderer = gtk_cell_renderer_text_new(); + g_object_set(renderer, +#if GTK_CHECK_VERSION(2, 6, 0) + "ellipsize", PANGO_ELLIPSIZE_END, +#endif + "ypad", 0, NULL); column = gtk_tree_view_column_new_with_attributes (_("E-Mail address"), renderer, "text", COL_ADDRESS, NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); @@ -730,6 +734,12 @@ static void addressbook_create(void) /* gtk_tree_view_column_set_sort_column_id(column, COL_ADDRESS); */ gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column); + renderer = gtk_cell_renderer_text_new(); + g_object_set(renderer, +#if GTK_CHECK_VERSION(2, 6, 0) + "ellipsize", PANGO_ELLIPSIZE_END, +#endif + "ypad", 0, NULL); column = gtk_tree_view_column_new_with_attributes (_("Remarks"), renderer, "text", COL_REMARKS, NULL); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); |