From 99e0f5a0aa06befc7dd0bb2d7693eed200ac612e Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 1 Aug 2004 23:30:54 +0000 Subject: (on_external_programs_activate): new-style handling of the external programs dialog. --- mixgtk/mixgtk_cmd_dispatcher.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/mixgtk/mixgtk_cmd_dispatcher.c b/mixgtk/mixgtk_cmd_dispatcher.c index a941627..1e9ccd7 100644 --- a/mixgtk/mixgtk_cmd_dispatcher.c +++ b/mixgtk/mixgtk_cmd_dispatcher.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_cmd_dispatcher.c : * Implementation of the functions declared in mixgtk_cmd_dispatcher.h * ------------------------------------------------------------------ - * $Id: mixgtk_cmd_dispatcher.c,v 1.22 2004/08/01 21:44:34 jao Exp $ + * $Id: mixgtk_cmd_dispatcher.c,v 1.23 2004/08/01 23:30:54 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -273,23 +273,16 @@ on_external_programs_activate () mix_vm_cmd_dispatcher_get_assembler (dis_data_.dispatcher)); gtk_widget_show (ext_dlg_); -} - -void -on_extern_cancel_button_clicked () -{ - gtk_widget_hide (ext_dlg_); -} + if (gtk_dialog_run (GTK_DIALOG (ext_dlg_)) == GTK_RESPONSE_OK) + { + const gchar *value = gtk_entry_get_text (GTK_ENTRY (ed_entry_)); + mix_vm_cmd_dispatcher_set_editor (dis_data_.dispatcher, value); + mixgtk_config_update (EDITOR_KEY_, value); + value = gtk_entry_get_text (GTK_ENTRY (asm_entry_)); + mix_vm_cmd_dispatcher_set_assembler (dis_data_.dispatcher, value); + mixgtk_config_update (MIXASM_KEY_, value); + } -void -on_extern_ok_button_clicked () -{ - const gchar *value = gtk_entry_get_text (GTK_ENTRY (ed_entry_)); - mix_vm_cmd_dispatcher_set_editor (dis_data_.dispatcher, value); - mixgtk_config_update (EDITOR_KEY_, value); - value = gtk_entry_get_text (GTK_ENTRY (asm_entry_)); - mix_vm_cmd_dispatcher_set_assembler (dis_data_.dispatcher, value); - mixgtk_config_update (MIXASM_KEY_, value); gtk_widget_hide (ext_dlg_); } -- cgit v1.2.3