Branch: refs/heads/master Author: Dimitar Zhekov dimitar.zhekov@gmail.com Committer: Dimitar Zhekov dimitar.zhekov@gmail.com Date: Thu, 21 Feb 2013 17:10:36 UTC Commit: ad6271ff07a8e61f03261947eadd8319afadb283 https://github.com/geany/geany-plugins/commit/ad6271ff07a8e61f03261947eadd83...
Log Message: ----------- scope - fixed inspect display empty value and default tooltips_fail_action
Modified Paths: -------------- scope/ChangeLog scope/data/scope.glade scope/docs/scope.html scope/src/inspect.c scope/src/prefs.c scope/src/scope.c
Modified: scope/ChangeLog 14 files changed, 14 insertions(+), 0 deletions(-) =================================================================== @@ -1,3 +1,17 @@ +2013-02-21 Dimitar Zhekov dimitar.zhekov@gmail.com + + * src/inspect.c: + Unified inspect display, fixing empty "value" looking identical to + unapplied variable. + * src/prefs.c: + Fixed the default value for tooltips_fail_action. + * scope.glade: + Inspect -> Format -> s/binary/Binary/. + * scope.html: + Small fixes. + * docs/scope.html, src/scope.c: + Increased version to 0.84. + 2013-01-31 Enrico Tröger enrico.troeger@uvena.de
* src/gtk216.c:
Modified: scope/data/scope.glade 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1137,7 +1137,7 @@ <child> <object class="GtkRadioMenuItem" id="inspect_format_binary"> <property name="visible">True</property> - <property name="label" translatable="yes">_binary</property> + <property name="label" translatable="yes">_Binary</property> <property name="use_underline">True</property> <property name="group">inspect_format_natural</property> </object>
Modified: scope/docs/scope.html 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -552,7 +552,7 @@ <p><em>pref_tooltips_length</em> - maximum length of a tooltip message, 0 = unlimited. Default = 2048.</p>
-<p><em>memory_line_bytes</em></p> - maximum bytes per <em>Memory</em> line</p>. +<p><em>memory_line_bytes</em></p> - maximum bytes per <em>Memory</em> line.</p>
<p>[terminal] (*nix only)</p> @@ -562,7 +562,7 @@ <p><em>save_pos</em> - auto save window position and widget size</p>
<p><em>padding</em> - whether <em>width</em> and <em>height</em> include the extra VTE widget -padding. If <em>save_pos</em> is active, it will save them with the padding.</p> +padding. If <em>save_pos</em> is active, they will be saved with the padding.</p>
<p>[disabled_break], [enabled_break], [execution_line]</p>
@@ -704,7 +704,7 @@
<b><a name="copyright">Copyright</a></b>
-<p>Scope 0.83, Copyright (C) 2013 Dimitar Toshkov Zhekov</p> +<p>Scope 0.84, Copyright (C) 2013 Dimitar Toshkov Zhekov</p>
<p>The menu and toolbar icons are from <a href="http://netbeans.org">Netbeans</a>, except for BreakPoint.</p>
Modified: scope/src/inspect.c 49 files changed, 25 insertions(+), 24 deletions(-) =================================================================== @@ -231,11 +231,13 @@ static void on_inspect_row_deleted(GtkTreeModel *model, GtkTreePath *path,
static const MenuItem *apply_item;
-static void inspect_redisplay(GtkTreeIter *iter, ParseVariable *var) +static gchar *inspect_redisplay(GtkTreeIter *iter, const char *value, gchar *display) { - gtk_tree_model_get(model, iter, INSPECT_HB_MODE, &var->hb_mode, -1); - g_free(var->display); - var->display = utils_get_display_from_7bit(var->value, var->hb_mode); + gint hb_mode; + + gtk_tree_model_get(model, iter, INSPECT_HB_MODE, &hb_mode, -1); + g_free(display); + return value && *value ? utils_get_display_from_7bit(value, hb_mode) : g_strdup("??"); }
static gint inspect_variable_store(GtkTreeIter *iter, const ParseVariable *var) @@ -244,9 +246,8 @@ static gint inspect_variable_store(GtkTreeIter *iter, const ParseVariable *var) gboolean expand;
gtk_tree_model_get(model, iter, INSPECT_EXPAND, &expand, INSPECT_FORMAT, &format, -1); - gtk_tree_store_set(store, iter, INSPECT_VAR1, var->name, INSPECT_DISPLAY, - var->display ? var->display : "??", INSPECT_VALUE, var->value, INSPECT_NUMCHILD, - var->numchild, -1); + gtk_tree_store_set(store, iter, INSPECT_VAR1, var->name, INSPECT_DISPLAY, var->display, + INSPECT_VALUE, var->value, INSPECT_NUMCHILD, var->numchild, -1);
if (var->numchild) { @@ -272,7 +273,7 @@ void on_inspect_variable(GArray *nodes) gint format;
parse_variable(nodes, &var, "numchild"); - inspect_redisplay(&iter, &var); + var.display = inspect_redisplay(&iter, var.value, var.display); remove_children(&iter);
if ((format = inspect_variable_store(&iter, &var)) != FORMAT_NATURAL) @@ -298,18 +299,15 @@ void on_inspect_format(GArray *nodes) if (!strcmp(inspect_formats[format], s)) break;
- iff (value && format < FORMAT_COUNT, "no value or bad format") + iff (format < FORMAT_COUNT, "bad format") { const char *token = parse_grab_token(nodes); GtkTreeIter iter;
if (inspect_find(&iter, FALSE, token)) { - gchar *display; - gint hb_mode; + gchar *display = inspect_redisplay(&iter, value, NULL);
- gtk_tree_model_get(model, &iter, INSPECT_HB_MODE, &hb_mode, -1); - display = utils_get_display_from_7bit(value, hb_mode); gtk_tree_store_set(store, &iter, INSPECT_DISPLAY, display, INSPECT_VALUE, &value, INSPECT_FORMAT, format, -1); g_free(display); @@ -449,7 +447,7 @@ static void inspect_node_change(const ParseNode *node, G_GNUC_UNUSED gpointer gd } else { - inspect_redisplay(&iter, &var); + var.display = inspect_redisplay(&iter, var.value, var.display);
if (var.children) { @@ -458,9 +456,8 @@ static void inspect_node_change(const ParseNode *node, G_GNUC_UNUSED gpointer gd } else { - gtk_tree_store_set(store, &iter, INSPECT_DISPLAY, - var.display ? var.display : "??", INSPECT_VALUE, - var.value, -1); + gtk_tree_store_set(store, &iter, INSPECT_DISPLAY, var.display, + INSPECT_VALUE, var.value, -1); } } } @@ -882,15 +879,19 @@ static void on_inspect_hbit_display(const MenuItem *menu_item)
static void inspect_hbit_update_iter(GtkTreeIter *iter, gint hb_mode) { - char *value; - gchar *display; + char *var1, *value;
- gtk_tree_model_get(model, iter, INSPECT_VALUE, &value, -1); - display = utils_get_display_from_7bit(value, hb_mode); - gtk_tree_store_set(store, iter, INSPECT_HB_MODE, hb_mode, value ? INSPECT_DISPLAY : -1, - display, -1); + gtk_tree_model_get(model, iter, INSPECT_VAR1, &var1, INSPECT_VALUE, &value, -1); + gtk_tree_store_set(store, iter, INSPECT_HB_MODE, hb_mode, -1); + + if (var1) + { + gchar *display = inspect_redisplay(iter, value, NULL); + gtk_tree_store_set(store, iter, INSPECT_DISPLAY, display, -1); + g_free(display); + } + g_free(var1); g_free(value); - g_free(display); }
static void on_inspect_hbit_update(const MenuItem *menu_item)
Modified: scope/src/prefs.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -290,7 +290,7 @@ void prefs_init(void) stash_group_add_integer(group, &pref_panel_tab_pos, "panel_tab_pos", GTK_POS_TOP); stash_group_add_integer(group, &pref_show_recent_items, "show_recent_items", 10); stash_group_add_integer(group, &pref_show_toolbar_items, "show_toolbar_items", 0xFF); - stash_group_add_integer(group, &pref_tooltips_fail_action, "tooltips_fail_action", 25); + stash_group_add_integer(group, &pref_tooltips_fail_action, "tooltips_fail_action", 0); stash_group_add_integer(group, &pref_tooltips_send_delay, "tooltips_send_delay", 25); stash_group_add_integer(group, &pref_tooltips_length, "tooltips_length", 2048); stash_group_add_integer(group, &pref_memory_bytes_per_line, "memory_line_bytes", 16);
Modified: scope/src/scope.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -32,7 +32,7 @@ PLUGIN_VERSION_CHECK(215)
PLUGIN_SET_TRANSLATABLE_INFO(LOCALEDIR, GETTEXT_PACKAGE, _("Scope Debugger"), - _("Simple GDB front-end."), "0.83" , "Dimitar Toshkov Zhekov dimitar.zhekov@gmail.com") + _("Simple GDB front-end."), "0.84" , "Dimitar Toshkov Zhekov dimitar.zhekov@gmail.com")
/* Keybinding(s) */ enum
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org