formatting pass

min
NunoSempere 2 months ago
parent a988ce965c
commit 204508bd0d

@ -5,7 +5,7 @@ This branch contains a bare-bones version of rosenrot, a webkit and gtk based br
- similar in many ways to the [original version of rose](https://github.com/mini-rose/rose-browser/tree/60173b6f5b562861b11dea17e3869ad6c3462bbb/src).
- But with the up to date libwebkit2gtk-4.1!
- compilable with [tcc](https://bellard.org/tcc/)! (also with gcc/clang)
- *One c file*, 390 lines (~356 excluding comments)
- *One c file*, 320 lines (~256 excluding comments & extraneous newlines)
- Still some minimal niceties: zoom, parsing more than one url from the command line, max number of tabs, plenty of shortcuts.
- Missing many quality of life features
- Meant for developers seeking to understand or replicate rosenrot

@ -38,6 +38,10 @@ depsdebian:
STYLE_BLUEPRINT="{BasedOnStyle: webkit, AllowShortIfStatementsOnASingleLine: true, IndentCaseLabels: true, AllowShortEnumsOnASingleLine: true}"
FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
stats:
cat rosenrot.c | wc -l
gcc -fpreprocessed -dD -E -P rosenrot.c | wc -l
format: $(SRC)
$(FORMATTER) $(SRC)

@ -210,7 +210,7 @@ int handle_signal_keypress(void* self, GdkEvent* event, GtkNotebook* notebook)
case KEY(0): // restore zoom
webkit_web_view_set_zoom_level(view, (zoom = ZOOM));
break;
case KEY(KP_Page_Up):{
case KEY(KP_Page_Up): {
int n = gtk_notebook_get_n_pages(notebook);
int k = gtk_notebook_get_current_page(notebook);
int l = (n + k - 1) % n;
@ -260,7 +260,7 @@ int handle_signal_keypress(void* self, GdkEvent* event, GtkNotebook* notebook)
notebook_create_new_tab(notebook, NULL);
break;
}
} else if(event_state == 0x0 && event_keyval == KEY(F11)){
} else if (event_state == 0x0 && event_keyval == KEY(F11)) {
if (is_fullscreen)
gtk_window_unfullscreen(window);
else

Loading…
Cancel
Save