+Fri Oct 24 19:16:46 2008 Søren Sandmann <sandmann@redhat.com>

+
+	* gnome-about-me.c (main): Remove unused GnomeProgram variable
+
+Fri Oct 24 19:19:46 2008  Søren Sandmann  <sandmann@redhat.com>
+
+	* sound-properties-capplet.c (setup_dialog): Delete code for
+	legacy config options
+	
+Fri Oct 24 19:18:37 2008  Søren Sandmann  <sandmann@redhat.com>
+
+	* capplet-util.c: Include <stdlib.h>
+	* capplet-util.h: Delete COPY_FROM_LEGACY macro
+
+Fri Oct 24 19:16:10 2008  Søren Sandmann  <sandmann@redhat.com>
+
+	* gnome-keyboard-properties.c (main): Remove copying of legacy settings
+


svn path=/trunk/; revision=9112
This commit is contained in:
Søren Sandmann Pedersen 2008-10-24 23:22:41 +00:00
parent d552cfc0f3
commit 3a227fbc66
11 changed files with 60 additions and 117 deletions

View file

@ -1,3 +1,7 @@
Fri Oct 24 19:16:46 2008 Søren Sandmann <sandmann@redhat.com>
* gnome-about-me.c (main): Remove unused GnomeProgram variable
==================== 2.24.0.1 ====================
==================== 2.23.2 ====================

View file

