Branch: refs/heads/master Author: Alexander Petukhov devel@apetukhov.ru Committer: Alexander Petukhov devel@apetukhov.ru Date: Wed, 04 Apr 2012 19:38:53 Commit: 57b4736aa5ff7d4793292d3b7831176a08994626 https://github.com/geany/geany-plugins/commit/57b4736aa5ff7d4793292d3b783117...
Log Message: ----------- fixes several bugs (see changelog)
Modified Paths: -------------- debugger/ChangeLog debugger/TODO debugger/src/callbacks.c debugger/src/cell_renderers/cellrendererbreakicon.c debugger/src/cell_renderers/cellrendererframeicon.c debugger/src/cell_renderers/cellrenderertoggle.c debugger/src/debug.c debugger/src/stree.c debugger/src/stree.h
Modified: debugger/ChangeLog 2 files changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -5,6 +5,8 @@ * handling spaces in target and breakpoints filenames (gdb) * fixing memory leaks on gtk_tree_row_reference_get_path and tree/list stores * fixing SIGSEGV when selecting a cell in custom cell renderers using a keyboard + * fixing lack of breakpoint/stack frame markers after plugin unload and load + * fixing "jump to current instruction" behaviour (does not change an active frame)
10-03-2012 Alexander Petukhov devel@apetukhov.ru
Modified: debugger/TODO 2 files changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -1,7 +1,5 @@ BUGS: - tooltip appears even if a pointer in no longer inside editor window -- when "Jump to current instruction" - two active frame icons in stack view -- no icons in stack and breaks after unload/load plugin
FEATURES: - custom tooltip with sticking facilities
Modified: debugger/src/callbacks.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -330,7 +330,7 @@ gboolean keys_callback(guint key_id) { debug_jump_to_current_instruction(); gtk_widget_set_sensitive(tab_call_stack, FALSE); - stree_select_first_frame(); + stree_select_first_frame(FALSE); gtk_widget_set_sensitive(tab_call_stack, TRUE); } }
Modified: debugger/src/cell_renderers/cellrendererbreakicon.c 42 files changed, 25 insertions(+), 17 deletions(-) =================================================================== @@ -415,24 +415,32 @@ GType cell_renderer_break_icon_get_type(void) if(0 == cell_break_icon_type) { - static const GTypeInfo cell_break_icon_info = + if ( (cell_break_icon_type = g_type_from_name("CellRendererBreakIcon")) ) { - sizeof (CellRendererBreakIconClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) cell_renderer_break_icon_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (CellRendererBreakIcon), - 0, /* n_preallocs */ - (GInstanceInitFunc) cell_renderer_break_icon_init, - }; - - /* Derive from GtkCellRenderer */ - cell_break_icon_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, - "CellRendererBreakIcon", - &cell_break_icon_info, - 0); + parent_class = g_type_class_peek_static(g_type_parent(cell_break_icon_type)); + clicked_signal = g_signal_lookup("clicked", cell_break_icon_type); + } + else + { + static const GTypeInfo cell_break_icon_info = + { + sizeof (CellRendererBreakIconClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) cell_renderer_break_icon_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (CellRendererBreakIcon), + 0, /* n_preallocs */ + (GInstanceInitFunc) cell_renderer_break_icon_init, + }; + + /* Derive from GtkCellRenderer */ + cell_break_icon_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, + "CellRendererBreakIcon", + &cell_break_icon_info, + 0); + } } return cell_break_icon_type;
Modified: debugger/src/cell_renderers/cellrendererframeicon.c 42 files changed, 25 insertions(+), 17 deletions(-) =================================================================== @@ -315,24 +315,32 @@ GType cell_renderer_frame_icon_get_type(void) if(0 == cell_frame_icon_type) { - static const GTypeInfo cell_frame_icon_info = + if ( (cell_frame_icon_type = g_type_from_name("CellRendererFrameIcon")) ) { - sizeof (CellRendererFrameIconClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) cell_renderer_frame_icon_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (CellRendererFrameIcon), - 0, /* n_preallocs */ - (GInstanceInitFunc) cell_renderer_frame_icon_init, - }; - - /* Derive from GtkCellRenderer */ - cell_frame_icon_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, - "CellRendererFrameIcon", - &cell_frame_icon_info, - 0); + parent_class = g_type_class_peek_static(g_type_parent(cell_frame_icon_type)); + clicked_signal = g_signal_lookup("clicked", cell_frame_icon_type); + } + else + { + static const GTypeInfo cell_frame_icon_info = + { + sizeof (CellRendererFrameIconClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) cell_renderer_frame_icon_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (CellRendererFrameIcon), + 0, /* n_preallocs */ + (GInstanceInitFunc) cell_renderer_frame_icon_init, + }; + + /* Derive from GtkCellRenderer */ + cell_frame_icon_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, + "CellRendererFrameIcon", + &cell_frame_icon_info, + 0); + } } return cell_frame_icon_type;
Modified: debugger/src/cell_renderers/cellrenderertoggle.c 8 files changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -70,9 +70,9 @@ static void cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class) */ GType cell_renderer_toggle_get_type(void) { - static GType cell_brekpoint_type = 0; + static GType cell_break_toggle_type = 0; - if(0 == cell_brekpoint_type) + if(0 == cell_break_toggle_type && !(cell_break_toggle_type = g_type_from_name("CellRendererToggle"))) { static const GTypeInfo cell_file_info = { @@ -88,13 +88,13 @@ GType cell_renderer_toggle_get_type(void) };
/* Derive from GtkToggleCellRenderer */ - cell_brekpoint_type = g_type_register_static (GTK_TYPE_CELL_RENDERER_TOGGLE, + cell_break_toggle_type = g_type_register_static (GTK_TYPE_CELL_RENDERER_TOGGLE, "CellRendererToggle", &cell_file_info, 0); } - return cell_brekpoint_type; + return cell_break_toggle_type; }
/*
Modified: debugger/src/debug.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -679,7 +679,7 @@ static void on_debugger_stopped (int thread_id) stree_add(f); iter = g_list_next(iter); } - stree_select_first_frame(); + stree_select_first_frame(TRUE);
/* files */ GList *files = active_module->get_files();
Modified: debugger/src/stree.c 12 files changed, 7 insertions(+), 5 deletions(-) =================================================================== @@ -136,7 +136,7 @@ static gboolean on_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean key } else if (column == gtk_tree_view_get_column(GTK_TREE_VIEW(widget), S_ADRESS && bx >= start_pos && bx < start_pos + width)) { - gtk_tooltip_set_text(tooltip, gtk_tree_path_get_indices(tpath)[1] == active_frame_index ? _("Active frame") : _("Switch to a frame")); + gtk_tooltip_set_text(tooltip, gtk_tree_path_get_indices(tpath)[1] == active_frame_index ? _("Active frame") : _("Click an arrow to switch to a frame")); gtk_tree_view_set_tooltip_row(GTK_TREE_VIEW(widget), tooltip, tpath); show = TRUE; } @@ -440,7 +440,7 @@ void stree_clear() /* * select first frame in the stack */ -void stree_select_first_frame() +void stree_select_first_frame(gboolean make_active) { gtk_tree_view_expand_all(GTK_TREE_VIEW(tree)); @@ -451,7 +451,11 @@ void stree_select_first_frame() gtk_tree_path_free(active_path); if(gtk_tree_model_iter_children(model, &frame_iter, &thread_iter)) { - gtk_tree_store_set (store, &frame_iter, S_ACTIVE, TRUE, -1); + if (make_active) + { + gtk_tree_store_set (store, &frame_iter, S_ACTIVE, TRUE, -1); + active_frame_index = 0; + }
GtkTreePath* path = gtk_tree_model_get_path(model, &frame_iter); @@ -460,8 +464,6 @@ void stree_select_first_frame() path);
gtk_tree_path_free(path); - - active_frame_index = 0; } }
Modified: debugger/src/stree.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -28,7 +28,7 @@ void stree_add_thread(int thread_id); void stree_remove_thread(int thread_id);
-void stree_select_first_frame(); +void stree_select_first_frame(gboolean make_active); void stree_remove_frames();
void stree_set_active_thread_id(int thread_id);
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
plugins-commits@lists.geany.org