* [PATCH] Save preferences correctly
@ 2006-09-07 16:51 Andrew STUBBS
2006-09-18 16:50 ` Andrew STUBBS
0 siblings, 1 reply; 3+ messages in thread
From: Andrew STUBBS @ 2006-09-07 16:51 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
Hi,
Last year I contributed a patch to make Insight read the .gdbtkinit file
when the INSIGHT_FORCE_READ_PREFERENCES environment variable is set,
regardless of -nx.
Unfortunately, I forgot to check the same variable when saving the
preferences. The attached patch should remedy the omission.
Andrew Stubbs
[-- Attachment #2: save_prefs.patch --]
[-- Type: text/plain, Size: 940 bytes --]
2006-09-07 Andrew Stubbs <andrew.stubbs@st.com>
* library/prefs.tcl (pref_save): Save preferences if
INSIGHT_FORCE_READ_PREFERENCES is set in the environment.
Index: gdb/gdbtk/library/prefs.tcl
===================================================================
--- gdb/gdbtk/library/prefs.tcl.orig 2006-09-07 17:30:19.000000000 +0100
+++ gdb/gdbtk/library/prefs.tcl 2006-09-07 17:35:10.000000000 +0100
@@ -160,9 +160,10 @@ proc pref_read {} {
# PROC: pref_save - save preferences to a file and delete window
# ------------------------------------------------------------------
proc pref_save {{win {}}} {
- global prefs_init_filename GDBStartup
+ global prefs_init_filename GDBStartup env
- if {!$GDBStartup(inhibit_prefs)} {
+ if {!$GDBStartup(inhibit_prefs)
+ || [info exists env(INSIGHT_FORCE_READ_PREFERENCES)]} {
debug "pref_save $prefs_init_filename"
if {[catch {open $prefs_init_filename w} fd]} {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Save preferences correctly
2006-09-07 16:51 [PATCH] Save preferences correctly Andrew STUBBS
@ 2006-09-18 16:50 ` Andrew STUBBS
2006-09-19 18:39 ` Keith Seitz
0 siblings, 1 reply; 3+ messages in thread
From: Andrew STUBBS @ 2006-09-18 16:50 UTC (permalink / raw)
To: insight
Ping
Andrew STUBBS wrote:
> Hi,
>
> Last year I contributed a patch to make Insight read the .gdbtkinit file
> when the INSIGHT_FORCE_READ_PREFERENCES environment variable is set,
> regardless of -nx.
>
> Unfortunately, I forgot to check the same variable when saving the
> preferences. The attached patch should remedy the omission.
>
> Andrew Stubbs
>
>
> ------------------------------------------------------------------------
>
> 2006-09-07 Andrew Stubbs <andrew.stubbs@st.com>
>
> * library/prefs.tcl (pref_save): Save preferences if
> INSIGHT_FORCE_READ_PREFERENCES is set in the environment.
>
> Index: gdb/gdbtk/library/prefs.tcl
> ===================================================================
> --- gdb/gdbtk/library/prefs.tcl.orig 2006-09-07 17:30:19.000000000 +0100
> +++ gdb/gdbtk/library/prefs.tcl 2006-09-07 17:35:10.000000000 +0100
> @@ -160,9 +160,10 @@ proc pref_read {} {
> # PROC: pref_save - save preferences to a file and delete window
> # ------------------------------------------------------------------
> proc pref_save {{win {}}} {
> - global prefs_init_filename GDBStartup
> + global prefs_init_filename GDBStartup env
>
> - if {!$GDBStartup(inhibit_prefs)} {
> + if {!$GDBStartup(inhibit_prefs)
> + || [info exists env(INSIGHT_FORCE_READ_PREFERENCES)]} {
> debug "pref_save $prefs_init_filename"
>
> if {[catch {open $prefs_init_filename w} fd]} {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Save preferences correctly
2006-09-18 16:50 ` Andrew STUBBS
@ 2006-09-19 18:39 ` Keith Seitz
0 siblings, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2006-09-19 18:39 UTC (permalink / raw)
To: Andrew STUBBS; +Cc: insight
Andrew STUBBS wrote:
> Ping
Did I not approve this already? Sheesh. I must be losing it. I'm gettin'
old, I guess. O:-)
I'll commit immediately.
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-19 18:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-07 16:51 [PATCH] Save preferences correctly Andrew STUBBS
2006-09-18 16:50 ` Andrew STUBBS
2006-09-19 18:39 ` Keith Seitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).