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 "enable-smooth-scrolling", false
#define GTK "gtk-application-prefer-dark-theme", false, "gtk-enable-animations", false #define GTK "gtk-application-prefer-dark-theme", false, "gtk-enable-animations", false
#define ROSE_HOMEPAGE true
#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 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 SEARCH "https://lite.duckduckgo.com/html/?q=%s"
#define CACHE_DIR "/home/loki/.cache/rose" #define CACHE_DIR "/home/loki/.cache/rose"

9
rose.c
View File

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