* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "main.h"
#include "view-file-list.h"
+#include <config.h>
+
#include "collect.h"
+#include "debug.h"
#include "dnd.h"
#include "img-view.h"
-#include "layout.h"
+#include "intl.h"
#include "layout-image.h"
+#include "layout.h"
+#include "main-defines.h"
#include "metadata.h"
#include "misc.h"
-#include "utilops.h"
#include "ui-fileops.h"
#include "ui-misc.h"
#include "ui-tree-edit.h"
#include "uri-utils.h"
+#include "utilops.h"
#include "view-file.h"
#include <vector>
void vflist_star_rating_set(ViewFile *vf, gboolean enable)
{
- GList *columns, *work;
+ GList *columns;
+ GList *work;
columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(vf->listview));
gint vflist_index_by_fd(ViewFile *vf, FileData *fd)
{
gint p = 0;
- GList *work, *work2;
+ GList *work;
+ GList *work2;
work = vf->list;
while (work)
while (valid)
{
FileData *fd;
- gboolean mark_val, selected;
+ gboolean mark_val;
+ gboolean selected;
gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, FILE_COLUMN_POINTER, &fd, -1);
mark_val = file_data_get_mark(fd, n);
ret = filelist_read(vf->dir_fd, &vf->list, nullptr);
if (vf->marks_enabled)
- {
- // When marks are enabled, lock FileDatas so that we don't end up re-parsing XML
- // each time a mark is changed.
- file_data_lock_list(vf->list);
- }
- else
+ {
+ // When marks are enabled, lock FileDatas so that we don't end up re-parsing XML
+ // each time a mark is changed.
+ file_data_lock_list(vf->list);
+ }
+ else
{
/** @FIXME only do this when needed (aka when we just switched from */
/** @FIXME marks-enabled to marks-disabled) */
/* this overrides the low default of a GtkCellRenderer from 100 to CELL_HEIGHT_OVERRIDE, something sane for our purposes */
-#define CELL_HEIGHT_OVERRIDE 512
+enum {
+ CELL_HEIGHT_OVERRIDE = 512
+};
static void cell_renderer_height_override(GtkCellRenderer *renderer)
{
}
}
-static GdkColor *vflist_listview_color_shifted(GtkWidget *widget)
+static GdkRGBA *vflist_listview_color_shifted(GtkWidget *widget)
{
- static GdkColor color;
+ static GdkRGBA color;
+ static GdkRGBA color_style;
static GtkWidget *done = nullptr;
if (done != widget)
GtkStyle *style;
style = gtk_widget_get_style(widget);
- memcpy(&color, &style->base[GTK_STATE_NORMAL], sizeof(color));
+ convert_gdkcolor_to_gdkrgba(&style->base[GTK_STATE_NORMAL], &color_style);
+
+ memcpy(&color, &color_style, sizeof(color));
shift_color(&color, -1, 0);
done = widget;
}
gtk_tree_model_get(tree_model, iter, FILE_COLUMN_COLOR, &set, -1);
g_object_set(G_OBJECT(cell),
- "cell-background-gdk", vflist_listview_color_shifted(vf->listview),
+ "cell-background-rgba", vflist_listview_color_shifted(vf->listview),
"cell-background-set", set, NULL);
}
void vflist_marks_set(ViewFile *vf, gboolean enable)
{
- GList *columns, *work;
+ GList *columns;
+ GList *work;
columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(vf->listview));