diff options
Diffstat (limited to 'src/plugins/fs/search.c')
-rw-r--r-- | src/plugins/fs/search.c | 37 |
1 files changed, 30 insertions, 7 deletions
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, |