From 3cddb9545a4f634b46565717ef0a59a6f4a166ce Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Wed, 23 Jun 2004 10:50:10 +0000 Subject: First, incomplete port to gtk 2.0. Basic functionality in place. --- mixgtk/mixgtk_mixal.c | 535 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 323 insertions(+), 212 deletions(-) (limited to 'mixgtk/mixgtk_mixal.c') diff --git a/mixgtk/mixgtk_mixal.c b/mixgtk/mixgtk_mixal.c index dc0f6d5..b805c30 100644 --- a/mixgtk/mixgtk_mixal.c +++ b/mixgtk/mixgtk_mixal.c @@ -1,24 +1,24 @@ /* -*-c-*- -------------- mixgtk_mixal.c : * Implementation of the functions declared in mixgtk_mixal.h * ------------------------------------------------------------------ - * $Id: mixgtk_mixal.c,v 1.16 2002/04/10 23:39:40 jao Exp $ + * $Id: mixgtk_mixal.c,v 1.17 2004/06/23 10:50:10 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2002, 2004 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ @@ -33,7 +33,9 @@ #define MIXAL_TAB_POS_ 2 static mix_vm_t *vm_ = NULL; -static GtkCList *clist_; +static GtkTreeView *clist_ = NULL; +static GtkListStore *clist_store_ = NULL; + static gulong lineno_; static const gchar *LOCAL_STATUS_BAR_ = "mixal_statusbar"; static GtkStatusbar *status_; @@ -41,164 +43,203 @@ static gint status_context_; static GPtrArray *tips_text_ = NULL; static GtkWidget *symbols_dlg_ = NULL; -static GtkWidget *symbols_clist_ = NULL; -static const gchar *SYMBOLS_CLIST_NAME_ = "symbols_clist"; +static GtkTreeView *symbols_view_ = NULL; +static GtkListStore *symbols_store_ = NULL; +static const gchar *SYMBOLS_VIEW_NAME_ = "symbols_view"; + +static const gchar *bp_stock_id_ = NULL; +static const gchar *pc_stock_id_ = NULL; +static const guint bp_stock_size_ = GTK_ICON_SIZE_MENU; + +enum { + CLIST_BP_ID_COL, + CLIST_BP_SIZE_COL, + CLIST_ADDRESS_COL, + CLIST_BYTECODE_COL, + CLIST_CODE_COL, + CLIST_ADDRESS_NO_COL, + CLIST_LINE_NO_COL, + CLIST_COL_NO +}; + +enum { + SYMBOLS_NAME_COL, + SYMBOLS_VALUE_COL, + SYMBOLS_WORD_COL, + SYMBOLS_COL_NO +}; + + +static gboolean +mixal_event_ (GtkWidget *w, GdkEvent *event, gpointer data); + static void -init_symbols_ (void) +init_symbols_ (void) { + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + symbols_dlg_ = mixgtk_widget_factory_get_dialog (MIXGTK_SYMBOLS_DIALOG); g_assert (symbols_dlg_); - symbols_clist_ = mixgtk_widget_factory_get_child_by_name - (MIXGTK_SYMBOLS_DIALOG, SYMBOLS_CLIST_NAME_); - g_assert (symbols_clist_); - gtk_clist_set_sort_type (GTK_CLIST (symbols_clist_), GTK_SORT_ASCENDING); - gtk_clist_set_auto_sort (GTK_CLIST (symbols_clist_), TRUE); + symbols_view_ = GTK_TREE_VIEW + (mixgtk_widget_factory_get_child_by_name + (MIXGTK_SYMBOLS_DIALOG, SYMBOLS_VIEW_NAME_)); + g_assert (symbols_view_); + + symbols_store_ = gtk_list_store_new (SYMBOLS_COL_NO, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING); + + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (symbols_store_), + SYMBOLS_NAME_COL, + GTK_SORT_ASCENDING); + + gtk_tree_view_set_model (symbols_view_, GTK_TREE_MODEL (symbols_store_)); + g_object_unref (G_OBJECT (symbols_store_)); + gtk_tree_view_append_column + (symbols_view_, + gtk_tree_view_column_new_with_attributes ("Name", renderer, + "text", SYMBOLS_NAME_COL, + NULL)); + gtk_tree_view_append_column + (symbols_view_, + gtk_tree_view_column_new_with_attributes ("Value", renderer, + "text", SYMBOLS_VALUE_COL, + NULL)); + gtk_tree_view_append_column + (symbols_view_, + gtk_tree_view_column_new_with_attributes ("", renderer, + "text", SYMBOLS_WORD_COL, + NULL)); } static void -insert_symbol_ (gpointer symbol, gpointer value, gpointer list) +insert_symbol_ (gpointer symbol, gpointer value, gpointer data) { enum {DEC_SIZE = 25, WORD_SIZE = 20}; static gchar DEC[DEC_SIZE], WORD[WORD_SIZE]; - - gchar *text[] = {(gchar *)symbol, DEC, WORD}; + + GtkTreeIter iter; + mix_word_t w = (mix_word_t)GPOINTER_TO_INT (value); g_snprintf (DEC, DEC_SIZE, "%s%ld", mix_word_is_negative (w)? "-" : "+", mix_word_magnitude (w)); mix_word_print_to_buffer (w, WORD); - gtk_clist_append ((GtkCList *)list, text); + + gtk_list_store_append (symbols_store_, &iter); + gtk_list_store_set (symbols_store_, &iter, + SYMBOLS_NAME_COL, (const gchar*)symbol, + SYMBOLS_VALUE_COL, DEC, + SYMBOLS_WORD_COL, WORD, + -1); } static void fill_symbols_ (const mix_symbol_table_t *table) { - if (symbols_clist_) - gtk_clist_clear (GTK_CLIST (symbols_clist_)); + if (symbols_view_) + gtk_list_store_clear (symbols_store_); else init_symbols_ (); - + mix_symbol_table_foreach (((mix_symbol_table_t *)table), - insert_symbol_, (gpointer)symbols_clist_); + insert_symbol_, NULL); } -static GdkColor colors_[3][2]; -static GdkColormap *colormap_ = NULL; -static const char* default_colors_[3][2] = { - {"red", "black"}, - {"lightgrey", "black"}, - {"white", "black"} -}; +static gboolean +init_clist_ (mixgtk_dialog_id_t top) +{ + GtkStockItem item; -static const char* keys_[3][2] = { - {"MIXAL.bp.color.bg", "MIXAL.bp.color.fg"}, - {"MIXAL.lc.color.bg", "MIXAL.lc.color.fg"}, - {"MIXAL.pl.color.bg", "MIXAL.pl.color.fg"} -}; + GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + GtkCellRenderer *bprenderer = gtk_cell_renderer_pixbuf_new (); -static const GdkColor * -parse_color_ (const gchar *str) -{ - static GdkColor color; - if (sscanf (str, "%hd%hd%hd", &(color.red), &(color.green), &(color.blue)) < 3) + clist_ = GTK_TREE_VIEW + (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_MIXAL)); + + g_assert (clist_); + + clist_store_ = gtk_list_store_new (CLIST_COL_NO, + G_TYPE_STRING, + G_TYPE_INT, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_INT, + G_TYPE_INT); + + gtk_tree_view_set_model (clist_, GTK_TREE_MODEL (clist_store_)); + g_object_unref (G_OBJECT (clist_store_)); + + gtk_tree_view_append_column + (clist_, + gtk_tree_view_column_new_with_attributes ("", bprenderer, + "stock-id", CLIST_BP_ID_COL, + "stock-size", CLIST_BP_SIZE_COL, + NULL)); + gtk_tree_view_append_column + (clist_, + gtk_tree_view_column_new_with_attributes ("Address", renderer, + "text", CLIST_ADDRESS_COL, + NULL)); + gtk_tree_view_append_column + (clist_, + gtk_tree_view_column_new_with_attributes ("Bytecode", renderer, + "text", CLIST_BYTECODE_COL, + NULL)); + gtk_tree_view_append_column + (clist_, + gtk_tree_view_column_new_with_attributes ("Source", renderer, + "text", CLIST_CODE_COL, + NULL)); + + if (gtk_stock_lookup (GTK_STOCK_STOP, &item)) { - g_warning (_("Wrong color spec: %s\n"), str); - return NULL; + bp_stock_id_ = item.stock_id; } - - return &color; -} -static const gchar * -color_to_string_ (const GdkColor *color) -{ - enum {LEN = 100}; - static gchar buffer[LEN]; - g_snprintf (buffer, LEN, "%hd %hd %hd", - color->red, color->green, color->blue); - return buffer; -} + if (gtk_stock_lookup (GTK_STOCK_GO_FORWARD, &item)) + { + pc_stock_id_ = item.stock_id; + } -static gboolean -init_color_ (GdkColor *c, const gchar *name) -{ - return (gdk_color_parse (name, c) && - gdk_colormap_alloc_color (colormap_, c, FALSE, TRUE)); + return TRUE; } + /* initialise the mixal widgets */ gboolean mixgtk_mixal_init (mix_vm_t *vm, mixgtk_dialog_id_t top) { static gboolean restart = FALSE; - int i,j; - + g_return_val_if_fail (vm != NULL, FALSE); vm_ = vm; - clist_ = GTK_CLIST (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_MIXAL)); - g_return_val_if_fail (clist_ != NULL, FALSE); - + + if (!init_clist_ (top)) return FALSE; + if (!mixgtk_config_is_split ()) status_ = GTK_STATUSBAR (mixgtk_widget_factory_get (MIXGTK_MAIN, MIXGTK_WIDGET_STATUSBAR)); else status_ = GTK_STATUSBAR (mixgtk_widget_factory_get_child_by_name (top, LOCAL_STATUS_BAR_)); - + g_return_val_if_fail (status_ != NULL, FALSE); status_context_ = gtk_statusbar_get_context_id (status_, "MIXAL status"); - - symbols_dlg_ = symbols_clist_ = NULL; - - /* allocate colors */ - colormap_ = gtk_widget_get_colormap (GTK_WIDGET (clist_)); - for (i = 0; i < 3; ++i) - for (j = 0; j < 2; ++j) - { - const gchar *ccol = mixgtk_config_get (keys_[i][j]); - const GdkColor *color = NULL; - if (ccol && (color = parse_color_ (ccol))) - { - mixgtk_mixal_set_color (i, j, color); - } - else - { - g_return_val_if_fail (init_color_ - (&colors_[i][j], default_colors_[i][j]), - FALSE); - } - } + + symbols_dlg_ = NULL; + symbols_view_ = NULL; + + g_signal_connect (G_OBJECT (clist_), "event", + G_CALLBACK (mixal_event_), NULL); if (restart) mixgtk_mixal_load_file (); else restart = TRUE; - - return TRUE; -} - -/* set the plain, location pointer and break colors */ -void -mixgtk_mixal_set_color (mixal_line_t line, mixal_line_zone_t zone, - const GdkColor *color) -{ - g_return_if_fail (color != NULL); - g_return_if_fail (line <= MIXAL_LINE_PLAIN); - g_return_if_fail (zone <= MIXAL_LINE_FG); - colors_[line][zone].red = color->red; - colors_[line][zone].green = color->green; - colors_[line][zone].blue = color->blue; - gdk_colormap_alloc_color (colormap_, &colors_[line][zone], FALSE, TRUE); - mixgtk_mixal_update_bp_all (); - mixgtk_config_update (keys_[line][zone], - color_to_string_(&colors_[line][zone])); -} -const GdkColor * -mixgtk_mixal_get_color (mixal_line_t line, mixal_line_zone_t zone) -{ - g_return_val_if_fail (line <= MIXAL_LINE_PLAIN, FALSE); - g_return_val_if_fail (zone <= MIXAL_LINE_FG, FALSE); - return &colors_[line][zone]; + return TRUE; } /* load the corresponding mixal file */ @@ -241,180 +282,250 @@ update_tips_ (const mix_symbol_table_t *table, void mixgtk_mixal_load_file (void) { - enum {ADDR_SIZE = 20, CONT_SIZE = 200}; - static gchar ADDR[ADDR_SIZE], CONT[CONT_SIZE]; - static gchar *TEXT[] = {ADDR, CONT}; - static gchar *NULL_TEXT[] = {NULL, NULL}; - + enum {ADDR_SIZE = 20, CONT_SIZE = 200, WORD_SIZE = 20}; + static gchar ADDR[ADDR_SIZE], CONT[CONT_SIZE], WORD[WORD_SIZE]; + const mix_src_file_t *file; - + GtkTreeIter iter; + g_assert (vm_); g_assert (clist_); - - gtk_clist_clear (clist_); + + gtk_list_store_clear (clist_store_); + if (tips_text_) + { + g_ptr_array_free (tips_text_, TRUE); + tips_text_ = NULL; + } + file = mix_vm_get_src_file (vm_); if (file != NULL) { gint k; + mix_address_t addr; const mix_symbol_table_t *table = mix_vm_get_symbol_table (vm_); - + + if (table) tips_text_ = g_ptr_array_new (); + lineno_ = mix_src_file_get_line_no (file); - if (tips_text_) g_ptr_array_free (tips_text_, TRUE); - tips_text_ = g_ptr_array_new (); - gtk_clist_freeze (clist_); + for (k = 0; k < lineno_; ++k) { - const gchar *line = mix_src_file_get_line (file, k + 1); - - g_snprintf (CONT, CONT_SIZE, "%03d: %s", k + 1, line); + gchar *line = + g_strchomp ((gchar *)mix_src_file_get_line (file, k + 1)); + + g_snprintf (CONT, CONT_SIZE, " %03d: %s", k + 1, line); addr = mix_vm_get_lineno_address (vm_, k + 1); if (addr != MIX_VM_CELL_NO) { - g_snprintf (ADDR, ADDR_SIZE, "%04d: ", - mix_short_magnitude (addr)); + g_snprintf (ADDR, ADDR_SIZE, "%04d", mix_short_magnitude (addr)); mix_word_print_to_buffer (mix_vm_get_addr_contents (vm_, addr), - ADDR + strlen (ADDR)); + WORD); } else - ADDR[0] = '\0'; - gtk_clist_append (clist_, TEXT); - gtk_clist_set_row_data (clist_, k, GINT_TO_POINTER - (mix_short_magnitude (addr))); - if (table) update_tips_ (table, line); - + { + g_snprintf (ADDR, ADDR_SIZE, _("N/A")); + g_snprintf (WORD, WORD_SIZE, _("N/A")); + } + gtk_list_store_append (clist_store_, &iter); + gtk_list_store_set (clist_store_, &iter, + CLIST_ADDRESS_NO_COL, mix_short_magnitude (addr), + CLIST_LINE_NO_COL, k + 1, + CLIST_ADDRESS_COL, ADDR, + CLIST_CODE_COL, CONT, + CLIST_BYTECODE_COL, WORD, + CLIST_BP_SIZE_COL, bp_stock_size_, + -1); + if (table) update_tips_ (table, line); } if (table) fill_symbols_ (table); - gtk_clist_append (clist_, NULL_TEXT); - gtk_clist_set_row_data (clist_, k, GINT_TO_POINTER (MIX_VM_CELL_NO)); - gtk_clist_unselect_row (clist_, 0, 0); - gtk_clist_thaw (clist_); } else - lineno_ = 0; + { + lineno_ = 0; + gtk_list_store_append (clist_store_, &iter); + gtk_list_store_set (clist_store_, &iter, + CLIST_ADDRESS_NO_COL, MIX_VM_CELL_NO, + CLIST_LINE_NO_COL, 0, + CLIST_ADDRESS_COL, "", + CLIST_CODE_COL, _("Source not available"), + CLIST_BYTECODE_COL, "", + -1); + } } /* update the widgets */ +static gint +find_address_ (gint address) +{ + GtkTreeIter iter; + gint addr; + gint row = 0; + gboolean valid = + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (clist_store_), &iter); + + while (valid) + { + ++row; + gtk_tree_model_get (GTK_TREE_MODEL (clist_store_), &iter, + CLIST_ADDRESS_NO_COL, &addr, -1); + if (addr == address) return row; + valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (clist_store_), &iter); + } + return 0; +} + static void -reset_bg_ (gint row) +update_bp_ (gint row) { - gint addr = GPOINTER_TO_INT (gtk_clist_get_row_data (clist_, row)); - gboolean isset = mix_vm_has_breakpoint_at_address (vm_, addr); - gtk_clist_set_background (clist_, row, - isset ? &colors_[MIXAL_LINE_BREAK][MIXAL_LINE_BG]: - &colors_[MIXAL_LINE_PLAIN][MIXAL_LINE_BG]); - gtk_clist_set_foreground (clist_, row, - isset ? &colors_[MIXAL_LINE_BREAK][MIXAL_LINE_FG]: - &colors_[MIXAL_LINE_PLAIN][MIXAL_LINE_FG]); + if (row > 0) + { + GtkTreePath *path = gtk_tree_path_new_from_indices (row - 1, -1); + GtkTreeIter iter; + + if (gtk_tree_model_get_iter (GTK_TREE_MODEL (clist_store_), &iter, path)) + { + gint address; + const gchar *id = NULL; + + gtk_tree_model_get (GTK_TREE_MODEL (clist_store_), &iter, + CLIST_ADDRESS_NO_COL, &address, -1); + if (mix_vm_has_breakpoint_at_address (vm_, address)) + id = bp_stock_id_; + else if (address == + (gint) mix_short_magnitude (mix_vm_get_prog_count (vm_))) + id = pc_stock_id_; + + gtk_list_store_set (clist_store_, &iter, CLIST_BP_ID_COL, id, -1); + } + gtk_tree_path_free (path); + } } - + static void select_row_ (gint row) { - static gint last = -1; - - gtk_clist_set_background (clist_, row, &colors_[MIXAL_LINE_LOC][MIXAL_LINE_BG]); - gtk_clist_set_foreground (clist_, row, &colors_[MIXAL_LINE_LOC][MIXAL_LINE_FG]); - if (gtk_clist_row_is_visible (clist_, row) != GTK_VISIBILITY_FULL) - gtk_clist_moveto (clist_, row, 0, 0.25, 0); - if (last != -1 && last != row) reset_bg_ (last); - last = row; + static gint previous = 0; + + if (row > 0 && previous != row) + { + GtkTreePath *path = gtk_tree_path_new_from_indices (row - 1, -1); + GtkTreeIter iter; + + if (gtk_tree_model_get_iter (GTK_TREE_MODEL (clist_store_), &iter, path)) + { + gtk_list_store_set (clist_store_, &iter, + CLIST_BP_ID_COL, pc_stock_id_, + -1); + update_bp_ (previous); + previous = row; + gtk_tree_view_scroll_to_cell (clist_, path, NULL, FALSE, 0.3, 0); + } + gtk_tree_path_free (path); + } } void mixgtk_mixal_update (void) { gint addr = 0; - gint k = 0; - + g_assert (vm_); - g_assert (clist_); - - addr = mix_short_magnitude (mix_vm_get_prog_count (vm_)); - k = gtk_clist_find_row_from_data (clist_, GINT_TO_POINTER (addr)); - select_row_ (k); + + addr = (gint) mix_short_magnitude (mix_vm_get_prog_count (vm_)); + select_row_ (find_address_ (addr)); } /* breakpoints */ void mixgtk_mixal_update_bp_at_address (guint addr) { - gint k; - - g_assert (vm_); - g_assert (clist_); - - k = gtk_clist_find_row_from_data (clist_, GINT_TO_POINTER (addr)); - reset_bg_ (k); + update_bp_ (find_address_ ((gint)addr)); } void mixgtk_mixal_update_bp_at_line (guint line) { - if ( line < 1 ) return; - - while (line < lineno_) - { - gint addr = GPOINTER_TO_INT (gtk_clist_get_row_data (clist_, line - 1)); - if (addr != MIX_VM_CELL_NO) break; - ++line; - } - reset_bg_ (line - 1); + update_bp_ ((gint)line); } void -mixgtk_mixal_update_bp_all () +mixgtk_mixal_update_bp_all (void) { - gint k, addr; - for (k = 0; k < lineno_; ++k) reset_bg_ (k); - addr = mix_vm_get_prog_count (vm_); - k = gtk_clist_find_row_from_data (clist_, GINT_TO_POINTER (addr)); - select_row_ (k); + gint k; + for (k = 1; k <= lineno_; ++k) update_bp_ (k); + mixgtk_mixal_update (); } /* callbacks */ -void -on_mixal_select_row (GtkWidget *w, gint row, gint col, GdkEventButton *e, - gpointer data) +static void +mixal_row_clicked_ (GtkTreeIter *iter) { - gboolean isset; - gint addr, pc; - - gtk_clist_unselect_row (clist_, row, col); - addr = GPOINTER_TO_INT (gtk_clist_get_row_data (clist_, row)); - pc = mix_vm_get_prog_count (vm_); + + gint addr = MIX_VM_CELL_NO; + gtk_tree_model_get (GTK_TREE_MODEL (clist_store_), + iter, CLIST_ADDRESS_NO_COL, &addr, -1); + if (addr < MIX_VM_CELL_NO) { - isset = mix_vm_has_breakpoint_at_address (vm_, addr); + gboolean isset = mix_vm_has_breakpoint_at_address (vm_, addr); if (isset) - mix_vm_clear_breakpoint_address (vm_, addr); + mix_vm_clear_breakpoint_address (vm_, addr); else - mix_vm_set_breakpoint_address (vm_, addr); - reset_bg_ (row); + mix_vm_set_breakpoint_address (vm_, addr); + update_bp_ (find_address_ (addr)); } } -gint -on_mixal_motion_notify_event (GtkWidget *list, GdkEventMotion *event, - gpointer data) +static void +mixal_motion_ (GtkTreeIter *iter) { static gint last_row = 0; static guint last_message = 0; - gint row = last_row, col = 0; - if (gtk_clist_get_selection_info (clist_, event->x, event->y, &row, &col) - && row != last_row && tips_text_) + + gint row = last_row; + + gtk_tree_model_get (GTK_TREE_MODEL (clist_store_), iter, + CLIST_LINE_NO_COL, &row, -1); + + if (row > 0 && row != last_row && tips_text_) { const gchar *msg = NULL; last_row = row; if (last_message) - gtk_statusbar_remove (status_, status_context_, last_message); - msg = (const gchar *)g_ptr_array_index (tips_text_, row); + gtk_statusbar_remove (status_, status_context_, last_message); + msg = (const gchar *)g_ptr_array_index (tips_text_, row - 1); if (msg) - last_message = gtk_statusbar_push (status_, status_context_, msg); + last_message = gtk_statusbar_push (status_, status_context_, msg); else - last_message = 0; - } + last_message = 0; + } +} + +static gboolean +mixal_event_ (GtkWidget *w, GdkEvent *event, gpointer data) +{ + GdkEventType type = event->type; + if ((type == GDK_BUTTON_PRESS || type == GDK_MOTION_NOTIFY) + && (gtk_tree_view_get_bin_window (clist_) == event->any.window)) + { + gdouble x = (type == GDK_BUTTON_PRESS)? event->button.x : event->motion.x; + gdouble y = (type == GDK_BUTTON_PRESS)? event->button.y : event->motion.y; + GtkTreeIter iter; + GtkTreePath *path = NULL; + GtkTreeViewColumn *col = NULL; + if (gtk_tree_view_get_path_at_pos (clist_, x, y, &path, &col, NULL, NULL) + && gtk_tree_model_get_iter (GTK_TREE_MODEL (clist_store_), + &iter, path)) + { + if (type == GDK_BUTTON_PRESS) mixal_row_clicked_ (&iter); + else mixal_motion_ (&iter); + } + if (path) gtk_tree_path_free (path); + return TRUE; + } return FALSE; } -- cgit v1.2.3