From: Kaj-Michael Lang Date: Thu, 10 Jan 2008 12:45:27 +0000 (+0200) Subject: Re-order the category list items. Ellipsize description. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3968c98c6709d7f44211e7d0937524365f38809;p=mapper Re-order the category list items. Ellipsize description. --- diff --git a/src/poi-gui.c b/src/poi-gui.c index 73a2de2..309116a 100644 --- a/src/poi-gui.c +++ b/src/poi-gui.c @@ -386,11 +386,11 @@ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_view), TRUE); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("ID"), renderer, "text", CAT_ID, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column); -gtk_tree_view_column_set_max_width(column, 1); renderer = gtk_cell_renderer_toggle_new(); g_signal_connect(renderer, "toggled", G_CALLBACK(category_toggled_cb), store); column = gtk_tree_view_column_new_with_attributes(_("Enabled"), renderer, "active", CAT_ENABLED, NULL); +gtk_tree_view_column_set_max_width(column, 32); gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column); gtk_tree_view_column_set_sort_column_id (column, CAT_ENABLED); @@ -406,13 +406,14 @@ gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column); gtk_tree_view_column_set_sort_column_id (column, CAT_LABEL); renderer = gtk_cell_renderer_text_new(); -column = gtk_tree_view_column_new_with_attributes(_("Description"), renderer, "text", CAT_DESC, NULL); +column = gtk_tree_view_column_new_with_attributes(_("# POIs"), renderer, "text", CAT_POI_CNT, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column); +gtk_tree_view_column_set_sort_column_id (column, CAT_POI_CNT); renderer = gtk_cell_renderer_text_new(); -column = gtk_tree_view_column_new_with_attributes(_("# POIs"), renderer, "text", CAT_POI_CNT, NULL); +g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); +column = gtk_tree_view_column_new_with_attributes(_("Description"), renderer, "text", CAT_DESC, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column); -gtk_tree_view_column_set_sort_column_id (column, CAT_POI_CNT); gtk_window_set_default_size(GTK_WINDOW(dialog), 500, 300);