From 9adb3b5f7ed3688e0b7347e29967154df72ab999 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= jaakko.keranen@iki.fi
Date: Sun, 13 Sep 2020 17:40:13 +0300
Subject: [PATCH 1/1] Default set of bookmarks for first run
src/app.c | 24 ++++++++++++++++++++++++
src/bookmarks.c | 2 +-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/app.c b/src/app.c
index f5294cb0..36388062 100644
--- a/src/app.c
+++ b/src/app.c
@@ -286,6 +286,7 @@ static void saveState_App_(const iApp *d) {
}
static void init_App_(iApp *d, int argc, char **argv) {
d->isFinishedLaunching = iFalse;
d->launchCommands = new_StringList();
iZap(d->lastDropTime);
@@ -316,6 +317,29 @@ static void init_App_(iApp *d, int argc, char **argv) {
loadPrefs_App_(d);
load_Visited(d->visited, dataDir_App_);
load_Bookmarks(d->bookmarks, dataDir_App_);
/* Create the default bookmarks for a quick start. */
add_Bookmarks(d->bookmarks,
collectNewCStr_String("gemini://gemini.circumlunar.space/"),
collectNewCStr_String("Project Gemini"),
NULL,
0x264a /* Gemini symbol */);
add_Bookmarks(d->bookmarks,
collectNewCStr_String("gemini://gemini.circumlunar.space/capcom/"),
collectNewCStr_String("CAPCOM Geminispace aggregator"),
NULL,
0x264a /* Gemini symbol */);
add_Bookmarks(d->bookmarks,
collectNewCStr_String("gemini://gus.guru/"),
collectNewCStr_String("GUS - Gemini Universal Search"),
NULL,
0x2690);
add_Bookmarks(d->bookmarks,
collectNewCStr_String("gemini://skyjake.fi/lagrange/"),
collectNewCStr_String("Lagrange"),
NULL,
0x1f306);
#if defined (iHaveLoadEmbed)
/* Load the resources from a file. */ {
if (!load_Embed(concatPath_CStr(cstr_String(execPath_App()), EMB_BIN))) {
diff --git a/src/bookmarks.c b/src/bookmarks.c
index 6a5eb296..8fe7d109 100644
--- a/src/bookmarks.c
+++ b/src/bookmarks.c
@@ -145,7 +145,7 @@ void add_Bookmarks(iBookmarks *d, const iString *url, const iString *title, cons
iBookmark *bm = new_Bookmark();
set_String(&bm->url, url);
set_String(&bm->title, title);
bm->icon = icon;
initCurrent_Time(&bm->when);
insert_Bookmarks_(d, bm);
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).