gnome-control-center/capplets/file-types/mime-types-model.h

74 lines
2.1 KiB
C
Raw Normal View History

2002-01-08 21:25:33 +00:00
/* -*- mode: c; style: linux -*- */
/* mime-types-model.h
* Copyright (C) 2001 Ximian, Inc.
2002-01-08 21:25:33 +00:00
*
* Written by Bradford Hovinen <hovinen@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, or (at your option)
* any later version.
2002-01-08 21:25:33 +00:00
*
* 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.
2002-01-08 21:25:33 +00:00
*
* 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 Place - Suite 330, Boston, MA
* 02111-1307, USA.
2002-01-08 21:25:33 +00:00
*/
#ifndef __MIME_TYPES_MODEL_H
#define __MIME_TYPES_MODEL_H
#include <gnome.h>
#include "model-entry.h"
2002-01-08 21:25:33 +00:00
G_BEGIN_DECLS
#define MIME_TYPES_MODEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mime_types_model_get_type (), MimeTypesModel)
#define MIME_TYPES_MODEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mime_types_model_get_type (), MimeTypesModelClass)
#define IS_MIME_TYPES_MODEL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mime_types_model_get_type ())
#define MODEL_ENTRY_FROM_ITER(obj) (MODEL_ENTRY ((obj)->user_data))
typedef struct _MimeTypesModel MimeTypesModel;
typedef struct _MimeTypesModelClass MimeTypesModelClass;
typedef struct _MimeTypesModelPrivate MimeTypesModelPrivate;
2002-01-08 21:25:33 +00:00
enum {
MODEL_COLUMN_MIME_TYPE,
MODEL_COLUMN_DESCRIPTION,
MODEL_COLUMN_ICON,
MODEL_COLUMN_FILE_EXT,
MODEL_LAST_COLUMN
2002-01-08 21:25:33 +00:00
};
struct _MimeTypesModel
{
GObject parent;
2002-01-08 21:25:33 +00:00
MimeTypesModelPrivate *p;
};
Implement. Mostly a copy from the corresponding function in 2002-01-14 Bradford Hovinen <hovinen@ximian.com> * mime-category-edit-dialog.c (populate_application_list): Implement. Mostly a copy from the corresponding function in mime-edit-dialog.c * mime-types-model.c (get_insertion_point): Make this public (find_supported_apps_for_category, reduce_supported_app_list) (intersect_lists, find_possible_supported_apps): Implement * mime-edit-dialog.c (fill_dialog): Fill category_entry (choose_cat_cb): Implement (mime_edit_dialog_init): Connect choose_button to choose_cat_cb * mime-type-info.c (mime_type_info_load): Load category name (mime_type_info_save): Call reinsert_iter to affect category name change * mime-types-model.c (mime_types_model_new): Add parameter is_category_select; TRUE iff this model should be only for selecting a category and not list the actual file types or Internet services (get_category_name): Implement * mime-edit-dialog.c (mime_edit_dialog_init): Add category_label to first size group 2002-01-13 Bradford Hovinen <hovinen@ximian.com> * file-types-capplet.c (edit_cb, row_activated_cb): Don't try to create a category edit dialog if this is the Internet Services category (count_cb): Only count other than internet services category * mime-types-model.c (model_entry_is_category): Implement (model_entry_is_protocol): Use categories[INTERNET_SERVICES_IDX] rather than string (model_entry_is_internet_services_category): Implement * Makefile.am (gnome_file_types_properties_SOURCES): Add mime-category-edit-dialog.[ch] * file-types-capplet.c (edit_cb): Construct a category edit dialog if the tree iterator has children (row_activated_cb): Ditto
2002-01-14 15:28:36 +00:00
struct _MimeTypesModelClass
{
GObjectClass g_object_class;
};
GType mime_types_model_get_type (void);
Implement. Mostly a copy from the corresponding function in 2002-01-14 Bradford Hovinen <hovinen@ximian.com> * mime-category-edit-dialog.c (populate_application_list): Implement. Mostly a copy from the corresponding function in mime-edit-dialog.c * mime-types-model.c (get_insertion_point): Make this public (find_supported_apps_for_category, reduce_supported_app_list) (intersect_lists, find_possible_supported_apps): Implement * mime-edit-dialog.c (fill_dialog): Fill category_entry (choose_cat_cb): Implement (mime_edit_dialog_init): Connect choose_button to choose_cat_cb * mime-type-info.c (mime_type_info_load): Load category name (mime_type_info_save): Call reinsert_iter to affect category name change * mime-types-model.c (mime_types_model_new): Add parameter is_category_select; TRUE iff this model should be only for selecting a category and not list the actual file types or Internet services (get_category_name): Implement * mime-edit-dialog.c (mime_edit_dialog_init): Add category_label to first size group 2002-01-13 Bradford Hovinen <hovinen@ximian.com> * file-types-capplet.c (edit_cb, row_activated_cb): Don't try to create a category edit dialog if this is the Internet Services category (count_cb): Only count other than internet services category * mime-types-model.c (model_entry_is_category): Implement (model_entry_is_protocol): Use categories[INTERNET_SERVICES_IDX] rather than string (model_entry_is_internet_services_category): Implement * Makefile.am (gnome_file_types_properties_SOURCES): Add mime-category-edit-dialog.[ch] * file-types-capplet.c (edit_cb): Construct a category edit dialog if the tree iterator has children (row_activated_cb): Ditto
2002-01-14 15:28:36 +00:00
GObject *mime_types_model_new (gboolean category_only);
Implement. Mostly a copy from the corresponding function in 2002-01-14 Bradford Hovinen <hovinen@ximian.com> * mime-category-edit-dialog.c (populate_application_list): Implement. Mostly a copy from the corresponding function in mime-edit-dialog.c * mime-types-model.c (get_insertion_point): Make this public (find_supported_apps_for_category, reduce_supported_app_list) (intersect_lists, find_possible_supported_apps): Implement * mime-edit-dialog.c (fill_dialog): Fill category_entry (choose_cat_cb): Implement (mime_edit_dialog_init): Connect choose_button to choose_cat_cb * mime-type-info.c (mime_type_info_load): Load category name (mime_type_info_save): Call reinsert_iter to affect category name change * mime-types-model.c (mime_types_model_new): Add parameter is_category_select; TRUE iff this model should be only for selecting a category and not list the actual file types or Internet services (get_category_name): Implement * mime-edit-dialog.c (mime_edit_dialog_init): Add category_label to first size group 2002-01-13 Bradford Hovinen <hovinen@ximian.com> * file-types-capplet.c (edit_cb, row_activated_cb): Don't try to create a category edit dialog if this is the Internet Services category (count_cb): Only count other than internet services category * mime-types-model.c (model_entry_is_category): Implement (model_entry_is_protocol): Use categories[INTERNET_SERVICES_IDX] rather than string (model_entry_is_internet_services_category): Implement * Makefile.am (gnome_file_types_properties_SOURCES): Add mime-category-edit-dialog.[ch] * file-types-capplet.c (edit_cb): Construct a category edit dialog if the tree iterator has children (row_activated_cb): Ditto
2002-01-14 15:28:36 +00:00
void mime_types_model_construct_iter (MimeTypesModel *model,
ModelEntry *entry,
GtkTreeIter *iter);
2002-01-08 21:25:33 +00:00
G_END_DECLS
#endif /* __MIME_TYPES_MODEL_H */