diff options
author | Nils Durner <durner@gnunet.org> | 2005-11-03 21:38:13 +0000 |
---|---|---|
committer | Nils Durner <durner@gnunet.org> | 2005-11-03 21:38:13 +0000 |
commit | 0bb7ba0e796e9f2fde6498fb15fda58fd5d67aba (patch) | |
tree | e2eabe481a99c51350c1c4ef5810965581623f96 | |
parent | 0e55c6b25e91b2b876c7050e708728eaf666e264 (diff) | |
download | gnunet-gtk-0bb7ba0e796e9f2fde6498fb15fda58fd5d67aba.tar.gz gnunet-gtk-0bb7ba0e796e9f2fde6498fb15fda58fd5d67aba.zip |
Make columns resizable
-rw-r--r-- | src/plugins/daemon/daemon.c | 11 | ||||
-rw-r--r-- | src/plugins/fs/download.c | 16 | ||||
-rw-r--r-- | src/plugins/fs/meta.c | 11 | ||||
-rw-r--r-- | src/plugins/fs/namespace.c | 57 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 37 | ||||
-rw-r--r-- | src/plugins/fs/upload.c | 12 |
6 files changed, 116 insertions, 28 deletions
diff --git a/src/plugins/daemon/daemon.c b/src/plugins/daemon/daemon.c index 91325f8c..1b84ce89 100644 --- a/src/plugins/daemon/daemon.c +++ b/src/plugins/daemon/daemon.c | |||
@@ -218,6 +218,7 @@ void init_daemon() { | |||
218 | GtkWidget * apps; | 218 | GtkWidget * apps; |
219 | GtkListStore * model; | 219 | GtkListStore * model; |
220 | GtkCellRenderer * renderer; | 220 | GtkCellRenderer * renderer; |
221 | int col; | ||
221 | 222 | ||
222 | apps | 223 | apps |
223 | = glade_xml_get_widget(getMainXML(), | 224 | = glade_xml_get_widget(getMainXML(), |
@@ -226,19 +227,25 @@ void init_daemon() { | |||
226 | gtk_tree_view_set_model(GTK_TREE_VIEW(apps), | 227 | gtk_tree_view_set_model(GTK_TREE_VIEW(apps), |
227 | GTK_TREE_MODEL(model)); | 228 | GTK_TREE_MODEL(model)); |
228 | renderer = gtk_cell_renderer_text_new(); | 229 | renderer = gtk_cell_renderer_text_new(); |
229 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(apps), | 230 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(apps), |
230 | -1, | 231 | -1, |
231 | _("Application"), | 232 | _("Application"), |
232 | renderer, | 233 | renderer, |
233 | "text", 0, | 234 | "text", 0, |
234 | NULL); | 235 | NULL); |
236 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(apps), | ||
237 | col - 1), | ||
238 | TRUE); | ||
235 | renderer = gtk_cell_renderer_text_new(); | 239 | renderer = gtk_cell_renderer_text_new(); |
236 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(apps), | 240 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(apps), |
237 | -1, | 241 | -1, |
238 | _("Description"), | 242 | _("Description"), |
239 | renderer, | 243 | renderer, |
240 | "text", 1, | 244 | "text", 1, |
241 | NULL); | 245 | NULL); |
246 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(apps), | ||
247 | col - 1), | ||
248 | TRUE); | ||
242 | 249 | ||
243 | updateAppModelSafe(NULL); | 250 | updateAppModelSafe(NULL); |
244 | tab | 251 | tab |
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index aad51417..7d1ab986 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -685,6 +685,7 @@ static int addDownloadView(void * cls, | |||
685 | void fs_download_start() { | 685 | void fs_download_start() { |
686 | GtkWidget * downloadList; | 686 | GtkWidget * downloadList; |
687 | GtkCellRenderer * renderer; | 687 | GtkCellRenderer * renderer; |
688 | int col; | ||
688 | 689 | ||
689 | 690 | ||
690 | downloadList = glade_xml_get_widget(getMainXML(), | 691 | downloadList = glade_xml_get_widget(getMainXML(), |
@@ -702,27 +703,36 @@ void fs_download_start() { | |||
702 | gtk_tree_view_set_model(GTK_TREE_VIEW(downloadList), | 703 | gtk_tree_view_set_model(GTK_TREE_VIEW(downloadList), |
703 | GTK_TREE_MODEL(summary)); | 704 | GTK_TREE_MODEL(summary)); |
704 | renderer = gtk_cell_renderer_progress_new(); | 705 | renderer = gtk_cell_renderer_progress_new(); |
705 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(downloadList), | 706 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(downloadList), |
706 | -1, | 707 | -1, |
707 | _("Name"), | 708 | _("Name"), |
708 | renderer, | 709 | renderer, |
709 | "value", DOWNLOAD_PROGRESS, | 710 | "value", DOWNLOAD_PROGRESS, |
710 | "text", DOWNLOAD_LINKNAME, | 711 | "text", DOWNLOAD_LINKNAME, |
711 | NULL); | 712 | NULL); |
713 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(downloadList), | ||
714 | col - 1), | ||
715 | TRUE); | ||
712 | renderer = gtk_cell_renderer_text_new(); | 716 | renderer = gtk_cell_renderer_text_new(); |
713 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(downloadList), | 717 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(downloadList), |
714 | -1, | 718 | -1, |
715 | _("Size"), | 719 | _("Size"), |
716 | renderer, | 720 | renderer, |
717 | "text", DOWNLOAD_SIZE, | 721 | "text", DOWNLOAD_SIZE, |
718 | NULL); | 722 | NULL); |
723 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(downloadList), | ||
724 | col - 1), | ||
725 | TRUE); | ||
719 | renderer = gtk_cell_renderer_text_new(); | 726 | renderer = gtk_cell_renderer_text_new(); |
720 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(downloadList), | 727 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(downloadList), |
721 | -1, | 728 | -1, |
722 | _("URI"), | 729 | _("URI"), |
723 | renderer, | 730 | renderer, |
724 | "text", DOWNLOAD_URISTRING, | 731 | "text", DOWNLOAD_URISTRING, |
725 | NULL); | 732 | NULL); |
733 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(downloadList), | ||
734 | col - 1), | ||
735 | TRUE); | ||
726 | FSUI_listDownloads(ctx, | 736 | FSUI_listDownloads(ctx, |
727 | NULL, | 737 | NULL, |
728 | &addDownloadView, | 738 | &addDownloadView, |
diff --git a/src/plugins/fs/meta.c b/src/plugins/fs/meta.c index e8264554..50d41729 100644 --- a/src/plugins/fs/meta.c +++ b/src/plugins/fs/meta.c | |||
@@ -63,6 +63,7 @@ void createMetaDataListTreeView(GladeXML * xml, | |||
63 | GdkPixbufLoader * loader; | 63 | GdkPixbufLoader * loader; |
64 | unsigned char * thumb; | 64 | unsigned char * thumb; |
65 | size_t ts; | 65 | size_t ts; |
66 | int col; | ||
66 | 67 | ||
67 | metamodel | 68 | metamodel |
68 | = gtk_list_store_new(META_NUM, | 69 | = gtk_list_store_new(META_NUM, |
@@ -72,19 +73,25 @@ void createMetaDataListTreeView(GladeXML * xml, | |||
72 | metaList = glade_xml_get_widget(xml, | 73 | metaList = glade_xml_get_widget(xml, |
73 | name); | 74 | name); |
74 | renderer = gtk_cell_renderer_text_new(); | 75 | renderer = gtk_cell_renderer_text_new(); |
75 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(metaList), | 76 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(metaList), |
76 | -1, | 77 | -1, |
77 | _("Category"), | 78 | _("Category"), |
78 | renderer, | 79 | renderer, |
79 | "text", META_STYPE, | 80 | "text", META_STYPE, |
80 | NULL); | 81 | NULL); |
82 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(metaList), | ||
83 | col - 1), | ||
84 | TRUE); | ||
81 | renderer = gtk_cell_renderer_text_new(); | 85 | renderer = gtk_cell_renderer_text_new(); |
82 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(metaList), | 86 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(metaList), |
83 | -1, | 87 | -1, |
84 | _("Value"), | 88 | _("Value"), |
85 | renderer, | 89 | renderer, |
86 | "text", META_VALUE, | 90 | "text", META_VALUE, |
87 | NULL); | 91 | NULL); |
92 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(metaList), | ||
93 | col - 1), | ||
94 | TRUE); | ||
88 | gtk_tree_view_set_model(GTK_TREE_VIEW(metaList), | 95 | gtk_tree_view_set_model(GTK_TREE_VIEW(metaList), |
89 | GTK_TREE_MODEL(metamodel)); | 96 | GTK_TREE_MODEL(metamodel)); |
90 | if (init != NULL) | 97 | if (init != NULL) |
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c index a592ea1e..b8127d98 100644 --- a/src/plugins/fs/namespace.c +++ b/src/plugins/fs/namespace.c | |||
@@ -60,6 +60,7 @@ static GtkWidget * makeNamespaceFrame(GtkWidget ** treeview, | |||
60 | GtkCellRenderer * renderer; | 60 | GtkCellRenderer * renderer; |
61 | GtkListStore * model; | 61 | GtkListStore * model; |
62 | GladeXML * namespaceXML; | 62 | GladeXML * namespaceXML; |
63 | int col; | ||
63 | 64 | ||
64 | namespaceXML | 65 | namespaceXML |
65 | = glade_xml_new(getGladeFileName(), | 66 | = glade_xml_new(getGladeFileName(), |
@@ -89,61 +90,85 @@ static GtkWidget * makeNamespaceFrame(GtkWidget ** treeview, | |||
89 | gtk_tree_view_set_model(GTK_TREE_VIEW(resultList), | 90 | gtk_tree_view_set_model(GTK_TREE_VIEW(resultList), |
90 | GTK_TREE_MODEL(model)); | 91 | GTK_TREE_MODEL(model)); |
91 | renderer = gtk_cell_renderer_text_new(); | 92 | renderer = gtk_cell_renderer_text_new(); |
92 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 93 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
93 | -1, | 94 | -1, |
94 | _("Filename"), | 95 | _("Filename"), |
95 | renderer, | 96 | renderer, |
96 | "text", IN_NAMESPACE_FILENAME, | 97 | "text", IN_NAMESPACE_FILENAME, |
97 | NULL); | 98 | NULL); |
99 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
100 | col - 1), | ||
101 | TRUE); | ||
98 | renderer = gtk_cell_renderer_text_new(); | 102 | renderer = gtk_cell_renderer_text_new(); |
99 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 103 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
100 | -1, | 104 | -1, |
101 | _("Filesize"), | 105 | _("Filesize"), |
102 | renderer, | 106 | renderer, |
103 | "text", IN_NAMESPACE_SIZE, | 107 | "text", IN_NAMESPACE_SIZE, |
104 | NULL); | 108 | NULL); |
109 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
110 | col - 1), | ||
111 | TRUE); | ||
105 | renderer = gtk_cell_renderer_text_new(); | 112 | renderer = gtk_cell_renderer_text_new(); |
106 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 113 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
107 | -1, | 114 | -1, |
108 | _("Description"), | 115 | _("Description"), |
109 | renderer, | 116 | renderer, |
110 | "text", IN_NAMESPACE_DESCRIPTION, | 117 | "text", IN_NAMESPACE_DESCRIPTION, |
111 | NULL); | 118 | NULL); |
119 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
120 | col - 1), | ||
121 | TRUE); | ||
112 | renderer = gtk_cell_renderer_text_new(); | 122 | renderer = gtk_cell_renderer_text_new(); |
113 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 123 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
114 | -1, | 124 | -1, |
115 | _("Mime-type"), | 125 | _("Mime-type"), |
116 | renderer, | 126 | renderer, |
117 | "text", IN_NAMESPACE_MIMETYPE, | 127 | "text", IN_NAMESPACE_MIMETYPE, |
118 | NULL); | 128 | NULL); |
129 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
130 | col - 1), | ||
131 | TRUE); | ||
119 | renderer = gtk_cell_renderer_text_new(); | 132 | renderer = gtk_cell_renderer_text_new(); |
120 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 133 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
121 | -1, | 134 | -1, |
122 | _("Publication Frequency"), | 135 | _("Publication Frequency"), |
123 | renderer, | 136 | renderer, |
124 | "text", IN_NAMESPACE_PUB_FREQ_STRING, | 137 | "text", IN_NAMESPACE_PUB_FREQ_STRING, |
125 | NULL); | 138 | NULL); |
139 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
140 | col - 1), | ||
141 | TRUE); | ||
126 | renderer = gtk_cell_renderer_text_new(); | 142 | renderer = gtk_cell_renderer_text_new(); |
127 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 143 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
128 | -1, | 144 | -1, |
129 | _("Next Publication Date"), | 145 | _("Next Publication Date"), |
130 | renderer, | 146 | renderer, |
131 | "text", IN_NAMESPACE_PUB_DATE_STRING, | 147 | "text", IN_NAMESPACE_PUB_DATE_STRING, |
132 | NULL); | 148 | NULL); |
149 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
150 | col - 1), | ||
151 | TRUE); | ||
133 | renderer = gtk_cell_renderer_text_new(); | 152 | renderer = gtk_cell_renderer_text_new(); |
134 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 153 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
135 | -1, | 154 | -1, |
136 | _("Last ID"), | 155 | _("Last ID"), |
137 | renderer, | 156 | renderer, |
138 | "text", IN_NAMESPACE_LAST_STRING, | 157 | "text", IN_NAMESPACE_LAST_STRING, |
139 | NULL); | 158 | NULL); |
159 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
160 | col - 1), | ||
161 | TRUE); | ||
140 | renderer = gtk_cell_renderer_text_new(); | 162 | renderer = gtk_cell_renderer_text_new(); |
141 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 163 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
142 | -1, | 164 | -1, |
143 | _("Next ID"), | 165 | _("Next ID"), |
144 | renderer, | 166 | renderer, |
145 | "text", IN_NAMESPACE_NEXT_STRING, | 167 | "text", IN_NAMESPACE_NEXT_STRING, |
146 | NULL); | 168 | NULL); |
169 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
170 | col - 1), | ||
171 | TRUE); | ||
147 | child = gtk_bin_get_child(GTK_BIN(window)); | 172 | child = gtk_bin_get_child(GTK_BIN(window)); |
148 | gtk_widget_ref(GTK_WIDGET(child)); | 173 | gtk_widget_ref(GTK_WIDGET(child)); |
149 | gtk_container_remove(GTK_CONTAINER(window), | 174 | gtk_container_remove(GTK_CONTAINER(window), |
@@ -1061,6 +1086,7 @@ void fs_namespace_start() { | |||
1061 | GtkListStore * model; | 1086 | GtkListStore * model; |
1062 | GtkCellRenderer * renderer; | 1087 | GtkCellRenderer * renderer; |
1063 | GtkWidget * trackCheckButton; | 1088 | GtkWidget * trackCheckButton; |
1089 | int col; | ||
1064 | 1090 | ||
1065 | trackCheckButton | 1091 | trackCheckButton |
1066 | = glade_xml_get_widget(getMainXML(), | 1092 | = glade_xml_get_widget(getMainXML(), |
@@ -1081,26 +1107,35 @@ void fs_namespace_start() { | |||
1081 | gtk_tree_view_set_model(GTK_TREE_VIEW(contentList), | 1107 | gtk_tree_view_set_model(GTK_TREE_VIEW(contentList), |
1082 | GTK_TREE_MODEL(model)); | 1108 | GTK_TREE_MODEL(model)); |
1083 | renderer = gtk_cell_renderer_text_new(); | 1109 | renderer = gtk_cell_renderer_text_new(); |
1084 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(contentList), | 1110 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(contentList), |
1085 | -1, | 1111 | -1, |
1086 | _("Filename"), | 1112 | _("Filename"), |
1087 | renderer, | 1113 | renderer, |
1088 | "text", NAMESPACE_FILENAME, | 1114 | "text", NAMESPACE_FILENAME, |
1089 | NULL); | 1115 | NULL); |
1116 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(contentList), | ||
1117 | col - 1), | ||
1118 | TRUE); | ||
1090 | renderer = gtk_cell_renderer_text_new(); | 1119 | renderer = gtk_cell_renderer_text_new(); |
1091 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(contentList), | 1120 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(contentList), |
1092 | -1, | 1121 | -1, |
1093 | _("Filesize"), | 1122 | _("Filesize"), |
1094 | renderer, | 1123 | renderer, |
1095 | "text", NAMESPACE_SIZE, | 1124 | "text", NAMESPACE_SIZE, |
1096 | NULL); | 1125 | NULL); |
1126 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(contentList), | ||
1127 | col - 1), | ||
1128 | TRUE); | ||
1097 | renderer = gtk_cell_renderer_text_new(); | 1129 | renderer = gtk_cell_renderer_text_new(); |
1098 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(contentList), | 1130 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(contentList), |
1099 | -1, | 1131 | -1, |
1100 | _("URI"), | 1132 | _("URI"), |
1101 | renderer, | 1133 | renderer, |
1102 | "text", NAMESPACE_URISTRING, | 1134 | "text", NAMESPACE_URISTRING, |
1103 | NULL); | 1135 | NULL); |
1136 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(contentList), | ||
1137 | col - 1), | ||
1138 | TRUE); | ||
1104 | addCronJob(&updateContentList, | 1139 | addCronJob(&updateContentList, |
1105 | 0, | 1140 | 0, |
1106 | UPDATE_CONTENT_LIST_FREQUENCY, | 1141 | UPDATE_CONTENT_LIST_FREQUENCY, |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index cd9dd14a..9de0a2cc 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -516,6 +516,7 @@ static GtkWidget * makeResultFrame(GtkWidget ** treeview, | |||
516 | GtkCellRenderer * renderer; | 516 | GtkCellRenderer * renderer; |
517 | GtkTreeStore * tree; | 517 | GtkTreeStore * tree; |
518 | GladeXML * searchXML; | 518 | GladeXML * searchXML; |
519 | int col; | ||
519 | 520 | ||
520 | searchXML | 521 | searchXML |
521 | = glade_xml_new(getGladeFileName(), | 522 | = glade_xml_new(getGladeFileName(), |
@@ -543,43 +544,58 @@ static GtkWidget * makeResultFrame(GtkWidget ** treeview, | |||
543 | gtk_tree_view_set_model(GTK_TREE_VIEW(resultList), | 544 | gtk_tree_view_set_model(GTK_TREE_VIEW(resultList), |
544 | GTK_TREE_MODEL(tree)); | 545 | GTK_TREE_MODEL(tree)); |
545 | renderer = gtk_cell_renderer_text_new(); | 546 | renderer = gtk_cell_renderer_text_new(); |
546 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 547 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
547 | -1, | 548 | -1, |
548 | _("Name"), | 549 | _("Name"), |
549 | renderer, | 550 | renderer, |
550 | "text", SEARCH_NAME, | 551 | "text", SEARCH_NAME, |
551 | NULL); | 552 | NULL); |
553 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
554 | col - 1), | ||
555 | TRUE); | ||
552 | renderer = gtk_cell_renderer_text_new(); | 556 | renderer = gtk_cell_renderer_text_new(); |
553 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 557 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
554 | -1, | 558 | -1, |
555 | _("Size"), | 559 | _("Size"), |
556 | renderer, | 560 | renderer, |
557 | "text", SEARCH_SIZE, | 561 | "text", SEARCH_SIZE, |
558 | NULL); | 562 | NULL); |
563 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
564 | col - 1), | ||
565 | TRUE); | ||
559 | renderer = gtk_cell_renderer_text_new(); | 566 | renderer = gtk_cell_renderer_text_new(); |
560 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 567 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
561 | -1, | 568 | -1, |
562 | _("Mime-type"), | 569 | _("Mime-type"), |
563 | renderer, | 570 | renderer, |
564 | "text", SEARCH_MIME, | 571 | "text", SEARCH_MIME, |
565 | NULL); | 572 | NULL); |
573 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
574 | col - 1), | ||
575 | TRUE); | ||
566 | renderer = gtk_cell_renderer_text_new(); | 576 | renderer = gtk_cell_renderer_text_new(); |
567 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 577 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
568 | -1, | 578 | -1, |
569 | _("Meta-data"), | 579 | _("Meta-data"), |
570 | renderer, | 580 | renderer, |
571 | "text", SEARCH_DESC, | 581 | "text", SEARCH_DESC, |
572 | NULL); | 582 | NULL); |
583 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
584 | col - 1), | ||
585 | TRUE); | ||
573 | if (! testConfigurationString("GNUNET-GTK", | 586 | if (! testConfigurationString("GNUNET-GTK", |
574 | "DISABLE-PREVIEWS", | 587 | "DISABLE-PREVIEWS", |
575 | "YES")) { | 588 | "YES")) { |
576 | renderer = gtk_cell_renderer_pixbuf_new(); | 589 | renderer = gtk_cell_renderer_pixbuf_new(); |
577 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), | 590 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList), |
578 | -1, | 591 | -1, |
579 | _("Preview"), | 592 | _("Preview"), |
580 | renderer, | 593 | renderer, |
581 | "pixbuf", SEARCH_PIXBUF, | 594 | "pixbuf", SEARCH_PIXBUF, |
582 | NULL); | 595 | NULL); |
596 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(resultList), | ||
597 | col - 1), | ||
598 | TRUE); | ||
583 | } | 599 | } |
584 | child = gtk_bin_get_child(GTK_BIN(window)); | 600 | child = gtk_bin_get_child(GTK_BIN(window)); |
585 | gtk_widget_ref(GTK_WIDGET(child)); | 601 | gtk_widget_ref(GTK_WIDGET(child)); |
@@ -939,6 +955,7 @@ void fs_search_start() { | |||
939 | GtkListStore * model; | 955 | GtkListStore * model; |
940 | GtkWidget * searchList; | 956 | GtkWidget * searchList; |
941 | GtkCellRenderer * renderer; | 957 | GtkCellRenderer * renderer; |
958 | int col; | ||
942 | 959 | ||
943 | searchCB | 960 | searchCB |
944 | = glade_xml_get_widget(getMainXML(), | 961 | = glade_xml_get_widget(getMainXML(), |
@@ -968,19 +985,25 @@ void fs_search_start() { | |||
968 | gtk_tree_view_set_model(GTK_TREE_VIEW(searchList), | 985 | gtk_tree_view_set_model(GTK_TREE_VIEW(searchList), |
969 | GTK_TREE_MODEL(summary)); | 986 | GTK_TREE_MODEL(summary)); |
970 | renderer = gtk_cell_renderer_text_new(); | 987 | renderer = gtk_cell_renderer_text_new(); |
971 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(searchList), | 988 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(searchList), |
972 | -1, | 989 | -1, |
973 | _("Query"), | 990 | _("Query"), |
974 | renderer, | 991 | renderer, |
975 | "text", SER_SUM_NAME, | 992 | "text", SER_SUM_NAME, |
976 | NULL); | 993 | NULL); |
994 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(searchList), | ||
995 | col - 1), | ||
996 | TRUE); | ||
977 | renderer = gtk_cell_renderer_text_new(); | 997 | renderer = gtk_cell_renderer_text_new(); |
978 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(searchList), | 998 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(searchList), |
979 | -1, | 999 | -1, |
980 | _("Results"), | 1000 | _("Results"), |
981 | renderer, | 1001 | renderer, |
982 | "text", SER_SUM_COUNT, | 1002 | "text", SER_SUM_COUNT, |
983 | NULL); | 1003 | NULL); |
1004 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(searchList), | ||
1005 | col - 1), | ||
1006 | TRUE); | ||
984 | 1007 | ||
985 | FSUI_listSearches(ctx, | 1008 | FSUI_listSearches(ctx, |
986 | &openTabForSearch, | 1009 | &openTabForSearch, |
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index 8607fe88..034bc6f8 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -482,6 +482,7 @@ void fs_upload_start() { | |||
482 | GtkWidget * uploadEntry; | 482 | GtkWidget * uploadEntry; |
483 | GtkCellRenderer * renderer; | 483 | GtkCellRenderer * renderer; |
484 | GtkListStore * model; | 484 | GtkListStore * model; |
485 | int col; | ||
485 | 486 | ||
486 | uploadList = glade_xml_get_widget(getMainXML(), | 487 | uploadList = glade_xml_get_widget(getMainXML(), |
487 | "activeUploadsList"); | 488 | "activeUploadsList"); |
@@ -493,21 +494,26 @@ void fs_upload_start() { | |||
493 | gtk_tree_view_set_model(GTK_TREE_VIEW(uploadList), | 494 | gtk_tree_view_set_model(GTK_TREE_VIEW(uploadList), |
494 | GTK_TREE_MODEL(summary)); | 495 | GTK_TREE_MODEL(summary)); |
495 | renderer = gtk_cell_renderer_progress_new(); | 496 | renderer = gtk_cell_renderer_progress_new(); |
496 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(uploadList), | 497 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(uploadList), |
497 | -1, | 498 | -1, |
498 | _("Filename"), | 499 | _("Filename"), |
499 | renderer, | 500 | renderer, |
500 | "text", UPLOAD_FILENAME, | 501 | "text", UPLOAD_FILENAME, |
501 | "value", UPLOAD_PROGRESS, | 502 | "value", UPLOAD_PROGRESS, |
502 | NULL); | 503 | NULL); |
504 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(uploadList), | ||
505 | col - 1), | ||
506 | TRUE); | ||
503 | renderer = gtk_cell_renderer_text_new(); | 507 | renderer = gtk_cell_renderer_text_new(); |
504 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(uploadList), | 508 | col = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(uploadList), |
505 | -1, | 509 | -1, |
506 | _("URI"), | 510 | _("URI"), |
507 | renderer, | 511 | renderer, |
508 | "text", UPLOAD_URISTRING, | 512 | "text", UPLOAD_URISTRING, |
509 | NULL); | 513 | NULL); |
510 | 514 | gtk_tree_view_column_set_resizable(gtk_tree_view_get_column(GTK_TREE_VIEW(uploadList), | |
515 | col - 1), | ||
516 | TRUE); | ||
511 | 517 | ||
512 | uploadEntry | 518 | uploadEntry |
513 | = glade_xml_get_widget(getMainXML(), | 519 | = glade_xml_get_widget(getMainXML(), |