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
72 lines
2.3 KiB
C
72 lines
2.3 KiB
C
/* -*- mode: c; style: linux -*- */
|
|
|
|
/* mime-type-info.h
|
|
*
|
|
* Copyright (C) 2002 Ximian, Inc.
|
|
*
|
|
* 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 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 Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __MIME_TYPE_INFO_H
|
|
#define __MIME_TYPE_INFO_H
|
|
|
|
#include <gnome.h>
|
|
#include <bonobo.h>
|
|
#include <libgnomevfs/gnome-vfs-mime-info.h>
|
|
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
typedef struct _MimeTypeInfo MimeTypeInfo;
|
|
|
|
struct _MimeTypeInfo
|
|
{
|
|
GtkTreeModel *model;
|
|
GtkTreeIter *iter;
|
|
|
|
gchar *mime_type;
|
|
gchar *description;
|
|
gchar *icon_name;
|
|
GList *file_extensions;
|
|
|
|
gchar *default_component_id;
|
|
GnomeVFSMimeApplication *default_action;
|
|
gchar *custom_line;
|
|
gboolean needs_terminal;
|
|
gchar *edit_line;
|
|
gchar *print_line;
|
|
|
|
gboolean is_category;
|
|
gchar *category;
|
|
};
|
|
|
|
MimeTypeInfo *mime_type_info_load (GtkTreeModel *model,
|
|
GtkTreeIter *iter);
|
|
void mime_type_info_save (const MimeTypeInfo *info);
|
|
void mime_type_info_update (MimeTypeInfo *info);
|
|
void mime_type_info_free (MimeTypeInfo *info);
|
|
|
|
char *mime_type_get_pretty_name_for_server (Bonobo_ServerInfo *server);
|
|
|
|
void mime_type_append_to_dirty_list (MimeTypeInfo *info);
|
|
void mime_type_remove_from_dirty_list (const gchar *mime_type);
|
|
void mime_type_commit_dirty_list (void);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __MIME_TYPE_INFO_H */
|