Revision: 2188 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2188&view=re... Author: cesspit Date: 2011-09-01 13:00:17 +0000 (Thu, 01 Sep 2011) Log Message: ----------- debugger: icon on a stack trace page, gui fixes, temporary disabled calltips as they seem to cause segfauts
Modified Paths: -------------- trunk/geany-plugins/debugger/src/bptree.h trunk/geany-plugins/debugger/src/callbacks.c trunk/geany-plugins/debugger/src/debug.c trunk/geany-plugins/debugger/src/stree.c trunk/geany-plugins/debugger/src/stree.h trunk/geany-plugins/debugger/src/tpage.c trunk/geany-plugins/debugger/src/vtree.c
Modified: trunk/geany-plugins/debugger/src/bptree.h =================================================================== --- trunk/geany-plugins/debugger/src/bptree.h 2011-08-31 22:24:52 UTC (rev 2187) +++ trunk/geany-plugins/debugger/src/bptree.h 2011-09-01 13:00:17 UTC (rev 2188) @@ -20,12 +20,12 @@ */
gboolean bptree_init(move_to_line_cb callback); -GtkWidget* bptree_get_widget(); +GtkWidget* bptree_get_widget(); void bptree_add_breakpoint(breakpoint* bp); void bptree_update_breakpoint(breakpoint* bp); void bptree_remove_breakpoint(breakpoint* bp); void bptree_set_condition(GtkTreeIter iter, gchar* condition); void bptree_set_hitscount(GtkTreeIter iter, int hitscount); void bptree_set_enabled(GtkTreeIter iter, gboolean enabled); -gchar* bptree_get_condition(GtkTreeIter iter); +gchar* bptree_get_condition(GtkTreeIter iter); void bptree_set_readonly(gboolean readonly);
Modified: trunk/geany-plugins/debugger/src/callbacks.c =================================================================== --- trunk/geany-plugins/debugger/src/callbacks.c 2011-08-31 22:24:52 UTC (rev 2187) +++ trunk/geany-plugins/debugger/src/callbacks.c 2011-09-01 13:00:17 UTC (rev 2188) @@ -231,7 +231,7 @@
if (word->len) { - gchar *calltip = debug_get_calltip_for_expression(word->str); + gchar *calltip = NULL;//debug_get_calltip_for_expression(word->str); if (calltip) { scintilla_send_message (editor->sci, SCI_CALLTIPSHOW, nt->position, (long)calltip);
Modified: trunk/geany-plugins/debugger/src/debug.c =================================================================== --- trunk/geany-plugins/debugger/src/debug.c 2011-08-31 22:24:52 UTC (rev 2187) +++ trunk/geany-plugins/debugger/src/debug.c 2011-09-01 13:00:17 UTC (rev 2188) @@ -662,7 +662,7 @@ while (iter) { frame *f = (frame*)iter->data; - stree_add(f); + stree_add(f, iter == stack); iter = g_list_next(iter); } stree_select_first(); @@ -1000,6 +1000,8 @@ g_list_free(stack); stack = NULL; } + + stree_destroy(); }
/*
Modified: trunk/geany-plugins/debugger/src/stree.c =================================================================== --- trunk/geany-plugins/debugger/src/stree.c 2011-08-31 22:24:52 UTC (rev 2187) +++ trunk/geany-plugins/debugger/src/stree.c 2011-09-01 13:00:17 UTC (rev 2188) @@ -34,6 +34,8 @@ #include "breakpoint.h" #include "debug_module.h"
+#include "xpm/frame_current.xpm" + #include "geanyplugin.h" extern GeanyFunctions *geany_functions; extern GeanyPlugin *geany_plugin; @@ -44,9 +46,12 @@ #define MW_FILE 0 #define MW_LINE 4
+#define ARROW_PADDING 10 + /* Tree view columns */ enum { + S_ARROW, S_ADRESS, S_FUNCTION, S_FILEPATH, @@ -68,6 +73,9 @@ /* flag to indicate whether to handle selection change */ static gboolean handle_selection = TRUE;
+/* pixbuf with the frame arrow */ +GdkPixbuf *arrow_pixbuf = NULL; + /* * Handles same tree row click to open frame position */ @@ -159,10 +167,13 @@ gboolean stree_init(move_to_line_cb cb) { callback = cb; + + arrow_pixbuf = gdk_pixbuf_new_from_xpm_data(frame_current_xpm);
/* create tree view */ store = gtk_list_store_new ( S_N_COLUMNS, + GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, @@ -189,6 +200,13 @@ int char_width = get_char_width(tree);
+ /* arrow */ + renderer = gtk_cell_renderer_pixbuf_new (); + column = create_column("", renderer, FALSE, + gdk_pixbuf_get_width(arrow_pixbuf) + 2 * ARROW_PADDING, + "pixbuf", S_ARROW); + gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column); + /* adress */ header = _("Address"); renderer = gtk_cell_renderer_text_new (); @@ -242,7 +260,7 @@ /* * add frame to the tree view */ -void stree_add(frame *f) +void stree_add(frame *f, gboolean first) { GtkTreeIter iter; gtk_list_store_append (store, &iter); @@ -252,6 +270,13 @@ S_FILEPATH, f->file, S_LINE, f->line, -1); + + if (first) + { + gtk_list_store_set (store, &iter, + S_ARROW, arrow_pixbuf, + -1); + }
/* remember if we have source for this frame */ if (f->have_source && !GPOINTER_TO_INT(g_hash_table_lookup(frames, (gpointer)f->file))) @@ -284,3 +309,11 @@ gtk_tree_path_free(path); } + +/* + * called on plugin exit to free arrow pixbuffer + */ +void stree_destroy() +{ + g_object_unref(arrow_pixbuf); +}
Modified: trunk/geany-plugins/debugger/src/stree.h =================================================================== --- trunk/geany-plugins/debugger/src/stree.h 2011-08-31 22:24:52 UTC (rev 2187) +++ trunk/geany-plugins/debugger/src/stree.h 2011-09-01 13:00:17 UTC (rev 2188) @@ -20,8 +20,9 @@ */
gboolean stree_init(move_to_line_cb cb); +void stree_destroy(); GtkWidget* stree_get_widget(); -void stree_add(frame *f); +void stree_add(frame *f, gboolean first); void stree_clear(); void stree_select_first();
Modified: trunk/geany-plugins/debugger/src/tpage.c =================================================================== --- trunk/geany-plugins/debugger/src/tpage.c 2011-08-31 22:24:52 UTC (rev 2187) +++ trunk/geany-plugins/debugger/src/tpage.c 2011-09-01 13:00:17 UTC (rev 2188) @@ -105,14 +105,6 @@ }
/* - * tells config to update when target changes - */ -void on_target_changed (GtkEditable *editable, gpointer user_data) -{ - dconfig_set_changed(); -} - -/* * delete selected rows from env variables page */ void delete_selected_rows() @@ -507,6 +499,8 @@ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); gtk_entry_set_text(GTK_ENTRY(targetname), filename); g_free (filename); + + dconfig_set_changed(); } gtk_widget_destroy (dialog); } @@ -603,6 +597,7 @@
/* Target frame */ GtkWidget *_frame = gtk_frame_new(_("Target")); + gtk_frame_set_shadow_type(GTK_FRAME(_frame), GTK_SHADOW_NONE); GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
/* filename hbox */ @@ -610,7 +605,7 @@ gtk_container_set_border_width(GTK_CONTAINER(hbox), SPACING);
targetname = gtk_entry_new (); - g_signal_connect(G_OBJECT(targetname), "changed", G_CALLBACK (on_target_changed), NULL); + gtk_entry_set_editable(GTK_ENTRY(targetname), FALSE); button_browse = gtk_button_new_with_label(_("Browse")); g_signal_connect(G_OBJECT(button_browse), "clicked", G_CALLBACK (on_target_browse_clicked), NULL); @@ -732,7 +727,6 @@ */ void tpage_set_readonly(gboolean readonly) { - gtk_editable_set_editable (GTK_EDITABLE (targetname), !readonly); gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), !readonly); g_object_set (renderer_name, "editable", !readonly, NULL); gtk_widget_set_sensitive (button_browse, !readonly);
Modified: trunk/geany-plugins/debugger/src/vtree.c =================================================================== --- trunk/geany-plugins/debugger/src/vtree.c 2011-08-31 22:24:52 UTC (rev 2187) +++ trunk/geany-plugins/debugger/src/vtree.c 2011-09-01 13:00:17 UTC (rev 2188) @@ -34,7 +34,7 @@ #include "utils.h"
/* columns minumum width in characters */ -#define MIN_COLUMN_CHARS 15 +#define MIN_COLUMN_CHARS 20
/* * key pressed event
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org