commit ba4e9760b889388d7985275d2e177875bf872abfc0344a21032741b5c95906e7 Author: OBS User unknown Date: Mon Jan 28 03:34:00 2008 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-settings-daemon?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/gnome-settings-daemon-2.21.5.2.tar.bz2 b/gnome-settings-daemon-2.21.5.2.tar.bz2 new file mode 100644 index 0000000..de2d234 --- /dev/null +++ b/gnome-settings-daemon-2.21.5.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f83b8e53c856a939e355c329e0442079e3bc4fd28c04bf7802dc3d98a1ec72e5 +size 1582693 diff --git a/gnome-settings-daemon-default-config.patch b/gnome-settings-daemon-default-config.patch new file mode 100644 index 0000000..26a38e1 --- /dev/null +++ b/gnome-settings-daemon-default-config.patch @@ -0,0 +1,13 @@ +Index: data/apps_gnome_settings_daemon_keybindings.schemas.in +=================================================================== +--- data/apps_gnome_settings_daemon_keybindings.schemas.in.orig ++++ data/apps_gnome_settings_daemon_keybindings.schemas.in +@@ -65,7 +65,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/eject + /apps/gnome_settings_daemon/keybindings/eject + string +- ++ <Control><Alt>Delete + + Eject + Eject's shortcut. diff --git a/gnome-settings-daemon-default-keybindings.patch b/gnome-settings-daemon-default-keybindings.patch new file mode 100644 index 0000000..4f972b1 --- /dev/null +++ b/gnome-settings-daemon-default-keybindings.patch @@ -0,0 +1,74 @@ +--- data/apps_gnome_settings_daemon_keybindings.schemas.in 2007-01-18 13:19:21.000000000 +0100 ++++ data/apps_gnome_settings_daemon_keybindings.schemas.in 2007-01-18 13:22:56.000000000 +0100 +@@ -17,7 +17,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/volume_mute + /apps/gnome_settings_daemon/keybindings/volume_mute + string +- ++ 0xa0 + + Volume mute + Volume mute's shortcut +@@ -29,7 +29,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/volume_down + /apps/gnome_settings_daemon/keybindings/volume_down + string +- ++ 0xae + + Volume down + Volume down's shortcut. +@@ -41,7 +41,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/volume_up + /apps/gnome_settings_daemon/keybindings/volume_up + string +- ++ 0xb0 + + Volume up + Volume up's shortcut. +@@ -65,7 +65,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/eject + /apps/gnome_settings_daemon/keybindings/eject + string +- ++ 0xcc + + Eject + Eject's shortcut. +@@ -89,7 +89,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/search + /apps/gnome_settings_daemon/keybindings/search + string +- ++ 0xe5 + + Search + Search's shortcut. +@@ -101,7 +101,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/email + /apps/gnome_settings_daemon/keybindings/email + string +- ++ 0xec + + E-mail + E-mail's shortcut. +@@ -137,7 +137,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/help + /apps/gnome_settings_daemon/keybindings/help + string +- ++ 0xf5 + + Launch help browser + Launch help browser's shortcut. +@@ -149,7 +149,7 @@ + /schemas/apps/gnome_settings_daemon/keybindings/www + /apps/gnome_settings_daemon/keybindings/www + string +- ++ 0xb2 + + Launch web browser + Launch web browser's shortcut. diff --git a/gnome-settings-daemon-system-proxy-configuration.patch b/gnome-settings-daemon-system-proxy-configuration.patch new file mode 100644 index 0000000..b86806e --- /dev/null +++ b/gnome-settings-daemon-system-proxy-configuration.patch @@ -0,0 +1,633 @@ +Index: schemas/Makefile.am +=================================================================== +--- schemas/Makefile.am (revision 7885) ++++ schemas/Makefile.am (working copy) +@@ -3,7 +3,8 @@ + apps_gnome_settings_daemon_screensaver.schemas.in \ + apps_gnome_settings_daemon_default_editor.schemas.in \ + desktop_gnome_font_rendering.schemas.in \ +- apps_gnome_settings_daemon_keybindings.schemas.in ++ apps_gnome_settings_daemon_keybindings.schemas.in \ ++ system_proxy.schemas.in + + schema_DATA = $(schema_in_files:.schemas.in=.schemas) + +Index: schemas/system_proxy.schemas.in +=================================================================== +--- schemas/system_proxy.schemas.in (revision 0) ++++ schemas/system_proxy.schemas.in (revision 0) +@@ -0,0 +1,26 @@ ++ ++ ++ ++ ++ /schemas/system/proxy/use_system_settings ++ /system/proxy/use_system_settings ++ string ++ only_if_mode_not_set ++ ++ Use the system's proxy settings ++ Whether to use the system's proxy settings. ++ Possible values are "only_if_mode_not_set", "system_values", and ++ "user_values". The first one is the default value; in ++ it, the system's proxy settings will be used if and ++ only if the user has never set his /system/proxy/mode ++ key. Once the user sets that key, use_system_settings ++ will switch to "system_values", which indicates that ++ the system's proxy settings should be used, or ++ "user_values", which indicates that the user's ++ settings should be used. The key will alternate ++ between these last two values in the future and will ++ not go back to the default value. ++ ++ ++ ++ +Index: gnome-settings-daemon/novell-sysconfig-proxy-helper +=================================================================== +--- gnome-settings-daemon/novell-sysconfig-proxy-helper (revision 0) ++++ gnome-settings-daemon/novell-sysconfig-proxy-helper (revision 0) +@@ -0,0 +1,19 @@ ++#!/bin/sh ++ ++if [ ! -f /etc/sysconfig/proxy ] ++then ++ exit 0 ++fi ++ ++source /etc/sysconfig/proxy ++ ++# This may look convoluted, but it's an easy way to let random shell ++# script code appear in /etc/sysconfig/proxy and still let user code ++# read the variables in it easily. ++ ++echo "PROXY_ENABLED $PROXY_ENABLED" ++echo "HTTP_PROXY $HTTP_PROXY" ++echo "HTTPS_PROXY $HTTPS_PROXY" ++echo "FTP_PROXY $FTP_PROXY" ++echo "GOPHER_PROXY $GOPHER_PROXY" ++echo "NO_PROXY $NO_PROXY" +Index: gnome-settings-daemon/gnome-settings-proxy.c +=================================================================== +--- gnome-settings-daemon/gnome-settings-proxy.c (revision 0) ++++ gnome-settings-daemon/gnome-settings-proxy.c (revision 0) +@@ -0,0 +1,494 @@ ++/* ++ * Copyright (C) 2007 Novell, Inc. ++ * ++ * Authors: Federico Mena-Quintero ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ++ * USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++#include "gnome-settings-module.h" ++#include "utils.h" ++ ++/* Novell extension */ ++#define KEY_USE_SYSTEM_SETTINGS "/system/proxy/use_system_settings" /* string */ ++#define VAL_USE_SYSTEM_SETTINGS_ONLY_IF_NOT_SET "only_if_mode_not_set" ++#define VAL_USE_SYSTEM_SETTINGS_SYSTEM_VALUES "system_values" ++#define VAL_USE_SYSTEM_SETTINGS_USER_VALUES "user_values" ++ ++#define ETC_SYSCONFIG_PROXY_URI "file:///etc/sysconfig/proxy" ++ ++/* Gnome keys */ ++#define DIR_PROXY "/system/proxy" ++#define KEY_USE_HTTP_PROXY "/system/http_proxy/use_http_proxy" /* bool */ ++#define KEY_HTTP_HOST "/system/http_proxy/host" /* string */ ++#define KEY_HTTP_PORT "/system/http_proxy/port" /* int */ ++#define KEY_HTTP_USE_AUTHENTICATION "/system/http_proxy/use_authentication" /* bool */ ++#define KEY_HTTP_AUTHENTICATION_USER "/system/http_proxy/authentication_user" /* string */ ++#define KEY_HTTP_AUTHENTICATION_PASSWORD "/system/http_proxy/authentication_password" /* string */ ++#define KEY_HTTP_IGNORE_HOSTS "/system/http_proxy/ignore_hosts" /* list-of-string */ ++#define KEY_MODE "/system/proxy/mode" /* string */ ++#define KEY_SECURE_HOST "/system/proxy/secure_host" /* string */ ++#define KEY_SECURE_PORT "/system/proxy/secure_port" /* int */ ++#define KEY_FTP_HOST "/system/proxy/ftp_host" /* string */ ++#define KEY_FTP_PORT "/system/proxy/ftp_port" /* int */ ++#define KEY_SOCKS_HOST "/system/proxy/socks_host" /* string */ ++#define KEY_SOCKS_PORT "/system/proxy/socks_port" /* int */ ++#define KEY_AUTOCONFIG_URL "/system/proxy/autoconfig_url" /* string */ ++ ++typedef struct { ++ char *proxy_enabled; /* "yes"/"no" */ ++ char *http_proxy; /* "http://host:port" */ ++ char *https_proxy; /* "http://host:port" */ ++ char *ftp_proxy; /* "http://host:port" */ ++ /* char *gopher_proxy; Gnome doesn't have a Gopher proxy setting as of 2.10 */ ++ char *no_proxy; /* "www.me.de, do.main, localhost" */ ++ /* char *user; ++ * char *password; ++ * Yast2 currently doesn't support a public username/password; they are just ++ * stored in /root/.wgetrc and /root/.curlrc ++ */ ++} SystemSettings; ++ ++typedef struct { ++ GnomeSettingsModule parent; ++} GnomeSettingsModuleProxy; ++ ++typedef struct { ++ GnomeSettingsModuleClass parent_class; ++} GnomeSettingsModuleProxyClass; ++ ++static GnomeSettingsModuleRunlevel gnome_settings_module_proxy_get_runlevel (GnomeSettingsModule *module); ++static gboolean gnome_settings_module_proxy_initialize (GnomeSettingsModule *module, GConfClient *config_client); ++static gboolean gnome_settings_module_proxy_start (GnomeSettingsModule *module); ++static gboolean gnome_settings_module_proxy_stop (GnomeSettingsModule *module); ++ ++static void ++gnome_settings_module_proxy_class_init (GnomeSettingsModuleProxyClass *klass) ++{ ++ GnomeSettingsModuleClass *module_class; ++ ++ module_class = (GnomeSettingsModuleClass *) klass; ++ module_class->get_runlevel = gnome_settings_module_proxy_get_runlevel; ++ module_class->initialize = gnome_settings_module_proxy_initialize; ++ module_class->start = gnome_settings_module_proxy_start; ++ module_class->stop = gnome_settings_module_proxy_stop; ++} ++ ++static void ++gnome_settings_module_proxy_init (GnomeSettingsModuleProxy *module) ++{ ++} ++ ++GType ++gnome_settings_module_proxy_get_type (void) ++{ ++ static GType module_type = 0; ++ ++ if (!module_type) { ++ const GTypeInfo module_info = { ++ sizeof (GnomeSettingsModuleProxyClass), ++ NULL, /* base_init */ ++ NULL, /* base_finalize */ ++ (GClassInitFunc) gnome_settings_module_proxy_class_init, ++ NULL, /* class_finalize */ ++ NULL, /* class_data */ ++ sizeof (GnomeSettingsModuleProxy), ++ 0, /* n_preallocs */ ++ (GInstanceInitFunc) gnome_settings_module_proxy_init, ++ }; ++ ++ module_type = g_type_register_static (GNOME_SETTINGS_TYPE_MODULE, ++ "GnomeSettingsModuleProxy", ++ &module_info, 0); ++ } ++ ++ return module_type; ++} ++ ++/* Returns whether the /system/proxy/mode key has ever been set by the user */ ++static gboolean ++user_mode_is_set (GConfClient *config_client) ++{ ++ GConfValue *value; ++ ++ value = gconf_client_get_without_default (config_client, KEY_MODE, NULL); ++ ++ if (value) ++ { ++ gconf_value_free (value); ++ return TRUE; ++ } ++ else ++ return FALSE; ++} ++ ++static const char * ++until_newline (const char *str, char **dest) ++{ ++ const char *p; ++ ++ p = strchr (str, '\n'); ++ if (!p) ++ p = str + strlen (str); ++ ++ if (dest) ++ *dest = g_strstrip (g_strndup (str, p - str)); ++ ++ return p; ++} ++ ++static const char * ++scan_for_token_and_jump_until_newline (const char *buf, const char *token, char **dest) ++{ ++ int len; ++ ++ len = strlen (token); ++ ++ if (strncmp (buf, token, len) == 0) ++ return until_newline (buf + len, dest); ++ else ++ return buf; ++} ++ ++/* Reads the system's proxy settings */ ++static void ++read_system_settings (SystemSettings *settings) ++{ ++ char *out; ++ const char *p; ++ int total_len; ++ struct tokens { ++ const char *token; ++ char **dest; ++ } tokens[] = { ++ { "PROXY_ENABLED ", &settings->proxy_enabled }, ++ { "HTTP_PROXY ", &settings->http_proxy }, ++ { "HTTPS_PROXY ", &settings->https_proxy }, ++ { "FTP_PROXY ", &settings->ftp_proxy }, ++ { "NO_PROXY ", &settings->no_proxy } ++ }; ++ int num_tokens = G_N_ELEMENTS (tokens); ++ ++ settings->proxy_enabled = NULL; ++ settings->http_proxy = NULL; ++ settings->https_proxy = NULL; ++ settings->ftp_proxy = NULL; ++ settings->no_proxy = NULL; ++ ++ if (!g_spawn_command_line_sync (LIBEXECDIR "/novell-sysconfig-proxy-helper", ++ &out, ++ NULL, ++ NULL, ++ NULL)) ++ ++ return; ++ ++ total_len = strlen (out); ++ ++ p = out; ++ while (p < out + total_len) ++ { ++ int i; ++ ++ for (i = 0; i < num_tokens; i++) ++ p = scan_for_token_and_jump_until_newline (p, tokens[i].token, tokens[i].dest); ++ ++ if (i == num_tokens) ++ p = until_newline (p, NULL); ++ ++ if (*p == '\n') ++ p++; ++ } ++ ++ g_free (out); ++} ++ ++static void ++system_settings_free (SystemSettings *settings) ++{ ++ g_free (settings->proxy_enabled); ++ g_free (settings->http_proxy); ++ g_free (settings->https_proxy); ++ g_free (settings->ftp_proxy); ++ g_free (settings->no_proxy); ++} ++ ++/* Disables the proxy in the user's settings */ ++static void ++copy_proxy_disabled (GConfClient *config_client) ++{ ++ gconf_client_set_bool (config_client, KEY_USE_HTTP_PROXY, FALSE, NULL); ++ gconf_client_set_string (config_client, KEY_MODE, "none", NULL); ++} ++ ++/* Copies the (enabled) system proxy settings in the user's settings */ ++static void ++copy_proxy_enabled (GConfClient *config_client, SystemSettings *settings) ++{ ++ GnomeVFSURI *uri; ++ ++ gconf_client_set_string (config_client, KEY_MODE, "manual", NULL); ++ ++ /* 1. HTTP proxy */ ++ ++ /* Yast2 currently doesn't support a public username/password */ ++ gconf_client_set_bool (config_client, KEY_HTTP_USE_AUTHENTICATION, FALSE, NULL); ++ gconf_client_set_string (config_client, KEY_HTTP_AUTHENTICATION_USER, "", NULL); ++ gconf_client_set_string (config_client, KEY_HTTP_AUTHENTICATION_PASSWORD, "", NULL); ++ ++ uri = gnome_vfs_uri_new (settings->http_proxy); ++ if (uri) ++ { ++ const char *host; ++ guint port; ++ ++ gconf_client_set_bool (config_client, KEY_USE_HTTP_PROXY, TRUE, NULL); ++ ++ host = gnome_vfs_uri_get_host_name (uri); ++ port = gnome_vfs_uri_get_host_port (uri); ++ ++ gconf_client_set_string (config_client, KEY_HTTP_HOST, host, NULL); ++ gconf_client_set_int (config_client, KEY_HTTP_PORT, (int) port, NULL); ++ ++ gnome_vfs_uri_unref (uri); ++ } ++ else ++ { ++ gconf_client_set_bool (config_client, KEY_USE_HTTP_PROXY, FALSE, NULL); ++ gconf_client_set_string (config_client, KEY_HTTP_HOST, "", NULL); ++ gconf_client_set_int (config_client, KEY_HTTP_PORT, 0, NULL); ++ gconf_client_set_list (config_client, KEY_HTTP_IGNORE_HOSTS, GCONF_VALUE_STRING, NULL, NULL); ++ } ++ ++ /* 2. HTTPS proxy */ ++ ++ uri = gnome_vfs_uri_new (settings->https_proxy); ++ if (uri) ++ { ++ const char *host; ++ guint port; ++ ++ host = gnome_vfs_uri_get_host_name (uri); ++ port = gnome_vfs_uri_get_host_port (uri); ++ ++ gconf_client_set_string (config_client, KEY_SECURE_HOST, host, NULL); ++ gconf_client_set_int (config_client, KEY_SECURE_PORT, (int) port, NULL); ++ ++ gnome_vfs_uri_unref (uri); ++ } ++ else ++ { ++ gconf_client_set_string (config_client, KEY_SECURE_HOST, "", NULL); ++ gconf_client_set_int (config_client, KEY_SECURE_PORT, 0, NULL); ++ } ++ ++ /* 3. FTP proxy */ ++ ++ uri = gnome_vfs_uri_new (settings->ftp_proxy); ++ ++ if (uri) ++ { ++ const char *host; ++ guint port; ++ ++ host = gnome_vfs_uri_get_host_name (uri); ++ port = gnome_vfs_uri_get_host_port (uri); ++ ++ gconf_client_set_string (config_client, KEY_FTP_HOST, host, NULL); ++ gconf_client_set_int (config_client, KEY_FTP_PORT, (int) port, NULL); ++ ++ gnome_vfs_uri_unref (uri); ++ } ++ else ++ { ++ gconf_client_set_string (config_client, KEY_FTP_HOST, "", NULL); ++ gconf_client_set_int (config_client, KEY_FTP_PORT, 0, NULL); ++ } ++ ++ /* 4. No-proxy hosts */ ++ ++ if (settings->no_proxy != NULL) ++ { ++ char **tokens; ++ int i; ++ GSList *list; ++ ++ tokens = g_strsplit_set (settings->no_proxy, ", ", 0); ++ ++ list = NULL; ++ ++ for (i = 0; tokens[i] != NULL; i++) ++ { ++ char *s; ++ ++ s = tokens[i]; ++ if (strlen (s) != 0) ++ list = g_slist_prepend (list, s); ++ } ++ ++ list = g_slist_reverse (list); ++ ++ gconf_client_set_list (config_client, KEY_HTTP_IGNORE_HOSTS, GCONF_VALUE_STRING, list, NULL); ++ ++ g_slist_free (list); ++ g_strfreev (tokens); ++ } ++ else ++ gconf_client_set_list (config_client, KEY_HTTP_IGNORE_HOSTS, GCONF_VALUE_STRING, NULL, NULL); ++} ++ ++/* Copies the system's proxy settings to the user's settings */ ++static void ++copy_system_to_user (GConfClient *config_client) ++{ ++ SystemSettings settings; ++ ++ read_system_settings (&settings); ++ ++ if (settings.proxy_enabled == NULL) ++ copy_proxy_disabled (config_client); ++ else ++ { ++ if (strcmp (settings.proxy_enabled, "no") == 0) ++ copy_proxy_disabled (config_client); ++ else if (strcmp (settings.proxy_enabled, "yes") == 0) ++ copy_proxy_enabled (config_client, &settings); ++ } ++ ++ system_settings_free (&settings); ++} ++ ++static void ++use_system_settings_change (GConfClient *config_client, const char *value) ++{ ++ if (strcmp (value, VAL_USE_SYSTEM_SETTINGS_SYSTEM_VALUES) == 0) ++ { ++ copy_system_to_user (config_client); ++ } ++ else if (strcmp (value, VAL_USE_SYSTEM_SETTINGS_USER_VALUES) == 0) ++ { ++ /* nothing; the user's values are already set */ ++ } ++} ++ ++static void ++dir_proxy_key_changed_cb (GConfEntry *entry) ++{ ++ GConfClient *client = gnome_settings_get_config_client (); ++ ++ if (strcmp (entry->key, KEY_USE_SYSTEM_SETTINGS) == 0) ++ use_system_settings_change (client, gconf_value_get_string (entry->value)); ++} ++ ++static void ++copy_system_values_if_needed (GConfClient *client) ++{ ++ char *value; ++ ++ value = gconf_client_get_string (client, KEY_USE_SYSTEM_SETTINGS, NULL); ++ if (!value) ++ return; ++ ++ use_system_settings_change (client, value); ++ g_free (value); ++} ++ ++/* File monitor callback for /etc/sysconfig/proxy */ ++static void ++monitor_cb (GnomeVFSMonitorHandle *handle, ++ const gchar *monitor_uri, ++ const gchar *info_uri, ++ GnomeVFSMonitorEventType event_type, ++ gpointer data) ++{ ++ if (event_type != GNOME_VFS_MONITOR_EVENT_CHANGED) ++ return; ++ ++ copy_system_values_if_needed ((GConfClient *) data); ++} ++ ++static GnomeSettingsModuleRunlevel ++gnome_settings_module_proxy_get_runlevel (GnomeSettingsModule *module) ++{ ++ return GNOME_SETTINGS_MODULE_RUNLEVEL_SERVICES; ++} ++ ++ ++static gboolean ++gnome_settings_module_proxy_initialize (GnomeSettingsModule *module, GConfClient *config_client) ++{ ++ GConfClient *client = gnome_settings_module_get_config_client (module); ++ GnomeVFSMonitorHandle *monitor_handle; ++ char *use_system_settings; ++ ++ /* The very first time g-s-d is run, we change the user's keys iff the new ++ * use_system_settings key is not set at all or is set to the default. ++ * Afterwards, that key will be set to reflect what the user had previously ++ * configured. ++ */ ++ ++ use_system_settings = gconf_client_get_string (client, KEY_USE_SYSTEM_SETTINGS, NULL); ++ if (!use_system_settings || strcmp (use_system_settings, VAL_USE_SYSTEM_SETTINGS_ONLY_IF_NOT_SET) == 0) ++ { ++ if (user_mode_is_set (config_client)) ++ gconf_client_set_string (client, KEY_USE_SYSTEM_SETTINGS, VAL_USE_SYSTEM_SETTINGS_USER_VALUES, NULL); ++ else ++ { ++ copy_system_to_user (config_client); ++ gconf_client_set_string (client, KEY_USE_SYSTEM_SETTINGS, VAL_USE_SYSTEM_SETTINGS_SYSTEM_VALUES, NULL); ++ } ++ } ++ ++ if (use_system_settings) ++ g_free (use_system_settings); ++ ++ gnome_settings_register_config_callback (DIR_PROXY, dir_proxy_key_changed_cb); ++ ++ if (gnome_vfs_monitor_add (&monitor_handle, ETC_SYSCONFIG_PROXY_URI, GNOME_VFS_MONITOR_FILE, ++ monitor_cb, client) != GNOME_VFS_OK) ++ { ++ g_warning ("Could not install file monitor for /etc/sysconfig/proxy"); ++ /* Can we do any better than this? */ ++ } ++ ++ return TRUE; ++} ++ ++static gboolean ++gnome_settings_module_proxy_start (GnomeSettingsModule *module) ++{ ++ GConfClient *client = gnome_settings_module_get_config_client (module); ++ ++ copy_system_values_if_needed (client); ++ ++ return TRUE; ++} ++ ++static gboolean ++gnome_settings_module_proxy_stop (GnomeSettingsModule *module) ++{ ++ return TRUE; ++} +Index: gnome-settings-daemon/gnome-settings-daemon.c +=================================================================== +--- gnome-settings-daemon/gnome-settings-daemon.c (revision 7885) ++++ gnome-settings-daemon/gnome-settings-daemon.c (working copy) +@@ -54,6 +54,7 @@ + GType gnome_settings_module_typing_break_get_type (void); + GType gnome_settings_module_xrdb_get_type (void); + GType gnome_settings_module_xsettings_get_type (void); ++GType gnome_settings_module_proxy_get_type (void); + + static GObject *parent_class = NULL; + XSettingsManager **managers = NULL; +@@ -199,7 +200,8 @@ + || !gnome_settings_module_sound_get_type () + || !gnome_settings_module_typing_break_get_type () + || !gnome_settings_module_xrdb_get_type () +- || !gnome_settings_module_xsettings_get_type ()) ++ || !gnome_settings_module_xsettings_get_type () ++ || !gnome_settings_module_proxy_get_type ()) + return; + + /* create hash table for loaded modules */ +Index: gnome-settings-daemon/Makefile.am +=================================================================== +--- gnome-settings-daemon/Makefile.am (revision 7885) ++++ gnome-settings-daemon/Makefile.am (working copy) +@@ -11,7 +11,8 @@ + -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \ + -DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \ + -DGNOMECC_GLADE_DIR="\"$(pkgdatadir)/glade\"" \ +- -DGNOMECC_PIXMAPS_DIR="\"$(pkgdatadir)/pixmaps\"" ++ -DGNOMECC_PIXMAPS_DIR="\"$(pkgdatadir)/pixmaps\"" \ ++ -DLIBEXECDIR="\"$(libexecdir)\"" + + libexec_PROGRAMS=gnome-settings-daemon + +@@ -50,6 +51,7 @@ + gnome-settings-xsettings.c \ + gsd-media-keys-window.c \ + gsd-media-keys-window.h \ ++ gnome-settings-proxy.c \ + list.c \ + list.h \ + reaper.c \ +@@ -91,6 +93,11 @@ + Gladedir = $(pkgdatadir)/glade + Glade_DATA = modmap-dialog.glade + ++helperdir = $(libexecdir) ++helperfile = novell-sysconfig-proxy-helper ++ ++install-data-hook : ++ $(INSTALL_SCRIPT) $(srcdir)/$(helperfile) $(DESTDIR)$(libexecdir)/$(helperfile) + Dbusapidir = $(includedir)/gnome-settings-daemon-2.0/gnome-settings-daemon + Dbusapi_DATA = gnome-settings-client.h + +@@ -116,7 +123,7 @@ + org.gnome.SettingsDaemon.service: org.gnome.SettingsDaemon.service.in Makefile + @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ + +-EXTRA_DIST = $(Glade_DATA) $(Dbusapi_DATA) \ ++EXTRA_DIST = $(Glade_DATA) $(Dbusapi_DATA) $(helperfile) \ + gnome-settings-daemon.pc.in gsd-infos.xml \ + org.gnome.SettingsDaemon.service.in gnome-settings-marshal.list + CLEANFILES = $(BUILT_SOURCES) $(service_DATA) diff --git a/gnome-settings-daemon.changes b/gnome-settings-daemon.changes new file mode 100644 index 0000000..ccf94ce --- /dev/null +++ b/gnome-settings-daemon.changes @@ -0,0 +1,17 @@ +------------------------------------------------------------------- +Fri Jan 25 14:37:20 CET 2008 - rodrigo@suse.de + +- Added missing unpackaged files +- Depend on gstreamer-0_10-plugins-base-devel for the sound module + +------------------------------------------------------------------- +Wed Jan 16 17:44:05 CET 2008 - rodrigo@suse.de + +- Disabled patches that need rebase. +- No need for gnome-patch-translation +- Updated BuildRequires + +------------------------------------------------------------------- +Wed Jan 16 14:24:29 CET 2008 - rodrigo@suse.de + +- First version of new gnome-settings-daemon package. diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec new file mode 100644 index 0000000..f59b7d6 --- /dev/null +++ b/gnome-settings-daemon.spec @@ -0,0 +1,182 @@ +# +# spec file for package gnome-settings-daemon (Version 2.21.5.2) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: gnome-settings-daemon +%define _name gnome-settings-daemon +BuildRequires: fdupes gnome-common gnome-desktop-devel gnome-patch-translation gstreamer-0_10-plugins-base-devel intltool libglade2-devel libgnomekbd-devel update-desktop-files xorg-x11 +License: GPL v2 or later +Group: System/GUI/GNOME +Version: 2.21.5.2 +Release: 1 +Summary: Settings daemon for the GNOME desktop +Source: %{_name}-%{version}.tar.bz2 +# PATCH-FIX-OPENSUSE gnome-settings-daemon-default-config.patch +Patch1: %{name}-default-config.patch +# PATCH-NEEDS-REBASE gnome-settings-daemon-system-proxy-configuration.patch +Patch2: %{name}-system-proxy-configuration.patch +# PATCH-NEEDS-REBASE gnome-settings-daemon-default-keybindings.patch +Patch3: %{name}-default-keybindings.patch +Url: http://www.gnome.org +Requires: %{name}-lang = %{version} +BuildRoot: %{_tmppath}/%{name}-%{version}-build +AutoReqProv: on +%gconf_schemas_prereq + +%description +gnome-settings-daemon provides a daemon run by all GNOME sessions to +provide live access to configuration settings and the changes done to +them as well as basic services like a clipboard manager, controlling +the startup of the screensaver, etc. + +This module was previously part of GNOME Control Center, but has been +splitted from it for a more general use. + + + +Authors: +-------- + Jonathan Blandford + William Jon McCann + Rodrigo Moya + Denis Washington + +%package devel +Summary: Development package for the GNOME settings daemon +Group: System/GUI/GNOME +AutoReqProv: on +Requires: %{name} = %{version} dbus-1-devel glib2-devel gtk2-devel gnome-desktop-devel gnome-menus-devel + +%description devel +gnome-settings-daemon provides a daemon run by all GNOME sessions to +provide live access to configuration settings and the changes done to +them as well as basic services like a clipboard manager, controlling +the startup of the screensaver, etc. + +This package includes header files used for client applications to +contact the settings daemon via its DBus interface. + + + +Authors: +-------- + Jonathan Blandford + William Jon McCann + Rodrigo Moya + Denis Washington + +%lang_package +%prep +%setup -q -n %{_name}-%{version} +#gnome-patch-translation-prepare +%patch1 +#%patch2 +#%patch3 +#gnome-patch-translation-update + +%build +autoreconf -f -i +# needed for control-center-2.16.1: +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +%configure\ + --libexecdir=%{_prefix}/lib/gnome-settings-daemon\ + --disable-static\ + --disable-scrollkeeper\ + --disable-update-mimedb +make %{?jobs:-j%jobs} + +%install +%makeinstall +# DESTDIR=$RPM_BUILD_ROOT mime-info-to-mime +# oh dear +%find_lang %{_name} +%find_gconf_schemas +cat %{name}.schemas_list >gnome-%{name}.lst +%fdupes $RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre -f %{name}.schemas_pre + +%post +/sbin/ldconfig +%posttrans -f %{name}.schemas_posttrans + +%preun -f %{name}.schemas_preun + +%postun +/sbin/ldconfig + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING ChangeLog NEWS README +%{_datadir}/dbus-1/services/org.gnome.SettingsDaemon.service +%dir %{_datadir}/gnome-settings-daemon +%dir %{_datadir}/gnome-settings-daemon/xrdb +%{_datadir}/gnome-settings-daemon/xrdb/*.ad +%dir %{_prefix}/lib/gnome-settings-daemon +%{_prefix}/lib/gnome-settings-daemon/gnome-settings-daemon +%dir %{_libdir}/gnome-settings-daemon +%dir %{_libdir}/gnome-settings-daemon/plugins +%{_libdir}/gnome-settings-daemon/plugins/* +%dir %{_libdir}/gnome-settings-daemon/plugins/a11y-keyboard +%{_libdir}/gnome-settings-daemon/plugins/a11y-keyboard/* +%dir %{_libdir}/gnome-settings-daemon/plugins/background +%{_libdir}/gnome-settings-daemon/plugins/background/* +%dir %{_libdir}/gnome-settings-daemon/plugins/clipboard +%{_libdir}/gnome-settings-daemon/plugins/clipboard/* +%dir %{_libdir}/gnome-settings-daemon/plugins/default-editor +%{_libdir}/gnome-settings-daemon/plugins/default-editor/* +%dir %{_libdir}/gnome-settings-daemon/plugins/dummy +%{_libdir}/gnome-settings-daemon/plugins/dummy/* +%dir %{_libdir}/gnome-settings-daemon/plugins/font +%{_libdir}/gnome-settings-daemon/plugins/font/* +%dir %{_libdir}/gnome-settings-daemon/plugins/keybindings +%{_libdir}/gnome-settings-daemon/plugins/keybindings/* +%dir %{_libdir}/gnome-settings-daemon/plugins/keyboard +%{_libdir}/gnome-settings-daemon/plugins/keyboard/* +%dir %{_libdir}/gnome-settings-daemon/plugins/media-keys +%{_libdir}/gnome-settings-daemon/plugins/media-keys/* +%dir %{_libdir}/gnome-settings-daemon/plugins/mouse +%{_libdir}/gnome-settings-daemon/plugins/mouse/* +%dir %{_libdir}/gnome-settings-daemon/plugins/screensaver +%{_libdir}/gnome-settings-daemon/plugins/screensaver/* +%dir %{_libdir}/gnome-settings-daemon/plugins/sound +%{_libdir}/gnome-settings-daemon/plugins/sound/* +%dir %{_libdir}/gnome-settings-daemon/plugins/typing-break +%{_libdir}/gnome-settings-daemon/plugins/typing-break/* +%dir %{_libdir}/gnome-settings-daemon/plugins/xrandr +%{_libdir}/gnome-settings-daemon/plugins/xrandr/* +%dir %{_libdir}/gnome-settings-daemon/plugins/xrdb +%{_libdir}/gnome-settings-daemon/plugins/xrdb/* +%dir %{_libdir}/gnome-settings-daemon/plugins/xsettings +%{_libdir}/gnome-settings-daemon/plugins/xsettings/* +%{_sysconfdir}/gconf/schemas/* + +%files lang -f %{_name}.lang + +%files devel +%defattr (-, root, root) +%dir %{_includedir}/gnome-settings-daemon-2.0 +%{_includedir}/gnome-settings-daemon-2.0/* +%{_libdir}/pkgconfig/*.pc + +%changelog +* Fri Jan 25 2008 rodrigo@suse.de +- Added missing unpackaged files +- Depend on gstreamer-0_10-plugins-base-devel for the sound module +* Wed Jan 16 2008 rodrigo@suse.de +- Disabled patches that need rebase. +- No need for gnome-patch-translation +- Updated BuildRequires +* Wed Jan 16 2008 rodrigo@suse.de +- First version of new gnome-settings-daemon package. diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4