CTABLE_COLUMN_COUNT
};
-typedef enum {
- SELECTION_NONE = 0,
- SELECTION_SELECTED = 1 << 0,
- SELECTION_PRELIGHT = 1 << 1,
- SELECTION_FOCUS = 1 << 2
-} SelectionType;
-
-
#define INFO_SELECTED(x) (x->flag_mask & SELECTION_SELECTED)
ct->prev_selection= ct->click_info;
}
+static void collection_table_popup_rectangular_selection_cb(GtkWidget *widget, gpointer data)
+{
+ CollectTable *ct = data;
+
+ options->collections.rectangular_selection = !(options->collections.rectangular_selection);
+}
+
static void collection_table_popup_remove_cb(GtkWidget *widget, gpointer data)
{
CollectTable *ct = data;
CollectTable *ct = data;
DupeWindow *dw;
- dw = dupe_window_new(DUPE_MATCH_NAME);
+ dw = dupe_window_new();
dupe_window_add_collection(dw, ct->cd);
}
G_CALLBACK(collection_table_popup_unselectall_cb), ct);
menu_item_add(submenu, _("Invert selection"),
G_CALLBACK(collection_table_popup_select_invert_cb), ct);
+ menu_item_add_check(submenu, _("Rectangular selection"), (options->collections.rectangular_selection != FALSE),
+ G_CALLBACK(collection_table_popup_rectangular_selection_cb), ct);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu);
menu_item_add_divider(menu);
*-------------------------------------------------------------------
*/
-static gboolean collection_table_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
{
CollectTable *ct = data;
- collection_table_motion_update(ct, (gint)bevent->x, (gint)bevent->y, FALSE);
+ collection_table_motion_update(ct, (gint)event->x, (gint)event->y, FALSE);
return FALSE;
}