diff options
-rw-r--r-- | ChangeLog | 21 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 21 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 21 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 21 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 21 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | gtk/Makefile.am | 46 | ||||
-rw-r--r-- | gtk/gtk.h | 2 | ||||
-rw-r--r-- | gtk/gtkfilechooser.c | 2 | ||||
-rw-r--r-- | gtk/gtkfilechooserdefault.c | 48 | ||||
-rw-r--r-- | gtk/gtkfilechooserdialog.c | 2 | ||||
-rw-r--r-- | gtk/gtkfilechooserentry.c | 7 | ||||
-rw-r--r-- | gtk/gtkfilechooserutils.c | 2 | ||||
-rw-r--r-- | gtk/gtkfilechooserwidget.c | 6 | ||||
-rw-r--r-- | gtk/gtkfilefilter.c | 14 | ||||
-rw-r--r-- | gtk/gtkfilesystem.c | 2 | ||||
-rw-r--r-- | gtk/gtkfilesystem.h | 8 | ||||
-rw-r--r-- | gtk/gtkfilesystemmodel.c | 5 | ||||
-rw-r--r-- | gtk/gtkfilesystemunix.c | 1 | ||||
-rw-r--r-- | gtk/xdgmime/Makefile.am | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 7 | ||||
-rw-r--r-- | tests/prop-editor.c | 31 | ||||
-rw-r--r-- | tests/testfilechooser.c | 16 |
23 files changed, 240 insertions, 68 deletions
@@ -1,3 +1,24 @@ +Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch] + gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]: + gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: + Basic framework for the new file selector widget. + + * gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch] + gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]: + Initial implementation of the GtkFileChooser user interface. + + * gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation + for Unix files. + + * configure.in gtk/Makefile.am gtk/xdgmime: Build code + for freedesktop.org MIME system on Unix. + + * tests/testfilechooser.c: Test program for GtkFileChooser + + * tests/prop-editor.c: Add support for properties on interfaces. + Tue Oct 21 16:12:51 2003 Owen Taylor <otaylor@redhat.com> * demos/gtk-demo/menus.c (do_menus): Fix some unused diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e027fd6517..d3893a4a55 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,24 @@ +Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch] + gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]: + gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: + Basic framework for the new file selector widget. + + * gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch] + gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]: + Initial implementation of the GtkFileChooser user interface. + + * gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation + for Unix files. + + * configure.in gtk/Makefile.am gtk/xdgmime: Build code + for freedesktop.org MIME system on Unix. + + * tests/testfilechooser.c: Test program for GtkFileChooser + + * tests/prop-editor.c: Add support for properties on interfaces. + Tue Oct 21 16:12:51 2003 Owen Taylor <otaylor@redhat.com> * demos/gtk-demo/menus.c (do_menus): Fix some unused diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e027fd6517..d3893a4a55 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,24 @@ +Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch] + gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]: + gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: + Basic framework for the new file selector widget. + + * gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch] + gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]: + Initial implementation of the GtkFileChooser user interface. + + * gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation + for Unix files. + + * configure.in gtk/Makefile.am gtk/xdgmime: Build code + for freedesktop.org MIME system on Unix. + + * tests/testfilechooser.c: Test program for GtkFileChooser + + * tests/prop-editor.c: Add support for properties on interfaces. + Tue Oct 21 16:12:51 2003 Owen Taylor <otaylor@redhat.com> * demos/gtk-demo/menus.c (do_menus): Fix some unused diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e027fd6517..d3893a4a55 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,24 @@ +Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch] + gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]: + gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: + Basic framework for the new file selector widget. + + * gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch] + gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]: + Initial implementation of the GtkFileChooser user interface. + + * gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation + for Unix files. + + * configure.in gtk/Makefile.am gtk/xdgmime: Build code + for freedesktop.org MIME system on Unix. + + * tests/testfilechooser.c: Test program for GtkFileChooser + + * tests/prop-editor.c: Add support for properties on interfaces. + Tue Oct 21 16:12:51 2003 Owen Taylor <otaylor@redhat.com> * demos/gtk-demo/menus.c (do_menus): Fix some unused diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e027fd6517..d3893a4a55 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,24 @@ +Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch] + gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]: + gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]: + Basic framework for the new file selector widget. + + * gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch] + gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]: + Initial implementation of the GtkFileChooser user interface. + + * gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation + for Unix files. + + * configure.in gtk/Makefile.am gtk/xdgmime: Build code + for freedesktop.org MIME system on Unix. + + * tests/testfilechooser.c: Test program for GtkFileChooser + + * tests/prop-editor.c: Add support for properties on interfaces. + Tue Oct 21 16:12:51 2003 Owen Taylor <otaylor@redhat.com> * demos/gtk-demo/menus.c (do_menus): Fix some unused diff --git a/configure.in b/configure.in index 3ccfe822ee..582b3d33c1 100644 --- a/configure.in +++ b/configure.in @@ -145,6 +145,7 @@ case "$host" in esac AC_MSG_RESULT([$os_win32]) AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes") +AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes") if test "$os_win32" = "yes"; then AC_CHECK_PROG(ms_librarian, lib.exe, yes, no) @@ -1571,6 +1572,7 @@ gtk/gtkversion.h gtk/gtk-win32.rc gtk/stock-icons/Makefile gtk/theme-bits/Makefile +gtk/xdgmime/Makefile modules/Makefile modules/input/Makefile contrib/Makefile diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 646894e614..8d630be488 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -2,6 +2,12 @@ SUBDIRS=stock-icons theme-bits +if OS_UNIX +SUBDIRS += xdgmime +endif + +DIST_SUBDIRS=stock-icons theme-bits xdgmime + INCLUDES = \ -DG_LOG_DOMAIN=\"Gtk\" \ -DGTK_LIBDIR=\"$(libdir)\" \ @@ -20,6 +26,7 @@ INCLUDES = \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ -DGTK_DISABLE_DEPRECATED \ + -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED \ $(GTK_DEBUG_FLAGS) \ $(GTK_DEP_CFLAGS) @@ -72,6 +79,10 @@ libadd = \ $(top_builddir)/gdk/$(gdktargetlib) \ $(GTK_DEP_LIBS) +if OS_UNIX +libadd += xdgmime/libxdgmime.la +endif + # common options for the various packages. libtool_opts = \ -version-info $(LT_VERSION_INFO) \ @@ -133,6 +144,10 @@ gtk_public_h_sources = \ gtkenums.h \ gtkeventbox.h \ gtkexpander.h \ + gtkfilechooser.h \ + gtkfilechooserdialog.h \ + gtkfilechooserwidget.h \ + gtkfilefilter.h \ gtkfilesel.h \ gtkfixed.h \ gtkfontbutton.h \ @@ -212,7 +227,6 @@ gtk_public_h_sources = \ gtktextchild.h \ gtktextdisplay.h \ gtktextiter.h \ - gtktextlayout.h \ gtktextmark.h \ gtktexttag.h \ gtktexttagtable.h \ @@ -249,11 +263,24 @@ gtk_public_h_sources = \ gtkwidget.h \ gtkwindow.h +# Installed header files without compatibility guarantees +# that are not include in gtk/gtk.h +gtk_semi_private_h_sources = \ + gtktextlayout.h \ + gtkfilesystem.h + # GTK+ header files that don't get installed gtk_private_h_sources = \ + gtkcellrendererseptext.h\ gtkcellview.h \ gtkcellviewmenuitem.h \ gtkentryprivate.h \ + gtkfilechooserentry.h \ + gtkfilechooserdefault.h \ + gtkfilechooserprivate.h \ + gtkfilechooserutils.h \ + gtkfilesystemunix.h \ + gtkfilesystemmodel.h \ gtkrbtree.h \ gtktextbtree.h \ gtktextchildprivate.h \ @@ -292,6 +319,7 @@ gtk_c_sources = \ gtkcelllayout.c \ gtkcellrenderer.c \ gtkcellrendererpixbuf.c \ + gtkcellrendererseptext.c\ gtkcellrenderertext.c \ gtkcellrenderertoggle.c \ gtkcellview.c \ @@ -317,7 +345,16 @@ gtk_c_sources = \ gtkentrycompletion.c \ gtkeventbox.c \ gtkexpander.c \ + gtkfilechooser.c \ + gtkfilechooserdialog.c \ + gtkfilechooserentry.c \ + gtkfilechooserdefault.c \ + gtkfilechooserutils.c \ + gtkfilechooserwidget.c \ + gtkfilefilter.c \ gtkfilesel.c \ + gtkfilesystem.c \ + gtkfilesystemmodel.c \ gtkfixed.c \ gtkfontbutton.c \ gtkfontsel.c \ @@ -451,6 +488,11 @@ gtk_c_sources = \ gtkwindow.c \ xembed.h +if OS_UNIX +gtk_private_h_sources += gtkfilesystemunix.h +gtk_c_sources += gtkfilesystemunix.c +endif + gtk_plug_c_sources = \ gtkplug.c \ gtksocket.c \ @@ -568,7 +610,7 @@ gtktypebuiltins.c: @REBUILD@ $(gtk_public_h_sources) Makefile lib_LTLIBRARIES = $(gtktargetlib) gtkincludedir = $(includedir)/gtk-2.0/gtk -gtkinclude_HEADERS = $(gtk_public_h_sources) $(gtk_built_public_sources) gtkversion.h +gtkinclude_HEADERS = $(gtk_public_h_sources) $(gtk_semi_private_h_sources) $(gtk_built_public_sources) gtkversion.h libgtk_x11_2_0_la_SOURCES = $(gtk_c_sources) $(gtk_plug_c_sources) libgtk_linux_fb_2_0_la_SOURCES = $(gtk_c_sources) @@ -74,6 +74,8 @@ #include <gtk/gtkexpander.h> #include <gtk/gtkfilesel.h> #include <gtk/gtkfixed.h> +#include <gtk/gtkfilechooserdialog.h> +#include <gtk/gtkfilechooserwidget.h> #include <gtk/gtkfontbutton.h> #include <gtk/gtkfontsel.h> #include <gtk/gtkframe.h> diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c index 23d3024eb0..aaa7382fab 100644 --- a/gtk/gtkfilechooser.c +++ b/gtk/gtkfilechooser.c @@ -20,8 +20,8 @@ #include "gtkfilechooser.h" #include "gtkfilechooserprivate.h" -#include "gtkfilechooserenums.h" #include "gtkfilesystem.h" +#include "gtktypebuiltins.h" #define _(str) (str) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 738983b52b..ddb517b62f 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -18,34 +18,36 @@ * Boston, MA 02111-1307, USA. */ +#include "gtkalignment.h" +#include "gtkcellrendererpixbuf.h" #include "gtkcellrendererseptext.h" -#include "gtkfilechooserimpldefault.h" +#include "gtkcellrenderertext.h" +#include "gtkentry.h" +#include "gtkfilechooserdefault.h" #include "gtkfilechooserentry.h" -#include "gtkfilechooserenums.h" #include "gtkfilechooserutils.h" #include "gtkfilechooser.h" #include "gtkfilesystemmodel.h" - -#include <gtk/gtkalignment.h> -#include <gtk/gtkcellrendererpixbuf.h> -#include <gtk/gtkcellrenderertext.h> -#include <gtk/gtkentry.h> -#include <gtk/gtkframe.h> -#include <gtk/gtkhbox.h> -#include <gtk/gtkhpaned.h> -#include <gtk/gtkicontheme.h> -#include <gtk/gtkimage.h> -#include <gtk/gtklabel.h> -#include <gtk/gtkmenuitem.h> -#include <gtk/gtkoptionmenu.h> -#include <gtk/gtkscrolledwindow.h> -#include <gtk/gtkstock.h> -#include <gtk/gtktable.h> -#include <gtk/gtktreeview.h> -#include <gtk/gtktreemodelsort.h> -#include <gtk/gtktreeselection.h> -#include <gtk/gtktreestore.h> -#include <gtk/gtkvbox.h> +#include "gtkframe.h" +#include "gtkhbox.h" +#include "gtkhpaned.h" +#include "gtkicontheme.h" +#include "gtkimage.h" +#include "gtklabel.h" +#include "gtkmenuitem.h" +#undef GTK_DISABLE_DEPRECATED +#include "gtkoptionmenu.h" +#define GTK_DISABLE_DEPRECATED +#include "gtkprivate.h" +#include "gtkscrolledwindow.h" +#include "gtkstock.h" +#include "gtktable.h" +#include "gtktreeview.h" +#include "gtktreemodelsort.h" +#include "gtktreeselection.h" +#include "gtktreestore.h" +#include "gtktypebuiltins.h" +#include "gtkvbox.h" #include <string.h> #include <time.h> diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c index 77ab450240..678913c335 100644 --- a/gtk/gtkfilechooserdialog.c +++ b/gtk/gtkfilechooserdialog.c @@ -20,9 +20,9 @@ #include "gtkfilechooserdialog.h" #include "gtkfilechooserwidget.h" -#include "gtkfilechooserenums.h" #include "gtkfilechooserutils.h" #include "gtkfilesystem.h" +#include "gtktypebuiltins.h" #include <stdarg.h> diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index ca29f02e26..da693aba38 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -18,12 +18,11 @@ * Boston, MA 02111-1307, USA. */ -#include "gtkfilechooserentry.h" - -#include <gtk/gtkentry.h> - #include <string.h> +#include "gtkentry.h" +#include "gtkfilechooserentry.h" + typedef struct _GtkFileChooserEntryClass GtkFileChooserEntryClass; #define GTK_FILE_CHOOSER_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_CHOOSER_ENTRY, GtkFileChooserEntryClass)) diff --git a/gtk/gtkfilechooserutils.c b/gtk/gtkfilechooserutils.c index de19257bfc..546ff93e7f 100644 --- a/gtk/gtkfilechooserutils.c +++ b/gtk/gtkfilechooserutils.c @@ -21,8 +21,8 @@ #include "gtkfilechooserutils.h" #include "gtkfilechooser.h" -#include "gtkfilechooserenums.h" #include "gtkfilesystem.h" +#include "gtktypebuiltins.h" static void delegate_set_current_folder (GtkFileChooser *chooser, const GtkFilePath *path); diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 0ad7e823e5..bfc3b81c5b 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -19,10 +19,12 @@ */ #include "gtkfilechooserwidget.h" -#include "gtkfilechooserimpldefault.h" -#include "gtkfilechooserenums.h" +#include "gtkfilechooserdefault.h" #include "gtkfilechooserutils.h" +#ifdef G_OS_UNIX #include "gtkfilesystemunix.h" +#endif +#include "gtktypebuiltins.h" struct _GtkFileChooserWidgetPrivate { diff --git a/gtk/gtkfilefilter.c b/gtk/gtkfilefilter.c index 762f923559..9f9c223965 100644 --- a/gtk/gtkfilefilter.c +++ b/gtk/gtkfilefilter.c @@ -18,12 +18,11 @@ * Boston, MA 02111-1307, USA. */ -#include "gtkfilefilter.h" - -#include <gtk/gtkobject.h> - #include <string.h> +#include "gtkfilefilter.h" +#include "gtkobject.h" + typedef struct _GtkFileFilterClass GtkFileFilterClass; typedef struct _FilterRule FilterRule; @@ -317,11 +316,6 @@ gtk_file_filter_get_needed (GtkFileFilter *filter) return filter->needed; } -/* Remove once we merge into GTK+ and use _gtk_fnmatch(). - */ -gboolean _gtk_file_chooser_fnmatch (const char *pattern, - const char *string); - /** * gtk_file_filter_filter: * @filter: a #GtkFileFilter @@ -359,7 +353,7 @@ gtk_file_filter_filter (GtkFileFilter *filter, return TRUE; break; case FILTER_RULE_PATTERN: - if (_gtk_file_chooser_fnmatch (rule->u.pattern, filter_info->display_name)) + if (_gtk_fnmatch (rule->u.pattern, filter_info->display_name)) return TRUE; break; case FILTER_RULE_CUSTOM: diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c index ff782f0c2f..ea7c4fee74 100644 --- a/gtk/gtkfilesystem.c +++ b/gtk/gtkfilesystem.c @@ -18,9 +18,9 @@ * Boston, MA 02111-1307, USA. */ -#include <gtk/gtkicontheme.h> #include "gtkfilesystem.h" +#include "gtkicontheme.h" #include <string.h> diff --git a/gtk/gtkfilesystem.h b/gtk/gtkfilesystem.h index 18ba61ca5d..ee962b2599 100644 --- a/gtk/gtkfilesystem.h +++ b/gtk/gtkfilesystem.h @@ -21,6 +21,14 @@ #ifndef __GTK_FILE_SYSTEM_H__ #define __GTK_FILE_SYSTEM_H__ +/* This is a "semi-private" header; it is meant only for + * alternate GtkFileChooser backend modules; no stability guarantees + * are made at this point + */ +#ifndef GTK_FILE_SYSTEM_ENABLE_UNSUPPORTED +#error "GtkFileSystem is not supported API for general use" +#endif + #include <glib-object.h> #include <gtk/gtkwidget.h> /* For icon handling */ diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index 75762cff5c..c69e29a415 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -18,10 +18,11 @@ * Boston, MA 02111-1307, USA. */ +#include <string.h> + #include "gtkfilesystemmodel.h" #include "gtkfilesystem.h" -#include <gtk/gtktreemodel.h> -#include <string.h> +#include "gtktreemodel.h" typedef struct _GtkFileSystemModelClass GtkFileSystemModelClass; typedef struct _FileModelNode FileModelNode; diff --git a/gtk/gtkfilesystemunix.c b/gtk/gtkfilesystemunix.c index ded5389ceb..60a1fbd7ec 100644 --- a/gtk/gtkfilesystemunix.c +++ b/gtk/gtkfilesystemunix.c @@ -21,6 +21,7 @@ #include "gtkfilesystem.h" #include "gtkfilesystemunix.h" +#define XDG_PREFIX _gtk_xdg #include "xdgmime/xdgmime.h" #include <errno.h> diff --git a/gtk/xdgmime/Makefile.am b/gtk/xdgmime/Makefile.am index 5edd02d7d0..38c427a7e3 100644 --- a/gtk/xdgmime/Makefile.am +++ b/gtk/xdgmime/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = -DXDG_PREFIX=_xdg +INCLUDES = -DXDG_PREFIX=_gtk_xdg noinst_LTLIBRARIES = libxdgmime.la diff --git a/tests/Makefile.am b/tests/Makefile.am index a669fce39f..f777438d62 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -31,6 +31,7 @@ noinst_PROGRAMS = \ testcalendar \ testcombo \ testdnd \ + testfilechooser \ testgtk \ testicontheme \ testinput \ @@ -64,6 +65,7 @@ testicontheme_DEPENDENCIES = $(TEST_DEPS) testcalendar_DEPENDENCIES = $(TEST_DEPS) testcombo_DEPENDENCIES = $(TEST_DEPS) testdnd_DEPENDENCIES = $(TEST_DEPS) +testfilechooser_DEPENDENCIES = $(TEST_DEPS) testgtk_DEPENDENCIES = $(TEST_DEPS) testinput_DEPENDENCIES = $(TEST_DEPS) testmenus_DEPENDENCIES = $(TEST_DEPS) @@ -90,6 +92,7 @@ simple_LDADD = $(LDADDS) testcalendar_LDADD = $(LDADDS) testcombo_LDADD = $(LDADDS) testdnd_LDADD = $(LDADDS) +testfilechooser_LDADD = $(LDADDS) testgtk_LDADD = $(LDADDS) testicontheme_LDADD = $(LDADDS) testinput_LDADD = $(LDADDS) @@ -119,6 +122,10 @@ pixbuf_random_LDADD = $(LDADDS) testmerge_LDADD = $(LDADDS) testactions_LDADD = $(LDADDS) +testfilechooser_SOURCES = \ + prop-editor.c \ + testfilechooser.c + testgtk_SOURCES = \ prop-editor.c \ testgtk.c diff --git a/tests/prop-editor.c b/tests/prop-editor.c index 851f700a6b..c9fe9d6d3b 100644 --- a/tests/prop-editor.c +++ b/tests/prop-editor.c @@ -686,13 +686,20 @@ properties_from_type (GObject *object, GtkWidget *sw; GtkWidget *vbox; GtkWidget *table; - GObjectClass *class; GParamSpec **specs; gint n_specs; int i; - class = G_OBJECT_CLASS (g_type_class_peek (type)); - specs = g_object_class_list_properties (class, &n_specs); + if (G_TYPE_IS_INTERFACE (type)) + { + gpointer vtable = g_type_default_interface_peek (type); + specs = g_object_interface_list_properties (vtable, &n_specs); + } + else + { + GObjectClass *class = G_OBJECT_CLASS (g_type_class_peek (type)); + specs = g_object_class_list_properties (class, &n_specs); + } if (n_specs == 0) return NULL; @@ -775,7 +782,9 @@ create_prop_editor (GObject *object, GtkWidget *properties; GtkWidget *label; gchar *title; - + GType *ifaces; + guint n_ifaces; + if ((win = g_object_get_data (G_OBJECT (object), "prop-editor-win"))) { gtk_window_present (GTK_WINDOW (win)); @@ -820,6 +829,20 @@ create_prop_editor (GObject *object, type = g_type_parent (type); } + + ifaces = g_type_interfaces (G_TYPE_FROM_INSTANCE (object), &n_ifaces); + while (n_ifaces--) + { + properties = properties_from_type (object, ifaces[n_ifaces], tips); + if (properties) + { + label = gtk_label_new (g_type_name (ifaces[n_ifaces])); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), + properties, label); + } + } + + g_free (ifaces); } else { diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index 5ec115d897..d813549536 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -6,16 +6,8 @@ #include <unistd.h> #include <gtk/gtk.h> -#include "gtkfilechooserdialog.h" -#include "gtkfilechooser.h" #include "prop-editor.h" -#ifdef USE_GNOME_VFS -#include "gtkfilesystemgnomevfs.h" -#else -#include "gtkfilesystemunix.h" -#endif - static GtkWidget *preview_label; static GtkWidget *preview_image; @@ -300,22 +292,14 @@ main (int argc, char **argv) GtkWidget *button; GtkWidget *dialog; GtkWidget *prop_editor; - GtkFileSystem *file_system; GtkFileFilter *filter; GtkWidget *preview_vbox; GtkWidget *extra; gtk_init (&argc, &argv); -#ifdef USE_GNOME_VFS - file_system = gtk_file_system_gnome_vfs_new (); -#else - file_system = gtk_file_system_unix_new (); -#endif - dialog = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG, "action", GTK_FILE_CHOOSER_ACTION_OPEN, - "file-system", file_system, "title", "Select a file", NULL); |