Now top bar appears after a search
and only goes away after an enter.
Otherwise what's the point of a bar/tab
This commit is contained in:
NunoSempere 2022-12-14 01:04:55 +00:00
parent 5366c5d636
commit 254b0ed658
2 changed files with 9 additions and 4 deletions

View File

@ -19,8 +19,8 @@
"enable-smooth-scrolling", false
#define GTK "gtk-application-prefer-dark-theme", false, "gtk-enable-animations", false
#define HOME "file:///home/loki/Documents/core/software/fresh/C/rose-browser/rose-bud-personal/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png" /* "https://duckduckgo.com" */
#define ROSE_HOMEPAGE true
#define HOME ROSE_HOMEPAGE ? "file:///home/loki/Documents/core/software/fresh/C/rose-browser/rose-bud-personal/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png" : "https://lite.duckduckgo.com/html"
#define SEARCH "https://lite.duckduckgo.com/html/?q=%s"
#define CACHE_DIR "/home/loki/.cache/rose"

9
rose.c
View File

@ -113,12 +113,15 @@ void load_changed(WebKitWebView *self, WebKitLoadEvent load_event, GtkNotebook *
if(DEBUG) printf("Load committed with: %s\n", webkit_web_view_get_uri (self));
break;
case WEBKIT_LOAD_FINISHED:
{
const char* title = webkit_web_view_get_title(self);
gtk_notebook_set_tab_label_text(notebook, GTK_WIDGET(self),
webkit_web_view_get_title(self));
gtk_widget_hide(GTK_WIDGET(bar));
title == NULL ? "" : title );
// gtk_widget_hide(GTK_WIDGET(bar));
break;
}
}
}
void notebook_append(GtkNotebook *notebook, const char *uri)
{
@ -223,6 +226,8 @@ int handle_key(func id, GtkNotebook *notebook)
} else {
gtk_notebook_next_page(notebook);
}
entry_mode = _SEARCH;
show_bar(notebook);
break;
case close_tab: