summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2004-07-02 00:09:55 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2004-07-02 00:09:55 +0000
commit8cfb73c9e84dc3d6be7bf2f2d1815e6f28d0dfec (patch)
tree005aa817df8ea0d599c4f758fee455b6ce71277d /mixgtk
parenta63e6f0986dc4b0dedc83e5143e697bfd88ea277 (diff)
downloadmdk-8cfb73c9e84dc3d6be7bf2f2d1815e6f28d0dfec.tar.gz
mdk-8cfb73c9e84dc3d6be7bf2f2d1815e6f28d0dfec.tar.bz2
go to dialog handling simplified.
Diffstat (limited to 'mixgtk')
-rw-r--r--mixgtk/mixgtk_mixvm.c29
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