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:
parent
c53bfb9c43
commit
ec08294088
9 changed files with 88 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue