#define INFO_SELECTED(x) (x->flag_mask & SELECTION_SELECTED)
-static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gint force);
+static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gboolean force);
/*
*-------------------------------------------------------------------
*/
-static gint collection_table_find_position(CollectTable *ct, CollectInfo *info, gint *row, gint *col)
+static gboolean collection_table_find_position(CollectTable *ct, CollectInfo *info, gint *row, gint *col)
{
gint n;
return TRUE;
}
-static gint collection_table_find_iter(CollectTable *ct, CollectInfo *info, GtkTreeIter *iter, gint *column)
+static gboolean collection_table_find_iter(CollectTable *ct, CollectInfo *info, GtkTreeIter *iter, gint *column)
{
GtkTreeModel *store;
gint row, col;
g_free(buf);
}
-static void collection_table_update_extras(CollectTable *ct, gint loading, gdouble value)
+static void collection_table_update_extras(CollectTable *ct, gboolean loading, gdouble value)
{
gchar *text;
collection_table_update_status(ct);
}
-static void collection_table_select_util(CollectTable *ct, CollectInfo *info, gint select)
+static void collection_table_select_util(CollectTable *ct, CollectInfo *info, gboolean select)
{
if (select)
{
}
}
-static void collection_table_select_region_util(CollectTable *ct, CollectInfo *start, CollectInfo *end, gint select)
+static void collection_table_select_region_util(CollectTable *ct, CollectInfo *start, CollectInfo *end, gboolean select)
{
gint row1, col1;
gint row2, col2;
ct->tip_window = NULL;
}
-static gint tip_schedule_cb(gpointer data)
+static gboolean tip_schedule_cb(gpointer data)
{
CollectTable *ct = data;
ct->editmenu_fd_list = NULL;
}
-static GtkWidget *collection_table_popup_menu(CollectTable *ct, gint over_icon)
+static GtkWidget *collection_table_popup_menu(CollectTable *ct, gboolean over_icon)
{
GtkWidget *menu;
GtkWidget *item;
}
}
-static void collection_table_move_focus(CollectTable *ct, gint row, gint col, gint relative)
+static void collection_table_move_focus(CollectTable *ct, gint row, gint col, gboolean relative)
{
gint new_row;
gint new_col;
popup_menu_position_clamp(menu, x, y, 0);
}
-static gint collection_table_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean collection_table_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
CollectTable *ct = data;
gint focus_row = 0;
gint focus_col = 0;
CollectInfo *info;
- gint stop_signal;
+ gboolean stop_signal = TRUE;
- stop_signal = TRUE;
switch (event->keyval)
{
case GDK_Left: case GDK_KP_Left:
*-------------------------------------------------------------------
*/
-static CollectInfo *collection_table_insert_find(CollectTable *ct, CollectInfo *source, gint *after, GdkRectangle *cell,
- gint use_coord, gint x, gint y)
+static CollectInfo *collection_table_insert_find(CollectTable *ct, CollectInfo *source, gboolean *after, GdkRectangle *cell,
+ gboolean use_coord, gint x, gint y)
{
CollectInfo *info = NULL;
GtkTreeModel *store;
gtk_tree_path_free(tpath);
info = source;
- *after = (x > cell->x + (cell->width / 2));
+ *after = !!(x > cell->x + (cell->width / 2));
}
return info;
}
if (info)
{
gtk_tree_view_get_background_area(GTK_TREE_VIEW(ct->listview), tpath, column, cell);
- *after = (x > cell->x + (cell->width / 2));
+ *after = !!(x > cell->x + (cell->width / 2));
}
gtk_tree_path_free(tpath);
{
CollectInfo *info;
GdkRectangle cell;
- gint after = FALSE;
+ gboolean after = FALSE;
info = collection_table_insert_find(ct, NULL, &after, &cell, TRUE, x, y);
return info;
}
-static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info, gint enable)
+static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info, gboolean enable)
{
gint row, col;
- gint after = FALSE;
+ gboolean after = FALSE;
GdkRectangle cell;
if (!enable)
*-------------------------------------------------------------------
*/
-static void collection_table_motion_update(CollectTable *ct, gint x, gint y, gint drop_event)
+static void collection_table_motion_update(CollectTable *ct, gint x, gint y, gboolean drop_event)
{
CollectInfo *info;
}
}
-static gint collection_table_auto_scroll_idle_cb(gpointer data)
+static gboolean collection_table_auto_scroll_idle_cb(gpointer data)
{
CollectTable *ct = data;
GdkWindow *window;
return FALSE;
}
-static gint collection_table_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer data)
+static gboolean collection_table_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer data)
{
CollectTable *ct = data;
return TRUE;
}
-static void collection_table_scroll(CollectTable *ct, gint scroll)
+static void collection_table_scroll(CollectTable *ct, gboolean scroll)
{
if (!scroll)
{
*-------------------------------------------------------------------
*/
-static gint collection_table_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
{
CollectTable *ct = data;
return FALSE;
}
-static gint collection_table_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
{
CollectTable *ct = data;
GtkTreeIter iter;
return TRUE;
}
-static gint collection_table_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
{
CollectTable *ct = data;
GtkTreeIter iter;
tip_schedule(ct);
- if ((gint)bevent->x != 0 || (gint) bevent->y != 0)
+ if ((gint)bevent->x != 0 || (gint)bevent->y != 0)
{
info = collection_table_find_data_by_coord(ct, (gint)bevent->x, (gint)bevent->y, &iter);
}
if (bevent->state & GDK_CONTROL_MASK)
{
- gint select;
+ gboolean select = !INFO_SELECTED(info);
- select = !INFO_SELECTED(info);
if ((bevent->state & GDK_SHIFT_MASK) && ct->prev_selection)
{
collection_table_select_region_util(ct, ct->prev_selection, info, select);
return TRUE;
}
-static gint collection_table_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+static gboolean collection_table_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
{
CollectTable *ct = data;
return list;
}
-static void collection_table_populate(CollectTable *ct, gint resize)
+static void collection_table_populate(CollectTable *ct, gboolean resize)
{
gint row;
GList *work;
collection_table_update_status(ct);
}
-static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gint force)
+static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gboolean force)
{
gint new_cols;
gint thumb_width;
collection_table_update_status(ct);
}
-static gint collection_table_sync_idle_cb(gpointer data)
+static gboolean collection_table_sync_idle_cb(gpointer data)
{
CollectTable *ct = data;
*-------------------------------------------------------------------
*/
-static void collection_table_add_dir_recursive(CollectTable *ct, FileData *dir_fd, gint recursive)
+static void collection_table_add_dir_recursive(CollectTable *ct, FileData *dir_fd, gboolean recursive)
{
GList *d;
GList *f;
filelist_free(d);
}
-static void confirm_dir_list_do(CollectTable *ct, GList *list, gint recursive)
+static void confirm_dir_list_do(CollectTable *ct, GList *list, gboolean recursive)
{
GList *work = list;
while (work)
guint time, gpointer data)
{
CollectTable *ct = data;
- gint selected;
+ gboolean selected;
GList *list = NULL;
gchar *uri_text = NULL;
gint total;
{
return collection_table_find_data(ct, ct->focus_row, ct->focus_column, NULL);
}
+
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */