Bug fix: Additional debug features
[geeqie.git] / src / collect-table.c
index 2695640..757fa9f 100644 (file)
@@ -62,14 +62,6 @@ enum {
        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)
 
 
@@ -808,6 +800,13 @@ static void collection_table_popup_select_invert_cb(GtkWidget *widget, gpointer
        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;
@@ -854,7 +853,7 @@ static void collection_table_popup_find_dupes_cb(GtkWidget *widget, gpointer dat
        CollectTable *ct = data;
        DupeWindow *dw;
 
-       dw = dupe_window_new(DUPE_MATCH_NAME);
+       dw = dupe_window_new();
        dupe_window_add_collection(dw, ct->cd);
 }
 
@@ -924,6 +923,8 @@ static GtkWidget *collection_table_popup_menu(CollectTable *ct, gboolean over_ic
                        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);
 
@@ -1592,11 +1593,11 @@ static void collection_table_scroll(CollectTable *ct, gboolean scroll)
  *-------------------------------------------------------------------
  */
 
-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;
 }