[Goodies-commits] r7474 - in xfce4-notes-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Sat Jun 6 17:50:34 CEST 2009
Author: mmassonnet
Date: 2009-06-06 15:50:34 +0000 (Sat, 06 Jun 2009)
New Revision: 7474
Removed:
xfce4-notes-plugin/trunk/panel-plugin/settings-dialog.h
Modified:
xfce4-notes-plugin/trunk/ChangeLog
xfce4-notes-plugin/trunk/configure.in.in
xfce4-notes-plugin/trunk/panel-plugin/Makefile.am
xfce4-notes-plugin/trunk/panel-plugin/notes.h
xfce4-notes-plugin/trunk/panel-plugin/panel-plugin.c
xfce4-notes-plugin/trunk/panel-plugin/settings-dialog.c
Log:
Made the settings dialog a standalone application
Modified: xfce4-notes-plugin/trunk/ChangeLog
===================================================================
--- xfce4-notes-plugin/trunk/ChangeLog 2009-06-06 13:41:52 UTC (rev 7473)
+++ xfce4-notes-plugin/trunk/ChangeLog 2009-06-06 15:50:34 UTC (rev 7474)
@@ -1,5 +1,19 @@
2009-06-06 Mike Massonnet <mmassonnet at xfce.org>
+Made the settings dialog a standalone application
+ * configure.in.in:
+ - Set Xfconf required.
+ * panel-plugin/Makefile.am:
+ - Add compilation rules for binary xfce4-notes-settings.
+ * panel-plugin/notes.c:
+ - Spawn xfce4-notes-settings instead of creating the settings
+ dialog.
+ * panel-plugin/settings-dialog.c:
+ - Add a main function to init Xfconf, an xfconf channel, and show
+ the settings dialog.
+
+2009-06-06 Mike Massonnet <mmassonnet at xfce.org>
+
Verify window/notes names for a set of invalid characters
* panel-plugin/application.vala:
- New method name_is_valid that verifies if the given name has
Modified: xfce4-notes-plugin/trunk/configure.in.in
===================================================================
--- xfce4-notes-plugin/trunk/configure.in.in 2009-06-06 13:41:52 UTC (rev 7473)
+++ xfce4-notes-plugin/trunk/configure.in.in 2009-06-06 15:50:34 UTC (rev 7474)
@@ -50,23 +50,8 @@
XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0])
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.4.0])
+XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0])
-dnl check for xfconf
-enable_xfconf=yes
-m4_define([xfconf_minimum_version], [0])
-XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [xfconf_minimum_version],
- [AC_DEFINE([HAVE_XFCONF], [1], [Define if Xfconf is present])],
- [
- echo "*** Optional package libxfconf-0 was either not found on your system"
- echo "*** or is too old. Please install or upgrade to at least version"
- echo "*** xfconf_minimum_version, or adjust the PKG_CONFIG_PATH environment variable"
- echo "*** if you installed the new version of the package in a nonstandard"
- echo "*** prefix."
- echo ""
- echo "*** Configuration dialog will be disabled!"
- enable_xfconf=no
- ])
-
dnl check for thunar_vfs
enable_thunar_vfs=yes
m4_define([thunar_minimum_version], [0.8.0])
@@ -127,7 +112,6 @@
echo " You need Vala $valac_minimum_version or higher (run $VALAC --version)"
echo
fi
-echo "* Settings Dialog: $enable_xfconf"
echo "* Thunar-vfs Support: $enable_thunar_vfs"
echo "* Debug Support: $enable_debug"
echo
Modified: xfce4-notes-plugin/trunk/panel-plugin/Makefile.am
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/Makefile.am 2009-06-06 13:41:52 UTC (rev 7473)
+++ xfce4-notes-plugin/trunk/panel-plugin/Makefile.am 2009-06-06 15:50:34 UTC (rev 7474)
@@ -17,6 +17,26 @@
@GTK_LIBS@
#
+# Settings dialog
+#
+bin_PROGRAMS += xfce4-notes-settings
+
+xfce4_notes_settings_SOURCES = \
+ color.c \
+ color.h \
+ settings-dialog.c
+
+xfce4_notes_settings_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @LIBXFCEGUI4_CFLAGS@ \
+ @XFCONF_CFLAGS@
+
+xfce4_notes_settings_LDADD = \
+ @GTK_LIBS@ \
+ @LIBXFCEGUI4_LIBS@ \
+ @XFCONF_LIBS@
+
+#
# Vala sources
#
if MAINTAINER_MODE
@@ -46,8 +66,6 @@
color.c \
color.h \
panel-plugin.c \
- settings-dialog.c \
- settings-dialog.h \
notes.c \
notes.h
xfce4_notes_plugin_SOURCES += $(vala_built_SOURCES)
Modified: xfce4-notes-plugin/trunk/panel-plugin/notes.h
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/notes.h 2009-06-06 13:41:52 UTC (rev 7473)
+++ xfce4-notes-plugin/trunk/panel-plugin/notes.h 2009-06-06 15:50:34 UTC (rev 7474)
@@ -24,9 +24,7 @@
#include <libxfce4panel/xfce-panel-plugin.h>
#include <libxfce4panel/xfce-panel-convenience.h>
#include <libxfcegui4/libxfcegui4.h>
-#ifdef HAVE_XFCONF
#include <xfconf/xfconf.h>
-#endif
#ifdef HAVE_THUNAR_VFS
#include <thunar-vfs/thunar-vfs.h>
#endif
@@ -60,9 +58,7 @@
GtkTooltips *tooltips;
-#ifdef HAVE_XFCONF
XfconfChannel *xfconf_channel;
-#endif
#ifdef HAVE_THUNAR_VFS
ThunarVfsMonitor *monitor;
Modified: xfce4-notes-plugin/trunk/panel-plugin/panel-plugin.c
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/panel-plugin.c 2009-06-06 13:41:52 UTC (rev 7473)
+++ xfce4-notes-plugin/trunk/panel-plugin/panel-plugin.c 2009-06-06 15:50:34 UTC (rev 7474)
@@ -25,9 +25,6 @@
#include "defines.h"
#include "color.h"
#include "notes.h"
-#ifdef HAVE_XFCONF
-#include "settings-dialog.h"
-#endif
#include "xfce4-popup-notes.h"
#include <libxfce4panel/xfce-hvbox.h>
@@ -40,9 +37,8 @@
static NotesPlugin *notes_plugin_new (XfcePanelPlugin *panel_plugin);
-#ifdef HAVE_XFCONF
static void notes_plugin_configure (NotesPlugin *notes_plugin);
-#endif
+
static gboolean notes_plugin_set_size (NotesPlugin *notes_plugin,
int size);
static void notes_plugin_set_orientation (NotesPlugin *notes_plugin,
@@ -56,14 +52,13 @@
static void notes_plugin_free (NotesPlugin *notes_plugin);
static void notes_plugin_destroy_timeout (NotesPlugin *notes_plugin);
-#ifdef HAVE_XFCONF
+
static void notes_plugin_monitor_xfconf (NotesPlugin *notes_plugin);
static void notes_plugin_xfconf_property_changed
(NotesPlugin *notes_plugin,
gchar *property,
GValue *value);
-#endif
#ifdef HAVE_THUNAR_VFS
static NotesWindow *notes_plugin_get_window_by_name (NotesPlugin *notes_plugin,
const gchar *name);
@@ -116,9 +111,7 @@
notes_plugin = notes_plugin_new (panel_plugin);
gtk_widget_show_all (GTK_WIDGET (panel_plugin));
-#ifdef HAVE_XFCONF
notes_plugin_monitor_xfconf (notes_plugin);
-#endif
/* Set the tooltip */
#if GTK_CHECK_VERSION (2,12,0)
@@ -129,20 +122,16 @@
orientation = xfce_panel_plugin_get_orientation (panel_plugin);
notes_plugin_set_orientation (notes_plugin, orientation);
-#ifdef HAVE_XFCONF
if (xfconf_channel_get_bool (notes_plugin->xfconf_channel,
- "/general/hide_arrow_button",
+ "/global/hide-arrow-button",
GENERAL_HIDE_ARROW_BUTTON))
gtk_widget_hide (notes_plugin->btn_arrow);
gchar *background = xfconf_channel_get_string (notes_plugin->xfconf_channel,
- "/general/background_color",
+ "/global/background-color",
GENERAL_BACKGROUND_COLOR);
color_set_background (background);
g_free (background);
-#else
- color_set_background (GENERAL_BACKGROUND_COLOR);
-#endif
/* Load the notes */
while (gtk_events_pending ())
@@ -171,9 +160,7 @@
DBG ("\nLook up file: %s\nNotes path: %s", notes_plugin->config_file,
notes_plugin->notes_path);
-#ifdef HAVE_XFCONF
xfconf_init (NULL);
-#endif
notes_plugin->windows = NULL;
notes_plugin->box_panel = GTK_WIDGET (xfce_hvbox_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0));
@@ -187,12 +174,10 @@
gtk_container_add (GTK_CONTAINER (notes_plugin->box_panel), notes_plugin->btn_arrow);
gtk_container_add (GTK_CONTAINER (panel_plugin), notes_plugin->box_panel);
-#ifdef HAVE_XFCONF
g_signal_connect_swapped (panel_plugin,
"configure-plugin",
G_CALLBACK (notes_plugin_configure),
notes_plugin);
-#endif
g_signal_connect_swapped (panel_plugin,
"size-changed",
G_CALLBACK (notes_plugin_set_size),
@@ -238,47 +223,28 @@
#endif
notes_plugin_set_selection (notes_plugin);
-#ifdef HAVE_XFCONF
xfce_panel_plugin_menu_show_configure (panel_plugin);
-#endif
xfce_panel_plugin_add_action_widget (panel_plugin, notes_plugin->btn_panel);
xfce_panel_plugin_add_action_widget (panel_plugin, notes_plugin->btn_arrow);
return notes_plugin;
}
-#ifdef HAVE_XFCONF
static void
notes_plugin_configure (NotesPlugin *notes_plugin)
{
- GtkWindowGroup *group;
- GtkWidget *dialog;
- gint result;
-
- xfce_panel_plugin_block_menu (notes_plugin->panel_plugin);
- dialog = prop_dialog_new (notes_plugin);
-
- group = gtk_window_group_new ();
- gtk_window_group_add_window (group, GTK_WINDOW (dialog));
-
- while (1)
- {
- result = gtk_dialog_run (GTK_DIALOG (dialog));
- if (result == GTK_RESPONSE_HELP)
- {
- result = g_spawn_command_line_async ("exo-open " PLUGIN_WEBSITE, NULL);
- if (G_UNLIKELY (result == FALSE))
- g_warning (_("Unable to open the following url: %s"), PLUGIN_WEBSITE);
- }
- else
- break;
- }
-
- g_object_unref (group);
- gtk_widget_destroy (dialog);
- xfce_panel_plugin_unblock_menu (notes_plugin->panel_plugin);
+ GtkWidget *error_dialog;
+ GError *error = NULL;
+ gint res;
+ res = gdk_spawn_command_line_on_screen (gdk_screen_get_default (), "xfce4-notes-settings", &error);
+ if (G_UNLIKELY (res == FALSE)) {
+ error_dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (notes_plugin->panel_plugin))), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Unable to open the settings dialog"));
+ if (error != NULL)
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (error_dialog), "%s", error->message);
+ gtk_dialog_run (GTK_DIALOG (error_dialog));
+ gtk_widget_destroy (error_dialog);
+ }
}
-#endif
static gboolean
notes_plugin_set_size (NotesPlugin *notes_plugin,
@@ -378,9 +344,7 @@
{
notes_plugin_save_data_all (notes_plugin);
-#ifdef HAVE_XFCONF
xfconf_shutdown ();
-#endif
#ifdef HAVE_THUNAR_VFS
/* TODO move code out from notes_window_destroy and add notes_window_free
@@ -407,7 +371,6 @@
notes_plugin->timeout = 0;
}
-#ifdef HAVE_XFCONF
static void
notes_plugin_monitor_xfconf (NotesPlugin *notes_plugin)
{
@@ -442,7 +405,6 @@
color_set_background (g_value_get_string (value));
}
}
-#endif
#ifdef HAVE_THUNAR_VFS
static NotesWindow *
Modified: xfce4-notes-plugin/trunk/panel-plugin/settings-dialog.c
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/settings-dialog.c 2009-06-06 13:41:52 UTC (rev 7473)
+++ xfce4-notes-plugin/trunk/panel-plugin/settings-dialog.c 2009-06-06 15:50:34 UTC (rev 7474)
@@ -21,12 +21,11 @@
#include <config.h>
#endif
-#ifdef HAVE_XFCONF
#include <xfconf/xfconf.h>
+#include <gtk/gtk.h>
+#include <libxfcegui4/libxfcegui4.h>
#include "defines.h"
-#include "settings-dialog.h"
-#include "notes.h"
#include "color.h"
enum
@@ -37,7 +36,7 @@
};
static GtkWidget *size_combo_box_new ();
-static void cb_size_changed (GtkComboBox *combobox, gpointer data);
+static void cb_size_combobox_changed (GtkComboBox *combobox, gpointer data);
enum
{
@@ -65,56 +64,50 @@
static GtkWidget *color_button = NULL;
GtkWidget *
-prop_dialog_new (NotesPlugin *notes_plugin)
+prop_dialog_new ()
{
- GtkWidget *dialog, *frame, *box, *hbox, *button, *label;
+ GtkWidget *dialog, *notebook, *vbox, *frame, *box, *hbox, *button, *label;
/* Configuration channel */
if (NULL == xfconf_channel)
- xfconf_channel = notes_plugin->xfconf_channel;
+ xfconf_channel = xfconf_channel_new_with_property_base ("xfce4-panel", "/plugins/notes");
-#if 0
- /* Set unset xfconf values */
- if (!xfconf_channel_has_property (xfconf_channel, "/new_window/transparency"))
- xfconf_channel_set_int (xfconf_channel,
- "/new_window/transparency",
- NEW_WINDOW_TRANSPARENCY);
-#endif
-
/* Dialog */
dialog =
- xfce_titled_dialog_new_with_buttons (_("Notes"),
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (notes_plugin->panel_plugin))),
+ xfce_titled_dialog_new_with_buttons (_("Notes"), NULL,
GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_NO_SEPARATOR,
- GTK_STOCK_HELP, GTK_RESPONSE_HELP,
GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
NULL);
xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dialog), _("Configure the plugin"));
- gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1);
gtk_window_set_icon_name (GTK_WINDOW (dialog), "xfce4-notes-plugin");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_window_stick (GTK_WINDOW (dialog));
- /* === Default settings === */
+ /* Notebook */
+ notebook = gtk_notebook_new ();
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
+ gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
+ gtk_container_set_border_width (GTK_CONTAINER (notebook), 0);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), notebook);
+
+ /* VBox */
+ vbox = gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (notebook), vbox);
+
+ /* === Global settings === */
box = gtk_vbox_new (FALSE, BORDER);
- frame = xfce_create_framebox_with_content (_("Default settings"), box);
+ frame = xfce_create_framebox_with_content (_("Global settings"), box);
gtk_container_set_border_width (GTK_CONTAINER (frame), BORDER);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), frame);
+ gtk_container_add (GTK_CONTAINER (vbox), frame);
/* Hide from taskbar */
- button = gtk_check_button_new_with_label (_("Hide windows from taskbar"));
+ button = gtk_check_button_new_with_label (_("Hide notes from taskbar"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), GENERAL_HIDE_FROM_TASKBAR);
- xfconf_g_property_bind (xfconf_channel, "/general/hide_windows_from_taskbar",
+ xfconf_g_property_bind (xfconf_channel, "/global/skip-taskbar-hint",
G_TYPE_BOOLEAN, G_OBJECT (button), "active");
gtk_box_pack_start (GTK_BOX (box), button, TRUE, FALSE, 0);
- /* Hide arrow button */
- button = gtk_check_button_new_with_label (_("Hide arrow button"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), GENERAL_HIDE_ARROW_BUTTON);
- xfconf_g_property_bind (xfconf_channel, "/general/hide_arrow_button",
- G_TYPE_BOOLEAN, G_OBJECT (button), "active");
- gtk_box_pack_start (GTK_BOX (box), button, TRUE, FALSE, 0);
-
/* Background color */
hbox = gtk_hbox_new (FALSE, BORDER);
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, FALSE, 0);
@@ -128,48 +121,38 @@
color_button = color_button_new ();
gtk_box_pack_start (GTK_BOX (hbox), color_button, FALSE, FALSE, 0);
+ /* Font description */
+ hbox = gtk_hbox_new (FALSE, BORDER);
+ gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, FALSE, 0);
+
+ label = gtk_label_new (_("Font:"));
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+ button = gtk_font_button_new_with_font ("Sans 12");
+ xfconf_g_property_bind (xfconf_channel, "/global/font-description",
+ G_TYPE_STRING, G_OBJECT (button), "font-name");
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+
/* === New window settings === */
box = gtk_vbox_new (FALSE, BORDER);
- frame = xfce_create_framebox_with_content (_("New window settings"), box);
+ frame = xfce_create_framebox_with_content (_("New group settings"), box);
gtk_container_set_border_width (GTK_CONTAINER (frame), BORDER);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), frame);
+ gtk_container_add (GTK_CONTAINER (vbox), frame);
/* Always on top */
button = gtk_check_button_new_with_label (_("Always on top"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), NEW_WINDOW_ABOVE);
- xfconf_g_property_bind (xfconf_channel, "/new_window/always_on_top",
+ xfconf_g_property_bind (xfconf_channel, "/new-window/always-on-top",
G_TYPE_BOOLEAN, G_OBJECT (button), "active");
gtk_box_pack_start (GTK_BOX (box), button, TRUE, FALSE, 0);
/* Sticky window */
- button = gtk_check_button_new_with_label (_("Sticky window"));
+ button = gtk_check_button_new_with_label (_("Sticky"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), NEW_WINDOW_STICKY);
- xfconf_g_property_bind (xfconf_channel, "/new_window/sticky",
+ xfconf_g_property_bind (xfconf_channel, "/new-window/sticky",
G_TYPE_BOOLEAN, G_OBJECT (button), "active");
gtk_box_pack_start (GTK_BOX (box), button, TRUE, FALSE, 0);
- /* Tabs */
- button = gtk_check_button_new_with_label (_("Show tabs"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), NEW_WINDOW_TABS);
- xfconf_g_property_bind (xfconf_channel, "/new_window/show_tabs",
- G_TYPE_BOOLEAN, G_OBJECT (button), "active");
- gtk_box_pack_start (GTK_BOX (box), button, TRUE, FALSE, 0);
-
- /* Font */
- hbox = gtk_hbox_new (FALSE, BORDER);
- gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, FALSE, 0);
-
- button = gtk_check_button_new_with_label (_("Font:"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), NEW_WINDOW_USE_FONT);
- xfconf_g_property_bind (xfconf_channel, "/new_window/use_font",
- G_TYPE_BOOLEAN, G_OBJECT (button), "active");
- gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
-
- button = gtk_font_button_new_with_font (NEW_WINDOW_FONT_DESCR);
- xfconf_g_property_bind (xfconf_channel, "/new_window/font_description",
- G_TYPE_STRING, G_OBJECT (button), "font-name");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
-
/* Size */
hbox = gtk_hbox_new (FALSE, BORDER);
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, FALSE, 0);
@@ -197,7 +180,7 @@
gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Normal"));
gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Large"));
- size = xfconf_channel_get_int (xfconf_channel, "/new_window/width", SIZE_NORMAL);
+ size = xfconf_channel_get_int (xfconf_channel, "/new-window/width", SIZE_NORMAL);
if (size == SIZE_SMALL)
gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), COMBOBOX_SIZE_SMALL);
else if (size == SIZE_NORMAL)
@@ -205,14 +188,14 @@
else if (size == SIZE_LARGE)
gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), COMBOBOX_SIZE_LARGE);
- g_signal_connect (combobox, "changed", G_CALLBACK (cb_size_changed), NULL);
+ g_signal_connect (combobox, "changed", G_CALLBACK (cb_size_combobox_changed), NULL);
return combobox;
}
static void
-cb_size_changed (GtkComboBox *combobox,
- gpointer data)
+cb_size_combobox_changed (GtkComboBox *combobox,
+ gpointer data)
{
gint id;
gint width = 0, height = 0;
@@ -228,21 +211,21 @@
if (id == COMBOBOX_SIZE_SMALL)
{
width = SIZE_SMALL;
- height = (gint)SIZE_SMALL*SIZE_FACTOR;
+ height = (gint)width*SIZE_FACTOR;
}
else if (id == COMBOBOX_SIZE_NORMAL)
{
width = SIZE_NORMAL;
- height = (gint)SIZE_NORMAL*SIZE_FACTOR;
+ height = (gint)width*SIZE_FACTOR;
}
else if (id == COMBOBOX_SIZE_LARGE)
{
width = SIZE_LARGE;
- height = (gint)SIZE_LARGE*SIZE_FACTOR;
+ height = (gint)width*SIZE_FACTOR;
}
- xfconf_channel_set_int (xfconf_channel, "/new_window/width", width);
- xfconf_channel_set_int (xfconf_channel, "/new_window/height", height);
+ xfconf_channel_set_int (xfconf_channel, "/new-window/width", width);
+ xfconf_channel_set_int (xfconf_channel, "/new-window/height", height);
}
static GtkWidget *
@@ -261,7 +244,7 @@
gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("White"));
gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Custom..."));
- color = xfconf_channel_get_string (xfconf_channel, "/general/background_color", GENERAL_BACKGROUND_COLOR);
+ color = xfconf_channel_get_string (xfconf_channel, "/global/background-color", GENERAL_BACKGROUND_COLOR);
if (!g_ascii_strcasecmp (color, BACKGROUND_YELLOW))
id = COMBOBOX_BACKGROUND_YELLOW;
else if (!g_ascii_strcasecmp (color, BACKGROUND_RED))
@@ -324,7 +307,7 @@
{
color = background_dialog_get_color (GTK_COLOR_SELECTION_DIALOG (dialog));
gdk_color_parse (color, &gdkcolor);
- xfconf_channel_set_string (xfconf_channel, "/general/background_color", color);
+ xfconf_channel_set_string (xfconf_channel, "/global/background-color", color);
g_free (color);
gtk_color_button_set_color (GTK_COLOR_BUTTON (color_button), &gdkcolor);
@@ -334,7 +317,7 @@
return;
}
- xfconf_channel_set_string (xfconf_channel, "/general/background_color", color);
+ xfconf_channel_set_string (xfconf_channel, "/global/background-color", color);
gdk_color_parse (color, &gdkcolor);
gtk_color_button_set_color (GTK_COLOR_BUTTON (color_button), &gdkcolor);
@@ -354,7 +337,7 @@
gtk_color_selection_set_has_opacity_control (GTK_COLOR_SELECTION (selection), FALSE);
g_signal_connect (selection, "color-changed", G_CALLBACK (cb_selection_changed), NULL);
- color = xfconf_channel_get_string (xfconf_channel, "/general/background_color", GENERAL_BACKGROUND_COLOR);
+ color = xfconf_channel_get_string (xfconf_channel, "/global/background-color", GENERAL_BACKGROUND_COLOR);
gdk_color_parse (color, &gdkcolor);
gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (selection), &gdkcolor);
g_free (color);
@@ -397,7 +380,7 @@
GdkColor gdkcolor;
gchar *color;
- color = xfconf_channel_get_string (xfconf_channel, "/general/background_color", GENERAL_BACKGROUND_COLOR);
+ color = xfconf_channel_get_string (xfconf_channel, "/global/background-color", GENERAL_BACKGROUND_COLOR);
gdk_color_parse (color, &gdkcolor);
g_free (color);
@@ -429,5 +412,18 @@
return TRUE;
}
-#endif
+
+gint main (gint argc,
+ gchar *argv[])
+{
+ GtkWidget *dialog;
+ xfconf_init (NULL);
+ gtk_init (&argc, &argv);
+ dialog = prop_dialog_new ();
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ xfconf_shutdown ();
+ return 0;
+}
+
More information about the Goodies-commits
mailing list