summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_input.c
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2019-01-12 19:31:20 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2020-10-18 17:47:53 +0100
commit1953e0b4b6a0317131df2de1b0f2c0483ad7690e (patch)
tree9d0aa83383af9a917863d0cac6f3ef4ced8b0219 /mixgtk/mixgtk_input.c
parent1cfdfe433c8c8dcb40a0813528d7d0e0bb5ae2b6 (diff)
downloadmdk-1953e0b4b6a0317131df2de1b0f2c0483ad7690e.tar.gz
mdk-1953e0b4b6a0317131df2de1b0f2c0483ad7690e.tar.bz2
Mirgration to GTK+3: seemingly safe changes
Diffstat (limited to 'mixgtk/mixgtk_input.c')
-rw-r--r--mixgtk/mixgtk_input.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/mixgtk/mixgtk_input.c b/mixgtk/mixgtk_input.c
index e49810d..9eb0316 100644
--- a/mixgtk/mixgtk_input.c
+++ b/mixgtk/mixgtk_input.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixgtk_input.c :
* Implementation of the functions declared in mixgtk_input.h
* ------------------------------------------------------------------
- * Copyright (C) 2001, 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2004, 2006, 2007, 2019 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -136,14 +136,14 @@ on_word_sign_changed (GtkEditable *sign, gpointer *data)
mix_word_t w =
mix_word_new (atoi (gtk_entry_get_text (GTK_ENTRY (childs_[DEC_]))));
- g_signal_handlers_block_by_func (GTK_OBJECT (sign),
+ g_signal_handlers_block_by_func (sign,
on_word_sign_changed, data);
if (txt[0] != '+' && txt[0] != '-') txt[0] = '+';
gtk_editable_delete_text (sign, 0, 1);
gtk_editable_insert_text (sign, txt, 1, &pos);
- g_signal_handlers_unblock_by_func (GTK_OBJECT (sign),
+ g_signal_handlers_unblock_by_func (sign,
on_word_sign_changed, data);
set_word_ (txt[0] == '-' ? mix_word_negative (w) : w);
}
@@ -202,13 +202,10 @@ set_word_ (mix_word_t word)
g_snprintf (BUFFER, SIZE, "%s%d", neg ? "-" : "", val);
- g_signal_handlers_block_by_func (GTK_OBJECT (childs_[DEC_]),
- on_word_dec_changed, NULL);
- g_signal_handlers_block_by_func (GTK_OBJECT (childs_[SIGN_]),
- on_word_sign_changed, NULL);
+ g_signal_handlers_block_by_func (childs_[DEC_], on_word_dec_changed, NULL);
+ g_signal_handlers_block_by_func (childs_[SIGN_], on_word_sign_changed, NULL);
for (k = B1_; k <= B5_; ++k)
- g_signal_handlers_block_by_func (GTK_OBJECT (childs_[k]),
- on_word_byte_changed, NULL);
+ g_signal_handlers_block_by_func (childs_[k], on_word_byte_changed, NULL);
gtk_entry_set_text (GTK_ENTRY (childs_[DEC_]), BUFFER);
gtk_entry_set_text (GTK_ENTRY (childs_[SIGN_]), neg ? "-" : "+");
@@ -221,11 +218,7 @@ set_word_ (mix_word_t word)
}
for (k = B1_; k <= B5_; ++k)
- g_signal_handlers_unblock_by_func (GTK_OBJECT (childs_[k]),
- on_word_byte_changed, NULL);
- g_signal_handlers_unblock_by_func (GTK_OBJECT (childs_[DEC_]),
- on_word_dec_changed, NULL);
- g_signal_handlers_unblock_by_func (GTK_OBJECT (childs_[SIGN_]),
- on_word_sign_changed, NULL);
+ g_signal_handlers_unblock_by_func (childs_[k], on_word_byte_changed, NULL);
+ g_signal_handlers_unblock_by_func (childs_[DEC_], on_word_dec_changed, NULL);
+ g_signal_handlers_unblock_by_func (childs_[SIGN_], on_word_sign_changed, NULL);
}
-