lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
List overview
Plugins-Commits
January 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
plugins-commits@lists.geany.org
1 participants
33 discussions
Start a n
N
ew thread
[geany/geany-plugins] 73c7fc: WebHelper: Don't access ui_widgets, plugins are not supposed to use it
by Colomban Wendling
13 Jan '13
13 Jan '13
Branch: refs/heads/master Author: Colomban Wendling <ban(a)herbesfolles.org> Committer: Colomban Wendling <ban(a)herbesfolles.org> Date: Sun, 13 Jan 2013 14:56:08 UTC Commit: 73c7fcf0045a027b2dad2d791b297c7d2435b7c8
https://github.com/geany/geany-plugins/commit/73c7fcf0045a027b2dad2d791b297…
Log Message: ----------- WebHelper: Don't access ui_widgets, plugins are not supposed to use it Modified Paths: -------------- webhelper/src/gwh-browser.c Modified: webhelper/src/gwh-browser.c 18 files changed, 13 insertions(+), 5 deletions(-) =================================================================== @@ -76,6 +76,7 @@ struct _GwhBrowserPrivate GtkToolItem *item_reload; GtkToolItem *item_inspector; + GtkWidget *statusbar; gchar *hovered_link; }; @@ -647,6 +648,7 @@ static void inspector_set_detached (GwhBrowser *self, g_object_unref (self->priv->default_icon); } g_object_unref (self->priv->settings); + g_object_unref (self->priv->statusbar); g_free (self->priv->hovered_link); G_OBJECT_CLASS (gwh_browser_parent_class)->finalize (object); @@ -892,8 +894,7 @@ static void inspector_set_detached (GwhBrowser *self, static guint id = 0; if (id == 0) { - id = gtk_statusbar_get_context_id (GTK_STATUSBAR (ui_widgets.statusbar), - "gwh-browser-hovered-link"); + id = gtk_statusbar_get_context_id (statusbar, "gwh-browser-hovered-link"); } return id; @@ -905,7 +906,7 @@ static void inspector_set_detached (GwhBrowser *self, gchar *uri, GwhBrowser *self) { - GtkStatusbar *statusbar = GTK_STATUSBAR (ui_widgets.statusbar); + GtkStatusbar *statusbar = GTK_STATUSBAR (self->priv->statusbar); if (self->priv->hovered_link) { gtk_statusbar_pop (statusbar, get_statusbar_context_id (statusbar)); @@ -925,7 +926,7 @@ static void inspector_set_detached (GwhBrowser *self, GwhBrowser *self) { if (self->priv->hovered_link) { - GtkStatusbar *statusbar = GTK_STATUSBAR (ui_widgets.statusbar); + GtkStatusbar *statusbar = GTK_STATUSBAR (self->priv->statusbar); gtk_statusbar_pop (statusbar, get_statusbar_context_id (statusbar)); } @@ -937,7 +938,7 @@ static void inspector_set_detached (GwhBrowser *self, GwhBrowser *self) { if (self->priv->hovered_link) { - GtkStatusbar *statusbar = GTK_STATUSBAR (ui_widgets.statusbar); + GtkStatusbar *statusbar = GTK_STATUSBAR (self->priv->statusbar); gtk_statusbar_push (statusbar, get_statusbar_context_id (statusbar), self->priv->hovered_link); @@ -996,6 +997,13 @@ static void inspector_set_detached (GwhBrowser *self, : self->priv->paned), self->priv->inspector_view); + self->priv->statusbar = ui_lookup_widget (geany->main_widgets->window, "statusbar"); + if (self->priv->statusbar) { + g_object_ref (self->priv->statusbar); + } else { + /* in the unlikely case we can't get the Geany statusbar, fake one */ + self->priv->statusbar = gtk_statusbar_new (); + } self->priv->hovered_link = NULL; g_signal_connect (self, "notify::orientation", -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] c6e21b: scope - ask user for terminate on build actions
by Dimitar Zhekov
03 Jan '13
03 Jan '13
Branch: refs/heads/master Author: Dimitar Zhekov <dimitar.zhekov(a)gmail.com> Committer: Dimitar Zhekov <dimitar.zhekov(a)gmail.com> Date: Thu, 03 Jan 2013 18:33:21 UTC Commit: c6e21b1adc431b39b08e3a0ff40426b391f4d219
https://github.com/geany/geany-plugins/commit/c6e21b1adc431b39b08e3a0ff4042…
Log Message: ----------- scope - ask user for terminate on build actions Modified Paths: -------------- scope/ChangeLog scope/TODO scope/src/debug.c scope/src/scope.c Modified: scope/ChangeLog 10 files changed, 10 insertions(+), 0 deletions(-) =================================================================== @@ -1,3 +1,13 @@ +2013-01-03 Dimitar Zhekov <dimitar.zhekov(a)gmail.com> + + * src/debug.c, src/scope.c + Ask user whether to terminate debugging on build actions. + + * src/debug.c: + Ignore "Auto run/exit" on Terminate if neither an executable nor a + load script is specified. + + 2013-01-02 Dimitar Zhekov <dimitar.zhekov(a)gmail.com> * docs/codes.html, src/inspect.c, src/inspect.h, src/local.c, Modified: scope/TODO 8 files changed, 1 insertions(+), 7 deletions(-) =================================================================== @@ -1,17 +1,11 @@ various tests, source code checks etc. -ask user for terminate debugging on build actions - -sync gdb thread/frame with the selected ones? - -forbid deselect for threads and stack? - add clear icon to entries? not very useful test inspect new_numchild and in_scope changes (but with C, these do not seem to change) -don't remove [index] along if member names? +don't remove [index] along with member names? Format (natural, decimal...) for Watches? Modified: scope/src/debug.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -651,14 +651,14 @@ void on_debug_step_out(G_GNUC_UNUSED const MenuItem *menu_item) debug_send_thread("-exec-finish"); } -void on_debug_terminate(G_GNUC_UNUSED const MenuItem *menu_item) +void on_debug_terminate(const MenuItem *menu_item) { switch (debug_state()) { case DS_DEBUG : case DS_READY : { - if (!program_auto_run_exit) + if (menu_item && !debug_auto_exit) { debug_send_command(N, "kill"); break; Modified: scope/src/scope.c 10 files changed, 10 insertions(+), 0 deletions(-) =================================================================== @@ -389,6 +389,15 @@ static void on_geany_startup_complete(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED program_context_changed(); } +static void on_build_start(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED gpointer gdata) +{ + if (debug_state() != DS_INACTIVE && dialogs_show_question(_("Build action activated. " + "Terminate debugging?"))) + { + on_debug_terminate(NULL); + } +} + typedef struct _ScopeCallback /* we don't want callbacks on builder init failure */ { const char *name; @@ -407,6 +416,7 @@ static void on_geany_startup_complete(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED { "project-open", G_CALLBACK(on_project_open) }, { "project-close", G_CALLBACK(on_project_close) }, { "geany-startup-complete", G_CALLBACK(on_geany_startup_complete) }, + { "build-start", G_CALLBACK(on_build_start) }, { NULL, NULL } }; -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany-plugins] f79165: scope - mark all data views for update when a value is modified
by Dimitar Zhekov
03 Jan '13
03 Jan '13
Branch: refs/heads/master Author: Dimitar Zhekov <dimitar.zhekov(a)gmail.com> Committer: Dimitar Zhekov <dimitar.zhekov(a)gmail.com> Date: Thu, 03 Jan 2013 17:53:48 UTC Commit: f79165f314e091ba34b09738f425f15d1594328d
https://github.com/geany/geany-plugins/commit/f79165f314e091ba34b09738f425f…
Log Message: ----------- scope - mark all data views for update when a value is modified Modified Paths: -------------- scope/ChangeLog scope/NEWS scope/NOTES scope/docs/codes.html scope/docs/scope.html scope/src/inspect.c scope/src/inspect.h scope/src/local.c scope/src/local.h scope/src/menu.c scope/src/menu.h scope/src/parse.c scope/src/scope.c scope/src/thread.c scope/src/utils.c scope/src/utils.h scope/src/views.c scope/src/views.h scope/src/watch.c scope/src/watch.h Modified: scope/ChangeLog 15 files changed, 15 insertions(+), 0 deletions(-) =================================================================== @@ -1,3 +1,18 @@ +2013-01-02 Dimitar Zhekov <dimitar.zhekov(a)gmail.com> + + * docs/codes.html, src/inspect.c, src/inspect.h, src/local.c, + src/local.h, src/menu.c, src/menu.h, src/parse.c, src/views.c, + src/views.h, src/watch.c, src/watch.h: + Unified/simplified all "modified" tokens. The original version was + an overkill, and did not update all possible value references. + + * src/thread.c: + Small "modified" tokens unification related changes. + + * docs/scope.html, src/scope.c: + Increased version to 0.80. + + 2012-12-30 Dimitar Zhekov <dimitar.zhekov(a)gmail.com> * src/break.c, src/inspect.c, src/stack.c, src/thread.c, src/utils.c, Modified: scope/NEWS 9 files changed, 9 insertions(+), 0 deletions(-) =================================================================== @@ -1,3 +1,12 @@ +Scope 0.80 (2013-01-02) + + * Mark all data views for update when a value is modified. + Simpler and more reliable; generates a bit larger gdb traffic. + + * Select, focus and align tree elements as needed instead of simply + selecting. + + Scope 0.79 (2012-12-27) * Easier sync between Scope/GDB thread/frame. Modified: scope/NOTES 3 files changed, 1 insertions(+), 2 deletions(-) =================================================================== @@ -1,5 +1,4 @@ -modifying a local function argument refreshes all stack frames - it may be -a struct or reference argument in other frames +"^done,value=\"", '7' matches 07-var-assign, handled later as "^done", '7' the only way to fix unnecessary inspect drop target expansion is to block INTO, so deriving GtkTreeStore and altering GtkTreeDragDest make no sense Modified: scope/docs/codes.html 30 files changed, 12 insertions(+), 18 deletions(-) =================================================================== @@ -177,9 +177,17 @@ <td class="tab">auto/manual <em>Expand</em> inspect</td> <td class="tab">insert children, set range if needed</td></tr> -<tr><td class="nowrap">07<scid>-var-assign</td> - <td class="tab">inspect value column edited</td> - <td class="tab">update inspect value</td></tr> +<tr><td class="nowrap">07-var-assign</td> + <td class="tab">inspect <em>Value</em> column edited</td> + <td class="tab">mark data views as dirty</td></tr> + +<tr><td class="nowrap">07-gdb-set</td> + <td class="tab">local <em>Modify</em> / <em>Value</em> column edited</td> + <td class="tab">-''-</td></tr> + +<tr><td class="nowrap">-''-</td> + <td class="tab">watch <em>Modify</em> / <em>Value</em> column edited</td> + <td class="tab">-''-</td></tr> <tr><td class="nowrap">070<scid>-var-delete</td> <td class="tab">un-<em>Apply</em> inspect</td> @@ -191,21 +199,7 @@ <tr><td class="nowrap"> </td><td class="tab"> </td><td class="tab"> </td></tr> -<tr><td class="nowrap">08-gdb-set</td> - <td class="tab">local <em>Modify</em> / <em>Value</em> column edited</td> - <td class="tab">mark locals as dirty</td></tr> - -<tr><td class="nowrap">08<tid>-gdb-set</td> - <td class="tab">08 for arg1 local variable</td> - <td class="tab">08 plus -stack-list-arguments --thread <tid></td></tr> - -<tr><td class="nowrap"> </td><td class="tab"> </td><td class="tab"> </td></tr> - -<tr><td class="nowrap">09<scid>-gdb-set</td> - <td class="tab">watch <em>Modify</em> / <em>Value</em> column edited</td> - <td class="tab">06<scid>-data-evaluate-expression</td></tr> - -<tr><td class="nowrap">09<scid>-data-evaluate-expression</td> +<tr><td class="nowrap">08<scid>-data-evaluate-expression</td> <td class="tab">popup <em>Evaluate/Modify</em></td> <td class="tab">command dialog with -gdb-set var expr=value</td></tr> Modified: scope/docs/scope.html 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -685,7 +685,7 @@ <b><a name="copyright">Copyright</a></b> -<p>Scope 0.79, Copyright (C) 2012 Dimitar Toshkov Zhekov</p> +<p>Scope 0.80, Copyright (C) 2012 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 37 files changed, 2 insertions(+), 35 deletions(-) =================================================================== @@ -408,25 +408,6 @@ void on_inspect_ndeleted(GArray *nodes) } } -void on_inspect_value(GArray *nodes) -{ - const char *token = parse_grab_token(nodes); - GtkTreeIter iter; - - if (inspect_find(&iter, FALSE, token)) - { - const char *value = parse_lead_value(nodes); - gint hb_mode; - gchar *display; - - 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, - -1); - g_free(display); - } -} - void on_inspect_path_expr(GArray *nodes) { const char *token = parse_grab_token(nodes); @@ -642,22 +623,8 @@ void inspect_add(const gchar *text) static void on_inspect_display_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, gchar *path_str, gchar *new_text, G_GNUC_UNUSED gpointer gdata) { - if (validate_column(new_text, TRUE)) - { - if (debug_state() & DS_SENDABLE) - { - GtkTreeIter iter; - char *format; - - gtk_tree_model_get_iter_from_string(model, &iter, path_str); - format = g_strdup_printf("07%d%s", inspect_get_scid(&iter), - "-var-assign %s %s"); - view_display_edited(model, &iter, new_text, format); - g_free(format); - } - else - plugin_beep(); - } + view_display_edited(model, debug_state() & DS_SENDABLE, path_str, "07-var-assign %s %s", + new_text); } static const TreeCell inspect_cells[] = Modified: scope/src/inspect.h 1 files changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -23,7 +23,6 @@ void on_inspect_format(GArray *nodes); void on_inspect_children(GArray *nodes); void on_inspect_ndeleted(GArray *nodes); -void on_inspect_value(GArray *nodes); void on_inspect_path_expr(GArray *nodes); void on_inspect_changelist(GArray *nodes); void on_inspect_signal(const char *name); Modified: scope/src/local.c 43 files changed, 5 insertions(+), 38 deletions(-) =================================================================== @@ -38,24 +38,8 @@ enum static void on_local_display_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, gchar *path_str, gchar *new_text, G_GNUC_UNUSED gpointer gdata) { - if (validate_column(new_text, TRUE)) - { - if (thread_state >= THREAD_STOPPED && frame_id) - { - GtkTreeIter iter; - const char *arg1; - char *format; - - gtk_tree_model_get_iter_from_string(model, &iter, path_str); - gtk_tree_model_get(model, &iter, LOCAL_ARG1, &arg1, -1); - format = g_strdup_printf("08%s%s", arg1 ? thread_id : "", - "-gdb-set var %s=%s"); - view_display_edited(model, &iter, new_text, format); - g_free(format); - } - else - plugin_beep(); - } + view_display_edited(model, thread_state >= THREAD_STOPPED && frame_id, path_str, + "07-gdb-set var %s=%s", new_text); } static const TreeCell local_cells[] = @@ -121,15 +105,6 @@ void on_local_variables(GArray *nodes) } } -void on_local_modified(GArray *nodes) -{ - const char *token = parse_grab_token(nodes); - - view_dirty(VIEW_LOCALS); - if (!g_strcmp0(token, thread_id)) - debug_send_format(T, "04%s-stack-list-arguments 1", token); -} - void locals_clear(void) { gtk_list_store_clear(store); @@ -143,7 +118,7 @@ static void local_send_update(char token) gboolean locals_update(void) { - if (view_stack_update()) + if (view_select_frame()) return FALSE; if (frame_id) @@ -177,17 +152,9 @@ static void on_local_copy(const MenuItem *menu_item) menu_copy(selection, menu_item); } -static void on_local_modify(G_GNUC_UNUSED const MenuItem *menu_item) +static void on_local_modify(const MenuItem *menu_item) { - GtkTreeIter iter; - const char *arg1; - char *prefix; - - gtk_tree_selection_get_selected(selection, NULL, &iter); - gtk_tree_model_get(model, &iter, LOCAL_ARG1, &arg1, -1); - prefix = g_strdup_printf("08%s", arg1 ? thread_id : ""); - menu_modify(model, &iter, prefix, menu_item ? MR_MODIFY : MR_MODSTR); - g_free(prefix); + menu_modify(selection, menu_item); } static void on_local_watch(G_GNUC_UNUSED const MenuItem *menu_item) Modified: scope/src/local.h 1 files changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -20,7 +20,6 @@ #ifndef LOCAL_H void on_local_variables(GArray *nodes); -void on_local_modified(GArray *nodes); void locals_clear(void); gboolean locals_update(void); Modified: scope/src/menu.c 12 files changed, 8 insertions(+), 4 deletions(-) =================================================================== @@ -360,15 +360,19 @@ static void menu_evaluate_modify(const gchar *expr, const char *value, const gch } } -void menu_modify(GtkTreeModel *model, GtkTreeIter *iter, const char *prefix, gint mr_mode) +void menu_modify(GtkTreeSelection *selection, const MenuItem *menu_item) { + GtkTreeModel *model; + GtkTreeIter iter; const gchar *name; const char *value; gint hb_mode; - gtk_tree_model_get(model, iter, COLUMN_NAME, &name, COLUMN_VALUE, &value, COLUMN_HB_MODE, + gtk_tree_selection_get_selected(selection, &model, &iter); + gtk_tree_model_get(model, &iter, COLUMN_NAME, &name, COLUMN_VALUE, &value, COLUMN_HB_MODE, &hb_mode, -1); - menu_evaluate_modify(name, value, _("Modify"), hb_mode, mr_mode, prefix); + menu_evaluate_modify(name, value, _("Modify"), hb_mode, menu_item ? MR_MODIFY : MR_MODSTR, + "07"); } void menu_inspect(GtkTreeSelection *selection) @@ -422,7 +426,7 @@ static void on_popup_evaluate(const MenuItem *menu_item) g_free(input); eval_mr_mode = menu_item ? MR_MODIFY : MR_MODSTR; - input = debug_send_evaluate('9', ++scid_gen, expr); + input = debug_send_evaluate('8', ++scid_gen, expr); g_free(expr); } Modified: scope/src/menu.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -82,7 +82,7 @@ void menu_mber_button_release(GtkTreeSelection *selection, GtkWidget *item, GdkEventButton *event, GtkWidget *menu); void menu_copy(GtkTreeSelection *selection, const MenuItem *menu_item); -void menu_modify(GtkTreeModel *model, GtkTreeIter *iter, const char *prefix, gint mr_mode); +void menu_modify(GtkTreeSelection *selection, const MenuItem *menu_item); void menu_inspect(GtkTreeSelection *selection); void on_menu_display_booleans(const MenuItem *menu_item); Modified: scope/src/parse.c 11 files changed, 7 insertions(+), 4 deletions(-) =================================================================== @@ -40,6 +40,11 @@ static void on_quiet_error(G_GNUC_UNUSED GArray *nodes) plugin_blink(); } +static void on_data_modified(G_GNUC_UNUSED GArray *nodes) +{ + views_data_dirty(); +} + typedef struct _ParseRoute { const char *prefix; @@ -81,8 +86,7 @@ static void on_quiet_error(G_GNUC_UNUSED GArray *nodes) { "^done,line=\"", on_debug_list_source, '2', '\0', 2 }, { "^done,value=\"", on_tooltip_value, '3', '\0', 1 }, { "^done,value=\"", on_watch_value, '6', '\0', 1 }, - { "^done,value=\"", on_inspect_value, '7', '\0', 1 }, - { "^done,value=\"", on_menu_evaluate_value, '9', '\0', 1 }, + { "^done,value=\"", on_menu_evaluate_value, '8', '\0', 1 }, { "^done,name=\"", on_inspect_variable, '7', '\0', 1 }, { "^done,format=\"", on_inspect_format, '7', '\0', 1 }, { "^done,numchild=\"", on_inspect_children, '7', '\0', 2 }, @@ -95,8 +99,7 @@ static void on_quiet_error(G_GNUC_UNUSED GArray *nodes) { "^done", on_debug_loaded, '1', '\0', 0 }, { "^done", on_break_done, '2', '\0', 0 }, { "^done", on_debug_auto_run, '5', '\0', 0 }, - { "^done", on_local_modified, '8', '\0', 0 }, - { "^done", on_watch_modified, '9', '\0', 0 }, + { "^done", on_data_modified, '7', '\0', 0 }, { "^error,", on_debug_load_error, '1', '\n', 0 }, { "^error,", on_tooltip_error, '3', '\0', 0 }, { "^error", on_quiet_error, '4', '\0', 0 }, 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.79" , "Dimitar Toshkov Zhekov <dimitar.zhekov(a)gmail.com>") + _("Simple GDB front-end."), "0.80" , "Dimitar Toshkov Zhekov <dimitar.zhekov(a)gmail.com>") /* Keybinding(s) */ enum Modified: scope/src/thread.c 12 files changed, 2 insertions(+), 10 deletions(-) =================================================================== @@ -326,11 +326,7 @@ static void thread_iter_stopped(GtkTreeIter *iter, StopData *sd) if (!addr) thread_state = THREAD_QUERY_FRAME; - view_dirty(VIEW_STACK); - view_dirty(VIEW_LOCALS); - view_dirty(VIEW_WATCHES); - view_dirty(VIEW_INSPECT); - view_dirty(VIEW_TOOLTIP); + views_data_dirty(); } else if (!addr) view_dirty(VIEW_THREADS); @@ -688,11 +684,7 @@ static void on_thread_selection_changed(GtkTreeSelection *selection, thread_state = THREAD_BLANK; } - view_dirty(VIEW_STACK); - view_dirty(VIEW_LOCALS); - view_dirty(VIEW_WATCHES); - view_dirty(VIEW_INSPECT); - view_dirty(VIEW_TOOLTIP); + views_data_dirty(); update_state(debug_state()); } Modified: scope/src/utils.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -780,13 +780,13 @@ void utils_enter_to_clicked(GtkWidget *widget, GtkWidget *button) g_signal_connect(widget, "key-press-event", G_CALLBACK(on_widget_key_press), button); } -void utils_tree_set_cursor(GtkTreeSelection *selection, GtkTreeIter *iter, gdouble align) +void utils_tree_set_cursor(GtkTreeSelection *selection, GtkTreeIter *iter, gdouble alignment) { GtkTreeView *tree = gtk_tree_selection_get_tree_view(selection); GtkTreePath *path = gtk_tree_model_get_path(gtk_tree_view_get_model(tree), iter); - if (align >= 0) - gtk_tree_view_scroll_to_cell(tree, path, NULL, TRUE, align, 0); + if (alignment >= 0) + gtk_tree_view_scroll_to_cell(tree, path, NULL, TRUE, alignment, 0); gtk_tree_view_set_cursor(tree, path, NULL, FALSE); gtk_tree_path_free(path); Modified: scope/src/utils.h 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -110,7 +110,7 @@ enum gchar *utils_text_buffer_get_text(GtkTextBuffer *text, gint maxlen); void utils_enter_to_clicked(GtkWidget *widget, GtkWidget *button); -void utils_tree_set_cursor(GtkTreeSelection *selection, GtkTreeIter *iter, gdouble align); +void utils_tree_set_cursor(GtkTreeSelection *selection, GtkTreeIter *iter, gdouble alignment); void utils_finalize(void); Modified: scope/src/views.c 46 files changed, 33 insertions(+), 13 deletions(-) =================================================================== @@ -51,6 +51,15 @@ void view_dirty(ViewIndex index) views[index].dirty = TRUE; } +void views_data_dirty(void) +{ + view_dirty(VIEW_STACK); + view_dirty(VIEW_LOCALS); + view_dirty(VIEW_WATCHES); + view_dirty(VIEW_INSPECT); + view_dirty(VIEW_TOOLTIP); +} + static void view_update_unconditional(ViewIndex index, DebugState state) { ViewInfo *view = views + index; @@ -132,9 +141,9 @@ void views_update(DebugState state) } } -gboolean view_stack_update(void) +gboolean view_select_frame(void) { - if (views[VIEW_STACK].dirty) + if (g_strcmp0(frame_id, "0") && views[VIEW_STACK].dirty) { DebugState state = thread_state >= THREAD_STOPPED ? DS_DEBUG : DS_READY; view_update_unconditional(VIEW_STACK, state); @@ -312,18 +321,29 @@ void view_set_line_data_func(const char *column, const char *cell, gint column_i GINT_TO_POINTER(column_id), NULL); } -void view_display_edited(GtkTreeModel *model, GtkTreeIter *iter, const gchar *new_text, - const char *format) +void view_display_edited(GtkTreeModel *model, gboolean condition, const gchar *path_str, + const char *format, gchar *new_text) { - const char *name; - gint hb_mode; - char *locale; - - gtk_tree_model_get(model, iter, COLUMN_NAME, &name, COLUMN_HB_MODE, &hb_mode, -1); - locale = utils_get_locale_from_display(new_text, hb_mode); - utils_str_replace_all(&locale, "\n", " "); - debug_send_format(F, format, name, locale); - g_free(locale); + if (validate_column(new_text, TRUE)) + { + if (condition) + { + GtkTreeIter iter; + const char *name; + gint hb_mode; + char *locale; + + gtk_tree_model_get_iter_from_string(model, &iter, path_str); + gtk_tree_model_get(model, &iter, COLUMN_NAME, &name, COLUMN_HB_MODE, + &hb_mode, -1); + locale = utils_get_locale_from_display(new_text, hb_mode); + utils_str_replace_all(&locale, "\n", " "); + debug_send_format(F, format, name, locale); + g_free(locale); + } + else + plugin_blink(); + } } void view_column_set_visible(const char *name, gboolean visible) Modified: scope/src/views.h 7 files changed, 4 insertions(+), 3 deletions(-) =================================================================== @@ -35,9 +35,10 @@ } ViewIndex; void view_dirty(ViewIndex index); +void views_data_dirty(void); void views_clear(void); void views_update(DebugState state); -gboolean view_stack_update(void); +gboolean view_select_frame(void); void view_inspect_update(void); void on_view_changed(GtkNotebook *notebook, gpointer page, gint page_num, gpointer gdata); @@ -68,8 +69,8 @@ GtkTreeView *view_connect(const char *name, GtkTreeModel **model, GtkTreeSelecti gtk_tree_sortable_set_sort_func((sortable), (column), (compare), \ GINT_TO_POINTER(column), NULL) void view_set_line_data_func(const char *column, const char *cell, gint column_id); -void view_display_edited(GtkTreeModel *model, GtkTreeIter *iter, const gchar *new_text, - const char *format); +void view_display_edited(GtkTreeModel *model, gboolean condition, const gchar *path_str, + const char *format, gchar *new_text); void view_column_set_visible(const char *name, gboolean visible); void view_seek_selected(GtkTreeSelection *selection, gboolean focus, SeekerType seeker); Modified: scope/src/watch.c 49 files changed, 6 insertions(+), 43 deletions(-) =================================================================== @@ -62,11 +62,6 @@ static void watch_iter_update(GtkTreeIter *iter, gpointer gdata) g_free(debug_send_evaluate('6', scid, expr)); } -static void watch_fetch(GtkTreeIter *iter) -{ - watch_iter_update(iter, GINT_TO_POINTER(TRUE)); -} - static void on_watch_expr_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, gchar *path_str, gchar *new_text, G_GNUC_UNUSED gpointer gdata) { @@ -88,7 +83,7 @@ static void on_watch_expr_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, pm->mr_mode, -1); if (enabled && (debug_state() & DS_DEBUG)) - watch_fetch(&iter); + watch_iter_update(&iter, GINT_TO_POINTER(TRUE)); } } } @@ -96,23 +91,8 @@ static void on_watch_expr_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, static void on_watch_display_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, gchar *path_str, gchar *new_text, G_GNUC_UNUSED gpointer gdata) { - if (validate_column(new_text, TRUE)) - { - if (debug_state() & DS_SENDABLE) - { - GtkTreeIter iter; - gint scid; - char *format; - - gtk_tree_model_get_iter_from_string(model, &iter, path_str); - gtk_tree_model_get(model, &iter, WATCH_SCID, &scid, -1); - format = g_strdup_printf("09%d%s", scid, "-gdb-set var %s=%s"); - view_display_edited(model, &iter, new_text, format); - g_free(format); - } - else - plugin_beep(); - } + view_display_edited(model, debug_state() & DS_SENDABLE, path_str, "07-gdb-set var %s=%s", + new_text); } static const TreeCell watch_cells[] = @@ -169,15 +149,6 @@ void on_watch_error(GArray *nodes) watch_set(nodes, parse_find_error(nodes), NULL); } -void on_watch_modified(GArray *nodes) -{ - const char *token = parse_grab_token(nodes); - GtkTreeIter iter; - - iff (model_find(model, &iter, WATCH_SCID, token), "%s: w_scid not found", token) - watch_fetch(&iter); -} - static void watch_iter_clear(GtkTreeIter *iter, G_GNUC_UNUSED gpointer gdata) { gtk_list_store_set(store, iter, WATCH_DISPLAY, NULL, WATCH_VALUE, NULL, -1); @@ -190,7 +161,7 @@ void watches_clear(void) gboolean watches_update(void) { - if (view_stack_update()) + if (view_select_frame()) return FALSE; model_foreach(model, (GFunc) watch_iter_update, GPOINTER_TO_INT(FALSE)); @@ -213,7 +184,7 @@ void watch_add(const gchar *text) utils_tree_set_cursor(selection, &iter, 0.5); if (debug_state() & DS_DEBUG) - watch_fetch(&iter); + watch_iter_update(&iter, NULL); } g_free(expr); @@ -311,15 +282,7 @@ static void on_watch_copy(const MenuItem *menu_item) static void on_watch_modify(const MenuItem *menu_item) { - GtkTreeIter iter; - gint scid; - char *prefix; - - gtk_tree_selection_get_selected(selection, NULL, &iter); - gtk_tree_model_get(model, &iter, WATCH_SCID, &scid, -1); - prefix = g_strdup_printf("09%d", scid); - menu_modify(model, &iter, prefix, menu_item ? MR_MODIFY : MR_MODSTR); - g_free(prefix); + menu_modify(selection, menu_item); } static void on_watch_inspect(G_GNUC_UNUSED const MenuItem *menu_item) Modified: scope/src/watch.h 1 files changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -21,7 +21,6 @@ void on_watch_value(GArray *nodes); void on_watch_error(GArray *nodes); -void on_watch_modified(GArray *nodes); void watches_clear(void); gboolean watches_update(void); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
← Newer
1
2
3
4
Older →
Jump to page:
1
2
3
4
Results per page:
10
25
50
100
200