diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-07-02 00:09:55 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-07-02 00:09:55 +0000 |
commit | c9e07769fc71a48e16368c3778093c3846828f31 (patch) | |
tree | 10e1c92fa9479619e6100472c18631d2099d3342 | |
parent | 1717e3813c205054e8dc186188828f735c52331f (diff) | |
download | mdk-c9e07769fc71a48e16368c3778093c3846828f31.tar.gz mdk-c9e07769fc71a48e16368c3778093c3846828f31.tar.bz2 |
go to dialog handling simplified.
-rw-r--r-- | mixgtk/mixgtk_mixvm.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/mixgtk/mixgtk_mixvm.c b/mixgtk/mixgtk_mixvm.c index 2a34367..cea52bb 100644 --- a/mixgtk/mixgtk_mixvm.c +++ b/mixgtk/mixgtk_mixvm.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_mixvm.c : * Implementation of the functions declared in mixgtk_mixvm.h * ------------------------------------------------------------------ - * $Id: mixgtk_mixvm.c,v 1.13 2004/06/30 14:07:53 jao Exp $ + * $Id: mixgtk_mixvm.c,v 1.14 2004/07/02 00:09:55 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -327,24 +327,6 @@ mem_cell_ (mix_word_t w, gpointer a) } void -on_goto_cancel_clicked (GtkWidget *w, gpointer data) -{ - gtk_widget_hide (goto_); -} - -void -on_goto_ok_clicked (GtkWidget *w, gpointer data) -{ - const gchar *txt = gtk_entry_get_text (goto_entry_); - mix_short_t addr = mix_short_new (atoi (txt)); - if (addr < MIX_VM_CELL_NO) - { - gtk_widget_hide (goto_); - mixgtk_mixvm_update_cells_to_address (addr); - } -} - -void on_mix_font_activate (void) { GtkWidget *w[REGISTER_NO_ + 2] = { @@ -421,7 +403,14 @@ static void cells_clicked_ (GtkTreeViewColumn* col, gpointer data) { if (!goto_) init_goto_ (); - gtk_widget_show (goto_); + if (gtk_dialog_run (GTK_DIALOG (goto_)) == GTK_RESPONSE_OK) + { + const gchar *txt = gtk_entry_get_text (goto_entry_); + mix_short_t addr = mix_short_new (atoi (txt)); + if (addr < MIX_VM_CELL_NO) + mixgtk_mixvm_update_cells_to_address (addr); + } + gtk_widget_hide (goto_); } static gboolean |