formatting/syntax tweaks

in particular, for switch cases which declare const, use a new block
min
NunoSempere 2 months ago
parent f2e06785f9
commit 8f4b4b9abf

@ -42,8 +42,7 @@ void load_uri(WebKitWebView* view, const char* uri)
snprintf(tmp, sizeof(tmp), "https://%s", uri);
webkit_web_view_load_uri(view, tmp);
}
else{
} else {
// Check for shortcuts
int l = SHORTCUT_N + strlen(uri) + 1;
char uri_expanded[l];
@ -218,14 +217,15 @@ void notebook_create_new_tab(GtkNotebook* notebook, const char* uri)
void toggle_bar(GtkNotebook* notebook)
{
switch (bar.entry_mode) {
case _SEARCH:
case _SEARCH: {
const char* url = webkit_web_view_get_uri(notebook_get_webview(notebook));
gtk_entry_set_placeholder_text(bar.line, "Search");
gtk_entry_buffer_set_text(bar.line_text, url, strlen(url));
gtk_widget_show(GTK_WIDGET(bar.widget));
gtk_window_set_focus(window, GTK_WIDGET(bar.line));
break;
case _FIND:
}
case _FIND: {
const char* search_text = webkit_find_controller_get_search_text(
webkit_web_view_get_find_controller(notebook_get_webview(notebook)));
@ -236,6 +236,7 @@ void toggle_bar(GtkNotebook* notebook)
gtk_widget_show(GTK_WIDGET(bar.widget));
gtk_window_set_focus(window, GTK_WIDGET(bar.line));
break;
}
default:
// fallthrough
case _HIDDEN:

Loading…
Cancel
Save