@ -1024,7 +1024,6 @@ about_me_setup_dialog (void)
int
main (int argc, char **argv)
{
GnomeProgram *program;
int rc = 0;
capplet_init (NULL, &argc, &argv);

View file

@ -2,6 +2,7 @@
#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include <glade/glade.h>
#include <gnome.h>
#include "capplet-util.h"
#include "gconf-property-editor.h"

View file

@ -26,6 +26,7 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
#include "capplet-util.h"
#include "theme-util.h"
gboolean

View file

@ -1,3 +1,8 @@
Fri Oct 24 19:18:37 2008 Søren Sandmann <sandmann@redhat.com>
* capplet-util.c: Include <stdlib.h>
* capplet-util.h: Delete COPY_FROM_LEGACY macro
Fri Oct 24 19:04:38 2008 Søren Sandmann <sandmann@redhat.com>
* gconf-property-editor.c: Delete unused function

View file

@ -32,6 +32,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <glib/gi18n.h>
#include <stdlib.h>
#include "capplet-util.h"

View file

@ -25,7 +25,8 @@
#define __CAPPLET_UTIL_H
#include <gio/gio.h>
#include <gnome.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gconf/gconf.h>
#include <gconf/gconf-changeset.h>
@ -35,14 +36,6 @@
#define WID(s) glade_xml_get_widget (dialog, s)
/* Copy a setting from the legacy gnome-config settings to the ConfigDatabase */
#define COPY_FROM_LEGACY(type, key, legacy_key) \
val_##type = gnome_config_get_##type##_with_default (legacy_key, &def); \
\
if (!def) \
gconf_client_set_##type (client, key, val_##type, NULL);
/* Some miscellaneous functions useful to all capplets */
void capplet_help (GtkWindow *parent, char const *section);

View file

@ -1,3 +1,7 @@
Fri Oct 24 19:16:10 2008 Søren Sandmann <sandmann@redhat.com>
* gnome-keyboard-properties.c (main): Remove copying of legacy settings
2008-10-24 Sergey Udaltsov <svu@gnome.org>
* gnome-keyboard-properties-xkbot.c: Small fix - remember sorted list

View file

@ -192,42 +192,6 @@ setup_dialog (GladeXML * dialog, GConfChangeSet * changeset)
setup_a11y_tabs (dialog, changeset);
}
static void
get_legacy_settings (void)
{
GConfClient *client;
gboolean val_bool, def;
gulong val_int;
client = gconf_client_get_default ();
COPY_FROM_LEGACY (bool,
"/gnome/desktop/peripherals/keyboard/repeat",
"/Desktop/Keyboard/repeat=true");
COPY_FROM_LEGACY (bool,
"/gnome/desktop/peripherals/keyboard/click",
"/Desktop/Keyboard/click=true");
COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/rate",
"/Desktop/Keyboard/rate=30");
COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/delay",
"/Desktop/Keyboard/delay=500");
COPY_FROM_LEGACY (int,
"/gnome/desktop/peripherals/keyboard/volume",
"/Desktop/Keyboard/clickvolume=0");
#if 0
COPY_FROM_LEGACY (int,
"/gnome/desktop/peripherals/keyboard/bell_volume",
"/Desktop/Bell/percent=50");
#endif
COPY_FROM_LEGACY (int,
"/gnome/desktop/peripherals/keyboard/bell_pitch",
"/Desktop/Bell/pitch=50");
COPY_FROM_LEGACY (int,
"/gnome/desktop/peripherals/keyboard/bell_duration",
"/Desktop/Bell/duration=100");
g_object_unref (G_OBJECT (client));
}
int
main (int argc, char **argv)
{
@ -237,7 +201,6 @@ main (int argc, char **argv)
GOptionContext *context;
static gboolean apply_only = FALSE;
static gboolean get_legacy = FALSE;
static gboolean switch_to_typing_break_page = FALSE;
static gboolean switch_to_a11y_page = FALSE;
@ -251,8 +214,6 @@ main (int argc, char **argv)
N_
("Just apply settings and quit (compatibility only; now handled by daemon)"),
NULL},
{"get-legacy", 0, 0, G_OPTION_ARG_NONE, &get_legacy,
N_("Retrieve and store legacy settings"), NULL},
{"typing-break", 0, 0, G_OPTION_ARG_NONE,
&switch_to_typing_break_page,
N_
@ -283,31 +244,27 @@ main (int argc, char **argv)
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
g_object_unref (client);
if (get_legacy) {
get_legacy_settings ();
} else {
changeset = NULL;
dialog = create_dialog ();
setup_dialog (dialog, changeset);
if (switch_to_typing_break_page) {
gtk_notebook_set_current_page (GTK_NOTEBOOK
(WID
("keyboard_notebook")),
4);
}
else if (switch_to_a11y_page) {
gtk_notebook_set_current_page (GTK_NOTEBOOK
(WID
("keyboard_notebook")),
2);
}
capplet_set_icon (WID ("keyboard_dialog"),
"preferences-desktop-keyboard");
gtk_widget_show (WID ("keyboard_dialog"));
gtk_main ();
changeset = NULL;
dialog = create_dialog ();
setup_dialog (dialog, changeset);
if (switch_to_typing_break_page) {
gtk_notebook_set_current_page (GTK_NOTEBOOK
(WID
("keyboard_notebook")),
4);
}
else if (switch_to_a11y_page) {
gtk_notebook_set_current_page (GTK_NOTEBOOK
(WID
("keyboard_notebook")),
2);
}
capplet_set_icon (WID ("keyboard_dialog"),
"preferences-desktop-keyboard");
gtk_widget_show (WID ("keyboard_dialog"));
gtk_main ();
return 0;
}

View file

@ -1,4 +1,9 @@
Fri Oct 24 18:59:34 2008 Søren Sandmann <sandmann@redhat.com>
Fri Oct 24 19:19:46 2008 Søren Sandmann <sandmann@redhat.com>
* sound-properties-capplet.c (setup_dialog): Delete code for
legacy config options
Fri Oct 24 19:19:29 2008 Søren Sandmann <sandmann@redhat.com>
* sound-properties-capplet.c: Get rid of gnome include

View file

@ -1138,26 +1138,6 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
setup_sound_theme_custom (dialog, CheckXKB());
}
/* get_legacy_settings
*
* Retrieve older gnome_config -style settings and store them in the
* configuration database.
*
* In most cases, it's best to use the COPY_FROM_LEGACY macro defined in
* capplets/common/capplet-util.h.
*/
static void
get_legacy_settings (void)
{
GConfClient *client;
gboolean val_bool, def;
client = gconf_client_get_default ();
COPY_FROM_LEGACY (bool, "/desktop/gnome/sound/event_sounds", "/sound/system/settings/event_sounds=false");
g_object_unref (G_OBJECT (client));
}
static void
dialog_response_cb (GtkWidget *dialog, gint response_id, GConfChangeSet *changeset)
{
@ -1177,14 +1157,11 @@ main (int argc, char **argv)
GladeXML *dialog;
GOptionContext *context;
gboolean apply_only = FALSE;
gboolean get_legacy = FALSE;
GOptionEntry cap_options[] = {
{ "apply", 0, 0, G_OPTION_ARG_NONE, &apply_only,
N_("Just apply settings and quit (compatibility only; now handled by daemon)"), NULL },
{ "init-session-settings", 0, 0, G_OPTION_ARG_NONE, &apply_only,
N_("Just apply settings and quit (compatibility only; now handled by daemon)"), NULL },
{ "get-legacy", 0, 0, G_OPTION_ARG_NONE, &get_legacy,
N_("Retrieve and store legacy settings"), NULL },
{ NULL }
};
@ -1205,26 +1182,22 @@ main (int argc, char **argv)
gconf_client_add_dir (gconf_client, "/desktop/gnome/sound", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_add_dir (gconf_client, "/apps/metacity/general", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
if (get_legacy) {
get_legacy_settings ();
} else {
dialog = create_dialog ();
if (dialog) {
changeset = gconf_change_set_new ();
setup_dialog (dialog, changeset);
setup_devices ();
dialog_win = WID ("sound_prefs_dialog");
g_signal_connect (dialog_win, "response", G_CALLBACK (dialog_response_cb), changeset);
g_signal_connect (dialog_win, "destroy", G_CALLBACK (gtk_main_quit), NULL);
capplet_set_icon (dialog_win, "gnome-sound-properties");
gtk_widget_show (dialog_win);
gtk_main ();
gconf_change_set_unref (changeset);
g_object_unref (dialog);
}
dialog = create_dialog ();
if (dialog) {
changeset = gconf_change_set_new ();
setup_dialog (dialog, changeset);
setup_devices ();
dialog_win = WID ("sound_prefs_dialog");
g_signal_connect (dialog_win, "response", G_CALLBACK (dialog_response_cb), changeset);
g_signal_connect (dialog_win, "destroy", G_CALLBACK (gtk_main_quit), NULL);
capplet_set_icon (dialog_win, "gnome-sound-properties");
gtk_widget_show (dialog_win);
gtk_main ();
gconf_change_set_unref (changeset);
g_object_unref (dialog);
}
g_object_unref (gconf_client);