commit: 5e1ea02409b318a46edc5d976738ca48d28246eb
parent: 92578a663bbb9a931a1771cd25922915cd014849
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 7 Dec 2019 11:50:04 +0100
Simplify formatting
Diffstat:
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/badwolf.c b/badwolf.c
@@ -243,10 +243,9 @@ WebViewCb_notify__estimated_load_progress(WebKitWebView *webView,
gdouble progress;
progress = webkit_web_view_get_estimated_load_progress(browser->webView);
- if(progress == 1)
- {
- progress = 0;
- }
+
+ if(progress >= 1) progress = 0;
+
gtk_entry_set_progress_fraction(GTK_ENTRY(browser->location), progress);
return TRUE;
@@ -304,13 +303,9 @@ WebViewCb_create(WebKitWebView *related_web_view,
struct Client *browser = new_browser(window, NULL, related_web_view);
if(badwolf_new_tab(GTK_NOTEBOOK(window->notebook), browser) < 0)
- {
return NULL;
- }
else
- {
return browser->webView;
- }
}
static gboolean
@@ -711,10 +706,7 @@ badwolf_new_tab(GtkNotebook *notebook, struct Client *browser)
gtk_widget_show_all(browser->box);
- if(gtk_notebook_insert_page(notebook, browser->box, NULL, (current_page + 1)) == -1)
- {
- return -1;
- }
+ if(gtk_notebook_insert_page(notebook, browser->box, NULL, (current_page + 1)) == -1) return -1;
gtk_notebook_set_tab_reorderable(notebook, browser->box, TRUE);
gtk_notebook_set_tab_label(notebook, browser->box, badwolf_new_tab_box(title, browser));