diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2019-01-12 19:31:20 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2020-10-18 17:47:53 +0100 |
commit | 1953e0b4b6a0317131df2de1b0f2c0483ad7690e (patch) | |
tree | 9d0aa83383af9a917863d0cac6f3ef4ced8b0219 /mixgtk/mixgtk_device.c | |
parent | 1cfdfe433c8c8dcb40a0813528d7d0e0bb5ae2b6 (diff) | |
download | mdk-1953e0b4b6a0317131df2de1b0f2c0483ad7690e.tar.gz mdk-1953e0b4b6a0317131df2de1b0f2c0483ad7690e.tar.bz2 |
Mirgration to GTK+3: seemingly safe changes
Diffstat (limited to 'mixgtk/mixgtk_device.c')
-rw-r--r-- | mixgtk/mixgtk_device.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mixgtk/mixgtk_device.c b/mixgtk/mixgtk_device.c index 1d28b6e..56804cd 100644 --- a/mixgtk/mixgtk_device.c +++ b/mixgtk/mixgtk_device.c @@ -1,7 +1,7 @@ /* -*-c-*- ---------------- mixgtk_device.c : * actual types for mixgtk devices * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 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 @@ -480,11 +480,17 @@ mixgtk_device_set_format (mix_device_type_t dev, gboolean dec) } +static gpointer +combo_child_ () +{ + return gtk_bin_get_child (GTK_BIN (combo_)); +} + static mix_device_type_t get_device_idx_ (void) { int k; - const gchar *name = gtk_entry_get_text (GTK_ENTRY (GTK_BIN (combo_)->child)); + const gchar *name = gtk_entry_get_text (GTK_ENTRY (combo_child_ ())); for (k = 0; k <= LAST_BIN_DEV_; ++k) if (!strcmp (name, DEF_NAMES_[k])) break; return k; @@ -504,7 +510,7 @@ init_devform_ (void) combo_ = mixgtk_widget_factory_get_child_by_name (MIXGTK_DEVFORM_DIALOG, "dev_combo"); g_assert (combo_); - gtk_editable_set_editable (GTK_EDITABLE (GTK_BIN (combo_)->child), FALSE); + gtk_editable_set_editable (GTK_EDITABLE (combo_child_ ()), FALSE); } void |