Commit 839a46d3 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*further improved naming convention for settings files (default.settings and...

*further improved naming convention for settings files (default.settings and user.settings), cosmetic improvements to the indexing prompt of the help browser dialog.
parent fc300bad
...@@ -131,9 +131,9 @@ deb: $(bindir) ...@@ -131,9 +131,9 @@ deb: $(bindir)
$(DESTDIR)/etc/init.d/ $(DESTDIR)/etc/init.d/
# default prefs file # default prefs file
install -d $(DESTDIR)/etc/pd-l2ork install -d $(DESTDIR)/etc/pd-l2ork
ln -s -f $(libpddir)/default.pd-l2ork \ ln -s -f $(libpddir)/default.settings \
$(DESTDIR)/etc/pd-l2ork/default.pd-l2ork $(DESTDIR)/etc/pd-l2ork/default.settings
install -p $(packages_src)/linux_make/default.pd-l2ork $(DESTDIR)$(libpddir) install -p $(packages_src)/linux_make/default.settings $(DESTDIR)$(libpddir)
# app window icon # app window icon
install -p $(packages_src)/linux_make/pd-l2ork.gif $(DESTDIR)$(libpddir) install -p $(packages_src)/linux_make/pd-l2ork.gif $(DESTDIR)$(libpddir)
# emacs mode for .pd files # emacs mode for .pd files
...@@ -177,7 +177,7 @@ installer_readme: ...@@ -177,7 +177,7 @@ installer_readme:
$(INSTALLER_README_FILE) $(INSTALLER_README_FILE)
installer_settings: installer_settings:
install -p $(packages_src)/linux_make/default.pd-l2ork $(DESTDIR)$(libpddir) install -p $(packages_src)/linux_make/default.settings $(DESTDIR)$(libpddir)
# app window icon # app window icon
install -p $(packages_src)/linux_make/pd-l2ork.gif $(DESTDIR)$(libpddir) install -p $(packages_src)/linux_make/pd-l2ork.gif $(DESTDIR)$(libpddir)
# install -d $(DESTDIR)/usr/share/icons/hicolor/128x128/apps # install -d $(DESTDIR)/usr/share/icons/hicolor/128x128/apps
......
...@@ -294,10 +294,10 @@ if { $tcl_platform(platform) == "windows" } { ...@@ -294,10 +294,10 @@ if { $tcl_platform(platform) == "windows" } {
set externalsdir "$::env(HOME)/pd-l2ork-externals" set externalsdir "$::env(HOME)/pd-l2ork-externals"
} }
proc bgerror {message} { #proc bgerror {message} {
pdtk_post "\ntcl error: $message" # pdtk_post "\ntcl error: $message"
#puts "\033\[0;1;33mtcl error: $::errorInfo\033\[0m" #puts "\033\[0;1;33mtcl error: $::errorInfo\033\[0m"
} #}
# make sure the user folder for installing externals exists # make sure the user folder for installing externals exists
#catch { #catch {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* this file implements a mechanism for storing and retrieving preferences. * this file implements a mechanism for storing and retrieving preferences.
* Should later be renamed "preferences.c" or something. * Should later be renamed "preferences.c" or something.
* *
* In unix this is handled by the "~/.pd-l2ork/settings" file, in windows by * In unix this is handled by the "~/.pd-l2ork/user.settings" file, in windows by
* the registry, and in MacOS by the Preferences system. * the registry, and in MacOS by the Preferences system.
*/ */
...@@ -58,11 +58,11 @@ static void sys_initloadpreferences( void) ...@@ -58,11 +58,11 @@ static void sys_initloadpreferences( void)
char default_prefs_file[FILENAME_MAX]; char default_prefs_file[FILENAME_MAX];
struct stat statbuf; struct stat statbuf;
snprintf(default_prefs_file, FILENAME_MAX, "%s/default.pd-l2ork", snprintf(default_prefs_file, FILENAME_MAX, "%s/default.settings",
sys_libdir->s_name); sys_libdir->s_name);
if (homedir) if (homedir)
snprintf(user_prefs_file, FILENAME_MAX, "%s/.pd-l2ork/settings", homedir); snprintf(user_prefs_file, FILENAME_MAX, "%s/.pd-l2ork/user.settings", homedir);
if (stat(user_prefs_file, &statbuf) == 0) if (stat(user_prefs_file, &statbuf) == 0)
strncpy(filenamebuf, user_prefs_file, FILENAME_MAX); strncpy(filenamebuf, user_prefs_file, FILENAME_MAX);
else if (stat(default_prefs_file, &statbuf) == 0) else if (stat(default_prefs_file, &statbuf) == 0)
...@@ -143,7 +143,7 @@ static void sys_initsavepreferences( void) ...@@ -143,7 +143,7 @@ static void sys_initsavepreferences( void)
if (!homedir) if (!homedir)
return; return;
snprintf(filenamebuf, FILENAME_MAX, "%s/.pd-l2ork/settings", homedir); snprintf(filenamebuf, FILENAME_MAX, "%s/.pd-l2ork/user.settings", homedir);
filenamebuf[FILENAME_MAX-1] = 0; filenamebuf[FILENAME_MAX-1] = 0;
if ((sys_prefsavefp = fopen(filenamebuf, "w")) == NULL) if ((sys_prefsavefp = fopen(filenamebuf, "w")) == NULL)
{ {
......
...@@ -236,7 +236,7 @@ proc ::dialog_search::create_dialog {mytoplevel} { ...@@ -236,7 +236,7 @@ proc ::dialog_search::create_dialog {mytoplevel} {
-anchor center -style Foo.TLabel -anchor center -style Foo.TLabel
text $mytoplevel.navtext -font "$searchfont -12" -height 1 -bd 0 \ text $mytoplevel.navtext -font "$searchfont -12" -height 1 -bd 0 \
-highlightthickness 0 -bg $::pd_colors(canvas_color) \ -highlightthickness 0 -bg $::pd_colors(canvas_color) \
-padx 8 -pady 3 -fg $::pd_colors(text) -padx 8 -pady 7 -fg $::pd_colors(text)
text $mytoplevel.resultstext \ text $mytoplevel.resultstext \
-yscrollcommand "$mytoplevel.yscrollbar set" \ -yscrollcommand "$mytoplevel.yscrollbar set" \
-bg $::pd_colors(canvas_color) -fg $::pd_colors(text) \ -bg $::pd_colors(canvas_color) -fg $::pd_colors(text) \
...@@ -618,9 +618,10 @@ proc ::dialog_search::search {} { ...@@ -618,9 +618,10 @@ proc ::dialog_search::search {} {
-mode determinate -mode determinate
ttk::button $widget.bcancel -text "Cancel" -padding {0 0 0 0} \ ttk::button $widget.bcancel -text "Cancel" -padding {0 0 0 0} \
-command "set ::dialog_search::cancelled 1" -cursor left_ptr -command "set ::dialog_search::cancelled 1" -cursor left_ptr
ttk::label $widget.building_index -background white -text " Building index for subsequent searches... "
# $widget insert 1.end " " # $widget insert 1.end " "
$widget window create 1.end -window $widget.pbar $widget window create 1.end -window $widget.pbar
$widget insert 1.end " Building index for subsequent searches... " $widget window create 1.end -window $widget.building_index
$widget window create 1.end -window $widget.bcancel $widget window create 1.end -window $widget.bcancel
$widget configure -state disabled $widget configure -state disabled
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment