From cd17b702add9f9fe6c13b010c5186748cbf58017 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 1 Jul 2001 13:33:17 +0000 Subject: split improved --- mixgtk/mixgtk_device.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'mixgtk/mixgtk_device.c') diff --git a/mixgtk/mixgtk_device.c b/mixgtk/mixgtk_device.c index 71e83bd..96e1ff9 100644 --- a/mixgtk/mixgtk_device.c +++ b/mixgtk/mixgtk_device.c @@ -331,6 +331,27 @@ mixgtk_device_copy_ (const struct mixgtk_device_t *from) } else { + static gchar *VALS[BIN_DEV_COL_] = {""}; + struct mixgtk_bin_device_t *to = (struct mixgtk_bin_device_t *) result; + struct mixgtk_bin_device_t *fr = (struct mixgtk_bin_device_t *) from; + to->last_insert = fr->last_insert; + to->dec = fr->dec; + if (to->last_insert > 0) + { + gint k, j, rows = to->last_insert / BIN_DEV_COL_; + GtkCList *tl = GTK_CLIST (result->widget); + GtkCList *fl = GTK_CLIST (from->widget); + for (k = 0; k < rows; ++k) + { + mix_word_t *words = g_new (mix_word_t, BIN_DEV_COL_); + mix_word_t *oldwords = + (mix_word_t *) gtk_clist_get_row_data (fl, k); + for (j = 0; j < BIN_DEV_COL_; ++j) words[j] = oldwords[j]; + gtk_clist_append (tl, VALS); + gtk_clist_set_row_data_full (tl, k, words, g_free); + } + redraw_bin_device_ (to); + } } return (mix_device_t *)result; } @@ -470,6 +491,7 @@ on_devapp_button_clicked () gchar value[20]; for (k = 0; k <= LAST_BIN_DEV_; ++k) mixgtk_device_set_format (k, IS_DEC (new_decs_, k)); + decs_ = new_decs_; snprintf (value, 20, "%d", decs_); mixgtk_config_update (DEV_FORMAT_KEY_, value); } -- cgit v1.2.3