diff options
author | Brian Tarricone <brian@tarricone.org> | 2008-10-18 12:40:12 +0000 |
---|---|---|
committer | Brian Tarricone <brian@tarricone.org> | 2008-10-18 12:40:12 +0000 |
commit | 8a0e2f069d3e43f59e9bbed8acf014a7c8a15f3d (patch) | |
tree | 01db6f8ef2b93a63e57f97e16eebfdd2c88c74dd /engines | |
parent | 56e41c907a8d1f98a29d98940d2a82b38902d0c1 (diff) | |
download | xfce4-session-8a0e2f069d3e43f59e9bbed8acf014a7c8a15f3d.tar.gz |
* configure.in.in: Depend on newer version of libxfconf.
* engines/*/Makefile.am: Link with libxfconf.
* libxfsm/xfsm-splash-rc.*: Replace XfceRc usage with
XfconfChannel.
* libxfsm/xfce4-session-2.0.pc.in: Add libxfconf-0 to required
packages list.
* settings/{module.*,splash-settings.c]: Load XfconfChannel
with a property base instead of the old XfceRc file.
* xfce4-session/xfsm-splash-screen.c: Fetch settings from
xfconf instead of rc file.
(Old svn revision: 28292)
Diffstat (limited to 'engines')
-rw-r--r-- | engines/balou/Makefile.am | 11 | ||||
-rw-r--r-- | engines/balou/config.c | 8 | ||||
-rw-r--r-- | engines/balou/engine.c | 5 | ||||
-rw-r--r-- | engines/mice/Makefile.am | 16 | ||||
-rw-r--r-- | engines/simple/Makefile.am | 18 | ||||
-rw-r--r-- | engines/simple/simple.c | 43 |
6 files changed, 58 insertions, 43 deletions
diff --git a/engines/balou/Makefile.am b/engines/balou/Makefile.am index 200fc437..d9743b83 100644 --- a/engines/balou/Makefile.am +++ b/engines/balou/Makefile.am @@ -18,7 +18,8 @@ libbalou_la_SOURCES = \ libbalou_la_CFLAGS = \ -I$(top_srcdir) \ - @LIBXFCEGUI4_CFLAGS@ \ + $(LIBXFCEGUI4_CFLAGS) \ + $(XFCONF_CFLAGS) \ -DBALOU_EXPORT_THEME=\"$(libexecdir)/balou-export-theme\" \ -DBALOU_INSTALL_THEME=\"$(libexecdir)/balou-install-theme\" @@ -28,12 +29,10 @@ libbalou_la_LDFLAGS = \ -module libbalou_la_LIBADD = \ - $(top_builddir)/libxfsm/libxfsm-4.6.la + $(top_builddir)/libxfsm/libxfsm-4.6.la \ + $(LIBXFCEGUI4_LIBS) \ + $(XFCONF_LIBS) -if HAVE_OS_CYGWIN -libbalou_la_LIBADD += \ - @XFCE_MCS_MANAGER_LIBS@ -endif libbalou_la_DEPENDENCIES = \ $(top_builddir)/libxfsm/libxfsm-4.6.la diff --git a/engines/balou/config.c b/engines/balou/config.c index c5853741..c5a7e378 100644 --- a/engines/balou/config.c +++ b/engines/balou/config.c @@ -835,7 +835,7 @@ config_create (XfsmSplashRc *rc) GtkWidget *page; GtkWidget *swin; GtkWidget *vbox; - const gchar *theme; + gchar *theme; theme = xfsm_splash_rc_read_entry (rc, "Theme", "Default"); @@ -914,6 +914,8 @@ config_create (XfsmSplashRc *rc) g_signal_connect (G_OBJECT (treeview), "destroy", G_CALLBACK (config_store), rc); + g_free (theme); + return page; } @@ -947,7 +949,7 @@ config_configure (XfsmSplashConfig *config, static GdkPixbuf* config_preview (XfsmSplashConfig *config) { - const gchar *name; + gchar *name; BalouTheme *theme; GdkPixbuf *pixbuf = NULL; @@ -959,6 +961,8 @@ config_preview (XfsmSplashConfig *config) pixbuf = balou_theme_generate_preview (theme, 320, 240); balou_theme_destroy (theme); + g_free (name); + return pixbuf; } diff --git a/engines/balou/engine.c b/engines/balou/engine.c index c0fc4475..0581dbac 100644 --- a/engines/balou/engine.c +++ b/engines/balou/engine.c @@ -37,11 +37,12 @@ static void engine_setup (XfsmSplashEngine *engine, XfsmSplashRc *rc) { - const gchar *theme_name; - BalouTheme *theme; + gchar *theme_name; + BalouTheme *theme; theme_name = xfsm_splash_rc_read_entry (rc, "Theme", DEFAULT_THEME); theme = balou_theme_load (theme_name); + g_free (theme_name); balou_init (BALOU (engine->user_data), engine->display, diff --git a/engines/mice/Makefile.am b/engines/mice/Makefile.am index 845d650c..231955b3 100644 --- a/engines/mice/Makefile.am +++ b/engines/mice/Makefile.am @@ -9,7 +9,8 @@ libmice_la_SOURCES = \ libmice_la_CFLAGS = \ -I$(top_srcdir) \ - @LIBXFCEGUI4_CFLAGS@ + $(LIBXFCEGUI4_CFLAGS) \ + $(XFCONF_CFLAGS) libmice_la_LDFLAGS = \ -avoid-version \ @@ -17,12 +18,9 @@ libmice_la_LDFLAGS = \ -module libmice_la_LIBADD = \ - $(top_builddir)/libxfsm/libxfsm-4.6.la - -if HAVE_OS_CYGWIN -libmice_la_LIBADD += \ - @XFCE_MCS_MANAGER_LIBS@ -endif + $(top_builddir)/libxfsm/libxfsm-4.6.la \ + $(LIBXFCEGUI4_LIBS) \ + $(XFCONF_LIBS) libmice_la_DEPENDENCIES = \ $(top_builddir)/libxfsm/libxfsm-4.6.la @@ -34,10 +32,10 @@ generate_SOURCES = \ generate.c generate_CFLAGS = \ - @LIBXFCEGUI4_CFLAGS@ + $(LIBXFCEGUI4_CFLAGS) generate_LDADD = \ - @LIBXFCEGUI4_LIBS@ + $(LIBXFCEGUI4_LIBS) EXTRA_DIST = \ diff --git a/engines/simple/Makefile.am b/engines/simple/Makefile.am index 553760bc..ab4e3986 100644 --- a/engines/simple/Makefile.am +++ b/engines/simple/Makefile.am @@ -9,21 +9,21 @@ libsimple_la_SOURCES = \ libsimple_la_CFLAGS = \ -I$(top_srcdir) \ - @LIBX11_CFLAGS@ \ - @LIBXFCEGUI4_CFLAGS@ + $(LIBX11_CFLAGS) \ + $(LIBXFCEGUI4_CFLAGS) \ + $(XFCONF_CFLAGS) libsimple_la_LDFLAGS = \ -avoid-version \ -no-undefined \ - -module + -module \ + $(LIBX11_LDFLAGS) libsimple_la_LIBADD = \ - $(top_builddir)/libxfsm/libxfsm-4.6.la - -if HAVE_OS_CYGWIN -libsimple_la_LIBADD += \ - @XFCE_MCS_MANAGER_LIBS@ -endif + $(top_builddir)/libxfsm/libxfsm-4.6.la \ + $(LIBX11_LIBS) \ + $(LIBXFCEGUI4_LIBS) \ + $(XFCONF_LIBS) libsimple_la_DEPENDENCIES = \ $(top_builddir)/libxfsm/libxfsm-4.6.la diff --git a/engines/simple/simple.c b/engines/simple/simple.c index 473a733e..91c943ac 100644 --- a/engines/simple/simple.c +++ b/engines/simple/simple.c @@ -92,8 +92,9 @@ simple_setup (XfsmSplashEngine *engine, PangoContext *context; GdkWindowAttr attr; GdkRectangle geo; - const gchar *font; - const gchar *path; + gchar *color; + gchar *font; + gchar *path; GdkWindow *root; GdkPixbuf *logo = NULL; GdkCursor *cursor; @@ -105,10 +106,14 @@ simple_setup (XfsmSplashEngine *engine, simple = (Simple *) engine->user_data; /* load settings */ - gdk_color_parse (xfsm_splash_rc_read_entry (rc, "BgColor", DEFAULT_BGCOLOR), - &simple->bgcolor); - gdk_color_parse (xfsm_splash_rc_read_entry (rc, "FgColor", DEFAULT_FGCOLOR), - &simple->fgcolor); + color = xfsm_splash_rc_read_entry (rc, "BgColor", DEFAULT_BGCOLOR); + gdk_color_parse (color, &simple->bgcolor); + g_free (color); + + color = xfsm_splash_rc_read_entry (rc, "FgColor", DEFAULT_FGCOLOR); + gdk_color_parse (color, &simple->fgcolor); + g_free (color); + font = xfsm_splash_rc_read_entry (rc, "Font", DEFAULT_FONT); path = xfsm_splash_rc_read_entry (rc, "Image", NULL); @@ -190,6 +195,8 @@ simple_setup (XfsmSplashEngine *engine, gdk_window_show (simple->window); /* cleanup */ + g_free (font); + g_free (path); pango_font_description_free (description); pango_font_metrics_unref (metrics); gdk_cursor_unref (cursor); @@ -345,8 +352,9 @@ static void config_configure (XfsmSplashConfig *config, GtkWidget *parent) { - const gchar *font; - const gchar *path; + gchar *font; + gchar *path; + gchar *colorstr; GtkWidget *dialog; GtkWidget *frame; GtkWidget *btn_font; @@ -379,6 +387,7 @@ config_configure (XfsmSplashConfig *config, font = xfsm_splash_rc_read_entry (config->rc, "Font", DEFAULT_FONT); btn_font = gtk_font_button_new_with_font (font); + g_free (font); xfce_framebox_add (XFCE_FRAMEBOX (frame), btn_font); gtk_widget_show (btn_font); @@ -395,8 +404,9 @@ config_configure (XfsmSplashConfig *config, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); - gdk_color_parse (xfsm_splash_rc_read_entry (config->rc, "BgColor", - DEFAULT_BGCOLOR), &color); + colorstr = xfsm_splash_rc_read_entry (config->rc, "BgColor", DEFAULT_BGCOLOR); + gdk_color_parse (colorstr, &color); + g_free (colorstr); sel_bg = xfce_color_button_new_with_color (&color); gtk_table_attach (GTK_TABLE (table), sel_bg, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); @@ -407,8 +417,9 @@ config_configure (XfsmSplashConfig *config, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); - gdk_color_parse (xfsm_splash_rc_read_entry (config->rc, "FgColor", - DEFAULT_FGCOLOR), &color); + colorstr = xfsm_splash_rc_read_entry (config->rc, "FgColor", DEFAULT_FGCOLOR); + gdk_color_parse (colorstr, &color); + g_free (colorstr); sel_fg = xfce_color_button_new_with_color (&color); gtk_table_attach (GTK_TABLE (table), sel_fg, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); @@ -454,6 +465,7 @@ config_configure (XfsmSplashConfig *config, gtk_widget_set_sensitive (button, TRUE); gtk_entry_set_text (GTK_ENTRY (entry), path); } + g_free (path); g_signal_connect (G_OBJECT (checkbox), "toggled", G_CALLBACK (config_toggled), entry); g_signal_connect (G_OBJECT (checkbox), "toggled", @@ -465,8 +477,8 @@ config_configure (XfsmSplashConfig *config, gtk_dialog_run (GTK_DIALOG (dialog)); /* store settings */ - font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (btn_font)); - xfsm_splash_rc_write_entry (config->rc, "Font", font); + xfsm_splash_rc_write_entry (config->rc, "Font", + gtk_font_button_get_font_name (GTK_FONT_BUTTON (btn_font))); xfce_color_button_get_color (XFCE_COLOR_BUTTON (sel_bg), &color); g_snprintf (buffer, 32, "#%02x%02x%02x", @@ -482,7 +494,7 @@ config_configure (XfsmSplashConfig *config, (unsigned) color.blue >> 8); xfsm_splash_rc_write_entry (config->rc, "FgColor", buffer); - path = gtk_entry_get_text (GTK_ENTRY (entry)); + path = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)) && path != NULL && g_file_test (path, G_FILE_TEST_IS_REGULAR)) { @@ -492,6 +504,7 @@ config_configure (XfsmSplashConfig *config, { xfsm_splash_rc_write_entry (config->rc, "Image", ""); } + g_free (path); gtk_widget_destroy (dialog); } |