summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_device.c
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-01 13:33:17 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-01 13:33:17 +0000
commitebefa5584f9a6fc29bdcd85d38c790cda42306b8 (patch)
tree4de17e4ff4244672709a7b4bb5e143983ed51924 /mixgtk/mixgtk_device.c
parent94b11021d85904bb9737e0ff69cc0e91a547e6d1 (diff)
downloadmdk-ebefa5584f9a6fc29bdcd85d38c790cda42306b8.tar.gz
mdk-ebefa5584f9a6fc29bdcd85d38c790cda42306b8.tar.bz2
split improved
Diffstat (limited to 'mixgtk/mixgtk_device.c')
-rw-r--r--mixgtk/mixgtk_device.c22
1 files changed, 22 insertions, 0 deletions
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);
}