2000-05-31 Gene Z. Ragan <gzr@eazel.com> Work in progress for the modified Files and Programs capplet that is relacing the old mime types capplet in the Gnome Control Center. * mime-type-capplet/Makefile.am: Added link dependeny to libgnomevfs. * mime-type-capplet/edit-window.c: (add_extension), (remove_extension): Rename functions to be more coherent. (initialize_main_win), (initialize_main_win_vals): Modified functions to remove dialog items that are obsolete in our new designs. Added new items such as the application and component menus. (populate_application_menu), (populate_component_menu), (application_menu_activate): Application menu functions that list the short list of applications for a mime type and allow a user to add applications to the short list. (add_application), (show_file_selector): Menu callback and function to display GtkFileSelection to allow user to locate an application to be associated with mime type. * mime-type-capplet/mime-data.c: (add_new_mime_type): Modified functions for new mime APIs. * mime-type-capplet/new-mime-window.c: (launch_new_mime_window): Modified functions for new mime APIs. * modules/file-method.c: (file_handle_new): Modified functions for new mime APIs.
34 lines
1 KiB
C
34 lines
1 KiB
C
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
|
|
/* Copyright (C) 1998 Redhat Software Inc.
|
|
* Authors: Jonathan Blandford <jrb@redhat.com>
|
|
*/
|
|
#ifndef _MIME_DATA_H_
|
|
#define _MIME_DATA_H_
|
|
#include "gnome.h"
|
|
#include <regex.h>
|
|
/* Typedefs */
|
|
typedef struct {
|
|
char *mime_type;
|
|
regex_t *regex[2];
|
|
GList *ext[2];
|
|
GList *user_ext[2];
|
|
char *ext_readable[2];
|
|
char *regex_readable[2];
|
|
char *file_name;
|
|
GList *keys;
|
|
} MimeInfo;
|
|
|
|
extern GHashTable *user_mime_types;
|
|
extern void add_to_key (char *mime_type, char *def, GHashTable *table, gboolean init_user);
|
|
|
|
GtkWidget *get_mime_clist (void);
|
|
void init_mime_type (void);
|
|
void delete_clicked (GtkWidget *widget, gpointer data);
|
|
void add_clicked (GtkWidget *widget, gpointer data);
|
|
void edit_clicked (GtkWidget *widget, gpointer data);
|
|
void add_new_mime_type (gchar *mime_type, gchar *ext);
|
|
void write_user_mime (void);
|
|
void write_initial_mime (void);
|
|
void reread_list (void);
|
|
void discard_mime_info (void);
|
|
#endif
|