From 26c2c851073baf9cbc23326d84c73a5e4db39d51 Mon Sep 17 00:00:00 2001 From: Richard Hestilow Date: Mon, 14 Jan 2002 18:25:44 +0000 Subject: [PATCH] Gnome 2 port. (Settings only halfway work right now.) 2002-01-14 Richard Hestilow * Gnome 2 port. (Settings only halfway work right now.) --- capplets/ui-properties/ChangeLog | 4 + .../ui-properties/behavior-properties.glade | 1980 +++++++++-------- capplets/ui-properties/main.c | 132 +- capplets/ui-properties/preferences.c | 577 +---- capplets/ui-properties/preferences.h | 36 +- capplets/ui-properties/prefs-widget-app.c | 8 +- capplets/ui-properties/prefs-widget-dialogs.c | 7 +- capplets/ui-properties/prefs-widget-mdi.c | 6 +- capplets/ui-properties/prefs-widget.c | 78 +- capplets/ui-properties/prefs-widget.h | 5 +- capplets/ui-properties/ui-properties.glade | 1980 +++++++++-------- capplets/ui-properties/ui-properties.glade.h | 7 - 12 files changed, 2342 insertions(+), 2478 deletions(-) diff --git a/capplets/ui-properties/ChangeLog b/capplets/ui-properties/ChangeLog index 7a5fdd1f3..1f0714026 100644 --- a/capplets/ui-properties/ChangeLog +++ b/capplets/ui-properties/ChangeLog @@ -1,3 +1,7 @@ +2002-01-14 Richard Hestilow + + * Gnome 2 port. (Settings only halfway work right now.) + 2001-09-29 Richard Hestilow * prefs-widget.c (prefs_widget_set_arg): Register diff --git a/capplets/ui-properties/behavior-properties.glade b/capplets/ui-properties/behavior-properties.glade index ccf52ba46..85e13d8f6 100644 --- a/capplets/ui-properties/behavior-properties.glade +++ b/capplets/ui-properties/behavior-properties.glade @@ -1,924 +1,1112 @@ - - + + - - New-ui-properties - new-ui-properties - - src - . - C - True - True - True - ui-properties.glade.h - + + + window4 + GTK_WINDOW_TOPLEVEL + no + no + yes + no + GTK_WIN_POS_NONE - - GtkWindow - window4 - window4 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False + + + no + 0 + yes - - GtkVBox - prefs_widget - False - 0 + + + yes + yes + yes + GTK_POS_TOP + no + 2 + 2 + no + yes - - GtkNotebook - notebook1 - True - True - True - GTK_POS_TOP - False - 2 - 2 - False - - 0 - False - False - + + + 4 + yes + 4 + 4 + 2 + 2 + yes - - GtkTable - table3 - 4 - 2 - 2 - True - 4 - 4 + + + Menus + 0 + GTK_SHADOW_ETCHED_IN + yes - - GtkFrame - frame7 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - 1 - 1 - 2 - 0 - 0 - True - False - False - False - True - True - + + + 4 + no + 0 + yes - - GtkVBox - vbox2 - 4 - False - 0 + + + yes + Menu bars are detachable + no + yes + yes - - GtkCheckButton - menubar_detachable_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:48:47 GMT - - - False - True - - 0 - False - False - - + + + + 0 + no + no + + - - GtkCheckButton - menubar_relief_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:48:53 GMT - - - False - True - - 0 - False - False - - + + + yes + Menu bars have a border + no + yes + yes - - GtkCheckButton - menus_have_tearoff_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:03 GMT - - - False - True - - 0 - False - False - - + + + + 0 + no + no + + - - GtkCheckButton - menus_have_icons_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:11 GMT - - - False - True - - 0 - False - False - - - - + + + yes + Menus can be torn off + no + yes + yes - - GtkFrame - frame8 - - 0 - GTK_SHADOW_ETCHED_IN - - 1 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - True - + + + + 0 + no + no + + - - GtkVBox - vbox3 - 4 - False - 0 + + + yes + Menu items have icons + no + yes + yes - - GtkCheckButton - statusbar_not_dialog_toggle - False - True - - toggled - toggled_cb - Sun, 24 Sep 2000 05:09:02 GMT - - - False - True - - 0 - False - False - - + + + + 0 + no + no + + + + + + + 0 + 1 + 1 + 2 + 0 + 0 + expand|fill + fill + + - - GtkCheckButton - statusbar_is_interactive_toggle - False - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:20 GMT - - - False - True - - 0 - False - False - - + + + Status Bar + 0 + GTK_SHADOW_ETCHED_IN + yes - - GtkHSeparator - hseparator1 - False - - 2 - False - False - - + + + 4 + no + 0 + yes - - GtkRadioButton - statusbar_meter_on_left_toggle - True - - toggled - toggled_cb - Fri, 08 Dec 2000 20:02:09 GMT - - - False - True - progressbar - - 0 - False - False - - + + + no + yes + Use status bar instead of dialog when possible + no + yes - - GtkRadioButton - statusbar_meter_on_right_toggle - True - - toggled - toggled_cb - Fri, 08 Dec 2000 20:02:15 GMT - - - False - True - progressbar - - 0 - False - False - - - - + + + + 0 + no + no + + - - GtkFrame - frame6 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - True - + + + no + yes + Status bar is interactive when possible + no + yes - - GtkTable - table4 - 4 - 4 - 2 - True - 0 - 0 + + + + 0 + no + no + + - - GtkCheckButton - toolbar_relief_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:42 GMT - - - False - True - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - + + + no + + + 2 + no + no + + - - GtkCheckButton - toolbar_relief_btn_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:48 GMT - - - False - True - - 0 - 1 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - + + + yes + Progress bar is on the left + no + yes + yes - - GtkCheckButton - toolbar_lines_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:53 GMT - - - False - True - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - + + + + 0 + no + no + + - - GtkCheckButton - toolbar_detachable_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:38 GMT - - - False - True - - 0 - 1 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - + + + yes + Progress bar is on the right + no + yes + yes + statusbar_meter_on_left_toggle - - GtkRadioButton - toolbar_icons_only_toggle - True - - toggled - toggled_cb - Fri, 08 Dec 2000 19:27:09 GMT - - - False - True - toolbar_icons - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - + + + + 0 + no + no + + + + + + + 1 + 2 + 1 + 2 + 0 + 0 + expand|fill + fill + + - - GtkRadioButton - toolbar_text_below_toggle - True - - toggled - toggled_cb - Fri, 08 Dec 2000 19:27:18 GMT - - - False - True - toolbar_icons - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - + + + Tool Bars + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 4 + yes + 0 + 0 + 4 + 2 + yes + + + + yes + Tool bars have a border + no + yes + yes + + + + + 0 + 1 + 1 + 2 + 0 + 0 + fill + + + + + + + yes + Tool bar buttons pop up on mouse over + no + yes + yes + + + + + 0 + 1 + 3 + 4 + 0 + 0 + fill + + + + + + + yes + Tool bars have line separators + no + yes + yes + + + + + 0 + 1 + 2 + 3 + 0 + 0 + fill + + + + + + + yes + Tool bars are detachable + no + yes + yes + + + + + 0 + 1 + 0 + 1 + 0 + 0 + expand|fill + + + + + + + yes + Tool bar buttons are icons only + no + yes + yes + + + + + 1 + 2 + 0 + 1 + 0 + 0 + fill + + + + + + + yes + Tool bar buttons are text below icons + no + yes + yes + toolbar_icons_only_toggle + + + + + 1 + 2 + 1 + 2 + 0 + 0 + fill + + + + + + + + 0 + 2 + 0 + 1 + 0 + 0 + expand|fill + fill + + + + + + + + Interface + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + tab + + + + + + 4 + no + 4 + yes + + + + Dialogs + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 4 + no + 0 + yes + + + + yes + Dialog buttons have icons + no + yes + yes + + + + + 0 + no + no + + + + + + yes + Place dialogs over application window when possible + no + yes + yes + + + + + 0 + no + no + + + + + + no + 4 + 4 + 3 + 2 + yes + + + + Dialogs open + GTK_JUSTIFY_RIGHT + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 0 + 1 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Wherever the Window Manager places them + 0.0 + convertwidget2 + yes + yes + + + + + + + + yes + + + + At the center of the screen + 0.0 + convertwidget3 + yes + yes + + + + + + + + yes + + + + At the mouse pointer + 0.0 + convertwidget4 + yes + yes + + + + + + + + + 1 + 2 + 0 + 1 + 0 + 0 + fill + + + + + + + Dialogs are treated + GTK_JUSTIFY_RIGHT + no + 0 + 0 + 0 + 0 + yes + + + 0 + 1 + 1 + 2 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Like any other window + 0.0 + convertwidget9 + yes + yes + + + + + + + + yes + + + + Specially by the window manager + 0.0 + convertwidget10 + yes + yes + + + + + + + + + 1 + 2 + 1 + 2 + 0 + 0 + fill + + + + + + + Dialog Buttons + GTK_JUSTIFY_CENTER + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 2 + 3 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Default (Spread out - big) + 0.0 + convertwidget14 + yes + yes + + + + + + + + yes + + + + Spread out + 0.0 + convertwidget15 + yes + yes + + + + + + + + yes + + + + Spread out (big) + 0.0 + convertwidget16 + yes + yes + + + + + + + + yes + + + + Left aligned + 0.0 + convertwidget17 + yes + yes + + + + + + + + yes + + + + Right aligned + 0.0 + convertwidget18 + yes + yes + + + + + + + + + 1 + 2 + 2 + 3 + 0 + 0 + fill + + + + + + 0 + no + no + + + + + + + 0 + no + no + + + + + + Multiple Documents + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 5 + no + 5 + 5 + 2 + 2 + yes + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Notebook tabs + 0.0 + convertwidget25 + yes + yes + + + + + + + + yes + + + + Seperate windows + 0.0 + convertwidget26 + yes + yes + + + + + + + + yes + + + + The same window + 0.0 + convertwidget27 + yes + yes + + + + + + + + + 1 + 2 + 0 + 1 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Left + 0.0 + convertwidget32 + yes + yes + + + + + + + + yes + + + + Right + 0.0 + convertwidget33 + yes + yes + + + + + + + + yes + + + + Top + 0.0 + convertwidget34 + yes + yes + + + + + + + + yes + + + + Bottom + 0.0 + convertwidget35 + yes + yes + + + + + + + + + 1 + 2 + 1 + 2 + 0 + 0 + fill + + + + + + + When opening Multiple documents, use + GTK_JUSTIFY_CENTER + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 0 + 1 + 0 + 0 + fill + + + + + + + When using Notebook tabs, place the tabs on the + GTK_JUSTIFY_CENTER + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 1 + 2 + 0 + 0 + fill + + + + + + + + 0 + no + no + + + + + + + + Miscellaneous + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + tab + + + + + 0 + no + no + + + - - - GtkLabel - Notebook:tab - label6 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox8 - 4 - False - 4 - - - GtkFrame - frame9 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - False - - - - GtkVBox - vbox9 - 4 - False - 0 - - - GtkCheckButton - dialog_icons_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 05:08:48 GMT - - - False - True - - 0 - False - False - - - - - GtkCheckButton - dialog_centered_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 05:09:12 GMT - - - False - True - - 0 - False - False - - - - - GtkTable - table5 - 3 - 2 - False - 4 - 4 - - 0 - False - False - - - - GtkLabel - label2 - - GTK_JUSTIFY_RIGHT - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - dialog_position_select - True - Wherever the Window Manager places them -At the center of the screen -At the mouse pointer - - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label3 - - GTK_JUSTIFY_RIGHT - False - 0 - 0 - 0 - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - dialog_type_select - True - Like any other window -Specially by the window manager - - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label1 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - dialog_buttons_style_select - True - Default (Spread out - big) -Spread out -Spread out (big) -Left aligned -Right aligned - - 0 - - 1 - 2 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - - - - GtkFrame - frame10 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - False - - - - GtkTable - table2 - 5 - 2 - 2 - False - 5 - 5 - - - GtkOptionMenu - mdi_mode_select - True - Notebook tabs -Seperate windows -The same window - - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - mdi_tab_pos_select - True - Left -Right -Top -Bottom - - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label8 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label9 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - - - - GtkLabel - Notebook:tab - label7 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - GtkHBox - hbox2 - False - 0 - - 0 - False - False - - - - GnomePixmap - pixmap1 - gnome-warning.png - - 0 - False - False - - - - - GtkLabel - label10 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - + - - - + diff --git a/capplets/ui-properties/main.c b/capplets/ui-properties/main.c index 52ddaacc2..3627d3a15 100644 --- a/capplets/ui-properties/main.c +++ b/capplets/ui-properties/main.c @@ -28,19 +28,10 @@ #include #include #include -#include -#include #include #include -#include - -#ifdef HAVE_XIMIAN_ARCHIVER -# include -# include -#endif /* HAVE_XIMIAN_ARCHIVER */ - #include "preferences.h" #include "prefs-widget.h" #include "prefs-widget-app.h" @@ -48,68 +39,21 @@ #include "prefs-widget-mdi.h" static Preferences *prefs; -static Preferences *old_prefs; static PrefsWidget *prefs_widget; -#ifdef HAVE_XIMIAN_ARCHIVER - -static Archive *archive; -static gboolean outside_location; - -static void -store_archive_data (void) -{ - Location *location; - xmlDocPtr xml_doc; - - if (capplet_get_location () == NULL) - location = archive_get_current_location (archive); - else - location = archive_get_location (archive, - capplet_get_location ()); - - xml_doc = preferences_write_xml (prefs); - location_store_xml (location, "ui-properties-capplet", - xml_doc, STORE_MASK_PREVIOUS); - xmlFreeDoc (xml_doc); - archive_close (archive); -} - -#endif /* HAVE_XIMIAN_ARCHIVER */ - -static void -ok_cb (GtkWidget *widget) -{ -#ifdef HAVE_XIMIAN_ARCHIVER - if (!outside_location) -#endif /* HAVE_XIMIAN_ARCHIVER */ - preferences_save (prefs); - -#ifdef HAVE_XIMIAN_ARCHIVER - store_archive_data (); -#endif /* HAVE_XIMIAN_ARCHIVER */ -} - -static void -cancel_cb (GtkWidget *widget) -{ -#ifdef HAVE_XIMIAN_ARCHIVER - if (!outside_location) -#endif /* HAVE_XIMIAN_ARCHIVER */ - preferences_save (old_prefs); -} +static gint cap_session_init = 0; +static struct poptOption cap_options[] = { + {"init-session-settings", '\0', POPT_ARG_NONE, &cap_session_init, 0, + N_("Initialize session settings"), NULL}, + {NULL, '\0', 0, NULL, 0} +}; static void setup_capplet_widget (void) { preferences_freeze (prefs); - prefs_widget = prefs_widget_new (prefs); - - gtk_signal_connect (GTK_OBJECT (prefs_widget), "ok", - GTK_SIGNAL_FUNC (ok_cb), NULL); - gtk_signal_connect (GTK_OBJECT (prefs_widget), "cancel", - GTK_SIGNAL_FUNC (cancel_cb), NULL); + prefs_widget = PREFS_WIDGET (prefs_widget_new (prefs)); gtk_widget_show (GTK_WIDGET (prefs_widget)); @@ -187,64 +131,16 @@ do_restore_from_defaults (void) int main (int argc, char **argv) { - GnomeClient *client; - GnomeClientFlags flags; - gint token, res; gchar *restart_args[3]; bindtextdomain (PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (PACKAGE, "UTF-8"); textdomain (PACKAGE); - glade_gnome_init (); - res = gnome_capplet_init ("behavior", - VERSION, argc, argv, NULL, - 0, NULL); - - if (res < 0) { - g_error ("Could not initialize the capplet."); - } - else if (res == 3) { -#ifdef HAVE_XIMIAN_ARCHIVER - do_get_xml (); -#endif /* HAVE_XIMIAN_ARCHIVER */ - return 0; - } - else if (res == 4) { -#ifdef HAVE_XIMIAN_ARCHIVER - do_set_xml (TRUE); -#endif /* HAVE_XIMIAN_ARCHIVER */ - return 0; - } - else if (res == 5) { - do_restore_from_defaults (); - return 0; - } - - client = gnome_master_client (); - flags = gnome_client_get_flags (client); - - if (flags & GNOME_CLIENT_IS_CONNECTED) { - token = gnome_startup_acquire_token - ("GNOME_UI_PROPERTIES", - gnome_client_get_id (client)); - - if (token) { - gnome_client_set_priority (client, 20); - gnome_client_set_restart_style (client, - GNOME_RESTART_ANYWAY); - restart_args[0] = argv[0]; - restart_args[1] = "--init-session-settings"; - restart_args[2] = NULL; - gnome_client_set_restart_command (client, 2, - restart_args); - } else { - gnome_client_set_restart_style (client, - GNOME_RESTART_NEVER); - } - } else { - token = 1; - } + gnome_program_init ("ui-properties-capplet", VERSION, + LIBGNOMEUI_MODULE, argc, argv, + GNOME_PARAM_POPT_TABLE, &cap_options, + NULL); gnome_window_icon_set_default_from_file (GNOMECC_ICONS_DIR"/gnome-applications.png"); @@ -273,15 +169,13 @@ main (int argc, char **argv) prefs = PREFERENCES (preferences_new ()); preferences_load (prefs); - if (token) preferences_apply_now (prefs); #endif /* HAVE_XIMIAN_ARCHIVER */ - if (!res) { - old_prefs = PREFERENCES (preferences_clone (prefs)); + if (!cap_session_init) { setup_capplet_widget (); - capplet_gtk_main (); + gtk_main (); } return 0; diff --git a/capplets/ui-properties/preferences.c b/capplets/ui-properties/preferences.c index 32d38ea3a..c37c17135 100644 --- a/capplets/ui-properties/preferences.c +++ b/capplets/ui-properties/preferences.c @@ -28,6 +28,7 @@ #include #include +#include #include "preferences.h" @@ -36,15 +37,10 @@ static GtkObjectClass *parent_class; static void preferences_init (Preferences *prefs); static void preferences_class_init (PreferencesClass *class); -static gint xml_read_int (xmlNodePtr node); -static xmlNodePtr xml_write_int (gchar *name, - gint number); -static gboolean xml_read_bool (xmlNodePtr node); -static xmlNodePtr xml_write_bool (gchar *name, - gboolean value); - static gint apply_timeout_cb (Preferences *prefs); +#define DGI "/desktop/gnome/interface/" + guint preferences_get_type (void) { @@ -57,8 +53,8 @@ preferences_get_type (void) sizeof (PreferencesClass), (GtkClassInitFunc) preferences_class_init, (GtkObjectInitFunc) preferences_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL + NULL, + NULL }; preferences_type = @@ -73,7 +69,6 @@ static void preferences_init (Preferences *prefs) { prefs->frozen = FALSE; - prefs->gnome_prefs = g_new0 (GnomePreferences, 1); /* FIXME: Code to set default values */ } @@ -108,14 +103,11 @@ preferences_clone (Preferences *prefs) g_return_val_if_fail (prefs != NULL, NULL); g_return_val_if_fail (IS_PREFERENCES (prefs), NULL); - g_return_val_if_fail (prefs->gnome_prefs != NULL, NULL); object = preferences_new (); new_prefs = PREFERENCES (object); - memcpy (new_prefs->gnome_prefs, prefs->gnome_prefs, - sizeof (GnomePreferences)); - new_prefs->dialog_use_icons = prefs->dialog_use_icons; + new_prefs->gnome_prefs = prefs->gnome_prefs; return object; } @@ -130,36 +122,52 @@ preferences_destroy (GtkObject *object) prefs = PREFERENCES (object); - if (prefs->gnome_prefs) g_free (prefs->gnome_prefs); - parent_class->destroy (object); } void preferences_load (Preferences *prefs) { + GConfClient *client; + g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - gnome_preferences_load_custom (prefs->gnome_prefs); - - prefs->dialog_use_icons = - gnome_config_get_bool ("/Gnome/Icons/ButtonUseIcons=true"); + client = gconf_client_get_default (); + prefs->gnome_prefs.menus_have_tearoff = gconf_client_get_bool (client, DGI "menus-have-tearoff", NULL); + prefs->gnome_prefs.statusbar_is_interactive = gconf_client_get_bool (client, DGI "statusbar-interactive", NULL); + prefs->gnome_prefs.menubar_relief = gconf_client_get_bool (client, DGI "menubar-relief", NULL); + prefs->gnome_prefs.toolbar_labels = gconf_client_get_bool (client, DGI "toolbar-labels", NULL); + prefs->gnome_prefs.menus_show_icons = gconf_client_get_bool (client, DGI "menus-have-icons", NULL); + prefs->gnome_prefs.menubar_detachable = gconf_client_get_bool (client, DGI "menubar-detachable", NULL); + prefs->gnome_prefs.toolbar_relief = gconf_client_get_bool (client, DGI "toolbar-relief", NULL); + prefs->gnome_prefs.statusbar_meter_on_right = gconf_client_get_bool (client, DGI "statusbar-meter-on-right", NULL); + prefs->gnome_prefs.toolbar_detachable = gconf_client_get_bool (client, DGI "toolbar-detachable", NULL); + + g_object_unref (G_OBJECT (client)); } void preferences_save (Preferences *prefs) { + + GConfClient *client; + g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - gnome_preferences_save_custom (prefs->gnome_prefs); - - gnome_config_set_bool ("/Gnome/Icons/ButtonUseIcons", - prefs->dialog_use_icons); - gnome_config_sync (); + client = gconf_client_get_default (); + gconf_client_set_bool (client, DGI "menus-have-tearoff", prefs->gnome_prefs.menus_have_tearoff, NULL); + gconf_client_set_bool (client, DGI "statusbar-interactive", prefs->gnome_prefs.statusbar_is_interactive, NULL); + gconf_client_set_bool (client, DGI "menubar-relief", prefs->gnome_prefs.menubar_relief, NULL); + gconf_client_set_bool (client, DGI "toolbar-labels", prefs->gnome_prefs.toolbar_labels, NULL); + gconf_client_set_bool (client, DGI "menus-have-icons", prefs->gnome_prefs.menus_show_icons, NULL); + gconf_client_set_bool (client, DGI "menubar-detachable", prefs->gnome_prefs.menubar_detachable, NULL); + gconf_client_set_bool (client, DGI "toolbar-relief", prefs->gnome_prefs.toolbar_relief, NULL); + gconf_client_set_bool (client, DGI "statusbar-meter-on-right", prefs->gnome_prefs.statusbar_meter_on_right, NULL); + gconf_client_set_bool (client, DGI "toolbar-detachable", prefs->gnome_prefs.toolbar_detachable, NULL); + + g_object_unref (G_OBJECT (client)); } void @@ -203,251 +211,6 @@ preferences_thaw (Preferences *prefs) if (prefs->frozen > 0) prefs->frozen--; } -Preferences * -preferences_read_xml (xmlDocPtr xml_doc) -{ - Preferences *prefs; - xmlNodePtr root_node, node; - - prefs = PREFERENCES (preferences_new ()); - - root_node = xmlDocGetRootElement (xml_doc); - - if (strcmp (root_node->name, "ui-properties")) - return NULL; - - for (node = root_node->childs; node; node = node->next) { - if (!strcmp (node->name, "dialog-buttons-style")) - prefs->gnome_prefs->dialog_buttons_style = - xml_read_int (node); - else if (!strcmp (node->name, "property-box-buttons-ok")) - prefs->gnome_prefs->property_box_buttons_ok = - xml_read_bool (node); - else if (!strcmp (node->name, "property-box-buttons-apply")) - prefs->gnome_prefs->property_box_buttons_apply = - xml_read_bool (node); - else if (!strcmp (node->name, "property-box-buttons-close")) - prefs->gnome_prefs->property_box_buttons_close = - xml_read_bool (node); - else if (!strcmp (node->name, "property-box-buttons-help")) - prefs->gnome_prefs->property_box_buttons_help = - xml_read_bool (node); - else if (!strcmp (node->name, "statusbar-not-dialog")) - prefs->gnome_prefs->statusbar_not_dialog = - xml_read_bool (node); - else if (!strcmp (node->name, "statusbar-is-interactive")) - prefs->gnome_prefs->statusbar_is_interactive = - xml_read_bool (node); - else if (!strcmp (node->name, "statusbar-meter-on-right")) - prefs->gnome_prefs->statusbar_meter_on_right = - xml_read_bool (node); - else if (!strcmp (node->name, "menubar-detachable")) - prefs->gnome_prefs->menubar_detachable = - xml_read_bool (node); - else if (!strcmp (node->name, "menubar-relief")) - prefs->gnome_prefs->menubar_relief = - xml_read_bool (node); - else if (!strcmp (node->name, "toolbar-detachable")) - prefs->gnome_prefs->toolbar_detachable = - xml_read_bool (node); - else if (!strcmp (node->name, "toolbar-relief")) - prefs->gnome_prefs->toolbar_relief = - xml_read_bool (node); - else if (!strcmp (node->name, "toolbar-relief-btn")) - prefs->gnome_prefs->toolbar_relief_btn = - xml_read_bool (node); - else if (!strcmp (node->name, "toolbar-lines")) - prefs->gnome_prefs->toolbar_lines = - xml_read_bool (node); - else if (!strcmp (node->name, "toolbar-labels")) - prefs->gnome_prefs->toolbar_labels = - xml_read_bool (node); - else if (!strcmp (node->name, "dialog-centered")) - prefs->gnome_prefs->dialog_centered = - xml_read_bool (node); - else if (!strcmp (node->name, "menus-have-tearoff")) - prefs->gnome_prefs->menus_have_tearoff = - xml_read_bool (node); - else if (!strcmp (node->name, "menus-have-icons")) - prefs->gnome_prefs->menus_have_icons = - xml_read_bool (node); - else if (!strcmp (node->name, "disable-imlib-cache")) - prefs->gnome_prefs->disable_imlib_cache = - xml_read_bool (node); - else if (!strcmp (node->name, "dialog-type")) - prefs->gnome_prefs->dialog_type = xml_read_int (node); - else if (!strcmp (node->name, "dialog-position")) - prefs->gnome_prefs->dialog_position = - xml_read_int (node); - else if (!strcmp (node->name, "mdi-mode")) - prefs->gnome_prefs->mdi_mode = xml_read_int (node); - else if (!strcmp (node->name, "mdi-tab-pos")) - prefs->gnome_prefs->mdi_tab_pos = xml_read_int (node); - else if (!strcmp (node->name, "dialog-use-icons")) - prefs->dialog_use_icons = xml_read_bool (node); - } - - return prefs; -} - -xmlDocPtr -preferences_write_xml (Preferences *prefs) -{ - xmlDocPtr doc; - xmlNodePtr node; - - doc = xmlNewDoc ("1.0"); - - node = xmlNewDocNode (doc, NULL, "ui-properties", NULL); - - xmlAddChild (node, - xml_write_int ("dialog-buttons-style", - prefs->gnome_prefs->dialog_buttons_style)); - - xmlAddChild (node, - xml_write_bool ("property-box-buttons-ok", - prefs->gnome_prefs->property_box_buttons_ok)); - xmlAddChild (node, - xml_write_bool ("property-box-buttons-apply", - prefs->gnome_prefs->property_box_buttons_apply)); - xmlAddChild (node, - xml_write_bool ("property-box-buttons-close", - prefs->gnome_prefs->property_box_buttons_close)); - xmlAddChild (node, - xml_write_bool ("property-box-buttons-help", - prefs->gnome_prefs->property_box_buttons_help)); - xmlAddChild (node, - xml_write_bool ("statusbar-not-dialog", - prefs->gnome_prefs->statusbar_not_dialog)); - xmlAddChild (node, - xml_write_bool ("statusbar-is-interactive", - prefs->gnome_prefs->statusbar_is_interactive)); - xmlAddChild (node, - xml_write_bool ("statusbar-meter-on-right", - prefs->gnome_prefs->statusbar_meter_on_right)); - xmlAddChild (node, - xml_write_bool ("menubar-detachable", - prefs->gnome_prefs->menubar_detachable)); - xmlAddChild (node, - xml_write_bool ("menubar-relief", - prefs->gnome_prefs->menubar_relief)); - xmlAddChild (node, - xml_write_bool ("toolbar-detachable", - prefs->gnome_prefs->toolbar_detachable)); - xmlAddChild (node, - xml_write_bool ("toolbar-relief", - prefs->gnome_prefs->toolbar_relief)); - xmlAddChild (node, - xml_write_bool ("toolbar-relief-btn", - prefs->gnome_prefs->toolbar_relief_btn)); - xmlAddChild (node, - xml_write_bool ("toolbar-lines", - prefs->gnome_prefs->toolbar_lines)); - xmlAddChild (node, - xml_write_bool ("toolbar-labels", - prefs->gnome_prefs->toolbar_labels)); - xmlAddChild (node, - xml_write_bool ("dialog-centered", - prefs->gnome_prefs->dialog_centered)); - xmlAddChild (node, - xml_write_bool ("menus-have-tearoff", - prefs->gnome_prefs->menus_have_tearoff)); - xmlAddChild (node, - xml_write_bool ("menus-have-icons", - prefs->gnome_prefs->menus_have_icons)); - xmlAddChild (node, - xml_write_bool ("disable-imlib-cache", - prefs->gnome_prefs->disable_imlib_cache)); - - xmlAddChild (node, - xml_write_int ("dialog-type", - prefs->gnome_prefs->dialog_type)); - xmlAddChild (node, - xml_write_int ("dialog-position", - prefs->gnome_prefs->dialog_position)); - xmlAddChild (node, - xml_write_int ("mdi-mode", - prefs->gnome_prefs->mdi_mode)); - xmlAddChild (node, - xml_write_int ("mdi-tab-pos", - prefs->gnome_prefs->mdi_tab_pos)); - - xmlAddChild (node, - xml_write_bool ("dialog-use-icons", - prefs->dialog_use_icons)); - - xmlDocSetRootElement (doc, node); - - return doc; -} - -/* Read a numeric value from a node */ - -static gint -xml_read_int (xmlNodePtr node) -{ - char *text; - - text = xmlNodeGetContent (node); - - if (text == NULL) - return 0; - else - return atoi (text); -} - -/* Write out a numeric value in a node */ - -static xmlNodePtr -xml_write_int (gchar *name, gint number) -{ - xmlNodePtr node; - gchar *str; - - g_return_val_if_fail (name != NULL, NULL); - - str = g_strdup_printf ("%d", number); - node = xmlNewNode (NULL, name); - xmlNodeSetContent (node, str); - g_free (str); - - return node; -} - -/* Read a boolean value from a node */ - -static gboolean -xml_read_bool (xmlNodePtr node) -{ - char *text; - - text = xmlNodeGetContent (node); - - if (!g_strcasecmp (text, "true")) - return TRUE; - else - return FALSE; -} - -/* Write out a boolean value in a node */ - -static xmlNodePtr -xml_write_bool (gchar *name, gboolean value) -{ - xmlNodePtr node; - - g_return_val_if_fail (name != NULL, NULL); - - node = xmlNewNode (NULL, name); - - if (value) - xmlNodeSetContent (node, "true"); - else - xmlNodeSetContent (node, "false"); - - return node; -} - static gint apply_timeout_cb (Preferences *prefs) { @@ -456,64 +219,13 @@ apply_timeout_cb (Preferences *prefs) return TRUE; } -GtkButtonBoxStyle +int preferences_get_dialog_buttons_style (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->dialog_buttons_style; -} - -int -preferences_get_property_box_buttons_ok (Preferences *prefs) -{ - g_return_val_if_fail (prefs != NULL, 0); - g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - - return prefs->gnome_prefs->property_box_buttons_ok; -} - -int -preferences_get_property_box_buttons_apply (Preferences *prefs) -{ - g_return_val_if_fail (prefs != NULL, 0); - g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - - return prefs->gnome_prefs->property_box_buttons_apply; -} - -int -preferences_get_property_box_buttons_close (Preferences *prefs) -{ - g_return_val_if_fail (prefs != NULL, 0); - g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - - return prefs->gnome_prefs->property_box_buttons_close; -} - -int -preferences_get_property_box_buttons_help (Preferences *prefs) -{ - g_return_val_if_fail (prefs != NULL, 0); - g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - - return prefs->gnome_prefs->property_box_buttons_help; -} - -int -preferences_get_statusbar_not_dialog (Preferences *prefs) -{ - g_return_val_if_fail (prefs != NULL, 0); - g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - - return prefs->gnome_prefs->statusbar_not_dialog; + return prefs->gnome_prefs.dialog_buttons_style; } int @@ -521,9 +233,8 @@ preferences_get_statusbar_is_interactive (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->statusbar_is_interactive; + return prefs->gnome_prefs.statusbar_is_interactive; } int @@ -531,9 +242,8 @@ preferences_get_statusbar_meter_on_right (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->statusbar_meter_on_right; + return prefs->gnome_prefs.statusbar_meter_on_right; } int @@ -541,9 +251,8 @@ preferences_get_statusbar_meter_on_left (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return !prefs->gnome_prefs->statusbar_meter_on_right; + return !prefs->gnome_prefs.statusbar_meter_on_right; } int @@ -551,9 +260,8 @@ preferences_get_menubar_detachable (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->menubar_detachable; + return prefs->gnome_prefs.menubar_detachable; } int @@ -561,9 +269,8 @@ preferences_get_menubar_relief (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->menubar_relief; + return prefs->gnome_prefs.menubar_relief; } int @@ -571,9 +278,8 @@ preferences_get_toolbar_detachable (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->toolbar_detachable; + return prefs->gnome_prefs.toolbar_detachable; } int @@ -581,29 +287,8 @@ preferences_get_toolbar_relief (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->toolbar_relief; -} - -int -preferences_get_toolbar_relief_btn (Preferences *prefs) -{ - g_return_val_if_fail (prefs != NULL, 0); - g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - - return prefs->gnome_prefs->toolbar_relief_btn; -} - -int -preferences_get_toolbar_lines (Preferences *prefs) -{ - g_return_val_if_fail (prefs != NULL, 0); - g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - - return prefs->gnome_prefs->toolbar_lines; + return prefs->gnome_prefs.toolbar_relief; } int @@ -611,9 +296,8 @@ preferences_get_toolbar_icons_only (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return !prefs->gnome_prefs->toolbar_labels; + return !prefs->gnome_prefs.toolbar_labels; } int @@ -621,9 +305,8 @@ preferences_get_toolbar_text_below (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->toolbar_labels; + return prefs->gnome_prefs.toolbar_labels; } int @@ -631,9 +314,8 @@ preferences_get_dialog_centered (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->dialog_centered; + return TRUE; } int @@ -641,9 +323,8 @@ preferences_get_menus_have_tearoff (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->menus_have_tearoff; + return prefs->gnome_prefs.menus_have_tearoff; } int @@ -651,19 +332,8 @@ preferences_get_menus_have_icons (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->menus_have_icons; -} - -int -preferences_get_disable_imlib_cache (Preferences *prefs) -{ - g_return_val_if_fail (prefs != NULL, 0); - g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - - return prefs->gnome_prefs->disable_imlib_cache; + return prefs->gnome_prefs.menus_show_icons; } GtkWindowType @@ -671,9 +341,8 @@ preferences_get_dialog_type (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->dialog_type; + return 0; } GtkWindowPosition @@ -681,9 +350,8 @@ preferences_get_dialog_position (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->dialog_position; + return 0; } GnomeMDIMode @@ -691,9 +359,8 @@ preferences_get_mdi_mode (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->mdi_mode; + return 0; } GtkPositionType @@ -701,9 +368,8 @@ preferences_get_mdi_tab_pos (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->gnome_prefs->mdi_tab_pos; + return 0; } int @@ -711,9 +377,8 @@ preferences_get_dialog_icons (Preferences *prefs) { g_return_val_if_fail (prefs != NULL, 0); g_return_val_if_fail (IS_PREFERENCES (prefs), 0); - g_return_val_if_fail (prefs->gnome_prefs != NULL, 0); - return prefs->dialog_use_icons; + return prefs->gnome_prefs.dialog_icons; } void @@ -721,59 +386,8 @@ preferences_set_dialog_buttons_style (Preferences *prefs, int style) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->dialog_buttons_style = style; -} - -void -preferences_set_property_box_buttons_ok (Preferences *prefs, int s) -{ - g_return_if_fail (prefs != NULL); - g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - - prefs->gnome_prefs->property_box_buttons_ok = s; -} - -void -set_property_set_property_box_buttons_apply (Preferences *prefs, int s) -{ - g_return_if_fail (prefs != NULL); - g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - - prefs->gnome_prefs->property_box_buttons_apply = s; -} - -void -preferences_set_property_box_buttons_close (Preferences *prefs, int s) -{ - g_return_if_fail (prefs != NULL); - g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - - prefs->gnome_prefs->property_box_buttons_close = s; -} - -void -preferences_set_property_box_buttons_help (Preferences *prefs, int s) -{ - g_return_if_fail (prefs != NULL); - g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - - prefs->gnome_prefs->property_box_buttons_help = s; -} - -void -preferences_set_statusbar_not_dialog (Preferences *prefs, int s) -{ - g_return_if_fail (prefs != NULL); - g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - - prefs->gnome_prefs->statusbar_not_dialog = s; + prefs->gnome_prefs.dialog_buttons_style = style; } void @@ -781,9 +395,8 @@ preferences_set_statusbar_is_interactive (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->statusbar_is_interactive = s; + prefs->gnome_prefs.statusbar_is_interactive = s; } void @@ -791,9 +404,8 @@ preferences_set_statusbar_meter_on_right (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->statusbar_meter_on_right = s; + prefs->gnome_prefs.statusbar_meter_on_right = s; } void @@ -801,9 +413,8 @@ preferences_set_statusbar_meter_on_left (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->statusbar_meter_on_right = !s; + prefs->gnome_prefs.statusbar_meter_on_right = !s; } void @@ -811,9 +422,8 @@ preferences_set_menubar_detachable (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->menubar_detachable = s; + prefs->gnome_prefs.menubar_detachable = s; } void @@ -821,9 +431,8 @@ preferences_set_menubar_relief (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->menubar_relief = s; + prefs->gnome_prefs.menubar_relief = s; } void @@ -831,9 +440,8 @@ preferences_set_toolbar_detachable (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->toolbar_detachable = s; + prefs->gnome_prefs.toolbar_detachable = s; } void @@ -841,29 +449,8 @@ preferences_set_toolbar_relief (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->toolbar_relief = s; -} - -void -preferences_set_toolbar_relief_btn (Preferences *prefs, int s) -{ - g_return_if_fail (prefs != NULL); - g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - - prefs->gnome_prefs->toolbar_relief_btn = s; -} - -void -preferences_set_toolbar_lines (Preferences *prefs, int s) -{ - g_return_if_fail (prefs != NULL); - g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - - prefs->gnome_prefs->toolbar_lines = s; + prefs->gnome_prefs.toolbar_relief = s; } void @@ -871,9 +458,8 @@ preferences_set_toolbar_icons_only (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->toolbar_labels = !s; + prefs->gnome_prefs.toolbar_labels = !s; } void @@ -881,9 +467,8 @@ preferences_set_toolbar_text_below (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->toolbar_labels = s; + prefs->gnome_prefs.toolbar_labels = s; } void @@ -891,9 +476,8 @@ preferences_set_dialog_centered (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->dialog_centered = s; + prefs->gnome_prefs.dialog_centered = s; } void @@ -901,9 +485,8 @@ preferences_set_menus_have_tearoff (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->menus_have_tearoff = s; + prefs->gnome_prefs.menus_have_tearoff = s; } void @@ -911,19 +494,8 @@ preferences_set_menus_have_icons (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->menus_have_icons = s; -} - -void -preferences_set_disable_imlib_cache (Preferences *prefs, int s) -{ - g_return_if_fail (prefs != NULL); - g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - - prefs->gnome_prefs->disable_imlib_cache = s; + prefs->gnome_prefs.menus_show_icons = s; } void @@ -931,9 +503,8 @@ preferences_set_dialog_type (Preferences *prefs, int type) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->dialog_type = type; + prefs->gnome_prefs.dialog_type = type; } void @@ -941,9 +512,8 @@ preferences_set_dialog_position (Preferences *prefs, int pos) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->dialog_position = pos; + prefs->gnome_prefs.dialog_position = pos; } void @@ -951,9 +521,8 @@ preferences_set_mdi_mode (Preferences *prefs, int mode) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->mdi_mode = mode; + prefs->gnome_prefs.mdi_mode = mode; } void @@ -961,9 +530,8 @@ preferences_set_mdi_tab_pos (Preferences *prefs, int type) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->gnome_prefs->mdi_tab_pos = type; + prefs->gnome_prefs.mdi_tab_pos = type; } void @@ -971,7 +539,6 @@ preferences_set_dialog_icons (Preferences *prefs, int s) { g_return_if_fail (prefs != NULL); g_return_if_fail (IS_PREFERENCES (prefs)); - g_return_if_fail (prefs->gnome_prefs != NULL); - prefs->dialog_use_icons = s; + prefs->gnome_prefs.dialog_icons = s; } diff --git a/capplets/ui-properties/preferences.h b/capplets/ui-properties/preferences.h index 3a772e3ee..cb352adbb 100644 --- a/capplets/ui-properties/preferences.h +++ b/capplets/ui-properties/preferences.h @@ -27,8 +27,6 @@ #include #include -#include - #define PREFERENCES(obj) GTK_CHECK_CAST (obj, preferences_get_type (), Preferences) #define PREFERENCES_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, preferences_get_type (), PreferencesClass) #define IS_PREFERENCES(obj) GTK_CHECK_TYPE (obj, preferences_get_type ()) @@ -43,9 +41,26 @@ struct _Preferences gint frozen; guint timeout_id; - GnomePreferences *gnome_prefs; - - gboolean dialog_use_icons; + struct { + enum { DEFAULT, SPREAD, EDGE, START, END } dialog_buttons_style; + gboolean dialog_icons; + gboolean dialog_centered; + GtkWindowPosition dialog_position; + GtkWindowType dialog_type; + gboolean menus_show_icons; + gboolean menus_have_tearoff; + gboolean toolbar_labels; + gboolean toolbar_detachable; + gboolean toolbar_relief; + gboolean toolbar_separator; + gboolean toolbar_popup; + gboolean menubar_detachable; + gboolean menubar_relief; + gboolean statusbar_meter_on_right; + gboolean statusbar_is_interactive; + GnomeMDIMode mdi_mode; + GtkPositionType mdi_tab_pos; + } gnome_prefs; }; struct _PreferencesClass @@ -67,9 +82,6 @@ void preferences_apply_now (Preferences *prefs); void preferences_freeze (Preferences *prefs); void preferences_thaw (Preferences *prefs); -Preferences *preferences_read_xml (xmlDocPtr xml_doc); -xmlDocPtr preferences_write_xml (Preferences *prefs); - /* get/set functions. It's really stupid that we need these */ int preferences_get_menubar_detachable (Preferences *prefs); @@ -77,15 +89,12 @@ int preferences_get_menubar_relief (Preferences *prefs); int preferences_get_menus_have_tearoff (Preferences *prefs); int preferences_get_menus_have_icons (Preferences *prefs); -int preferences_get_statusbar_not_dialog (Preferences *prefs); int preferences_get_statusbar_is_interactive (Preferences *prefs); int preferences_get_statusbar_meter_on_left (Preferences *prefs); int preferences_get_statusbar_meter_on_right (Preferences *prefs); int preferences_get_toolbar_detachable (Preferences *prefs); int preferences_get_toolbar_relief (Preferences *prefs); -int preferences_get_toolbar_relief_btn (Preferences *prefs); -int preferences_get_toolbar_lines (Preferences *prefs); int preferences_get_toolbar_icons_only (Preferences *prefs); int preferences_get_toolbar_text_below (Preferences *prefs); @@ -94,7 +103,7 @@ int preferences_get_dialog_centered (Preferences *prefs); GtkWindowPosition preferences_get_dialog_position (Preferences *prefs); GtkWindowType preferences_get_dialog_type (Preferences *prefs); -GtkButtonBoxStyle preferences_get_dialog_buttons_style (Preferences *prefs); +int preferences_get_dialog_buttons_style (Preferences *prefs); GnomeMDIMode preferences_get_mdi_mode (Preferences *prefs); GtkPositionType preferences_get_mdi_tab_pos (Preferences *prefs); @@ -117,15 +126,12 @@ void preferences_set_menubar_relief (Preferences *prefs, int void preferences_set_menus_have_tearoff (Preferences *prefs, int i); void preferences_set_menus_have_icons (Preferences *prefs, int i); -void preferences_set_statusbar_not_dialog (Preferences *prefs, int i); void preferences_set_statusbar_is_interactive (Preferences *prefs, int i); void preferences_set_statusbar_meter_on_left (Preferences *prefs, int i); void preferences_set_statusbar_meter_on_right (Preferences *prefs, int i); void preferences_set_toolbar_detachable (Preferences *prefs, int i); void preferences_set_toolbar_relief (Preferences *prefs, int i); -void preferences_set_toolbar_relief_btn (Preferences *prefs, int i); -void preferences_set_toolbar_lines (Preferences *prefs, int i); void preferences_set_toolbar_icons_only (Preferences *prefs, int i); void preferences_set_toolbar_text_below (Preferences *prefs, int i); diff --git a/capplets/ui-properties/prefs-widget-app.c b/capplets/ui-properties/prefs-widget-app.c index 77fa190d9..8b64ffaa7 100644 --- a/capplets/ui-properties/prefs-widget-app.c +++ b/capplets/ui-properties/prefs-widget-app.c @@ -40,8 +40,6 @@ static widget_desc_t widget_desc[] = { WD_CHECK (statusbar_meter_on_right, "statusbar_meter_on_right"), WD_CHECK (toolbar_detachable, "toolbar_detachable"), WD_CHECK (toolbar_relief, "toolbar_relief"), - WD_CHECK (toolbar_relief_btn, "toolbar_relief_btn"), - WD_CHECK (toolbar_lines, "toolbar_lines"), /* WD_CHECK (toolbar_labels, "toolbar_labels"), */ WD_END }; @@ -61,8 +59,8 @@ prefs_widget_app_get_type (void) sizeof (PrefsWidgetAppClass), (GtkClassInitFunc) prefs_widget_app_class_init, (GtkObjectInitFunc) prefs_widget_app_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL + NULL, + NULL }; prefs_widget_app_type = @@ -99,7 +97,7 @@ prefs_widget_app_new (Preferences *prefs) g_return_val_if_fail (prefs == NULL || IS_PREFERENCES (prefs), NULL); dialog_data = glade_xml_new (GNOMECC_GLADE_DIR "/behavior-properties.glade", - "prefs_widget_app"); + "prefs_widget_app", NULL); widget = gtk_widget_new (prefs_widget_app_get_type (), "dialog_data", dialog_data, diff --git a/capplets/ui-properties/prefs-widget-dialogs.c b/capplets/ui-properties/prefs-widget-dialogs.c index dca4cc867..a38f96256 100644 --- a/capplets/ui-properties/prefs-widget-dialogs.c +++ b/capplets/ui-properties/prefs-widget-dialogs.c @@ -33,7 +33,6 @@ static PrefsWidgetClass *parent_class; static widget_desc_t widget_desc[] = { WD_OPTION (dialog_buttons_style, "dialog_buttons_style"), - WD_CHECK (statusbar_not_dialog, "statusbar_not_dialog"), WD_OPTION (dialog_position, "dialog_position"), WD_OPTION (dialog_type, "dialog_type"), WD_CHECK (dialog_centered, "dialog_centered"), @@ -56,8 +55,8 @@ prefs_widget_dialogs_get_type (void) sizeof (PrefsWidgetDialogsClass), (GtkClassInitFunc) prefs_widget_dialogs_class_init, (GtkObjectInitFunc) prefs_widget_dialogs_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL + NULL, + NULL }; prefs_widget_dialogs_type = @@ -95,7 +94,7 @@ prefs_widget_dialogs_new (Preferences *prefs) dialog_data = glade_xml_new (GNOMECC_GLADE_DIR "/behavior-properties.glade", - "prefs_widget_dialogs"); + "prefs_widget_dialogs", NULL); widget = gtk_widget_new (prefs_widget_dialogs_get_type (), "dialog_data", dialog_data, diff --git a/capplets/ui-properties/prefs-widget-mdi.c b/capplets/ui-properties/prefs-widget-mdi.c index ce78cb710..7d8a2052e 100644 --- a/capplets/ui-properties/prefs-widget-mdi.c +++ b/capplets/ui-properties/prefs-widget-mdi.c @@ -52,8 +52,8 @@ prefs_widget_mdi_get_type (void) sizeof (PrefsWidgetMDIClass), (GtkClassInitFunc) prefs_widget_mdi_class_init, (GtkObjectInitFunc) prefs_widget_mdi_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL + NULL, + NULL }; prefs_widget_mdi_type = @@ -91,7 +91,7 @@ prefs_widget_mdi_new (Preferences *prefs) dialog_data = glade_xml_new (GNOMECC_GLADE_DIR "/behavior-properties.glade", - "prefs_widget_mdi"); + "prefs_widget_mdi", NULL); widget = gtk_widget_new (prefs_widget_mdi_get_type (), "dialog_data", dialog_data, diff --git a/capplets/ui-properties/prefs-widget.c b/capplets/ui-properties/prefs-widget.c index 6c314ada3..f90d80f26 100644 --- a/capplets/ui-properties/prefs-widget.c +++ b/capplets/ui-properties/prefs-widget.c @@ -37,15 +37,12 @@ static widget_desc_t widget_desc[] = { WD_CHECK (menus_have_tearoff, "menus_have_tearoff"), WD_CHECK (menus_have_icons, "menus_have_icons"), - WD_CHECK (statusbar_not_dialog, "statusbar_not_dialog"), WD_CHECK (statusbar_is_interactive, "statusbar_is_interactive"), WD_CHECK (statusbar_meter_on_left , "statusbar_meter_on_left"), WD_CHECK (statusbar_meter_on_right, "statusbar_meter_on_right"), WD_CHECK (toolbar_detachable, "toolbar_detachable"), WD_CHECK (toolbar_relief, "toolbar_relief"), - WD_CHECK (toolbar_relief_btn, "toolbar_relief_btn"), - WD_CHECK (toolbar_lines, "toolbar_lines"), WD_CHECK (toolbar_icons_only, "toolbar_icons_only"), WD_CHECK (toolbar_text_below, "toolbar_text_below"), @@ -75,7 +72,7 @@ enum { static guint prefs_widget_signals[LAST_SIGNAL] = { 0 }; -static CappletWidgetClass *parent_class; +static GtkDialogClass *parent_class; static void prefs_widget_init (PrefsWidget *prefs_widget); static void prefs_widget_class_init (PrefsWidgetClass *class); @@ -101,6 +98,10 @@ static void toggled_cb (GtkToggleButton *tb, PrefsWidget *prefs_widget); static void selected_cb (GtkMenuItem *mi, PrefsWidget *prefs_widget); +static void capplet_widget_state_changed (GtkDialog *dialog, gboolean state); +static void prefs_widget_response_cb (PrefsWidget *prefs_widget, GtkResponseType response, gpointer data); + +#define CAPPLET_WIDGET(x) GTK_DIALOG(x) guint prefs_widget_get_type (void) @@ -114,12 +115,12 @@ prefs_widget_get_type (void) sizeof (PrefsWidgetClass), (GtkClassInitFunc) prefs_widget_class_init, (GtkObjectInitFunc) prefs_widget_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL + NULL, + NULL }; prefs_widget_type = - gtk_type_unique (capplet_widget_get_type (), + gtk_type_unique (gtk_dialog_get_type (), &prefs_widget_info); } @@ -129,6 +130,14 @@ prefs_widget_get_type (void) static void prefs_widget_init (PrefsWidget *prefs_widget) { + gtk_dialog_add_buttons (GTK_DIALOG (prefs_widget), + GTK_STOCK_HELP, GTK_RESPONSE_HELP, + GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, + GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, + NULL); + gtk_dialog_set_response_sensitive (GTK_DIALOG (prefs_widget), GTK_RESPONSE_APPLY, FALSE); + g_signal_connect (G_OBJECT (prefs_widget), "response", + prefs_widget_response_cb, NULL); } static void @@ -152,19 +161,16 @@ prefs_widget_class_init (PrefsWidgetClass *class) prefs_widget_signals[READ_PREFERENCES] = gtk_signal_new ("read-preferences", GTK_RUN_FIRST, - object_class->type, + G_OBJECT_CLASS_TYPE (G_OBJECT_CLASS (object_class)), GTK_SIGNAL_OFFSET (PrefsWidgetClass, read_preferences), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); - gtk_object_class_add_signals (object_class, prefs_widget_signals, - LAST_SIGNAL); - class->read_preferences = read_preferences; - parent_class = CAPPLET_WIDGET_CLASS - (gtk_type_class (capplet_widget_get_type ())); + parent_class = GTK_DIALOG_CLASS + (g_type_class_ref (gtk_dialog_get_type ())); class->widget_desc = widget_desc; } @@ -200,14 +206,14 @@ prefs_widget_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) case ARG_DIALOG_DATA: if (prefs_widget->dialog_data) - gtk_object_unref - (GTK_OBJECT (prefs_widget->dialog_data)); + g_object_unref + (G_OBJECT (prefs_widget->dialog_data)); prefs_widget->dialog_data = GTK_VALUE_POINTER (*arg); if (prefs_widget->dialog_data) { - gtk_object_ref - (GTK_OBJECT (prefs_widget->dialog_data)); + g_object_ref + (G_OBJECT (prefs_widget->dialog_data)); if (prefs_widget->prefs) gtk_signal_emit (GTK_OBJECT (prefs_widget), @@ -260,7 +266,7 @@ prefs_widget_new (Preferences *prefs) g_return_val_if_fail (prefs == NULL || IS_PREFERENCES (prefs), NULL); dialog_data = glade_xml_new (GNOMECC_GLADE_DIR "/behavior-properties.glade", - "prefs_widget"); + "prefs_widget", NULL); widget = gtk_widget_new (prefs_widget_get_type (), "preferences", prefs, @@ -268,7 +274,8 @@ prefs_widget_new (Preferences *prefs) NULL); dlg_widget = glade_xml_get_widget (dialog_data, "prefs_widget"); - gtk_container_add (GTK_CONTAINER (widget), dlg_widget); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (widget)->vbox), dlg_widget, + TRUE, TRUE, 0); return widget; } @@ -296,8 +303,8 @@ read_preferences (PrefsWidget *prefs_widget, Preferences *prefs) g_return_if_fail (IS_PREFERENCES (prefs)); widget_desc = - PREFS_WIDGET_CLASS (GTK_OBJECT - (prefs_widget)->klass)->widget_desc; + PREFS_WIDGET_CLASS (G_OBJECT_GET_CLASS (G_OBJECT + (prefs_widget)))->widget_desc; g_return_if_fail (widget_desc != NULL); @@ -340,8 +347,8 @@ register_callbacks (PrefsWidget *prefs_widget, GladeXML *dialog_data) g_return_if_fail (dialog_data != NULL); g_return_if_fail (GLADE_IS_XML (dialog_data)); - widget_desc = PREFS_WIDGET_CLASS (GTK_OBJECT - (prefs_widget)->klass)->widget_desc; + widget_desc = PREFS_WIDGET_CLASS (G_OBJECT_GET_CLASS (G_OBJECT + (prefs_widget)))->widget_desc; if (widget_desc == NULL) return; @@ -395,8 +402,8 @@ find_widget_desc_with_name (PrefsWidget *prefs_widget, const char *name) g_return_val_if_fail (name != NULL, NULL); widget_desc = - PREFS_WIDGET_CLASS (GTK_OBJECT - (prefs_widget)->klass)->widget_desc; + PREFS_WIDGET_CLASS (G_OBJECT_GET_CLASS (G_OBJECT + (prefs_widget)))->widget_desc; g_return_val_if_fail (widget_desc != NULL, NULL); @@ -458,3 +465,24 @@ selected_cb (GtkMenuItem *mi, PrefsWidget *prefs_widget) capplet_widget_state_changed (CAPPLET_WIDGET (prefs_widget), TRUE); } } + + +static void +capplet_widget_state_changed (GtkDialog *dialog, gboolean state) +{ + gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_APPLY, state); +} + +static void +prefs_widget_response_cb (PrefsWidget *prefs_widget, GtkResponseType response, gpointer data) +{ + switch (response) + { + case GTK_RESPONSE_APPLY: + preferences_save (prefs_widget->prefs); + break; + case GTK_RESPONSE_CLOSE: + gtk_main_quit (); + break; + } +} diff --git a/capplets/ui-properties/prefs-widget.h b/capplets/ui-properties/prefs-widget.h index 1392a6a65..3b4b7facc 100644 --- a/capplets/ui-properties/prefs-widget.h +++ b/capplets/ui-properties/prefs-widget.h @@ -26,7 +26,6 @@ #include #include -#include #include "preferences.h" @@ -70,7 +69,7 @@ typedef struct _PrefsWidgetClass PrefsWidgetClass; struct _PrefsWidget { - CappletWidget capplet_widget; + GtkDialog capplet_widget; Preferences *prefs; GladeXML *dialog_data; @@ -78,7 +77,7 @@ struct _PrefsWidget struct _PrefsWidgetClass { - CappletWidgetClass parent_class; + GtkDialogClass parent_class; void (*read_preferences) (PrefsWidget *prefs_widget, Preferences *prefs); diff --git a/capplets/ui-properties/ui-properties.glade b/capplets/ui-properties/ui-properties.glade index ccf52ba46..1510b08ed 100644 --- a/capplets/ui-properties/ui-properties.glade +++ b/capplets/ui-properties/ui-properties.glade @@ -1,924 +1,1112 @@ - - + + - - New-ui-properties - new-ui-properties - - src - . - C - True - True - True - ui-properties.glade.h - + + + window4 + GTK_WINDOW_TOPLEVEL + no + no + yes + no + GTK_WIN_POS_NONE - - GtkWindow - window4 - window4 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False + + + no + 0 + yes - - GtkVBox - prefs_widget - False - 0 + + + yes + yes + yes + GTK_POS_TOP + no + 2 + 2 + no + yes - - GtkNotebook - notebook1 - True - True - True - GTK_POS_TOP - False - 2 - 2 - False - - 0 - False - False - + + + 4 + yes + 4 + 4 + 2 + 2 + yes - - GtkTable - table3 - 4 - 2 - 2 - True - 4 - 4 + + + Menus + 0 + GTK_SHADOW_ETCHED_IN + yes - - GtkFrame - frame7 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - 1 - 1 - 2 - 0 - 0 - True - False - False - False - True - True - + + + 4 + no + 0 + yes - - GtkVBox - vbox2 - 4 - False - 0 + + + yes + Menu bars are detachable + no + yes + yes - - GtkCheckButton - menubar_detachable_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:48:47 GMT - - - False - True - - 0 - False - False - - + + + + 0 + no + no + + - - GtkCheckButton - menubar_relief_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:48:53 GMT - - - False - True - - 0 - False - False - - + + + yes + Menu bars have a border + no + yes + yes - - GtkCheckButton - menus_have_tearoff_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:03 GMT - - - False - True - - 0 - False - False - - + + + + 0 + no + no + + - - GtkCheckButton - menus_have_icons_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:11 GMT - - - False - True - - 0 - False - False - - - - + + + yes + Menus can be torn off + no + yes + yes - - GtkFrame - frame8 - - 0 - GTK_SHADOW_ETCHED_IN - - 1 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - True - + + + + 0 + no + no + + - - GtkVBox - vbox3 - 4 - False - 0 + + + yes + Menu items have icons + no + yes + yes - - GtkCheckButton - statusbar_not_dialog_toggle - False - True - - toggled - toggled_cb - Sun, 24 Sep 2000 05:09:02 GMT - - - False - True - - 0 - False - False - - + + + + 0 + no + no + + + + + + + 0 + 1 + 1 + 2 + 0 + 0 + expand|fill + fill + + - - GtkCheckButton - statusbar_is_interactive_toggle - False - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:20 GMT - - - False - True - - 0 - False - False - - + + + Status Bar + 0 + GTK_SHADOW_ETCHED_IN + yes - - GtkHSeparator - hseparator1 - False - - 2 - False - False - - + + + 4 + no + 0 + yes - - GtkRadioButton - statusbar_meter_on_left_toggle - True - - toggled - toggled_cb - Fri, 08 Dec 2000 20:02:09 GMT - - - False - True - progressbar - - 0 - False - False - - + + + no + yes + Use status bar instead of dialog when possible + no + yes - - GtkRadioButton - statusbar_meter_on_right_toggle - True - - toggled - toggled_cb - Fri, 08 Dec 2000 20:02:15 GMT - - - False - True - progressbar - - 0 - False - False - - - - + + + + 0 + no + no + + - - GtkFrame - frame6 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - True - + + + no + yes + Status bar is interactive when possible + no + yes - - GtkTable - table4 - 4 - 4 - 2 - True - 0 - 0 + + + + 0 + no + no + + - - GtkCheckButton - toolbar_relief_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:42 GMT - - - False - True - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - + + + no + + + 2 + no + no + + - - GtkCheckButton - toolbar_relief_btn_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:48 GMT - - - False - True - - 0 - 1 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - + + + yes + Progress bar is on the left + no + yes + yes - - GtkCheckButton - toolbar_lines_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:53 GMT - - - False - True - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - + + + + 0 + no + no + + - - GtkCheckButton - toolbar_detachable_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 02:49:38 GMT - - - False - True - - 0 - 1 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - + + + yes + Progress bar is on the right + no + yes + yes + statusbar_meter_on_left_toggle - - GtkRadioButton - toolbar_icons_only_toggle - True - - toggled - toggled_cb - Fri, 08 Dec 2000 19:27:09 GMT - - - False - True - toolbar_icons - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - + + + + 0 + no + no + + + + + + + 1 + 2 + 1 + 2 + 0 + 0 + expand|fill + fill + + - - GtkRadioButton - toolbar_text_below_toggle - True - - toggled - toggled_cb - Fri, 08 Dec 2000 19:27:18 GMT - - - False - True - toolbar_icons - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - + + + Tool Bars + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 4 + yes + 0 + 0 + 4 + 2 + yes + + + + yes + Tool bars have a border + no + yes + yes + + + + + 0 + 1 + 1 + 2 + 0 + 0 + fill + + + + + + + yes + Tool bar buttons pop up on mouse over + no + yes + yes + + + + + 0 + 1 + 3 + 4 + 0 + 0 + fill + + + + + + + yes + Tool bars have line separators + no + yes + yes + + + + + 0 + 1 + 2 + 3 + 0 + 0 + fill + + + + + + + yes + Tool bars are detachable + no + yes + yes + + + + + 0 + 1 + 0 + 1 + 0 + 0 + expand|fill + + + + + + + yes + Tool bar buttons are icons only + no + yes + yes + + + + + 1 + 2 + 0 + 1 + 0 + 0 + fill + + + + + + + yes + Tool bar buttons are text below icons + no + yes + yes + toolbar_icons_only_toggle + + + + + 1 + 2 + 1 + 2 + 0 + 0 + fill + + + + + + + + 0 + 2 + 0 + 1 + 0 + 0 + expand|fill + fill + + + + + + + + Interface + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + tab + + + + + + 4 + no + 4 + yes + + + + Dialogs + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 4 + no + 0 + yes + + + + yes + Dialog buttons have icons + no + yes + yes + + + + + 0 + no + no + + + + + + yes + Place dialogs over application window when possible + no + yes + yes + + + + + 0 + no + no + + + + + + no + 4 + 4 + 3 + 2 + yes + + + + Dialogs open + GTK_JUSTIFY_RIGHT + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 0 + 1 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Wherever the Window Manager places them + 0.0 + convertwidget2 + yes + yes + + + + + + + + yes + + + + At the center of the screen + 0.0 + convertwidget3 + yes + yes + + + + + + + + yes + + + + At the mouse pointer + 0.0 + convertwidget4 + yes + yes + + + + + + + + + 1 + 2 + 0 + 1 + 0 + 0 + fill + + + + + + + Dialogs are treated + GTK_JUSTIFY_RIGHT + no + 0 + 0 + 0 + 0 + yes + + + 0 + 1 + 1 + 2 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Like any other window + 0.0 + convertwidget9 + yes + yes + + + + + + + + yes + + + + Specially by the window manager + 0.0 + convertwidget10 + yes + yes + + + + + + + + + 1 + 2 + 1 + 2 + 0 + 0 + fill + + + + + + + Dialog Buttons + GTK_JUSTIFY_CENTER + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 2 + 3 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Default (Spread out - big) + 0.0 + convertwidget14 + yes + yes + + + + + + + + yes + + + + Spread out + 0.0 + convertwidget15 + yes + yes + + + + + + + + yes + + + + Spread out (big) + 0.0 + convertwidget16 + yes + yes + + + + + + + + yes + + + + Left aligned + 0.0 + convertwidget17 + yes + yes + + + + + + + + yes + + + + Right aligned + 0.0 + convertwidget18 + yes + yes + + + + + + + + + 1 + 2 + 2 + 3 + 0 + 0 + fill + + + + + + 0 + no + no + + + + + + + 0 + no + no + + + + + + Multiple Documents + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 5 + no + 5 + 5 + 2 + 2 + yes + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Notebook tabs + 0.0 + convertwidget25 + yes + yes + + + + + + + + yes + + + + Seperate windows + 0.0 + convertwidget26 + yes + yes + + + + + + + + yes + + + + The same window + 0.0 + convertwidget27 + yes + yes + + + + + + + + + 1 + 2 + 0 + 1 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Left + 0.0 + convertwidget32 + yes + yes + + + + + + + + yes + + + + Right + 0.0 + convertwidget33 + yes + yes + + + + + + + + yes + + + + Top + 0.0 + convertwidget34 + yes + yes + + + + + + + + yes + + + + Bottom + 0.0 + convertwidget35 + yes + yes + + + + + + + + + 1 + 2 + 1 + 2 + 0 + 0 + fill + + + + + + + When opening Multiple documents, use + GTK_JUSTIFY_CENTER + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 0 + 1 + 0 + 0 + fill + + + + + + + When using Notebook tabs, place the tabs on the + GTK_JUSTIFY_CENTER + no + 0 + 0.5 + 0 + 0 + yes + + + 0 + 1 + 1 + 2 + 0 + 0 + fill + + + + + + + + 0 + no + no + + + + + + + + Miscellaneous + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + tab + + + + + 0 + no + no + + + - - - GtkLabel - Notebook:tab - label6 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox8 - 4 - False - 4 - - - GtkFrame - frame9 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - False - - - - GtkVBox - vbox9 - 4 - False - 0 - - - GtkCheckButton - dialog_icons_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 05:08:48 GMT - - - False - True - - 0 - False - False - - - - - GtkCheckButton - dialog_centered_toggle - True - - toggled - toggled_cb - Sun, 24 Sep 2000 05:09:12 GMT - - - False - True - - 0 - False - False - - - - - GtkTable - table5 - 3 - 2 - False - 4 - 4 - - 0 - False - False - - - - GtkLabel - label2 - - GTK_JUSTIFY_RIGHT - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - dialog_position_select - True - Wherever the Window Manager places them -At the center of the screen -At the mouse pointer - - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label3 - - GTK_JUSTIFY_RIGHT - False - 0 - 0 - 0 - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - dialog_type_select - True - Like any other window -Specially by the window manager - - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label1 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - dialog_buttons_style_select - True - Default (Spread out - big) -Spread out -Spread out (big) -Left aligned -Right aligned - - 0 - - 1 - 2 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - - - - GtkFrame - frame10 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - False - - - - GtkTable - table2 - 5 - 2 - 2 - False - 5 - 5 - - - GtkOptionMenu - mdi_mode_select - True - Notebook tabs -Seperate windows -The same window - - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - mdi_tab_pos_select - True - Left -Right -Top -Bottom - - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label8 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label9 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - - - - GtkLabel - Notebook:tab - label7 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - GtkHBox - hbox2 - False - 0 - - 0 - False - False - - - - GnomePixmap - pixmap1 - gnome-warning.png - - 0 - False - False - - - - - GtkLabel - label10 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - + - - - + diff --git a/capplets/ui-properties/ui-properties.glade.h b/capplets/ui-properties/ui-properties.glade.h index 14a846355..4c0a93b05 100644 --- a/capplets/ui-properties/ui-properties.glade.h +++ b/capplets/ui-properties/ui-properties.glade.h @@ -24,7 +24,6 @@ gchar *s = N_("Tool bar buttons are icons only"); gchar *s = N_("Tool bar buttons are text below icons"); gchar *s = N_("Interface"); gchar *s = N_("Dialogs"); -gchar *s = N_("Dialog buttons have icons"); gchar *s = N_("Place dialogs over application window when possible"); gchar *s = N_("Dialogs open"); gchar *s = N_("Wherever the Window Manager places them"); @@ -33,12 +32,6 @@ gchar *s = N_("At the mouse pointer"); gchar *s = N_("Dialogs are treated"); gchar *s = N_("Like any other window"); gchar *s = N_("Specially by the window manager"); -gchar *s = N_("Dialog Buttons"); -gchar *s = N_("Default (Spread out - big)"); -gchar *s = N_("Spread out"); -gchar *s = N_("Spread out (big)"); -gchar *s = N_("Left aligned"); -gchar *s = N_("Right aligned"); gchar *s = N_("Multiple Documents"); gchar *s = N_("Notebook tabs"); gchar *s = N_("Seperate windows");