Fix case where rosenrot is called with url arg
This commit is contained in:
parent
6fbcb549fd
commit
cf1e9bb911
8
makefile
8
makefile
|
@ -1,9 +1,9 @@
|
||||||
# C compiler
|
# C compiler
|
||||||
CC=gcc # alternatives: tcc, clang, zig cc
|
CC=gcc # alternatives: tcc, clang, zig cc
|
||||||
WARNINGS=-Wall
|
WARNINGS=-Wall
|
||||||
DEBUG= # -g
|
|
||||||
OPTIMIZED_SOME=-O3
|
OPTIMIZED_SOME=-O3
|
||||||
OPTIMIZED_MORE=-Ofast -march=native -funit-at-a-time -flto # binary will not be compatible with other computers, but may be much faster
|
OPTIMIZED_MORE=-Ofast -march=native -funit-at-a-time -flto # binary will not be compatible with other computers, but may be much faster
|
||||||
|
DEBUG= # -g
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
DEPS='webkit2gtk-4.1'
|
DEPS='webkit2gtk-4.1'
|
||||||
|
@ -31,14 +31,18 @@ build: $(SRC) $(PLUGINS) $(CONFIG) constants user_cache
|
||||||
$(CC) $(WARNINGS) $(OPTIMIZED_MORE) $(DEBUG) $(INCS) $(PLUGINS) $(SRC) -o rosenrot $(LIBS) $(ADBLOCK)
|
$(CC) $(WARNINGS) $(OPTIMIZED_MORE) $(DEBUG) $(INCS) $(PLUGINS) $(SRC) -o rosenrot $(LIBS) $(ADBLOCK)
|
||||||
|
|
||||||
constants:
|
constants:
|
||||||
|
@echo "# Computing constants"
|
||||||
cd plugins/readability/ && sh recompute_READABILITY_N.sh
|
cd plugins/readability/ && sh recompute_READABILITY_N.sh
|
||||||
cd plugins/style && sh recompute_STYLE_N.sh
|
cd plugins/style && sh recompute_STYLE_N.sh
|
||||||
|
@echo
|
||||||
|
|
||||||
user_cache:
|
user_cache:
|
||||||
@ # can't make this with sudo, because USER_CACHE_DIR could be /home/root/.cache
|
@if [ `id -u` -eq 0 ]; then echo "can't run make user_cache with sudo, because USER_CACHE_DIR would be /home/root/.cache"; return 1; fi
|
||||||
|
@echo "# Create user cache"
|
||||||
mkdir -p $(USER_CACHE_DIR)
|
mkdir -p $(USER_CACHE_DIR)
|
||||||
find . -type f -not -path "*.git*" -not -path "*makefile*" -exec \
|
find . -type f -not -path "*.git*" -not -path "*makefile*" -exec \
|
||||||
sed -i "s|$(MAINTAINER_CACHE_DIR)|$(USER_CACHE_DIR)|g" {} +
|
sed -i "s|$(MAINTAINER_CACHE_DIR)|$(USER_CACHE_DIR)|g" {} +
|
||||||
|
@echo
|
||||||
|
|
||||||
runtime_files:
|
runtime_files:
|
||||||
sudo mkdir -p /opt/rosenrot/
|
sudo mkdir -p /opt/rosenrot/
|
||||||
|
|
|
@ -447,7 +447,9 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
/* Show to user */
|
/* Show to user */
|
||||||
gtk_widget_show_all(GTK_WIDGET(window));
|
gtk_widget_show_all(GTK_WIDGET(window));
|
||||||
// gtk_widget_hide(GTK_WIDGET(bar.widget));
|
if (argc != 0) {
|
||||||
|
gtk_widget_hide(GTK_WIDGET(bar.widget));
|
||||||
|
}
|
||||||
|
|
||||||
/* Deal with more tabs */
|
/* Deal with more tabs */
|
||||||
if (argc > 2) {
|
if (argc > 2) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user