aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNunoSempere <nuno.semperelh@protonmail.com>2024-03-12 14:16:29 -0300
committerNunoSempere <nuno.semperelh@protonmail.com>2024-03-12 14:16:29 -0300
commit8907cbb063f4369bfba554f3fb6f1fc2a9a17fd9 (patch)
tree185663d5729607ce3b3ad42639c5435d612618d3
parent0f940a7460182187195b6300ae9bc0c822a11724 (diff)
formatting pass
-rw-r--r--config.h4
-rw-r--r--makefile15
-rwxr-xr-xrosebin39008 -> 39008 bytes
-rw-r--r--rose.c8
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 f20a0c1..623f8b9 100755
--- a/rose
+++ b/rose
Binary files differ
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 <https://webkitgtk.org/reference/webkit2gtk/2.5.1/WebKitWebView.html>
- */
+ */
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/gtk3/signal.Widget.button-press-event.html>
- <https://docs.gtk.org/gdk3/union.Event.html>
- https://docs.gtk.org/gdk3/struct.EventButton.html