Index:rox-1.1.10-selbutton/ROX-Filer/pixmaps/select.xpm *** rox-1.1.10-patched/ROX-Filer/pixmaps/select.xpm Thu Jan 1 01:00:00 1970 --- rox-1.1.10-selbutton/ROX-Filer/pixmaps/select.xpm Wed Jan 2 14:23:30 2002 *************** *** 0 **** --- 1,24 ---- + /* XPM */ + static char * select_xpm[] = { + "17 16 5 1", + " c None", + ". c #000000", + "+ c #C5CEC5", + "@ c #FFFFFF", + "# c #7F7F7F", + ".................", + ".+++++++++++++++.", + ".+@@@@@@@@@@@#.+.", + ".+@@@@@@@@@@#..+.", + ".+@@@@@@@@@#...+.", + ".+@@@@@@@@#....+.", + ".+@@@@@@@#.....+.", + ".+@@@@@@#......+.", + ".+@@@@@#.......+.", + ".+@@@@#........+.", + ".+@@@#.........+.", + ".+@@#..........+.", + ".+@#...........+.", + ".+#............+.", + ".+++++++++++++++.", + "................."}; Index:rox-1.1.10-selbutton/ROX-Filer/src/toolbar.c *** rox-1.1.10-patched/ROX-Filer/src/toolbar.c Wed Jan 2 13:53:48 2002 --- rox-1.1.10-selbutton/ROX-Filer/src/toolbar.c Wed Jan 2 14:23:30 2002 *************** *** 81,86 **** --- 81,88 ---- FilerWindow *filer_window); static void toolbar_hidden_clicked(GtkWidget *widget, FilerWindow *filer_window); + static void toolbar_select_clicked(GtkWidget *widget, + FilerWindow *filer_window); static GtkWidget *add_button(GtkWidget *box, Tool *tool, FilerWindow *filer_window); static GtkWidget *create_toolbar(FilerWindow *filer_window); *************** *** 133,138 **** --- 135,144 ---- toolbar_hidden_clicked, DROP_NONE, TRUE, NULL, NULL}, + {N_("Select"), "select", N_("Select all/invert selection"), + toolbar_select_clicked, DROP_NONE, TRUE, + NULL, NULL}, + {N_("Help"), "help", N_("Show ROX-Filer help"), toolbar_help_clicked, DROP_NONE, TRUE, NULL, NULL}, *************** *** 336,341 **** --- 342,365 ---- FilerWindow *filer_window) { display_set_hidden(filer_window, !filer_window->show_hidden); + } + + static void toolbar_select_clicked(GtkWidget *widget, FilerWindow *filer_window) + { + GdkEvent *event; + + event = gtk_get_current_event(); + if (event->type == GDK_BUTTON_RELEASE && + ((GdkEventButton *) event)->button==2) + { + collection_invert_selection(filer_window->collection); + } + else if (event->type == GDK_BUTTON_RELEASE && + ((GdkEventButton *) event)->button==1) + { + collection_select_all(filer_window->collection); + } + filer_window->temp_item_selected = FALSE; } static GtkWidget *create_toolbar(FilerWindow *filer_window)