Committed patches by Lauris Kaplinski for bugs 73571, 73587, and 71613.

2002-03-11  Richard Hestilow <hestilow@ximian.com>

	* Committed patches by Lauris Kaplinski for bugs 73571, 73587,
	and 71613.
This commit is contained in:
Richard Hestilow 2002-03-12 01:35:40 +00:00 committed by Rachel Hestilow
parent c53bfb9c43
commit ec08294088
9 changed files with 88 additions and 12 deletions

View file

@ -1,3 +1,8 @@
2002-03-11 Richard Hestilow <hestilow@ximian.com>
* Committed patches by Lauris Kaplinski for bugs 73571, 73587,
and 71613.
2002-03-11 jacob berkman <jacob@ximian.com>
* configure.in (AC_OUTPUT):

View file

@ -13,4 +13,4 @@ libcommon_a_SOURCES = \
activate-settings-daemon.c activate-settings-daemon.h \
capplet-util.c capplet-util.h \
gconf-property-editor.c gconf-property-editor.h \
gconf-property-editor-marshal.c gconf-property-editor-marshal.h
gconf-property-editor-marshal.c gconf-property-editor-marshal.h

View file

@ -1,3 +1,11 @@
2002-03-07 Lauris Kaplinski <lauris@ximian.com>
* gnome-default-applications-properties.c (generic_guard): Set focus
and emit signal here, instead of mnemonic handler
(create_dialog): Set data on radio widgets, to be used for focus/entry
tracking. Do not connect mnemonic_activate signals, as these are
handled by toggles already.
2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
* gnome-default-applications-properties.c: s/PACKAGE/GETTEXT_PACKAGE/g

View file

