From 963cbcaff5e09c28a9c5a1524d9dfc6d5a22f6af Mon Sep 17 00:00:00 2001 From: Bradford Hovinen Date: Tue, 3 Jul 2001 18:06:27 +0000 Subject: [PATCH] Use correct location for Glade data 2001-07-03 Bradford Hovinen * capplets/Makefile.am (INCLUDES): Use correct location for Glade data --- ChangeLog | 5 +++++ capplets/Makefile.am | 10 +++++----- capplets/sound-properties-capplet.c | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a577fee2..d7481af42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-07-03 Bradford Hovinen + + * capplets/Makefile.am (INCLUDES): Use correct location for Glade + data + 2001-07-03 Richard Hestilow * configure.in: Add PKG_CHECK_MODULES for SCREENSAVER_CAPPLET. diff --git a/capplets/Makefile.am b/capplets/Makefile.am index 1647a0335..dbc3f12cc 100644 --- a/capplets/Makefile.am +++ b/capplets/Makefile.am @@ -8,11 +8,11 @@ always_built_SUBDIRS = desktop-links \ SUBDIRS = $(always_built_SUBDIRS) INCLUDES = \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DGNOME_ICONDIR=\""${prefix}/share/pixmaps"\" \ - -DGLADE_DATADIR=\""$(Gladedir)"\" \ - @CAPPLET_CFLAGS@ \ - -I$(top_srcdir) \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + -DGNOME_ICONDIR=\""${prefix}/share/pixmaps"\" \ + -DGLADE_DATADIR=\""$(datadir)/control-center-data"\" \ + @CAPPLET_CFLAGS@ \ + -I$(top_srcdir) \ -I$(top_srcdir)/intl bin_PROGRAMS = sound-properties-capplet diff --git a/capplets/sound-properties-capplet.c b/capplets/sound-properties-capplet.c index 9ccb3dbc6..78883dff4 100644 --- a/capplets/sound-properties-capplet.c +++ b/capplets/sound-properties-capplet.c @@ -25,6 +25,10 @@ # include #endif +#define DEBUG_MSG(str, args...) \ + g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "(%d:%s) " str, \ + getpid (), __FUNCTION__ , ## args) + /* Macros for variables that vary from capplet to capplet */ #define DEFAULT_MONIKER "archiver:sound-properties" @@ -199,9 +203,24 @@ create_dialog_cb (BonoboGenericFactory *factory, gpointer data) GtkWidget *pf; if (control == NULL) { + DEBUG_MSG ("Creating control"); + dialog = glade_xml_new (GLADE_FILE, "prefs_widget"); + + if (dialog == NULL) { + g_critical ("Could not load glade file"); + return NULL; + } + widget = glade_xml_get_widget (dialog, "prefs_widget"); + if (widget == NULL) { + g_critical ("Could not find preferences widget"); + return NULL; + } + + DEBUG_MSG ("Loaded dialog: %p, %p", dialog, widget); + pf = bonobo_property_frame_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (pf), widget); gtk_widget_show_all (pf);