diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-07-01 18:03:10 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-07-06 20:28:20 +0200 |
| commit | f09e17c3c564e8310125a10c03397cbf473ff643 (patch) | |
| tree | 8d0fd4a28e3686c33aaa140d07ddba26ab28bdc2 /fluid/template_panel.cxx | |
| parent | b0e0c355edaa2e23148cb0260ada907aec930f05 (diff) | |
Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files
The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
Diffstat (limited to 'fluid/template_panel.cxx')
| -rw-r--r-- | fluid/template_panel.cxx | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/fluid/template_panel.cxx b/fluid/template_panel.cxx index 42edb4f69..f46b85d18 100644 --- a/fluid/template_panel.cxx +++ b/fluid/template_panel.cxx @@ -1,6 +1,4 @@ // -// "$Id$" -// // FLUID template support for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2020 by Bill Spitzak and others. @@ -11,9 +9,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // generated by Fast Light User Interface Designer (fluid) version 1.0400 @@ -182,11 +180,11 @@ Fl_Double_Window* make_template_panel() { void template_clear() { int i; void *filename; - + for (i = 1; i <= template_browser->size(); i ++) { if ((filename = template_browser->data(i)) != NULL) free(filename); } - + template_browser->deselect(); template_browser->clear(); } @@ -194,19 +192,19 @@ void template_clear() { void template_delete_cb(Fl_Button *, void *) { int item = template_browser->value(); if (item < 1) return; - + const char *name = template_browser->text(item); const char *flfile = (const char *)template_browser->data(item); if (!flfile) return; - + if (!fl_choice("Are you sure you want to delete the template \"%s\"?", "Cancel", "Delete", 0, name)) return; - + if (fl_unlink(flfile)) { fl_alert("Unable to delete template \"%s\":\n%s", name, strerror(errno)); return; } - + template_browser->remove(item); template_browser->do_callback(); } @@ -216,13 +214,13 @@ void template_load() { char name[1024], filename[1400], path[1024], *ptr; struct dirent **files; int num_files; - + fluid_prefs.getUserdataPath(path, sizeof(path)); strlcat(path, "templates", sizeof(path)); - + int sample_templates_generated = 0; fluid_prefs.get("sample_templates_generated", sample_templates_generated, 0); - + if (!sample_templates_generated) { strcpy(filename, path); strcat(filename, "/FLTK_License.fl"); @@ -230,44 +228,40 @@ void template_load() { if (f) { fputs( "# data file for the Fltk User Interface Designer (fluid)\nversion 1.0400\nheader_name {.h}\n" - "code_name {.cxx}\ncomment {//\n// \"$Id$\"\n//\n// @INSTANCE@ for the Fast Light Tool Kit (FLT" + "code_name {.cxx}\ncomment {//\n// @INSTANCE@ for the Fast Light Tool Kit (FLT" "K).\n//\n// Copyright 1998-2020 by Bill Spitzak and others.\n//\n// This library is free sof" "tware. Distribution and use rights are outlined in\n// the file \"COPYING\" which should have " "been included with this file. If this\n// file is missing or damaged, see the license at:\n" - "//\n// https://www.fltk.org/COPYING.php\n//\n// Please report all bugs and problems on th" - "e following page:\n//\n// https://www.fltk.org/str.php\n//\n} {selected in_source in_head" - "er\n}\n\ncomment {\n//\n// End of \"$Id$\".\n//} {in_source in_header\n}\n", f); + "//\n// https://www.fltk.org/COPYING.php\n//\n// Please see the following page on how to report " + "bugs and issues:\n//\n// https://www.fltk.org/bugs.php\n//\n} {selected in_source in_head" + "er\n}\n", f); fclose(f); } sample_templates_generated = 1; fluid_prefs.set("sample_templates_generated", sample_templates_generated); fluid_prefs.flush(); } - + num_files = fl_filename_list(path, &files); - + for (i = 0; i < num_files; i ++) { if (fl_filename_match(files[i]->d_name, "*.fl")) { // Format the name as the filename with "_" replaced with " " // and without the trailing ".fl"... strlcpy(name, files[i]->d_name, sizeof(name)); *strstr(name, ".fl") = '\0'; - + for (ptr = name; *ptr; ptr ++) { if (*ptr == '_') *ptr = ' '; } - + // Add the template to the browser... snprintf(filename, sizeof(filename), "%s/%s", path, files[i]->d_name); template_browser->add(name, strdup(filename)); } - + free(files[i]); } - + if (num_files > 0) free(files); } - -// -// End of "$Id$". -// |