@ -50,9 +50,23 @@ static void
generic_guard (GtkWidget *toggle,
GtkWidget *widget)
{
GtkWidget *w;
gtk_widget_set_sensitive (widget, GTK_TOGGLE_BUTTON (toggle)->active);
if (GTK_TOGGLE_BUTTON (toggle)->active) {
w = g_object_get_data (G_OBJECT (toggle), "entry");
if (w && GTK_WIDGET_REALIZED (w)) gtk_widget_grab_focus (w);
if (w && GTK_IS_ENTRY (w)) {
gchar *text;
text = g_strdup (gtk_entry_get_text (GTK_ENTRY (w)));
gtk_entry_set_text (GTK_ENTRY (w), text);
g_free (text);
}
}
}
#if 0
static gboolean
mnemonic_activate (GtkWidget *toggle,
gboolean group_cycling,
@ -69,6 +83,7 @@ mnemonic_activate (GtkWidget *toggle,
}
return FALSE;
}
#endif
static void
initialize_default_applications (void)
@ -416,7 +431,6 @@ dialog_response (GtkDialog *widget,
};
}
static GladeXML *
create_dialog (GConfClient *client)
{
@ -439,22 +453,31 @@ create_dialog (GConfClient *client)
strings = NULL;
}
/* Source of command string */
g_object_set_data (G_OBJECT (WID ("text_select_radio")), "entry", WID ("text_select_combo_entry"));
/* Source of command string */
g_object_set_data (G_OBJECT (WID ("text_custom_radio")), "entry", WID ("text_custom_command_entry"));
#if 0
g_signal_connect (G_OBJECT (WID ("text_select_radio")),
"mnemonic_activate", (GCallback) mnemonic_activate,
WID ("text_select_combo_entry"));
#endif
g_signal_connect (G_OBJECT (WID ("text_select_combo_entry")),
"changed", (GCallback) text_setup_custom,
dialog);
g_signal_connect (G_OBJECT (WID ("text_select_radio")),
"toggled", (GCallback) generic_guard,
WID ("text_select_combo"));
#if 0
g_signal_connect (G_OBJECT (WID ("text_custom_radio")),
"mnemonic_activate", (GCallback) mnemonic_activate,
WID ("text_custom_command_entry"));
#endif
g_signal_connect (G_OBJECT (WID ("text_custom_radio")),
"toggled", (GCallback) generic_guard,
WID ("text_custom_vbox"));
read_editor (client, dialog);
/* Web page */
@ -468,19 +491,27 @@ create_dialog (GConfClient *client)
strings = NULL;
}
/* Source of command string */
g_object_set_data (G_OBJECT (WID ("web_select_radio")), "entry", WID ("web_select_combo_entry"));
/* Source of command string */
g_object_set_data (G_OBJECT (WID ("web_custom_radio")), "entry", WID ("web_custom_command_entry"));
#if 0
g_signal_connect (G_OBJECT (WID ("web_select_radio")),
"mnemonic_activate", (GCallback) mnemonic_activate,
WID ("web_select_combo_entry"));
#endif
g_signal_connect (G_OBJECT (WID ("web_select_combo_entry")),
"changed", (GCallback) browser_setup_custom,
dialog);
g_signal_connect (G_OBJECT (WID ("web_select_radio")),
"toggled", (GCallback) generic_guard,
WID ("web_select_combo"));
#if 0
g_signal_connect (G_OBJECT (WID ("web_custom_radio")),
"mnemonic_activate", (GCallback) mnemonic_activate,
WID ("web_custom_command_entry"));
#endif
g_signal_connect (G_OBJECT (WID ("web_custom_radio")),
"toggled", (GCallback) generic_guard,
WID ("web_custom_vbox"));
@ -499,19 +530,27 @@ create_dialog (GConfClient *client)
strings = NULL;
}
/* Source of command string */
g_object_set_data (G_OBJECT (WID ("help_select_radio")), "entry", WID ("help_select_combo_entry"));
/* Source of command string */
g_object_set_data (G_OBJECT (WID ("help_custom_radio")), "entry", WID ("help_custom_command_entry"));
#if 0
g_signal_connect (G_OBJECT (WID ("help_select_radio")),
"mnemonic_activate", (GCallback) mnemonic_activate,
WID ("help_select_combo_entry"));
#endif
g_signal_connect (G_OBJECT (WID ("help_select_combo_entry")),
"changed", (GCallback) help_setup_custom,
dialog);
g_signal_connect (G_OBJECT (WID ("help_select_radio")),
"toggled", (GCallback) generic_guard,
WID ("help_select_combo"));
#if 0
g_signal_connect (G_OBJECT (WID ("help_custom_radio")),
"mnemonic_activate", (GCallback) mnemonic_activate,
WID ("help_custom_command_entry"));
#endif
g_signal_connect (G_OBJECT (WID ("help_custom_radio")),
"toggled", (GCallback) generic_guard,
WID ("help_custom_vbox"));
@ -530,19 +569,27 @@ create_dialog (GConfClient *client)
strings = NULL;
}
/* Source of command string */
g_object_set_data (G_OBJECT (WID ("terminal_select_radio")), "entry", WID ("terminal_select_combo_entry"));
/* Source of command string */
g_object_set_data (G_OBJECT (WID ("terminal_custom_radio")), "entry", WID ("terminal_custom_command_entry"));
#if 0
g_signal_connect (G_OBJECT (WID ("terminal_select_radio")),
"mnemonic_activate", (GCallback) mnemonic_activate,
WID ("terminal_select_combo_entry"));
#endif
g_signal_connect (G_OBJECT (WID ("terminal_select_combo_entry")),
"changed", (GCallback) terminal_setup_custom,
dialog);
g_signal_connect (G_OBJECT (WID ("terminal_select_radio")),
"toggled", (GCallback) generic_guard,
WID ("terminal_select_combo"));
#if 0
g_signal_connect (G_OBJECT (WID ("terminal_custom_radio")),
"mnemonic_activate", (GCallback) mnemonic_activate,
WID ("terminal_custom_command_entry"));
#endif
g_signal_connect (G_OBJECT (WID ("terminal_custom_radio")),
"toggled", (GCallback) generic_guard,
WID ("terminal_custom_table"));

