From fd244132adb4225b6982422632bd69bc57b4e589 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 13 Nov 2003 19:02:07 +0000 Subject: New folder-tree widget that replaces the shell's folder-tree widget. 2003-11-13 Jeffrey Stedfast * em-folder-tree.[c,h]: New folder-tree widget that replaces the shell's folder-tree widget. * em-folder-tree-model.[c,h]: New source files subclassing GtkTreeStore for handling the mess that is drag&drop. * em-folder-selection-button.c: Ported to use EMFolderTree. * em-folder-selection.c: Ported to use EMFolderTree. * em-folder-selector.c: Ported to use EMFolderTree. * mail-component.c: Ported to use EMFolderTree. * mail-offline-handler.c (storage_go_online): Updated to not pass a storage argument. * mail-folder-cache.c: Removed storage stuff. * mail-send-recv.c (receive_update_got_store): Don't do EStorage* stuff anymore. svn path=/trunk/; revision=23331 --- mail/em-folder-tree-model.h | 81 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 mail/em-folder-tree-model.h (limited to 'mail/em-folder-tree-model.h') diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h new file mode 100644 index 0000000000..c52509ad63 --- /dev/null +++ b/mail/em-folder-tree-model.h @@ -0,0 +1,81 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Authors: Jeffrey Stedfast + * + * Copyright 2003 Ximian, Inc. (www.ximian.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. + * + */ + + +#ifndef __EM_FOLDER_TREE_MODEL_H__ +#define __EM_FOLDER_TREE_MODEL_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#pragma } +#endif /* __cplusplus */ + +#define EM_TYPE_FOLDER_TREE_MODEL (em_folder_tree_model_get_type ()) +#define EM_FOLDER_TREE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModel)) +#define EM_FOLDER_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModelClass)) +#define EM_IS_FOLDER_TREE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EM_TYPE_FOLDER_TREE_MODEL)) +#define EM_IS_FOLDER_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EM_TYPE_FOLDER_TREE_MODEL)) +#define EM_FOLDER_TREE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EM_TYPE_FOLDER_TREE_MODEL, EMFolderTreeModelClass)) + +typedef struct _EMFolderTreeModel EMFolderTreeModel; +typedef struct _EMFolderTreeModelClass EMFolderTreeModelClass; + +struct _EMFolderTreeModel { + GtkTreeStore parent_object; + +}; + +struct _EMFolderTreeModelClass { + GtkTreeStoreClass parent_class; + + /* signals */ + gboolean (* drag_data_received) (EMFolderTreeModel *model, + GtkTreePath *dest_path, + GtkSelectionData *selection_data); + gboolean (* row_drop_possible) (EMFolderTreeModel *model, + GtkTreePath *dest_path, + GtkSelectionData *selection_data); + + gboolean (* row_draggable) (EMFolderTreeModel *model, + GtkTreePath *src_path); + gboolean (* drag_data_get) (EMFolderTreeModel *model, + GtkTreePath *src_path, + GtkSelectionData *selection_data); + gboolean (* drag_data_delete) (EMFolderTreeModel *model, + GtkTreePath *src_path); +}; + + +GType em_folder_tree_model_get_type (void); + + +EMFolderTreeModel *em_folder_tree_model_new (int n_columns, GType *types); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __EM_FOLDER_TREE_MODEL_H__ */ -- cgit