As I said on #gtk-devel today, I've written some replacements for the GnomeFileEntry and GnomePixmapEntry widgets in libgnomeui for possible inclusion in GTK+ 2.6: EscoFileChooserEntry and EscoImageButton. I'm attaching the headers. Screenshots of these widgets in action are at: http://esco.mine.nu/sshots/esco-file-chooser-entry-1.png http://esco.mine.nu/sshots/esco-image-button-1.png http://esco.mine.nu/sshots/user-selector-applet-0.0.7.png The full sources, including a test app are at http://esco.mine.nu/downloads/user-selector-applet-0.0.7.tar.gz in the "src/esco-ui" directory. -- Peace, Jim Cape http://ignore-your.tv "We still name our military helicopter gunships after victims of genocide. Nobody bats an eyelash about that: Blackhawk. Apache. And Comanche. If the Luftwaffe named its military helicopters Jew and Gypsy, I suppose people would notice." -- Noam Chomsky, "Propaganda and the Public Mind"
/* Escobar Libraries: escofilechooserentry.h * * Copyright (c) 2004 James M. Cape <jcape ignore-your tv> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ESCO_FILE_CHOOSER_ENTRY_H__ #define __ESCO_FILE_CHOOSER_ENTRY_H__ 1 #include <gtk/gtkhbox.h> G_BEGIN_DECLS #define ESCO_TYPE_FILE_CHOOSER_ENTRY \ (esco_file_chooser_entry_get_type ()) #define ESCO_FILE_CHOOSER_ENTRY(object) \ (G_TYPE_CHECK_INSTANCE_CAST ((object), ESCO_TYPE_FILE_CHOOSER_ENTRY, EscoFileChooserEntry)) #define ESCO_FILE_CHOOSER_ENTRY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), ESCO_TYPE_FILE_CHOOSER_ENTRY, EscoFileChooserEntryClass)) #define ESCO_IS_FILE_CHOOSER_ENTRY(object) \ (G_TYPE_CHECK_INSTANCE_TYPE ((object), ESCO_TYPE_FILE_CHOOSER_ENTRY)) #define ESCO_IS_FILE_CHOOSER_ENTRY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), ESCO_TYPE_FILE_CHOOSER_ENTRY)) #define ESCO_FILE_CHOOSER_ENTRY_GET_CLASS(object) \ (G_TYPE_INSTANCE_GET_CLASS ((object), ESCO_TYPE_FILE_CHOOSER_ENTRY, EscoFileChooserEntryClass)) typedef struct _EscoFileChooserEntry EscoFileChooserEntry; typedef struct _EscoFileChooserEntryPrivate EscoFileChooserEntryPrivate; typedef struct _EscoFileChooserEntryClass EscoFileChooserEntryClass; struct _EscoFileChooserEntry { /* <private> */ GtkHBox parent; EscoFileChooserEntryPrivate *_priv; }; struct _EscoFileChooserEntryClass { /* <private> */ GtkHBoxClass parent_class; void (*__esco_reserved1); void (*__esco_reserved2); void (*__esco_reserved3); void (*__esco_reserved4); void (*__esco_reserved5); void (*__esco_reserved6); void (*__esco_reserved7); void (*__esco_reserved8); }; GType esco_file_chooser_entry_get_type (void) G_GNUC_CONST; GtkWidget *esco_file_chooser_entry_new (const gchar *title); void esco_file_chooser_entry_set_title (EscoFileChooserEntry *entry, const gchar *title); G_CONST_RETURN gchar *esco_file_chooser_entry_get_title (EscoFileChooserEntry *entry); void esco_file_chooser_entry_set_max_history_size (EscoFileChooserEntry *entry, guint max_size); guint esco_file_chooser_entry_get_max_history_size (EscoFileChooserEntry *entry); void esco_file_chooser_entry_add_history (EscoFileChooserEntry *entry, const gchar *filename); void esco_file_chooser_entry_remove_history (EscoFileChooserEntry *entry, const gchar *filename); void esco_file_chooser_entry_set_history (EscoFileChooserEntry *entry, GSList *history); GSList *esco_file_chooser_entry_get_history (EscoFileChooserEntry *entry); G_END_DECLS #endif /* __ESCO_FILE_CHOOSER_ENTRY_H__ */
/* Escobar Libraries: escoimagebutton.h * * Copyright (c) 2004 James M. Cape <jcape ignore-your tv> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ESCO_IMAGE_BUTTON_H__ #define __ESCO_IMAGE_BUTTON_H__ 1 #include <gtk/gtktogglebutton.h> G_BEGIN_DECLS #define ESCO_TYPE_IMAGE_BUTTON \ (esco_image_button_get_type ()) #define ESCO_IMAGE_BUTTON(object) \ (G_TYPE_CHECK_INSTANCE_CAST ((object), ESCO_TYPE_IMAGE_BUTTON, EscoImageButton)) #define ESCO_IMAGE_BUTTON_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), ESCO_TYPE_IMAGE_BUTTON, EscoImageButtonClass)) #define ESCO_IS_IMAGE_BUTTON(object) \ (G_TYPE_CHECK_INSTANCE_TYPE ((object), ESCO_TYPE_IMAGE_BUTTON)) #define ESCO_IS_IMAGE_BUTTON_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), ESCO_TYPE_IMAGE_BUTTON)) #define ESCO_IMAGE_BUTTON_GET_CLASS(object) \ (G_TYPE_INSTANCE_GET_CLASS ((object), ESCO_TYPE_IMAGE_BUTTON, EscoImageButtonClass)) typedef struct _EscoImageButton EscoImageButton; typedef struct _EscoImageButtonPrivate EscoImageButtonPrivate; typedef struct _EscoImageButtonClass EscoImageButtonClass; struct _EscoImageButton { /* <private> */ GtkToggleButton parent; EscoImageButtonPrivate *_priv; }; struct _EscoImageButtonClass { /* <private> */ GtkToggleButtonClass parent_class; void (*__esco_reserved1); void (*__esco_reserved2); void (*__esco_reserved3); void (*__esco_reserved4); void (*__esco_reserved5); void (*__esco_reserved6); void (*__esco_reserved7); void (*__esco_reserved8); }; GType esco_image_button_get_type (void) G_GNUC_CONST; GtkWidget *esco_image_button_new (const gchar *title); void esco_image_button_set_title (EscoImageButton *button, const gchar *title); G_CONST_RETURN gchar *esco_image_button_get_title (EscoImageButton *button); void esco_image_button_set_minimum_size (EscoImageButton *button, guint min_size); guint esco_image_button_get_minimum_size (EscoImageButton *button); void esco_image_button_set_show_label (EscoImageButton *button, gboolean show_label); gboolean esco_image_button_get_show_label (EscoImageButton *button); G_END_DECLS #endif /* !__ESCO_IMAGE_BUTTON_H__ */
Attachment:
signature.asc
Description: This is a digitally signed message part