View file

@ -1,3 +1,10 @@
2002-03-08 Lauris Kaplinski <lauris@ximian.com>
* mime-type-info.c (mime_type_info_using_custom_app): Return TRUE
if default_action does not exist (it is better than crash)
* mime-edit-dialog.c (store_data): Create default_action if there is none
2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
* file-types-applet.c: s/PACKAGE/GETTEXT_PACKAGE/g

View file

@ -624,6 +624,8 @@ store_data (MimeEditDialog *dialog)
if (!mime_type_info_using_custom_app (dialog->p->info)) {
gnome_vfs_mime_application_free (dialog->p->info->default_action);
dialog->p->info->default_action = g_new0 (GnomeVFSMimeApplication, 1);
} else if (!dialog->p->info->default_action) {
dialog->p->info->default_action = g_new0 (GnomeVFSMimeApplication, 1);
}
g_free (dialog->p->info->default_action->command);

View file

@ -201,7 +201,7 @@ mime_type_info_using_custom_app (const MimeTypeInfo *info)
gchar *tmp;
gboolean ret;
if (info->default_action->name == NULL)
if (!info->default_action || !info->default_action->name)
return TRUE;
tmp = g_strdup_printf ("Custom %s", info->mime_type);

View file

@ -1,3 +1,8 @@
2002-03-07 Lauris Kaplinski <lauris@ximian.com>
* gnome-settings-keyboard.c (apply_settings): Use correct GConf keys,
click volume is of type float, not int
2002-03-10 Seth Nickell <snickell@stanford.edu>
* GNOME_SettingsDaemon.server.in:
@ -20,6 +25,7 @@
register it with bonobo-activation. Still has a main loop that can
be run normally to launch the settings daemon.
>>>>>>> 1.26
2002-03-06 Miles Lane <miles@megapathdsl.net>
* gnome-settings-daemon.c -- Correct the gnome_program_init()

View file

@ -43,8 +43,9 @@ apply_settings (void)
GConfClient *client;
gboolean repeat, click;
int rate, delay, volume;
int rate, delay;
int bell_volume, bell_pitch, bell_duration;
double volume;
#ifdef HAVE_X11_EXTENSIONS_XF86MISC_H
XF86MiscKbdSettings kbdsettings;
@ -54,14 +55,14 @@ apply_settings (void)
client = gconf_client_get_default ();
repeat = gconf_client_get_bool (client, "/gnome/desktop/peripherals/keyboard/repeat", NULL);
click = gconf_client_get_bool (client, "/gnome/desktop/peripherals/keyboard/click", NULL);
rate = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/rate", NULL);
delay = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/delay", NULL);
volume = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/click_volume", NULL);
bell_volume = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/bell_volume", NULL);
bell_pitch = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/bell_pitch", NULL);
bell_duration = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/bell_duration", NULL);
repeat = gconf_client_get_bool (client, "/desktop/gnome/peripherals/keyboard/repeat", NULL);
click = gconf_client_get_bool (client, "/desktop/gnome/peripherals/keyboard/click", NULL);
rate = gconf_client_get_int (client, "/desktop/gnome/peripherals/keyboard/rate", NULL);
delay = gconf_client_get_int (client, "/desktop/gnome/peripherals/keyboard/delay", NULL);
volume = gconf_client_get_float (client, "/desktop/gnome/peripherals/keyboard/click_volume", NULL);
bell_volume = gconf_client_get_int (client, "/desktop/gnome/peripherals/keyboard/bell_volume", NULL);
bell_pitch = gconf_client_get_int (client, "/desktop/gnome/peripherals/keyboard/bell_pitch", NULL);
bell_duration = gconf_client_get_int (client, "/desktop/gnome/peripherals/keyboard/bell_duration", NULL);
if (repeat) {
XAutoRepeatOn (GDK_DISPLAY ());