gnome-control-center/capplets/file-types/file-types-icon-entry.h

72 lines
2.7 KiB
C
Raw Normal View History

New API to get and set icon data. 2000-07-14 Gene Z. Ragan <gzr@eazel.com> * libgnomevfs/gnome-vfs-mime-handlers.c: * libgnomevfs/gnome-vfs-mime-handlers.h: (gnome_vfs_mime_get_icon), (gnome_vfs_mime_set_icon): New API to get and set icon data. * mime-type-capplet/Makefile.am: Added new file mime-type-capplet/nautilus-mime-type-icon-entry.c * mime-type-capplet/nautilus-mime-type-icon-entry.c: * mime-type-capplet/nautilus-mime-type-icon-entry.h: (nautilus_mime_type_icon_entry_get_type), (nautilus_mime_type_icon_entry_class_init), (entry_changed), (entry_activated), (setup_preview), (ientry_destroy), (browse_clicked), (icon_selected_cb), (cancel_pressed), (gil_icon_selected_cb), (nautilus_mime_type_show_icon_selection), (drag_data_received), (drag_data_get), (nautilus_mime_type_icon_entry_init), (nautilus_mime_type_icon_entry_new), (nautilus_mime_type_icon_entry_gnome_file_entry), (nautilus_mime_type_icon_entry_gnome_entry), (nautilus_mime_type_icon_entry_gtk_entry), (nautilus_mime_type_icon_entry_set_pixmap_subdir), (nautilus_mime_type_icon_entry_set_icon), (nautilus_mime_type_icon_entry_get_filename): New file. This is a new verison of GnomeIconEntry. I am customizing it to look and bahve in a way that is compatible with Arlo's UI reccomendations. * mime-type-capplet/nautilus-mime-type-capplet.c: (mime_list_selected_row_callback), (icon_changed), (change_icon_clicked), (init_mime_capplet), (nautilus_mime_type_capplet_update_info), (populate_mime_list): More UI cleanups. Removed GnomeIconEntry and replaced with new NautilusMimeTypeIconEntry.
2000-07-15 01:56:53 +00:00
/* NautilusMimeIconEntry widget - Combo box with "Browse" button for files and
* A pick button which can display a list of icons
* in a current directory, the browse button displays
* same dialog as pixmap-entry
*
* Copyright (C) 1998 The Free Software Foundation
*
* Author: George Lebl <jirka@5z.com>
* icon selection based on original dentry-edit code which was:
* Written by: Havoc Pennington, based on code by John Ellis.
*/
#ifndef NAUTILUS_MIME_TYPE_ICON_ENTRY_H
#define NAUTILUS_MIME_TYPE_ICON_ENTRY_H
#include <gtk/gtkframe.h>
#include <gtk/gtkvbox.h>
#include <libgnome/gnome-defs.h>
#include <libgnomeui/gnome-file-entry.h>
BEGIN_GNOME_DECLS
#define NAUTILUS_TYPE_MIME_ICON_ENTRY (nautilus_mime_type_icon_entry_get_type ())
#define NAUTILUS_MIME_ICON_ENTRY(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_MIME_ICON_ENTRY, NautilusMimeIconEntry))
#define NAUTILUS_MIME_ICON_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_MIME_ICON_ENTRY, NautilusMimeIconEntryClass))
#define NAUTILUS_MIME_IS_ICON_ENTRY(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_MIME_ICON_ENTRY))
#define NAUTILUS_MIME_IS_ICON_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_MIME_ICON_ENTRY))
typedef struct _NautilusMimeIconEntry NautilusMimeIconEntry;
typedef struct _NautilusMimeIconEntryClass NautilusMimeIconEntryClass;
struct _NautilusMimeIconEntry {
GtkVBox vbox;
GtkWidget *fentry;
GtkWidget *frame;
GtkWidget *pick_dialog;
gchar *pick_dialog_dir;
};
struct _NautilusMimeIconEntryClass {
GtkVBoxClass parent_class;
};
guint nautilus_mime_type_icon_entry_get_type (void);
GtkWidget *nautilus_mime_type_icon_entry_new (const gchar *history_id,
const gchar *browse_dialog_title);
/*by default gnome_pixmap entry sets the default directory to the
gnome pixmap directory, this will set it to a subdirectory of that,
or one would use the file_entry functions for any other path*/
void nautilus_mime_type_icon_entry_set_pixmap_subdir(NautilusMimeIconEntry *ientry,
const gchar *subdir);
void nautilus_mime_type_icon_entry_set_icon(NautilusMimeIconEntry *ientry,
const gchar *filename);
GtkWidget *nautilus_mime_type_icon_entry_gnome_file_entry(NautilusMimeIconEntry *ientry);
GtkWidget *nautilus_mime_type_icon_entry_gnome_entry (NautilusMimeIconEntry *ientry);
GtkWidget *nautilus_mime_type_icon_entry_gtk_entry (NautilusMimeIconEntry *ientry);
/*only return a file if it was possible to load it with imlib*/
gchar *nautilus_mime_type_icon_entry_get_filename (NautilusMimeIconEntry *ientry);
void nautilus_mime_type_show_icon_selection (NautilusMimeIconEntry * ientry);
END_GNOME_DECLS
#endif