summaryrefslogtreecommitdiff
path: root/fluid/panels/template_panel.fl
diff options
context:
space:
mode:
Diffstat (limited to 'fluid/panels/template_panel.fl')
-rw-r--r--fluid/panels/template_panel.fl16
1 files changed, 8 insertions, 8 deletions
diff --git a/fluid/panels/template_panel.fl b/fluid/panels/template_panel.fl
index b0ba20968..be0376c2c 100644
--- a/fluid/panels/template_panel.fl
+++ b/fluid/panels/template_panel.fl
@@ -20,7 +20,7 @@ comment {//
} {in_source in_header
}
-decl {\#include "app/fluid.h"} {private local
+decl {\#include "Fluid.h"} {private local
}
decl {\#include "tools/filename.h"} {selected private local
@@ -111,7 +111,7 @@ template_delete->activate();
char pngfile[1024], *ext;
strlcpy(pngfile, flfile, sizeof(pngfile));
-if ((ext = strrchr(pngfile, '.')) == NULL) return;
+if ((ext = strrchr(pngfile, '.')) == nullptr) return;
strcpy(ext, ".png");
img = Fl_Shared_Image::get(pngfile);
@@ -179,7 +179,7 @@ Function {template_clear()} {return_type void
void *filename;
for (i = 1; i <= template_browser->size(); i ++) {
- if ((filename = template_browser->data(i)) != NULL) free(filename);
+ if ((filename = template_browser->data(i)) != nullptr) free(filename);
}
template_browser->deselect();
@@ -205,7 +205,7 @@ if (fl_unlink(flfile)) {
char pngfile[1024], *ext;
strlcpy(pngfile, flfile, sizeof(pngfile));
-if ((ext = strrchr(pngfile, '.')) != NULL) {
+if ((ext = strrchr(pngfile, '.')) != nullptr) {
strcpy(ext, ".png");
fl_unlink(pngfile);
}
@@ -241,12 +241,12 @@ char name[1024], filename[1400], path[1024], *ptr;
struct dirent **files;
int num_files;
-fluid_prefs.getUserdataPath(path, sizeof(path));
+Fluid.preferences.getUserdataPath(path, sizeof(path));
strlcat(path, "templates", sizeof(path));
fl_make_path(path);
int sample_templates_generated = 0;
-fluid_prefs.get("sample_templates_generated", sample_templates_generated, 0);
+Fluid.preferences.get("sample_templates_generated", sample_templates_generated, 0);
if (sample_templates_generated < 2) {
strcpy(filename, path);
@@ -268,8 +268,8 @@ if (sample_templates_generated < 2) {
template_install(path, "/FLTK_License.fl", tmpl_FLTK_License_fl, sizeof(tmpl_FLTK_License_fl), tmpl_FLTK_License_fl_size);
template_install(path, "/1of7GUIs.fl", tmpl_1of7GUIs_fl, sizeof(tmpl_1of7GUIs_fl), tmpl_1of7GUIs_fl_size);
sample_templates_generated = 2;
- fluid_prefs.set("sample_templates_generated", sample_templates_generated);
- fluid_prefs.flush();
+ Fluid.preferences.set("sample_templates_generated", sample_templates_generated);
+ Fluid.preferences.flush();
}
num_files = fl_filename_list(path, &files);