Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit5e1ea02409b318a46edc5d976738ca48d28246eb (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-12-07 11:50:04 +0100
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-12-15 19:10:54 +0100
Files1403c608ebb6026d2c4b6beb5a0633a455b4fbaa
goodwolf-5e1ea02409b318a46edc5d976738ca48d28246eb.tar
goodwolf-5e1ea02409b318a46edc5d976738ca48d28246eb.tar.gz
goodwolf-5e1ea02409b318a46edc5d976738ca48d28246eb.zip
Parent92578a663bbb9a931a1771cd25922915cd014849 (diff)
Simplify formatting
1 files changed, 4 insertions, 12 deletions
-rw-r--r--badwolf.c16
diff --git a/badwolf.c b/badwolf.c
index 9071351..289e218 100644
--- 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));