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.glade | 4 ++-- mixgtk/mixgtk_cmd_dispatcher.c | 14 +++++++++++++- mixgtk/mixgtk_device.c | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 3 deletions(-) (limited to 'mixgtk') diff --git a/mixgtk/mixgtk.glade b/mixgtk/mixgtk.glade index f2c8773..cd73289 100644 --- a/mixgtk/mixgtk.glade +++ b/mixgtk/mixgtk.glade @@ -359,7 +359,7 @@ on_split_windows_toggled Sun, 24 Jun 2001 12:39:53 GMT - + False True @@ -1757,7 +1757,7 @@ on_split_windows_toggled Sun, 24 Jun 2001 12:26:00 GMT - + True True diff --git a/mixgtk/mixgtk_cmd_dispatcher.c b/mixgtk/mixgtk_cmd_dispatcher.c index c03db47..ae009b8 100644 --- a/mixgtk/mixgtk_cmd_dispatcher.c +++ b/mixgtk/mixgtk_cmd_dispatcher.c @@ -302,6 +302,7 @@ gboolean mixgtk_cmd_dispatcher_init (mixgtk_dialog_id_t top) { static gboolean restart = FALSE; + gchar *text = NULL; ext_dlg_ = NULL; ed_entry_ = NULL; @@ -310,10 +311,21 @@ mixgtk_cmd_dispatcher_init (mixgtk_dialog_id_t top) dis_data_.prompt = mixgtk_widget_factory_get (top, MIXGTK_WIDGET_PROMPT); g_return_val_if_fail (dis_data_.prompt != NULL, FALSE); + + if (dis_data_.log) + text = gtk_editable_get_chars (GTK_EDITABLE (dis_data_.log), 0, -1); + dis_data_.log = mixgtk_widget_factory_get (top, MIXGTK_WIDGET_LOG); + g_return_val_if_fail (dis_data_.log != NULL, FALSE); - + + if (text) + { + gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL, text, -1); + g_free (text); + } + if (!dis_data_.dispatcher) { int r = pipe (dis_data_.fildes); 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