diff --git a/capplets/keyboard/ChangeLog b/capplets/keyboard/ChangeLog index 986034a55..1b0e48f6e 100644 --- a/capplets/keyboard/ChangeLog +++ b/capplets/keyboard/ChangeLog @@ -1,3 +1,7 @@ +2006-07-06 Sergey Udaltsov + + Fixing the build process + 2006-06-25 Sergey Udaltsov *.c: massive libgswitchit API change diff --git a/capplets/keyboard/gnome-keyboard-properties-xkb.c b/capplets/keyboard/gnome-keyboard-properties-xkb.c index e71f04c43..e47dd17c5 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkb.c +++ b/capplets/keyboard/gnome-keyboard-properties-xkb.c @@ -30,7 +30,7 @@ #include #include -#include "libgswitchit/gswitchit_config.h" +#include "libgswitchit/gswitchit-config.h" #include "capplet-util.h" #include "gconf-property-editor.h" diff --git a/capplets/keyboard/gnome-keyboard-properties-xkblt.c b/capplets/keyboard/gnome-keyboard-properties-xkblt.c index b63b7ad1b..23854ed96 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkblt.c +++ b/capplets/keyboard/gnome-keyboard-properties-xkblt.c @@ -29,7 +29,7 @@ #include #include -#include "libgswitchit/gswitchit_config.h" +#include "libgswitchit/gswitchit-config.h" #include "capplet-util.h" #include "gconf-property-editor.h" diff --git a/capplets/keyboard/gnome-keyboard-properties-xkbot.c b/capplets/keyboard/gnome-keyboard-properties-xkbot.c index 4297899d2..a9a7c3c79 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkbot.c +++ b/capplets/keyboard/gnome-keyboard-properties-xkbot.c @@ -30,7 +30,7 @@ #include #include -#include "libgswitchit/gswitchit_config.h" +#include "libgswitchit/gswitchit-config.h" #include "capplet-util.h" #include "gconf-property-editor.h" diff --git a/capplets/keyboard/gnome-keyboard-properties-xkbpv.c b/capplets/keyboard/gnome-keyboard-properties-xkbpv.c index 35b32f553..d20c359be 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkbpv.c +++ b/capplets/keyboard/gnome-keyboard-properties-xkbpv.c @@ -28,7 +28,7 @@ #include #include -#include "libgswitchit/gswitchit_config.h" +#include "libgswitchit/gswitchit-config.h" #include "capplet-util.h" diff --git a/gnome-settings-daemon/ChangeLog b/gnome-settings-daemon/ChangeLog index 7a597b196..6f1a619c2 100644 --- a/gnome-settings-daemon/ChangeLog +++ b/gnome-settings-daemon/ChangeLog @@ -1,3 +1,7 @@ +2006-07-06 Sergey Udaltsov + + Fixing the build process + 2006-06-23 Sergey Udaltsov * factory.c, gnome-settings-daemon.c, diff --git a/gnome-settings-daemon/gnome-settings-daemon.c b/gnome-settings-daemon/gnome-settings-daemon.c index d0e6752a8..115d2f3f5 100644 --- a/gnome-settings-daemon/gnome-settings-daemon.c +++ b/gnome-settings-daemon/gnome-settings-daemon.c @@ -263,6 +263,7 @@ gnome_settings_daemon_new (void) GSList *list; GnomeSettingsDaemon *daemon; GdkDisplay *display; + GObject *dbusServer; int i; int n_screens; @@ -394,6 +395,8 @@ gnome_settings_daemon_new (void) gnome_settings_xrdb_load (client); gnome_settings_typing_break_load (client); + dbusServer = g_object_new (gnome_settings_server_get_type (), NULL); + return G_OBJECT (daemon); } diff --git a/gnome-settings-daemon/gnome-settings-daemon.h b/gnome-settings-daemon/gnome-settings-daemon.h index f5eeb6d6e..c4c7b1d21 100644 --- a/gnome-settings-daemon/gnome-settings-daemon.h +++ b/gnome-settings-daemon/gnome-settings-daemon.h @@ -68,6 +68,11 @@ void gnome_settings_daemon_spawn_with_input (char **argv, GConfClient *gnome_settings_daemon_get_conf_client (void); +/** + * DBUS server + */ +GType gnome_settings_server_get_type (void); + G_END_DECLS #endif /* __GNOME_SETTINGS_DAEMON_H */ diff --git a/gnome-settings-daemon/gnome-settings-dbus.c b/gnome-settings-daemon/gnome-settings-dbus.c index ad8172124..d3479e436 100644 --- a/gnome-settings-daemon/gnome-settings-dbus.c +++ b/gnome-settings-daemon/gnome-settings-dbus.c @@ -1,31 +1,26 @@ -#include -#include #include - -#include "gnome-settings-keyboard-xkb.h" +#include static GObjectClass *parent_class = NULL; -typedef struct KeyboardConfigRegistry KeyboardConfigRegistry; -typedef struct KeyboardConfigRegistryClass KeyboardConfigRegistryClass; +typedef struct GnomeSettingsServer GnomeSettingsServer; +typedef struct GnomeSettingsServerClass GnomeSettingsServerClass; -struct KeyboardConfigRegistry { +struct GnomeSettingsServer { GObject parent; - - XklConfigRegistry *registry; }; -struct KeyboardConfigRegistryClass { +struct GnomeSettingsServerClass { GObjectClass parent; DBusGConnection *connection; }; -#define KEYBOARD_CONFIG_TYPE_REGISTRY (keyboard_config_registry_get_type ()) -#define KEYBOARD_CONFIG_REGISTRY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), KEYBOARD_CONFIG_TYPE_REGISTRY, KeyboardConfigRegistry)) -#define KEYBOARD_CONFIG_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), KEYBOARD_CONFIG_TYPE_REGISTRY, KeyboardConfigRegistryClass)) -#define KEYBOARD_CONFIG_IS_REGISTRY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), KEYBOARD_CONFIG_TYPE_REGISTRY)) -#define KEYBOARD_CONFIG_IS_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), KEYBOARD_CONFIG_TYPE_REGISTRY)) -#define KEYBOARD_CONFIG_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), KEYBOARD_CONFIG_TYPE_REGISTRY, KeyboardConfigRegistryClass)) +#define GNOME_SETTINGS_TYPE_SERVER (gnome_settings_server_get_type ()) +#define GNOME_SETTINGS_SERVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GNOME_SETTINGS_TYPE_SERVER, GnomeSettingsServer)) +#define GNOME_SETTINGS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_SETTINGS_TYPE_SERVER, GnomeSettingsServerClass)) +#define GNOME_SETTINGS_IS_SERVER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GNOME_SETTINGS_TYPE_SERVER)) +#define GNOME_SETTINGS_IS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_SETTINGS_TYPE_SERVER)) +#define GNOME_SETTINGS_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_SETTINGS_TYPE_SERVER, GnomeSettingsServerClass)) gboolean settings_daemon_awake (GObject * object, GError ** error) @@ -33,94 +28,11 @@ settings_daemon_awake (GObject * object, GError ** error) return TRUE; } -gboolean - keyboard_config_registry_get_current_descriptions_as_utf8 - (KeyboardConfigRegistry * registry, - gchar *** short_layout_descriptions, - gchar *** long_layout_descriptions, - gchar *** short_variant_descriptions, - gchar *** long_variant_descriptions, GError ** error) { - if (! - (xkl_engine_get_features (xkl_engine) & - XKLF_MULTIPLE_LAYOUTS_SUPPORTED)) - return FALSE; - - XklConfigRec *xkl_config = xkl_config_rec_new (); - - if (!xkl_config_rec_get_from_server (xkl_config, xkl_engine)) - return FALSE; - - char **pl = xkl_config->layouts; - char **pv = xkl_config->variants; - guint total_layouts = g_strv_length (xkl_config->layouts); - gchar **sld = *short_layout_descriptions = - g_new0 (char *, total_layouts + 1); - gchar **lld = *long_layout_descriptions = - g_new0 (char *, total_layouts + 1); - gchar **svd = *short_variant_descriptions = - g_new0 (char *, total_layouts + 1); - gchar **lvd = *long_variant_descriptions = - g_new0 (char *, total_layouts + 1); - - while (pl != NULL && *pl != NULL) { - XklConfigItem item; - - g_snprintf (item.name, sizeof item.name, "%s", *pl); - if (xkl_config_registry_find_layout - (registry->registry, &item)) { - *sld++ = g_strdup (item.short_description); - *lld++ = g_strdup (item.description); - } else { - *sld++ = g_strdup (""); - *lld++ = g_strdup (""); - } - - if (*pv != NULL) { - g_snprintf (item.name, sizeof item.name, "%s", - *pv); - if (xkl_config_registry_find_variant - (registry->registry, *pl, &item)) { - *svd = g_strdup (item.short_description); - *lvd = g_strdup (item.description); - } else { - *svd++ = g_strdup (""); - *lvd++ = g_strdup (""); - } - } else { - *svd++ = g_strdup (""); - *lvd++ = g_strdup (""); - } - - *pl++, *pv++; - } - g_object_unref (G_OBJECT (xkl_config)); - - return TRUE; -} - -G_DEFINE_TYPE (KeyboardConfigRegistry, keyboard_config_registry, - G_TYPE_OBJECT) +G_DEFINE_TYPE (GnomeSettingsServer, gnome_settings_server, G_TYPE_OBJECT) #include "gnome-settings-server.h" -static void -finalize (GObject * object) -{ - KeyboardConfigRegistry *registry; - - registry = KEYBOARD_CONFIG_REGISTRY (object); - if (registry->registry == NULL) { - return; - } - - g_object_unref (registry->registry); - registry->registry = NULL; - - g_object_unref (xkl_engine); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} static void -keyboard_config_registry_class_init (KeyboardConfigRegistryClass * klass) +gnome_settings_server_class_init (GnomeSettingsServerClass * klass) { GError *error = NULL; GObjectClass *object_class; @@ -135,29 +47,27 @@ keyboard_config_registry_class_init (KeyboardConfigRegistryClass * klass) } /* &dbus_glib__object_info is provided in the server-bindings.h file */ - dbus_g_object_type_install_info (KEYBOARD_CONFIG_TYPE_REGISTRY, + dbus_g_object_type_install_info (GNOME_SETTINGS_TYPE_SERVER, &dbus_glib_settings_daemon_object_info); object_class = G_OBJECT_CLASS (klass); - object_class->finalize = finalize; - parent_class = g_type_class_peek_parent (klass); } static void -keyboard_config_registry_init (KeyboardConfigRegistry * registry) +gnome_settings_server_init (GnomeSettingsServer * server) { GError *error = NULL; DBusGProxy *driver_proxy; - KeyboardConfigRegistryClass *klass = - KEYBOARD_CONFIG_REGISTRY_GET_CLASS (registry); + GnomeSettingsServerClass *klass = + GNOME_SETTINGS_SERVER_GET_CLASS (server); unsigned request_ret; /* Register DBUS path */ dbus_g_connection_register_g_object (klass->connection, "/org/gnome/SettingsDaemon", - G_OBJECT (registry)); + G_OBJECT (server)); /* Register the service name, the constant here are defined in dbus-glib-bindings.h */ driver_proxy = dbus_g_proxy_new_for_name (klass->connection, @@ -165,18 +75,13 @@ keyboard_config_registry_init (KeyboardConfigRegistry * registry) DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); - if (!org_freedesktop_DBus_request_name (driver_proxy, "org.gnome.SettingsDaemon", 0, &request_ret, /* See tutorial for more infos about these */ - &error)) { + if (!org_freedesktop_DBus_request_name + (driver_proxy, "org.gnome.SettingsDaemon", 0, &request_ret, + &error)) { g_warning ("Unable to register service: %s", error->message); g_error_free (error); } + g_object_unref (driver_proxy); - - /* Init libxklavier stuff */ - g_object_ref (xkl_engine); - - registry->registry = xkl_config_registry_get_instance (xkl_engine); - - xkl_config_registry_load (registry->registry); } diff --git a/gnome-settings-daemon/gnome-settings-keyboard-xkb.c b/gnome-settings-daemon/gnome-settings-keyboard-xkb.c index 17ae188b9..5fd01cd49 100644 --- a/gnome-settings-daemon/gnome-settings-keyboard-xkb.c +++ b/gnome-settings-daemon/gnome-settings-keyboard-xkb.c @@ -35,7 +35,8 @@ #include #include -#include +#include +#include #include "gnome-settings-keyboard-xkb.h" #include "gnome-settings-daemon.h" diff --git a/gnome-settings-daemon/gsd-infos.xml b/gnome-settings-daemon/gsd-infos.xml index f17aeff87..73f331316 100644 --- a/gnome-settings-daemon/gsd-infos.xml +++ b/gnome-settings-daemon/gsd-infos.xml @@ -5,14 +5,4 @@ - - - - - - - - - -