Skip to content

Commit

Permalink
Prepare merging of some parts of view_file_list and view_file_icon and
Browse files Browse the repository at this point in the history
simplification of view_file* interface.
  • Loading branch information
Laurent Monin committed May 3, 2008
1 parent f520f8c commit 04a9e3e
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ geeqie_SOURCES = \
view_dir_list.h \
view_dir_tree.c \
view_dir_tree.h \
view_file.c \
view_file.h \
view_file_list.c \
view_file_list.h \
view_file_icon.c \
Expand Down
38 changes: 38 additions & 0 deletions src/typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ typedef enum {
DIRVIEW_TREE
} DirViewType;

typedef enum {
FILEVIEW_LIST,
FILEVIEW_ICON
} FileViewType;

typedef enum {
CMD_COPY = GQ_EDITOR_GENERIC_SLOTS,
CMD_MOVE,
Expand Down Expand Up @@ -142,9 +147,12 @@ typedef struct _FileData FileData;
typedef struct _FileDataChangeInfo FileDataChangeInfo;

typedef struct _LayoutWindow LayoutWindow;

typedef struct _ViewDir ViewDir;
typedef struct _ViewDirInfoList ViewDirInfoList;
typedef struct _ViewDirInfoTree ViewDirInfoTree;

typedef struct _ViewFile ViewFile;
typedef struct _ViewFileList ViewFileList;
typedef struct _ViewFileIcon ViewFileIcon;

Expand Down Expand Up @@ -492,6 +500,9 @@ struct _LayoutWindow

LayoutLocation file_location;

ViewFile *vf;
FileViewType file_view_type;

ViewFileList *vfl;
ViewFileIcon *vfi;
GtkWidget *file_view;
Expand Down Expand Up @@ -586,6 +597,33 @@ struct _ViewDirInfoTree
gint busy_ref;
};


struct _ViewFile
{
FileViewType type;
gpointer info;

GtkWidget *widget;
GtkWidget *listview;

gchar *path;
GList *list;

SortType sort_method;
gint sort_ascend;

/* func list */
void (*func_thumb_status)(ViewFile *vf, gdouble val, const gchar *text, gpointer data);
gpointer data_thumb_status;

void (*func_status)(ViewFile *vf, gpointer data);
gpointer data_status;

LayoutWindow *layout;

GtkWidget *popup;
};

struct _ViewFileList
{
GtkWidget *widget;
Expand Down
19 changes: 19 additions & 0 deletions src/view_file.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Geeqie
* Copyright (C) 2008 The Geeqie Team
*
* Author: Laurent Monin
*
* This software is released under the GNU General Public License (GNU GPL).
* Please read the included file COPYING for more information.
* This software comes with no warranty of any kind, use at your own risk!
*/

#include "main.h"
#include "view_file.h"

#include "debug.h"
#include "view_file_list.h"
#include "view_file_icon.h"


15 changes: 15 additions & 0 deletions src/view_file.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Geeqie
* Copyright (C) 2008 The Geeqie Team
*
* Author: Laurent Monin
*
* This software is released under the GNU General Public License (GNU GPL).
* Please read the included file COPYING for more information.
* This software comes with no warranty of any kind, use at your own risk!
*/

#ifndef VIEW_FILE_H
#define VIEW_FILE_H

#endif /* VIEW_FILE_H */

0 comments on commit 04a9e3e

Please sign in to comment.