From 8907cbb063f4369bfba554f3fb6f1fc2a9a17fd9 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 12 Mar 2024 14:16:29 -0300 Subject: [PATCH] formatting pass --- config.h | 4 ++-- makefile | 15 +++++++++------ rose | Bin 39008 -> 39008 bytes rose.c | 8 ++++---- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/config.h b/config.h index 531b6c2..b6f3005 100644 --- a/config.h +++ b/config.h @@ -40,8 +40,8 @@ To remove plugins completely; "enable-smooth-scrolling", false, \ "default-charset", "utf-8" /* CACHE */ -#define CACHE_DIR "/home/nuno/.cache/rose" -#define DATA_MANAGER_OPTS "base-cache-directory", CACHE_DIR, "base-data-directory", CACHE_DIR, +#define DATA_DIR "/home/nuno/.cache/rose" +#define DATA_MANAGER_OPTS "base-cache-directory", DATA_DIR, "base-data-directory", DATA_DIR // GTK #define GTK_SETTINGS_CONFIG_H "gtk-application-prefer-dark-theme", false, "gtk-enable-animations", false diff --git a/makefile b/makefile index 011b630..25aa387 100644 --- a/makefile +++ b/makefile @@ -31,8 +31,8 @@ FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT) # Change hardcoded paths when building ## Cache USER=`whoami` -DEFAULT_CACHE_DIR=/home/loki/.cache/rose -CURRENT_CACHE_DIR=/home/$(USER)/.cache/rose +DEFAULT_DATA_DIR=/home/nuno/.cache/rose +CURRENT_DATA_DIR=/home/$(USER)/.cache/rose ## dir DEFAULT_DIR=/home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot CURRENT_DIR=`pwd` @@ -42,10 +42,10 @@ build: $(SRC) $(PLUGINS) $(CONFIG) cd plugins/readability/ && sh recompute_READABILITY_N.sh cd plugins/style && sh recompute_STYLE_N.sh # Make cache - mkdir -p $(CURRENT_CACHE_DIR) + mkdir -p $(CURRENT_DATA_DIR) # Hardcode cache path find $(CURRENT_DIR) -type f -not -path "*.git*" -not -path "*makefile*" -exec \ - sed -i "s|$(DEFAULT_CACHE_DIR)|$(CURRENT_CACHE_DIR)|g" {} + + sed -i "s|$(DEFAULT_DATA_DIR)|$(CURRENT_DATA_DIR)|g" {} + # Hardcode git repository path find $(CURRENT_DIR) -type f -not -path "*.git*" -not -path "*makefile*" -exec \ sed -i "s|$(DEFAULT_DIR)|$(CURRENT_DIR)|g" {} + @@ -82,11 +82,14 @@ uninstall: rm -r /usr/share/themes/rose rm /usr/bin/rose rm /usr/bin/rose-mklink - rm $(CACHE_DIR) + rm $(DATA_DIR) clean: rm rose - rm $(CACHE_DIR) + rm $(DATA_DIR) format: $(SRC) $(PLUGINS) $(FORMATTER) $(SRC) $(PLUGINS) $(rose.h) + +diagnose_deprecations: + make && G_ENABLE_DIAGNOSTIC=1 ./rose diff --git a/rose b/rose index f20a0c19c2a2dea23e14ee31b78dfc29196fd497..623f8b9c360d40c1adf72f65b59d5e7f95e6fd39 100755 GIT binary patch delta 2688 zcmZ8j4Nz3q6@GVNBUap9tW2Poh(D1v24M>eXx-^<3g)5UUlOzf8XXx0gp@RkB&p-# ztR%kfY$S7`t#R7M*0xE9TGFKxTQhYPaA8_AOq!%2i7ci>?p7;?p3A2aLVmE|t)yrgjDpTR+*!DSZQxaf z0angM;a2A5Ym4@=c7CcTm96J*6+Oo;hjP~x&tZpoliO#yyEHWAHk;Xn(47*CiG9T9 zsTsbYb5{o3`Fk@<5LNqJ4W?F;BItSsP^$Gg!s63^NC{SAt&Tn7(-_IoQmt3axh~}& z8A<^{Cl>*7jf?fLbqo-D@A4#g&4pL72g=rPlS{nLyVO+QLwdmZc{(_Y z$YLCRLCRja(^KWy*<)SoR@A_u}hjDeUMaBaZ`owScZ^nvgQ#RJyBRhcG{&AG49 zp-bW#;-Ch;yJXNO_EYWwm(6g1`iRf2(GesY5gXv8#4(^(atPU@nEStgebCtiZ(;_P zv)jSc0C>U5hyA^@|B3GDCY9|KJfdh?lvs}5(|aHtgk+T5*!?ASCE)U{QIs<6rr3^c z;$lT6P^)pZJFZrBUw0`+HrST8j;j2z4Jp3Ke@l6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 zL6SXEUWA<6E9Dqu3uKxJ`c)~5A=~~gWedqZDK9_{K~9kDmoha5c?K|5kUtuf(ifvF zQX28l2E+Rx@-E~}kmsAFD2<@_eaInDKL*(e*y;S6@&(MolPfaWDV|@kkTvrcD;~m& ziB^%r_VJG^HZTWIsGNsyXJrnn!1rRa4=~&L3FsEyTe+BZ^SG*orm?F$yXr|6;XA6n z&wM-JpXwR?{+UzojMdw`XO6MSzl*28~WlL?%?HLtPaaOM8-7`*a5b6|^! zdBP_TRx`Zq&3{$mJ#W5$17m~X7aJhr!yg|ylgL)`LoJ!Hz9K!5;^U`V*05sES~Fv3 W-Y%E4<|NoF43BSRXZTR-fa!lOb~T;= diff --git a/rose.c b/rose.c index a26e155..775b338 100644 --- a/rose.c +++ b/rose.c @@ -78,7 +78,7 @@ void handle_signal_load_changed(WebKitWebView* self, WebKitLoadEvent load_event, { switch (load_event) { /* see - */ + */ case WEBKIT_LOAD_STARTED: set_custom_style(self); redirect_if_annoying(self, webkit_web_view_get_uri(self)); @@ -132,7 +132,7 @@ GtkWidget* handle_signal_create_new_tab(WebKitWebView* self, webkit_web_view_evaluate_javascript(self, "alert('Too many tabs, not opening a new one')", -1, NULL, "rosenrot-alert-numtabs", NULL, NULL, NULL); return NULL; } - /* + /* WebKitGTK documentation recommends returning the new webview. I imagine that this might allow e.g., to go back in a new tab or generally to keep track of history. @@ -385,9 +385,9 @@ int handle_signal_keypress(void* self, GdkEvent* event, GtkNotebook* notebook) if ((event->key.state == shortcut[i].mod || shortcut[i].mod == 0x0) && event->key.keyval == shortcut[i].key) return handle_shortcut(shortcut[i].id, notebook); /* - If I wanted to bind button presses, like the extra button in the mouse, + If I wanted to bind button presses, like the extra button in the mouse, I would have to bind the button-press-event signal instead. - Some links in case I go down that road: + Some links in case I go down that road: - - - https://docs.gtk.org/gdk3/struct.EventButton.html