[Swfdec] Branch 'as' - 2 commits - player/swfdec_debug_script.c player/swfdec_player_manager.c

Benjamin Otte company at kemper.freedesktop.org
Wed Jun 20 12:41:56 PDT 2007


 player/swfdec_debug_script.c   |    1 +
 player/swfdec_player_manager.c |   15 +++++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

New commits:
diff-tree c2f03c4e831f4c314a9f61fdac1273b55bc019c9 (from ec0d68890cf216a2dc1ffd42deea08c5dff1d0a5)
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Jun 20 21:29:56 2007 +0200

    when setting a breakpoint to the start of every function, make sure the function has a body
    
    This triggers an assertion otherwise

diff --git a/player/swfdec_player_manager.c b/player/swfdec_player_manager.c
index cb3e7b0..966c170 100644
--- a/player/swfdec_player_manager.c
+++ b/player/swfdec_player_manager.c
@@ -442,12 +442,6 @@ command_continue (SwfdecPlayerManager *m
 }
 
 static void
-set_breakpoint (gpointer script, gpointer debugger)
-{
-  swfdec_debugger_set_breakpoint (debugger, script, 0);
-}
-
-static void
 command_next (SwfdecPlayerManager *manager, const char *arg)
 {
   if (!swfdec_player_manager_get_interrupted (manager))
@@ -457,6 +451,15 @@ command_next (SwfdecPlayerManager *manag
 }
 
 static void
+set_breakpoint (gpointer scriptp, gpointer debugger)
+{
+  SwfdecDebuggerScript *script = scriptp;
+
+  if (script->n_commands > 0)
+    swfdec_debugger_set_breakpoint (debugger, script, 0);
+}
+
+static void
 command_break (SwfdecPlayerManager *manager, const char *arg)
 {
   char *str;
diff-tree ec0d68890cf216a2dc1ffd42deea08c5dff1d0a5 (from 9c5cb7cb9f6278896bc8a1e7cd7fb541b079c8de)
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Jun 20 21:26:24 2007 +0200

    limit the width of the description line
    
    Otherwise some long commands (most notable ConstantPool and Push) can expose
    bugs in the cell renderer when the lines get really long. And those result in
    the tree view not updating. Not funny.

diff --git a/player/swfdec_debug_script.c b/player/swfdec_debug_script.c
index aa64ac5..8b551ef 100644
--- a/player/swfdec_debug_script.c
+++ b/player/swfdec_debug_script.c
@@ -159,6 +159,7 @@ swfdec_debug_script_add_columns (GtkTree
   renderer = gtk_cell_renderer_text_new ();
   column = gtk_tree_view_column_new_with_attributes ("Command", renderer,
     "text", COLUMN_DESC, NULL);
+  g_object_set (renderer, "width-chars", 30, NULL);
   gtk_tree_view_column_set_sort_column_id (column, COLUMN_DESC);
   gtk_tree_view_column_set_resizable (column, TRUE);
   gtk_tree_view_append_column (treeview, column);


More information about the Swfdec mailing list