make initial page blank

This commit is contained in:
NunoSempere 2024-03-14 16:31:07 -03:00
parent 6d925ea23a
commit e9950d648a
9 changed files with 15 additions and 6 deletions

View File

@ -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/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 ### Installation and usage

View File

@ -15,9 +15,11 @@
#define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */ #define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */
#define DEBUG false #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 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://search.nunosempere.com/search?q=%s"
#define SEARCH "https://lite.duckduckgo.com/html/?q=%s" // "https://search.nunosempere.com/search?q=%s" // #define SEARCH "https://lite.duckduckgo.com/html/?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 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 // Plugins
#define LIBRE_REDIRECT_ENABLED true #define LIBRE_REDIRECT_ENABLED true

BIN
images/3-init.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

BIN
images/6-multiple-tabs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 123 KiB

BIN
rosenrot

Binary file not shown.

View File

@ -26,9 +26,16 @@ WebKitWebView* notebook_get_webview(GtkNotebook* notebook)
} }
/* Load content*/ /* Load content*/
void show_bar(GtkNotebook* notebook);
void load_uri(WebKitWebView* view, const char* uri) 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); webkit_web_view_load_uri(view, uri);
} else { } else {
// Check for shortcuts // Check for shortcuts
@ -440,7 +447,7 @@ int main(int argc, char** argv)
/* Show to user */ /* Show to user */
gtk_widget_show_all(GTK_WIDGET(window)); 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 */ /* Deal with more tabs */
if (argc > 2) { if (argc > 2) {