Added ui-properties back in
2002-01-14 Bradford Hovinen <hovinen@ximian.com> * capplets/Makefile.am (SUBDIRS): Added ui-properties back in * capplets/ui-properties/main.c (main): Remove Ximian archiver stuff * capplets/ui-properties/*.c: Change GNOMECC_blah_DIR to GNOMECC_DATA_DIR "/blah
This commit is contained in:
parent
26c2c85107
commit
57513c09d7
6 changed files with 9 additions and 90 deletions
|
@ -1,3 +1,7 @@
|
|||
2002-01-14 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* main.c (main): Remove Ximian archiver stuff
|
||||
|
||||
2002-01-14 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* Gnome 2 port. (Settings only halfway work right now.)
|
||||
|
|
|
@ -60,66 +60,6 @@ setup_capplet_widget (void)
|
|||
preferences_thaw (prefs);
|
||||
}
|
||||
|
||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
||||
|
||||
static void
|
||||
do_get_xml (void)
|
||||
{
|
||||
Preferences *prefs;
|
||||
xmlDocPtr doc;
|
||||
|
||||
prefs = PREFERENCES (preferences_new ());
|
||||
preferences_load (prefs);
|
||||
doc = preferences_write_xml (prefs);
|
||||
xmlDocDump (stdout, doc);
|
||||
gtk_object_destroy (GTK_OBJECT (prefs));
|
||||
}
|
||||
|
||||
static void
|
||||
do_set_xml (gboolean apply_settings)
|
||||
{
|
||||
xmlDocPtr doc;
|
||||
char buffer[16384];
|
||||
GString *doc_str;
|
||||
int t = 0;
|
||||
|
||||
fflush (stdin);
|
||||
|
||||
fcntl (fileno (stdin), F_SETFL, 0);
|
||||
|
||||
doc_str = g_string_new ("");
|
||||
|
||||
while ((t = read (fileno (stdin), buffer, sizeof (buffer) - 1)) != 0) {
|
||||
buffer[t] = '\0';
|
||||
g_string_append (doc_str, buffer);
|
||||
}
|
||||
|
||||
if (doc_str->len > 0) {
|
||||
doc = xmlParseDoc (doc_str->str);
|
||||
g_string_free (doc_str, TRUE);
|
||||
|
||||
if (doc != NULL) {
|
||||
prefs = preferences_read_xml (doc);
|
||||
|
||||
if (prefs && apply_settings) {
|
||||
preferences_save (prefs);
|
||||
return;
|
||||
}
|
||||
else if (prefs != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
xmlFreeDoc (doc);
|
||||
}
|
||||
} else {
|
||||
g_critical ("No data to apply");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* HAVE_XIMIAN_ARCHIVER */
|
||||
|
||||
static void
|
||||
do_restore_from_defaults (void)
|
||||
{
|
||||
|
@ -142,36 +82,11 @@ main (int argc, char **argv)
|
|||
GNOME_PARAM_POPT_TABLE, &cap_options,
|
||||
NULL);
|
||||
|
||||
gnome_window_icon_set_default_from_file (GNOMECC_ICONS_DIR"/gnome-applications.png");
|
||||
|
||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
||||
archive = ARCHIVE (archive_load (FALSE));
|
||||
|
||||
if (capplet_get_location () != NULL &&
|
||||
strcmp (capplet_get_location (),
|
||||
archive_get_current_location_id (archive)))
|
||||
{
|
||||
outside_location = TRUE;
|
||||
do_set_xml (FALSE);
|
||||
if (prefs == NULL) return -1;
|
||||
preferences_freeze (prefs);
|
||||
} else {
|
||||
outside_location = FALSE;
|
||||
prefs = PREFERENCES (preferences_new ());
|
||||
preferences_load (prefs);
|
||||
}
|
||||
|
||||
if (!outside_location && token) {
|
||||
preferences_apply_now (prefs);
|
||||
}
|
||||
|
||||
#else /* !HAVE_XIMIAN_ARCHIVER */
|
||||
gnome_window_icon_set_default_from_file (GNOMECC_DATA_DIR"/icons/gnome-applications.png");
|
||||
|
||||
prefs = PREFERENCES (preferences_new ());
|
||||
preferences_load (prefs);
|
||||
|
||||
#endif /* HAVE_XIMIAN_ARCHIVER */
|
||||
|
||||
if (!cap_session_init) {
|
||||
setup_capplet_widget ();
|
||||
|
||||
|
|
|
@ -96,7 +96,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",
|
||||
dialog_data = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/behavior-properties.glade",
|
||||
"prefs_widget_app", NULL);
|
||||
|
||||
widget = gtk_widget_new (prefs_widget_app_get_type (),
|
||||
|
|
|
@ -93,7 +93,7 @@ prefs_widget_dialogs_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",
|
||||
glade_xml_new (GNOMECC_DATA_DIR "/interfaces/behavior-properties.glade",
|
||||
"prefs_widget_dialogs", NULL);
|
||||
|
||||
widget = gtk_widget_new (prefs_widget_dialogs_get_type (),
|
||||
|
|
|
@ -90,7 +90,7 @@ prefs_widget_mdi_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",
|
||||
glade_xml_new (GNOMECC_DATA_DIR "/interfaces/behavior-properties.glade",
|
||||
"prefs_widget_mdi", NULL);
|
||||
|
||||
widget = gtk_widget_new (prefs_widget_mdi_get_type (),
|
||||
|
|
|
@ -265,7 +265,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",
|
||||
dialog_data = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/behavior-properties.glade",
|
||||
"prefs_widget", NULL);
|
||||
|
||||
widget = gtk_widget_new (prefs_widget_get_type (),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue