Initial GNOME2 port.
2001-12-01 Richard Hestilow <hestilow@ximian.com> * Initial GNOME2 port.
This commit is contained in:
parent
bafad73d36
commit
478912430c
21 changed files with 1145 additions and 1067 deletions
|
@ -1,3 +1,7 @@
|
|||
2001-12-01 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* Initial GNOME2 port.
|
||||
|
||||
2001-08-18 Abel Cheung <maddog@linux.org.hk>
|
||||
|
||||
* interface.c (edit_create): Fixed a string (cut 'n paste is source
|
||||
|
|
|
@ -2,7 +2,7 @@ cappletname = default-applications
|
|||
cappletgroup =
|
||||
bin_PROGRAMS = default-applications-properties
|
||||
|
||||
default_applications_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
|
||||
default_applications_properties_LDADD = @OLD_CAPPLET_LIBS@
|
||||
default_applications_properties_SOURCES = \
|
||||
default-application-properties.c \
|
||||
interface.c interface.h \
|
||||
|
@ -28,7 +28,7 @@ install-data-local:
|
|||
install-data-am: install-data-local
|
||||
####@###GNOMECC_CAPPLETS_DESKTOP_IN_RULE@
|
||||
|
||||
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
|
||||
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) @OLD_CAPPLET_CFLAGS@
|
||||
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
|
||||
EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST)
|
||||
iconsdir = $(GNOMECC_ICONS_DIR)
|
||||
|
|
|
@ -124,23 +124,3 @@ create_pixmap (GtkWidget *widget,
|
|||
gdk_bitmap_unref (mask);
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
/* This is an internally used function to create imlib images. */
|
||||
GdkImlibImage*
|
||||
create_image (const gchar *filename)
|
||||
{
|
||||
GdkImlibImage *image;
|
||||
gchar *pathname;
|
||||
|
||||
pathname = gnome_pixmap_file (filename);
|
||||
if (!pathname)
|
||||
{
|
||||
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
image = gdk_imlib_load_image (pathname);
|
||||
g_free (pathname);
|
||||
return image;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,5 +30,3 @@ GtkWidget* create_pixmap (GtkWidget *widget,
|
|||
const gchar *filename,
|
||||
gboolean gnome_pixmap);
|
||||
|
||||
GdkImlibImage* create_image (const gchar *filename);
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2001-12-01 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* Initial GNOME2 port.
|
||||
|
||||
2001-10-18 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* screensaver-capplet.png: fix the icon (bug #61522)
|
||||
|
|
|
@ -4,7 +4,7 @@ cappletname = screensaver
|
|||
cappletgroup =
|
||||
bin_PROGRAMS = screensaver-properties-capplet
|
||||
|
||||
screensaver_properties_capplet_LDADD = $(GNOMECC_CAPPLETS_LIBS) -lXt
|
||||
screensaver_properties_capplet_LDADD = @OLD_CAPPLET_LIBS@ -lXt
|
||||
screensaver_properties_capplet_SOURCES = \
|
||||
main.c \
|
||||
prefs-widget.c prefs-widget.h\
|
||||
|
@ -17,6 +17,7 @@ screensaver_properties_capplet_SOURCES = \
|
|||
daemon.c daemon.h\
|
||||
rc-parse.c rc-parse.h\
|
||||
resources.c resources.h\
|
||||
gnome-startup.c gnome-startup.h \
|
||||
XScreenSaver_ad.h
|
||||
|
||||
pixmaps_DATA = no-hack.png blank-screen.png
|
||||
|
@ -37,7 +38,7 @@ install-data-local:
|
|||
install-data-am: install-data-local
|
||||
####@###GNOMECC_CAPPLETS_DESKTOP_IN_RULE@
|
||||
|
||||
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
|
||||
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) @OLD_CAPPLET_CFLAGS@
|
||||
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
|
||||
EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST) $(pixmaps_DATA)
|
||||
iconsdir = $(GNOMECC_ICONS_DIR)
|
||||
|
|
45
capplets/screensaver/gnome-startup.c
Normal file
45
capplets/screensaver/gnome-startup.c
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* gnome-startup.c - Functions for handling one-time startups in sessions.
|
||||
Written by Tom Tromey <tromey@cygnus.com>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "gnome-startup.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
gboolean
|
||||
gnome_startup_acquire_token (const char *property,
|
||||
const char *session_id)
|
||||
{
|
||||
Atom atom, actual;
|
||||
unsigned long nitems, nbytes;
|
||||
unsigned char *current;
|
||||
int len, format;
|
||||
gboolean result;
|
||||
|
||||
atom = XInternAtom (GDK_DISPLAY (), property, False);
|
||||
len = strlen (session_id);
|
||||
|
||||
/* Append our session id to the property. We do this to avoid a
|
||||
race condition: if two clients run this code, we want to make
|
||||
sure that only one client can acquire the lock. */
|
||||
XChangeProperty (GDK_DISPLAY (), DefaultRootWindow (GDK_DISPLAY ()), atom,
|
||||
XA_STRING, 8, PropModeAppend, session_id, len);
|
||||
|
||||
if (XGetWindowProperty (GDK_DISPLAY (), DefaultRootWindow (GDK_DISPLAY ()),
|
||||
atom, 0, len, False, XA_STRING,
|
||||
&actual, &format,
|
||||
&nitems, &nbytes, ¤t) != Success)
|
||||
current = NULL;
|
||||
|
||||
if (! current)
|
||||
return 0;
|
||||
|
||||
result = ! strncmp (current, session_id, len);
|
||||
XFree (current);
|
||||
|
||||
return result;
|
||||
}
|
27
capplets/screensaver/gnome-startup.h
Normal file
27
capplets/screensaver/gnome-startup.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* gnome-startup.h - Functions for handling one-time startups in sessions.
|
||||
Written by Tom Tromey <tromey@cygnus.com>. */
|
||||
|
||||
#ifndef GNOME_STARTUP_H
|
||||
#define GNOME_STARTUP_H
|
||||
|
||||
#include <libgnome/gnome-defs.h>
|
||||
#include <glib.h>
|
||||
|
||||
BEGIN_GNOME_DECLS
|
||||
|
||||
/* This function is used by configurator programs that set some global
|
||||
X server state. The general idea is that such a program can be run
|
||||
in an `initialization' mode, where it sets the server state
|
||||
according to some saved state. This function implements a mutex
|
||||
for such programs. The mutex a property on the root window. Call
|
||||
this function with the session manager's session id. If it returns
|
||||
false, then do nothing. If it returns true, then the caller has
|
||||
obtained the mutex and should proceed with initialization. The
|
||||
property name is generally of the form GNOME_<PROGRAM>_PROPERTY. */
|
||||
|
||||
gboolean gnome_startup_acquire_token (const gchar *property_name,
|
||||
const gchar *sm_id);
|
||||
|
||||
END_GNOME_DECLS
|
||||
|
||||
#endif /* GNOME_STARTUP_H */
|
|
@ -28,9 +28,9 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include <gnome.h>
|
||||
#include <libgnomeui/gnome-window-icon.h>
|
||||
#include <tree.h>
|
||||
#include <parser.h>
|
||||
#include <xmlIO.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ parse_config_file (const char *file_name)
|
|||
gint line_no;
|
||||
char *line, *key, *value;
|
||||
|
||||
if (!g_file_test (file_name, G_FILE_TEST_ISFILE))
|
||||
if (!g_file_test (file_name, G_FILE_TEST_IS_REGULAR))
|
||||
return NULL;
|
||||
|
||||
in = fopen (file_name, "r");
|
||||
|
@ -562,7 +562,7 @@ preferences_save_to_file (Preferences *prefs)
|
|||
be world-readable (so that the daemon, running as "nobody", will
|
||||
still be able to read it.)
|
||||
*/
|
||||
if (g_file_test (name, G_FILE_TEST_ISFILE)) {
|
||||
if (g_file_test (name, G_FILE_TEST_IS_REGULAR)) {
|
||||
mode_t mode = st.st_mode;
|
||||
mode |= S_IRUSR | S_IWUSR; /* read/write by user */
|
||||
mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH); /* executable by none */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <dirent.h>
|
||||
|
||||
#include <gnome.h>
|
||||
#include <parser.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#include "preferences.h"
|
||||
#include "preview.h"
|
||||
|
@ -435,7 +435,7 @@ xml_get_programs_list (xmlNodePtr programs_node)
|
|||
Screensaver *saver;
|
||||
gint id = 0;
|
||||
|
||||
for (node = programs_node->childs; node; node = node->next) {
|
||||
for (node = programs_node->children; node; node = node->next) {
|
||||
saver = screensaver_read_xml (node);
|
||||
if (!saver) continue;
|
||||
saver->id = id++;
|
||||
|
@ -462,7 +462,7 @@ preferences_read_xml (xmlDocPtr xml_doc)
|
|||
if (strcmp (root_node->name, "screensaver-prefs"))
|
||||
return NULL;
|
||||
|
||||
for (node = root_node->childs; node; node = node->next) {
|
||||
for (node = root_node->children; node; node = node->next) {
|
||||
if (!strcmp (node->name, "verbose"))
|
||||
prefs->verbose = xml_read_bool (node);
|
||||
else if (!strcmp (node->name, "lock"))
|
||||
|
@ -657,7 +657,7 @@ parse_arg_default (GString *s, xmlNodePtr node)
|
|||
g_string_append_c (s, ' ');
|
||||
g_string_append (s, arr[0]);
|
||||
g_string_append (s, val);
|
||||
if (arr[1] && arg[2])
|
||||
if (arr[1] && arr[2])
|
||||
g_string_append (s, arr[2]);
|
||||
}
|
||||
|
||||
|
@ -680,7 +680,7 @@ screensaver_read_xml (xmlNodePtr saver_node)
|
|||
|
||||
args = g_string_new (saver->name);
|
||||
|
||||
for (node = saver_node->childs; node; node = node->next) {
|
||||
for (node = saver_node->children; node; node = node->next) {
|
||||
if (!strcmp (node->name, "command-line"))
|
||||
saver->command_line =
|
||||
g_strdup (xmlNodeGetContent (node));
|
||||
|
@ -757,7 +757,7 @@ screensaver_new_from_file (const gchar *filename)
|
|||
if (!doc)
|
||||
return NULL;
|
||||
|
||||
node = doc->root;
|
||||
node = doc->children;
|
||||
if (!node)
|
||||
{
|
||||
xmlFreeDoc (doc);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <sys/time.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <tree.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
enum _SelectionMode {
|
||||
SM_DISABLE_SCREENSAVER,
|
||||
|
|
|
@ -149,8 +149,8 @@ guint 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 =
|
||||
|
@ -194,7 +194,7 @@ prefs_widget_init (PrefsWidget *prefs_widget)
|
|||
prefs_widget->priv = g_new0 (PrefsWidgetPrivate, 1);
|
||||
prefs_widget->priv->xml =
|
||||
glade_xml_new (GNOMECC_GLADE_DIR "/screensaver-properties.glade",
|
||||
NULL);
|
||||
NULL, NULL);
|
||||
if (!prefs_widget->priv->xml)
|
||||
return;
|
||||
|
||||
|
@ -328,7 +328,7 @@ prefs_widget_class_init (PrefsWidgetClass *class)
|
|||
|
||||
prefs_widget_signals[STATE_CHANGED_SIGNAL] =
|
||||
gtk_signal_new ("pref-changed", GTK_RUN_FIRST,
|
||||
object_class->type,
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
GTK_SIGNAL_OFFSET (PrefsWidgetClass,
|
||||
state_changed),
|
||||
gtk_signal_default_marshaller,
|
||||
|
@ -336,15 +336,12 @@ prefs_widget_class_init (PrefsWidgetClass *class)
|
|||
|
||||
prefs_widget_signals[ACTIVATE_DEMO_SIGNAL] =
|
||||
gtk_signal_new ("activate_demo", GTK_RUN_FIRST,
|
||||
object_class->type,
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
GTK_SIGNAL_OFFSET (PrefsWidgetClass,
|
||||
activate_demo),
|
||||
gtk_signal_default_marshaller,
|
||||
GTK_TYPE_NONE, 0);
|
||||
|
||||
gtk_object_class_add_signals (object_class, prefs_widget_signals,
|
||||
LAST_SIGNAL);
|
||||
|
||||
class->state_changed = NULL;
|
||||
object_class->destroy = prefs_widget_destroy;
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ show_screensaver_timeout (void)
|
|||
gdk_pixbuf_unref (pixbuf);
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file
|
||||
(GNOMECC_PIXMAPS_DIR "/no-hack.png");
|
||||
(GNOMECC_PIXMAPS_DIR "/no-hack.png", NULL);
|
||||
gdk_pixbuf_render_to_drawable
|
||||
(pixbuf, (GdkDrawable *) preview_window->window,
|
||||
preview_window->style->fg_gc[0], 0, 0, 0, 0,
|
||||
|
@ -291,7 +291,7 @@ show_preview (Screensaver *saver)
|
|||
|
||||
if (saver->fakepreview)
|
||||
{
|
||||
pixbuf = gdk_pixbuf_new_from_file (saver->fakepreview);
|
||||
pixbuf = gdk_pixbuf_new_from_file (saver->fakepreview, NULL);
|
||||
gdk_pixbuf_render_to_drawable
|
||||
(pixbuf, (GdkDrawable *) preview_window->window,
|
||||
preview_window->style->fg_gc[0], 0, 0, 0, 0,
|
||||
|
@ -332,7 +332,7 @@ show_blank_preview (void)
|
|||
if (pixbuf)
|
||||
gdk_pixbuf_unref (pixbuf);
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file (GNOMECC_PIXMAPS_DIR "/blank-screen.png");
|
||||
pixbuf = gdk_pixbuf_new_from_file (GNOMECC_PIXMAPS_DIR "/blank-screen.png", NULL);
|
||||
gdk_pixbuf_render_to_drawable
|
||||
(pixbuf, (GdkDrawable *) preview_window->window,
|
||||
preview_window->style->fg_gc[0], 0, 0, 0, 0,
|
||||
|
@ -344,16 +344,7 @@ show_blank_preview (void)
|
|||
static GdkWindow *
|
||||
gdk_window_new_from_xwindow (Window xwindow)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkWindowPrivate *window_priv;
|
||||
|
||||
window_priv = g_new0 (GdkWindowPrivate, 1);
|
||||
window = (GdkWindow *) window_priv;
|
||||
window_priv->xdisplay = gdk_display;
|
||||
window_priv->xwindow = xwindow;
|
||||
window_priv->destroyed = FALSE;
|
||||
|
||||
return window;
|
||||
return gdk_window_foreign_new (xwindow);
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
|
|
|
@ -230,7 +230,7 @@ get_screensaver_dir_list (void)
|
|||
while (fgets (buffer, 1024, in)) {
|
||||
buffer[strlen(buffer) - 1] = '\0';
|
||||
|
||||
if (g_file_test (buffer, G_FILE_TEST_ISDIR)) {
|
||||
if (g_file_test (buffer, G_FILE_TEST_IS_DIR)) {
|
||||
list_tail = g_list_append (NULL, g_strdup (buffer));
|
||||
if (screensaver_dir_list == NULL)
|
||||
screensaver_dir_list = list_tail;
|
||||
|
@ -264,7 +264,7 @@ rc_command_exists (char *command)
|
|||
|
||||
/* If this is a complete path, then just stat it */
|
||||
if (strchr (program, '/')) {
|
||||
if (g_file_test (program, G_FILE_TEST_ISFILE))
|
||||
if (g_file_test (program, G_FILE_TEST_IS_REGULAR))
|
||||
ret = TRUE;
|
||||
else
|
||||
ret = FALSE;
|
||||
|
@ -280,7 +280,7 @@ rc_command_exists (char *command)
|
|||
for (node = screensaver_dir_list; node; node = node->next) {
|
||||
fullpath = g_concat_dir_and_file ((gchar *) node->data,
|
||||
program);
|
||||
if (g_file_test (fullpath, G_FILE_TEST_ISFILE)) {
|
||||
if (g_file_test (fullpath, G_FILE_TEST_IS_REGULAR)) {
|
||||
g_free (program);
|
||||
g_free (fullpath);
|
||||
return TRUE;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Shell.h>
|
||||
#include <gdk/gdkprivate.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
#include "resources.h"
|
||||
#include "rc-parse.h"
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
#endif
|
||||
|
||||
#include <gnome.h>
|
||||
#include <parser.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <tree.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#include "screensaver-prefs-dialog.h"
|
||||
#include "preferences.h"
|
||||
|
@ -157,8 +157,8 @@ screensaver_prefs_dialog_get_type (void)
|
|||
sizeof (ScreensaverPrefsDialogClass),
|
||||
(GtkClassInitFunc) screensaver_prefs_dialog_class_init,
|
||||
(GtkObjectInitFunc) screensaver_prefs_dialog_init,
|
||||
(GtkArgSetFunc) NULL,
|
||||
(GtkArgGetFunc) NULL
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
screensaver_prefs_dialog_type =
|
||||
|
@ -233,7 +233,7 @@ screensaver_prefs_dialog_class_init (ScreensaverPrefsDialogClass *class)
|
|||
|
||||
screensaver_prefs_dialog_signals[OK_CLICKED_SIGNAL] =
|
||||
gtk_signal_new ("ok-clicked", GTK_RUN_FIRST,
|
||||
object_class->type,
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
GTK_SIGNAL_OFFSET
|
||||
(ScreensaverPrefsDialogClass, ok_clicked),
|
||||
gtk_signal_default_marshaller,
|
||||
|
@ -241,16 +241,12 @@ screensaver_prefs_dialog_class_init (ScreensaverPrefsDialogClass *class)
|
|||
|
||||
screensaver_prefs_dialog_signals[DEMO_SIGNAL] =
|
||||
gtk_signal_new ("demo", GTK_RUN_FIRST,
|
||||
object_class->type,
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
GTK_SIGNAL_OFFSET
|
||||
(ScreensaverPrefsDialogClass, demo),
|
||||
gtk_signal_default_marshaller,
|
||||
GTK_TYPE_NONE, 0);
|
||||
|
||||
gtk_object_class_add_signals (object_class,
|
||||
screensaver_prefs_dialog_signals,
|
||||
LAST_SIGNAL);
|
||||
|
||||
object_class->destroy =
|
||||
(void (*) (GtkObject *)) screensaver_prefs_dialog_destroy;
|
||||
|
||||
|
@ -285,7 +281,7 @@ screensaver_prefs_dialog_new (Screensaver *saver)
|
|||
xmlDocGetRootElement (dialog->argument_doc);
|
||||
}
|
||||
|
||||
if (dialog->cli_args_db && dialog->argument_data && dialog->argument_data->childs && dialog->argument_data->childs->next) {
|
||||
if (dialog->cli_args_db && dialog->argument_data && dialog->argument_data->children && dialog->argument_data->children->next) {
|
||||
settings_widget =
|
||||
get_screensaver_widget (dialog);
|
||||
} else {
|
||||
|
@ -408,7 +404,7 @@ activate_option_cb (GtkWidget *widget)
|
|||
option_def = gtk_object_get_data (GTK_OBJECT (widget), "option_def");
|
||||
select_data = gtk_object_get_data (GTK_OBJECT (widget), "select_data");
|
||||
|
||||
node = select_data->childs;
|
||||
node = select_data->children;
|
||||
|
||||
while (node) {
|
||||
if (node != option_def)
|
||||
|
@ -533,7 +529,7 @@ write_select (xmlNodePtr argument_data, GTree *widget_db)
|
|||
menu_item = GTK_MENU_SHELL (menu)->children;
|
||||
active = gtk_menu_get_active (GTK_MENU (menu));
|
||||
|
||||
for (node = argument_data->childs; node && menu_item;
|
||||
for (node = argument_data->children; node && menu_item;
|
||||
node = node->next)
|
||||
{
|
||||
if (!xmlGetProp (node, "id")) continue;
|
||||
|
@ -593,9 +589,9 @@ write_command_line (gchar *name, xmlNodePtr argument_data, GTree *widget_db)
|
|||
gboolean free_v = FALSE;
|
||||
|
||||
line = g_string_new (name);
|
||||
node = argument_data->childs;
|
||||
node = argument_data->children;
|
||||
|
||||
for (node = argument_data->childs; node; node = node->next) {
|
||||
for (node = argument_data->children; node; node = node->next) {
|
||||
if (!strcmp (node->name, "boolean")) {
|
||||
arg = write_boolean (node, widget_db);
|
||||
free_v = FALSE;
|
||||
|
@ -751,13 +747,13 @@ get_argument_data (Screensaver *saver)
|
|||
if (!doc)
|
||||
return NULL;
|
||||
|
||||
if (!(doc->root && doc->root->childs))
|
||||
if (!(doc->children && doc->children->children))
|
||||
{
|
||||
xmlFreeDoc (doc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (node = doc->root->childs; node != NULL; node = node->next)
|
||||
for (node = doc->children->children; node != NULL; node = node->next)
|
||||
{
|
||||
if (!strcmp (node->name, "select")
|
||||
|| !strcmp (node->name, "number")
|
||||
|
@ -903,7 +899,7 @@ get_select_widget (ScreensaverPrefsDialog *dialog, xmlNodePtr select_data,
|
|||
gtk_object_set_data (GTK_OBJECT (option_menu), "option_def",
|
||||
select_data);
|
||||
|
||||
for (node = select_data->childs; node; node = node->next) {
|
||||
for (node = select_data->children; node; node = node->next) {
|
||||
option_str = xmlGetProp (node, "_label");
|
||||
if (!option_str) continue;
|
||||
|
||||
|
@ -1186,7 +1182,7 @@ place_hgroup (ScreensaverPrefsDialog *dialog,
|
|||
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
|
||||
for (node = hgroup_data->childs; node; node = node->next) {
|
||||
for (node = hgroup_data->children; node; node = node->next) {
|
||||
id = xmlGetProp (node, "id");
|
||||
if (!id) continue;
|
||||
|
||||
|
@ -1296,7 +1292,7 @@ populate_table (ScreensaverPrefsDialog *dialog, GtkTable *table)
|
|||
g_return_if_fail (table != NULL);
|
||||
g_return_if_fail (GTK_IS_TABLE (table));
|
||||
|
||||
for (node = dialog->argument_data->childs; node; node = node->next) {
|
||||
for (node = dialog->argument_data->children; node; node = node->next) {
|
||||
id = xmlGetProp (node, "id");
|
||||
if (!id && strcmp (node->name, "hgroup")) continue;
|
||||
|
||||
|
@ -1568,7 +1564,7 @@ read_select (GTree *widget_db, xmlNodePtr argument_data,
|
|||
|
||||
/* Get the index of the selected option */
|
||||
|
||||
for (node = argument_data->childs; node; node = node->next) {
|
||||
for (node = argument_data->children; node; node = node->next) {
|
||||
if (!xmlGetProp (node, "id")) continue;
|
||||
|
||||
found = arg_is_set (node, cli_db);
|
||||
|
@ -1588,7 +1584,7 @@ read_select (GTree *widget_db, xmlNodePtr argument_data,
|
|||
|
||||
i = 0;
|
||||
|
||||
for (node = argument_data->childs; node; node = node->next) {
|
||||
for (node = argument_data->children; node; node = node->next) {
|
||||
if (!xmlGetProp (node, "id")) continue;
|
||||
|
||||
if (i != set_idx)
|
||||
|
@ -1600,7 +1596,7 @@ read_select (GTree *widget_db, xmlNodePtr argument_data,
|
|||
|
||||
i = 0;
|
||||
|
||||
for (node = argument_data->childs; node; node = node->next) {
|
||||
for (node = argument_data->children; node; node = node->next) {
|
||||
if (!xmlGetProp (node, "id")) continue;
|
||||
|
||||
if (i == set_idx) {
|
||||
|
@ -1656,7 +1652,7 @@ place_screensaver_properties (ScreensaverPrefsDialog *dialog,
|
|||
{
|
||||
xmlNodePtr node;
|
||||
|
||||
for (node = argument_data->childs; node; node = node->next) {
|
||||
for (node = argument_data->children; node; node = node->next) {
|
||||
if (!strcmp (node->name, "boolean"))
|
||||
read_boolean (dialog->widget_db, node,
|
||||
dialog->cli_args_db);
|
||||
|
@ -1738,6 +1734,8 @@ demo_cb (GtkWidget *widget, ScreensaverPrefsDialog *dialog)
|
|||
static void
|
||||
help_cb (GtkWidget *widget, ScreensaverPrefsDialog *dialog)
|
||||
{
|
||||
/* I can't even find the current help... */
|
||||
#if 0
|
||||
GnomeHelpMenuEntry entry;
|
||||
gchar *url;
|
||||
|
||||
|
@ -1756,6 +1754,7 @@ help_cb (GtkWidget *widget, ScreensaverPrefsDialog *dialog)
|
|||
gnome_url_show (url);
|
||||
g_free (url);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#define __SCREENSAVER_PREFS_DIALOG_H
|
||||
|
||||
#include <gnome.h>
|
||||
#include <tree.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <glade/glade.h>
|
||||
|
||||
#include "preferences.h"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,7 @@
|
|||
#include <ctype.h>
|
||||
|
||||
#include <gnome.h>
|
||||
#include <parser.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#include "selection-dialog.h"
|
||||
#include "preferences.h"
|
||||
|
@ -78,8 +78,8 @@ selection_dialog_get_type (void)
|
|||
sizeof (SelectionDialogClass),
|
||||
(GtkClassInitFunc) selection_dialog_class_init,
|
||||
(GtkObjectInitFunc) selection_dialog_init,
|
||||
(GtkArgSetFunc) NULL,
|
||||
(GtkArgGetFunc) NULL
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
selection_dialog_type =
|
||||
|
@ -143,16 +143,12 @@ selection_dialog_class_init (SelectionDialogClass *class)
|
|||
|
||||
selection_dialog_signals[OK_CLICKED_SIGNAL] =
|
||||
gtk_signal_new ("ok-clicked", GTK_RUN_FIRST,
|
||||
object_class->type,
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
GTK_SIGNAL_OFFSET (SelectionDialogClass,
|
||||
ok_clicked),
|
||||
gtk_marshal_NONE__POINTER,
|
||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||
|
||||
gtk_object_class_add_signals (object_class,
|
||||
selection_dialog_signals,
|
||||
LAST_SIGNAL);
|
||||
|
||||
known_savers = get_known_savers ();
|
||||
|
||||
class->ok_clicked = NULL;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define __SELECTION_DIALOG_H
|
||||
|
||||
#include <gnome.h>
|
||||
#include <tree.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#include "prefs-widget.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue