aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNunoSempere <nuno.semperelh@protonmail.com>2024-03-14 16:31:07 -0300
committerNunoSempere <nuno.semperelh@protonmail.com>2024-03-14 16:31:07 -0300
commite9950d648aa04dfe97d806904583324f6007a958 (patch)
treeedee158c1325945b9b55df9d3b353123161d881d
parent6d925ea23ae7bae6627e2e6575d34bc7e6f7a628 (diff)
make initial page blank
-rw-r--r--README.md2
-rw-r--r--config.h8
-rw-r--r--images/3-init.pngbin0 -> 13938 bytes
-rw-r--r--images/3-multiple-tabs.pngbin175909 -> 0 bytes
-rw-r--r--images/6-hello-world.pngbin309494 -> 0 bytes
-rw-r--r--images/6-multiple-tabs.pngbin0 -> 264119 bytes
-rw-r--r--images/7-hello-world-search.pngbin42808 -> 125658 bytes
-rwxr-xr-xrosenrotbin40176 -> 40216 bytes
-rw-r--r--rosenrot.c11
9 files changed, 15 insertions, 6 deletions
diff --git a/README.md b/README.md
index 504111d..4bad724 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ Rosenrot is a small browser forked from an earlier version of [rose](https://git
![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/7-hello-world-search.png)
-![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/6-hello-world.png)
+![](https://raw.githubusercontent.com/NunoSempere/rosenrot-browser/master/images/3-multiple-tabs.png)
### Installation and usage
diff --git a/config.h b/config.h
index b29cc02..ec6cc9e 100644
--- a/config.h
+++ b/config.h
@@ -15,9 +15,11 @@
#define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */
#define DEBUG false
#define MAX_NUM_TABS 8 // set to 0 or false if you want unlimited tabs, or look at the relevant rose.c code.
-#define ROSE_HOMEPAGE false
-#define SEARCH "https://lite.duckduckgo.com/html/?q=%s" // "https://search.nunosempere.com/search?q=%s"
-#define HOME ROSE_HOMEPAGE ? "file:///home/nuno/Documents/workspace/rosenrot/user-scripts/debian-12/rose-images/rose-homepage-2.png" : "https://search.nunosempere.com/"
+#define SEARCH "https://search.nunosempere.com/search?q=%s"
+// #define SEARCH "https://lite.duckduckgo.com/html/?q=%s"
+#define HOME ""
+// #define HOME "https://search.nunosempere.com/"
+// #define HOME "file:///home/nuno/Documents/workspace/rosenrot/user-scripts/debian-12/rose-images/rose-homepage-2.png"
// Plugins
#define LIBRE_REDIRECT_ENABLED true
diff --git a/images/3-init.png b/images/3-init.png
new file mode 100644
index 0000000..49526e5
--- /dev/null
+++ b/images/3-init.png
Binary files differ
diff --git a/images/3-multiple-tabs.png b/images/3-multiple-tabs.png
deleted file mode 100644
index 2d60c9d..0000000
--- a/images/3-multiple-tabs.png
+++ /dev/null
Binary files differ
diff --git a/images/6-hello-world.png b/images/6-hello-world.png
deleted file mode 100644
index c690cde..0000000
--- a/images/6-hello-world.png
+++ /dev/null
Binary files differ
diff --git a/images/6-multiple-tabs.png b/images/6-multiple-tabs.png
new file mode 100644
index 0000000..27bcc91
--- /dev/null
+++ b/images/6-multiple-tabs.png
Binary files differ
diff --git a/images/7-hello-world-search.png b/images/7-hello-world-search.png
index 7b2a2c8..74ac428 100644
--- a/images/7-hello-world-search.png
+++ b/images/7-hello-world-search.png
Binary files differ
diff --git a/rosenrot b/rosenrot
index dfffdcd..2e62adb 100755
--- a/rosenrot
+++ b/rosenrot
Binary files differ
diff --git a/rosenrot.c b/rosenrot.c
index a932133..680ae41 100644
--- a/rosenrot.c
+++ b/rosenrot.c
@@ -26,9 +26,16 @@ WebKitWebView* notebook_get_webview(GtkNotebook* notebook)
}
/* Load content*/
+
+void show_bar(GtkNotebook* notebook);
void load_uri(WebKitWebView* view, const char* uri)
{
- if (g_str_has_prefix(uri, "http://") || g_str_has_prefix(uri, "https://") || g_str_has_prefix(uri, "file://") || g_str_has_prefix(uri, "about:")) {
+ if (strlen(uri) == 0){
+ webkit_web_view_load_uri(view, "");
+ bar.entry_mode = _SEARCH;
+ show_bar(notebook);
+
+ }else if (g_str_has_prefix(uri, "http://") || g_str_has_prefix(uri, "https://") || g_str_has_prefix(uri, "file://") || g_str_has_prefix(uri, "about:")) {
webkit_web_view_load_uri(view, uri);
} else {
// Check for shortcuts
@@ -440,7 +447,7 @@ int main(int argc, char** argv)
/* Show to user */
gtk_widget_show_all(GTK_WIDGET(window));
- gtk_widget_hide(GTK_WIDGET(bar.widget));
+ // gtk_widget_hide(GTK_WIDGET(bar.widget));
/* Deal with more tabs */
if (argc > 2) {