Commit b4797a62 authored by Moritz Lipp's avatar Moritz Lipp

Merge branch 'release/0.2.5'

parents 9f5880aa cfabe75b
...@@ -28,6 +28,9 @@ endif ...@@ -28,6 +28,9 @@ endif
ifneq (${WITH_JSON},0) ifneq (${WITH_JSON},0)
CPPFLAGS += -DWITH_JSON CPPFLAGS += -DWITH_JSON
JSON_PC_NAME = json-c
else
JSON_PC_NAME =
endif endif
ifeq (,$(findstring -DGETTEXT_PACKAGE,${CPPFLAGS})) ifeq (,$(findstring -DGETTEXT_PACKAGE,${CPPFLAGS}))
...@@ -89,6 +92,7 @@ ${BUILDDIR}/${PROJECT}.pc: ${PROJECTNV}.pc.in config.mk ...@@ -89,6 +92,7 @@ ${BUILDDIR}/${PROJECT}.pc: ${PROJECTNV}.pc.in config.mk
-e 's,@INCLUDEDIR@,${INCLUDEDIR},' \ -e 's,@INCLUDEDIR@,${INCLUDEDIR},' \
-e 's,@LIBDIR@,${LIBDIR},' \ -e 's,@LIBDIR@,${LIBDIR},' \
-e 's,@LIBNOTIFY_PC_NAME@,${LIBNOTIFY_PC_NAME},' \ -e 's,@LIBNOTIFY_PC_NAME@,${LIBNOTIFY_PC_NAME},' \
-e 's,@JSON_PC_NAME@,${JSON_PC_NAME},' \
${PROJECTNV}.pc.in > $@.tmp ${PROJECTNV}.pc.in > $@.tmp
$(QUIET)mv $@.tmp $@ $(QUIET)mv $@.tmp $@
...@@ -101,15 +105,15 @@ ${OBJECTS}: config.mk \ ...@@ -101,15 +105,15 @@ ${OBJECTS}: config.mk \
${BUILDDIR_RELEASE}/%.o: %.c ${BUILDDIR_RELEASE}/%.o: %.c
$(call colorecho,CC,$<) $(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@)) @mkdir -p ${DEPENDDIR}/$(dir $@)
@mkdir -p $(dir $(abspath $@)) @mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< \ $(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< \
-MMD -MF ${DEPENDDIR}/$(abspath $@).dep -MMD -MF ${DEPENDDIR}/$@.dep
${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}.a: ${OBJECTS} ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}.a: ${OBJECTS}
$(call colorecho,AR,$@) $(call colorecho,AR,$@)
@mkdir -p ${BUILDDIR_RELEASE}/${BINDIR} @mkdir -p ${BUILDDIR_RELEASE}/${BINDIR}
$(QUIET)ar rcs $@ ${OBJECTS} $(QUIET)${AR} rcs $@ ${OBJECTS}
${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}.so.${SOVERSION}: ${OBJECTS} ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}.so.${SOVERSION}: ${OBJECTS}
$(call colorecho,LD,$@) $(call colorecho,LD,$@)
...@@ -132,10 +136,10 @@ ${OBJECT_DEBUG}: config.mk \ ...@@ -132,10 +136,10 @@ ${OBJECT_DEBUG}: config.mk \
${BUILDDIR_DEBUG}/%.o: %.c ${BUILDDIR_DEBUG}/%.o: %.c
$(call colorecho,CC,$<) $(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@)) @mkdir -p ${DEPENDDIR}/$(dir $@)
@mkdir -p $(dir $(abspath $@)) @mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< \ $(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< \
-MMD -MF ${DEPENDDIR}/$(abspath $@).dep -MMD -MF ${DEPENDDIR}/$@.dep
${BUILDDIR_DEBUG}/${BINDIR}/lib${PROJECT}.a: ${OBJECTS_DEBUG} ${BUILDDIR_DEBUG}/${BINDIR}/lib${PROJECT}.a: ${OBJECTS_DEBUG}
$(call colorecho,AR,$@) $(call colorecho,AR,$@)
...@@ -161,10 +165,10 @@ ${OBJECTS_GCOV}: config.mk \ ...@@ -161,10 +165,10 @@ ${OBJECTS_GCOV}: config.mk \
${BUILDDIR_GCOV}/%.o: %.c ${BUILDDIR_GCOV}/%.o: %.c
$(call colorecho,CC,$<) $(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@)) @mkdir -p ${DEPENDDIR}/$(dir $@)
@mkdir -p $(dir $(abspath $@)) @mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${GCOV_CFLAGS} \ $(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${GCOV_CFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep -o $@ $< -MMD -MF ${DEPENDDIR}/$@.dep
${BUILDDIR_GCOV}/${BINDIR}/lib${PROJECT}.a: ${OBJECTS_GCOV} ${BUILDDIR_GCOV}/${BINDIR}/lib${PROJECT}.a: ${OBJECTS_GCOV}
$(call colorecho,AR,$@) $(call colorecho,AR,$@)
...@@ -278,8 +282,9 @@ uninstall-headers: ...@@ -278,8 +282,9 @@ uninstall-headers:
$(call colorecho,UNINSTALL,"Remove pkg-config file") $(call colorecho,UNINSTALL,"Remove pkg-config file")
$(QUIET)rm -f ${DESTDIR}${LIBDIR}/pkgconfig/${PROJECT}.pc $(QUIET)rm -f ${DESTDIR}${LIBDIR}/pkgconfig/${PROJECT}.pc
DEPENDS = ${DEPENDDIRS:^=${DEPENDDIR}/}$(addprefix ${DEPENDDIR}/,${OBJECTS:.o=.o.dep})
-include ${DEPENDS}
.PHONY: all options clean debug doc test dist install install-headers uninstall \ .PHONY: all options clean debug doc test dist install install-headers uninstall \
uninstall-headers ${PROJECT} ${PROJECT}-debug po update-po \ uninstall-headers ${PROJECT} ${PROJECT}-debug po update-po \
static shared install-static install-shared static shared install-static install-shared
-include $(wildcard ${DEPENDDIR}/*.dep)
...@@ -10,7 +10,7 @@ enhance the user interface that is used by zathura and jumanji. ...@@ -10,7 +10,7 @@ enhance the user interface that is used by zathura and jumanji.
Requirements Requirements
------------ ------------
glib (>= 2.28) glib (>= 2.28)
gtk3 (>= 3.2) gtk3 (>= 3.4)
intltool intltool
libnotify (optional, for notification support) libnotify (optional, for notification support)
......
# See LICENSE file for license and copyright information # See LICENSE file for license and copyright information
#
ifeq ($(COLOR),1)
# GCC diagnostics colors
DIAGNOSTICS_COLOR_AVAILABLE ?= $(shell ($(CC) -fdiagnostics-color=always -E - </dev/null >/dev/null 2>/dev/null && echo 1) || echo 0)
ifeq ($(DIAGNOSTICS_COLOR_AVAILABLE),1)
CPPFLAGS += -fdiagnostics-color=always
endif
# colorful output
TPUT ?= /usr/bin/tput TPUT ?= /usr/bin/tput
TPUT_AVAILABLE ?= $(shell ${TPUT} -V 2>/dev/null) TPUT_AVAILABLE ?= $(shell ${TPUT} -V 2>/dev/null)
ifdef TPUT_AVAILABLE ifdef TPUT_AVAILABLE
ifeq ($(COLOR),1)
COLOR_NORMAL = `$(TPUT) sgr0` COLOR_NORMAL = `$(TPUT) sgr0`
COLOR_ACTION = `$(TPUT) bold``$(TPUT) setaf 3` COLOR_ACTION = `$(TPUT) bold``$(TPUT) setaf 3`
COLOR_COMMENT = `$(TPUT) bold``$(TPUT) setaf 2` COLOR_COMMENT = `$(TPUT) bold``$(TPUT) setaf 2`
COLOR_BRACKET = `$(TPUT) setaf 4` COLOR_BRACKET = `$(TPUT) setaf 4`
CC += -fdiagnostics-color=always
define colorecho define colorecho
@echo $(COLOR_BRACKET)" ["$(COLOR_ACTION)$1$(COLOR_BRACKET)"] "$(COLOR_COMMENT)$2$(COLOR_BRACKET) $(COLOR_NORMAL) @echo $(COLOR_BRACKET)" ["$(COLOR_ACTION)$1$(COLOR_BRACKET)"] "$(COLOR_COMMENT)$2$(COLOR_BRACKET) $(COLOR_NORMAL)
endef endef
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
GIRARA_VERSION_MAJOR = 0 GIRARA_VERSION_MAJOR = 0
GIRARA_VERSION_MINOR = 2 GIRARA_VERSION_MINOR = 2
GIRARA_VERSION_REV = 4 GIRARA_VERSION_REV = 5
VERSION = ${GIRARA_VERSION_MAJOR}.${GIRARA_VERSION_MINOR}.${GIRARA_VERSION_REV} VERSION = ${GIRARA_VERSION_MAJOR}.${GIRARA_VERSION_MINOR}.${GIRARA_VERSION_REV}
# Rules for the SOMAJOR and SOMINOR. # Rules for the SOMAJOR and SOMINOR.
...@@ -46,7 +46,7 @@ BINDIR ?= bin ...@@ -46,7 +46,7 @@ BINDIR ?= bin
# GTK+ # GTK+
GTK_VERSION_CHECK ?= 1 GTK_VERSION_CHECK ?= 1
GTK_MIN_VERSION = 3.2 GTK_MIN_VERSION = 3.4
GTK_PKG_CONFIG_NAME = gtk+-3.0 GTK_PKG_CONFIG_NAME = gtk+-3.0
# glib # glib
GLIB_VERSION_CHECK ?= 1 GLIB_VERSION_CHECK ?= 1
...@@ -70,8 +70,11 @@ endif ...@@ -70,8 +70,11 @@ endif
INCS = ${GTK_INC} ${LIBNOTIFY_INC} ${JSON_INC} INCS = ${GTK_INC} ${LIBNOTIFY_INC} ${JSON_INC}
LIBS = ${GTK_LIB} ${LIBNOTIFY_LIB} ${JSON_LIB} -lm LIBS = ${GTK_LIB} ${LIBNOTIFY_LIB} ${JSON_LIB} -lm
# flags # pre-processor flags
CFLAGS += -std=c99 -pedantic -Wall -Wextra -fPIC $(INCS) CPPFLAGS += -D_FILE_OFFSET_BITS=64
# compiler flags
CFLAGS += -std=c11 -pedantic -Wall -Wextra -fPIC $(INCS)
# linker flags # linker flags
LDFLAGS += -fPIC LDFLAGS += -fPIC
......
...@@ -9,6 +9,12 @@ ...@@ -9,6 +9,12 @@
-GtkRange-slider-width: 0; -GtkRange-slider-width: 0;
-GtkRange-trough-border: 0; -GtkRange-trough-border: 0;
} }
#@session@ GtkScrolledWindow GtkScrollbar {
background-color: @scrollbar-bg@;
}
#@session@ GtkScrolledWindow GtkScrollbar.slider {
background-color: @scrollbar-fg@;
}
#@session@ * { #@session@ * {
color: @default-fg@; color: @default-fg@;
......
...@@ -10,4 +10,4 @@ Version: ${version} ...@@ -10,4 +10,4 @@ Version: ${version}
URL: http://pwmt.org/projects/girara URL: http://pwmt.org/projects/girara
Cflags: -I${includedir} Cflags: -I${includedir}
Libs: -L${libdir} -l${project} Libs: -L${libdir} -l${project}
Requires.private: gtk+-3.0 @LIBNOTIFY_PC_NAME@ Requires.private: gtk+-3.0 @LIBNOTIFY_PC_NAME@ @JSON_PC_NAME@
...@@ -52,7 +52,8 @@ girara_cmd_map_unmap(girara_session_t* session, girara_list_t* argument_list, ...@@ -52,7 +52,8 @@ girara_cmd_map_unmap(girara_session_t* session, girara_list_t* argument_list,
{"Tab", GDK_KEY_Tab}, {"Tab", GDK_KEY_Tab},
{"ShiftTab", GDK_KEY_ISO_Left_Tab}, {"ShiftTab", GDK_KEY_ISO_Left_Tab},
{"Up", GDK_KEY_Up}, {"Up", GDK_KEY_Up},
{"Print", GDK_KEY_Print} {"Print", GDK_KEY_Print},
{"Home", GDK_KEY_Home}
}; };
typedef struct gdk_mouse_button_s typedef struct gdk_mouse_button_s
......
...@@ -218,6 +218,8 @@ girara_config_load_default(girara_session_t* session) ...@@ -218,6 +218,8 @@ girara_config_load_default(girara_session_t* session)
girara_setting_add(session, "notification-warning-bg", "#F3F000", STRING, TRUE, _("Warning notifaction background color"), NULL, NULL); girara_setting_add(session, "notification-warning-bg", "#F3F000", STRING, TRUE, _("Warning notifaction background color"), NULL, NULL);
girara_setting_add(session, "notification-fg", "#000000", STRING, TRUE, _("Notification foreground color"), NULL, NULL); girara_setting_add(session, "notification-fg", "#000000", STRING, TRUE, _("Notification foreground color"), NULL, NULL);
girara_setting_add(session, "notification-bg", "#FFFFFF", STRING, TRUE, _("Notification background color"), NULL, NULL); girara_setting_add(session, "notification-bg", "#FFFFFF", STRING, TRUE, _("Notification background color"), NULL, NULL);
girara_setting_add(session, "scrollbar-fg", "#DDDDDD", STRING, TRUE, _("Scrollbar foreground color"), NULL, NULL);
girara_setting_add(session, "scrollbar-bg", "#000000", STRING, TRUE, _("Scrollbar background color"), NULL, NULL);
girara_setting_add(session, "tabbar-fg", "#939393", STRING, TRUE, _("Tab bar foreground color"), NULL, NULL); girara_setting_add(session, "tabbar-fg", "#939393", STRING, TRUE, _("Tab bar foreground color"), NULL, NULL);
girara_setting_add(session, "tabbar-bg", "#000000", STRING, TRUE, _("Tab bar background color"), NULL, NULL); girara_setting_add(session, "tabbar-bg", "#000000", STRING, TRUE, _("Tab bar background color"), NULL, NULL);
girara_setting_add(session, "tabbar-focus-fg", "#9FBC00", STRING, TRUE, _("Tab bar foreground color (active)"), NULL, NULL); girara_setting_add(session, "tabbar-focus-fg", "#9FBC00", STRING, TRUE, _("Tab bar foreground color (active)"), NULL, NULL);
...@@ -237,16 +239,19 @@ girara_config_load_default(girara_session_t* session) ...@@ -237,16 +239,19 @@ girara_config_load_default(girara_session_t* session)
girara_setting_add(session, "smooth-scroll", &use_smooth_scroll, BOOLEAN, TRUE, _("Enable smooth scrolling and zooming"), NULL, NULL); girara_setting_add(session, "smooth-scroll", &use_smooth_scroll, BOOLEAN, TRUE, _("Enable smooth scrolling and zooming"), NULL, NULL);
/* shortcuts */ /* shortcuts */
girara_shortcut_add(session, 0, GDK_KEY_Escape, NULL, girara_sc_abort, normal_mode, 0, NULL); girara_shortcut_add(session, 0, GDK_KEY_Escape, NULL, girara_sc_abort, normal_mode, 0, NULL);
girara_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_c, NULL, girara_sc_abort, normal_mode, 0, NULL); girara_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_bracketleft, NULL, girara_sc_abort, normal_mode, 0, NULL);
girara_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_q, NULL, girara_sc_quit, normal_mode, 0, NULL); girara_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_c, NULL, girara_sc_abort, normal_mode, 0, NULL);
girara_shortcut_add(session, 0, GDK_KEY_colon, NULL, girara_sc_focus_inputbar, normal_mode, 0, ":"); girara_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_q, NULL, girara_sc_quit, normal_mode, 0, NULL);
girara_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_w, NULL, girara_sc_tab_close, normal_mode, 0, NULL); girara_shortcut_add(session, 0, GDK_KEY_colon, NULL, girara_sc_focus_inputbar, normal_mode, 0, ":");
girara_shortcut_add(session, 0, 0, "gt", girara_sc_tab_navigate, normal_mode, GIRARA_NEXT, NULL); girara_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_w, NULL, girara_sc_tab_close, normal_mode, 0, NULL);
girara_shortcut_add(session, 0, 0, "gT", girara_sc_tab_navigate, normal_mode, GIRARA_PREVIOUS, NULL); girara_shortcut_add(session, 0, 0, "gt", girara_sc_tab_navigate, normal_mode, GIRARA_NEXT, NULL);
girara_shortcut_add(session, 0, 0, "gT", girara_sc_tab_navigate, normal_mode, GIRARA_PREVIOUS, NULL);
/* inputbar shortcuts */ /* inputbar shortcuts */
girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_j, girara_isc_activate, 0, NULL);
girara_inputbar_shortcut_add(session, 0, GDK_KEY_Escape, girara_isc_abort, 0, NULL); girara_inputbar_shortcut_add(session, 0, GDK_KEY_Escape, girara_isc_abort, 0, NULL);
girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_bracketleft, girara_isc_abort, 0, NULL);
girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_c, girara_isc_abort, 0, NULL); girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_c, girara_isc_abort, 0, NULL);
girara_inputbar_shortcut_add(session, 0, GDK_KEY_Tab, girara_isc_completion, GIRARA_NEXT, NULL); girara_inputbar_shortcut_add(session, 0, GDK_KEY_Tab, girara_isc_completion, GIRARA_NEXT, NULL);
girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_Tab, girara_isc_completion, GIRARA_NEXT_GROUP, NULL); girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_Tab, girara_isc_completion, GIRARA_NEXT_GROUP, NULL);
......
...@@ -63,6 +63,8 @@ init_template_engine(GiraraTemplate* csstemplate) ...@@ -63,6 +63,8 @@ init_template_engine(GiraraTemplate* csstemplate)
"notification-warning-bg", "notification-warning-bg",
"notification-fg", "notification-fg",
"notification-bg", "notification-bg",
"scrollbar-fg",
"scrollbar-bg",
"tabbar-fg", "tabbar-fg",
"tabbar-bg", "tabbar-bg",
"tabbar-focus-fg", "tabbar-focus-fg",
...@@ -115,6 +117,8 @@ fill_template_with_values(girara_session_t* session) ...@@ -115,6 +117,8 @@ fill_template_with_values(girara_session_t* session)
"notification-warning-bg", "notification-warning-bg",
"notification-fg", "notification-fg",
"notification-bg", "notification-bg",
"scrollbar-fg",
"scrollbar-bg",
"tabbar-fg", "tabbar-fg",
"tabbar-bg", "tabbar-bg",
"tabbar-focus-fg", "tabbar-focus-fg",
...@@ -268,9 +272,7 @@ girara_session_create() ...@@ -268,9 +272,7 @@ girara_session_create()
gtk_box_set_homogeneous(session->gtk.inputbar_box, TRUE); gtk_box_set_homogeneous(session->gtk.inputbar_box, TRUE);
session->gtk.view = gtk_scrolled_window_new(NULL, NULL); session->gtk.view = gtk_scrolled_window_new(NULL, NULL);
session->gtk.viewport = gtk_viewport_new(NULL, NULL); session->gtk.viewport = gtk_viewport_new(NULL, NULL);
#if GTK_CHECK_VERSION(3, 4, 0)
gtk_widget_add_events(session->gtk.viewport, GDK_SCROLL_MASK); gtk_widget_add_events(session->gtk.viewport, GDK_SCROLL_MASK);
#endif
session->gtk.statusbar = gtk_event_box_new(); session->gtk.statusbar = gtk_event_box_new();
session->gtk.notification_area = gtk_event_box_new(); session->gtk.notification_area = gtk_event_box_new();
session->gtk.notification_text = gtk_label_new(NULL); session->gtk.notification_text = gtk_label_new(NULL);
...@@ -289,13 +291,11 @@ girara_session_init(girara_session_t* session, const char* sessionname) ...@@ -289,13 +291,11 @@ girara_session_init(girara_session_t* session, const char* sessionname)
return false; return false;
} }
#if GTK_CHECK_VERSION(3, 4, 0)
bool smooth_scroll = false; bool smooth_scroll = false;
girara_setting_get(session, "smooth-scroll", &smooth_scroll); girara_setting_get(session, "smooth-scroll", &smooth_scroll);
if (smooth_scroll) { if (smooth_scroll) {
gtk_widget_add_events(session->gtk.viewport, GDK_SMOOTH_SCROLL_MASK); gtk_widget_add_events(session->gtk.viewport, GDK_SMOOTH_SCROLL_MASK);
} }
#endif
session->private_data->session_name = g_strdup( session->private_data->session_name = g_strdup(
(sessionname == NULL) ? "girara" : sessionname); (sessionname == NULL) ? "girara" : sessionname);
......
...@@ -148,6 +148,13 @@ girara_inputbar_shortcut_free(girara_inputbar_shortcut_t* inputbar_shortcut) ...@@ -148,6 +148,13 @@ girara_inputbar_shortcut_free(girara_inputbar_shortcut_t* inputbar_shortcut)
g_slice_free(girara_inputbar_shortcut_t, inputbar_shortcut); g_slice_free(girara_inputbar_shortcut_t, inputbar_shortcut);
} }
bool
girara_isc_activate(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{
girara_callback_inputbar_activate(session->gtk.inputbar_entry, session);
return true;
}
bool bool
girara_isc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_isc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
......
...@@ -211,6 +211,19 @@ bool girara_sc_toggle_tabbar(girara_session_t* session, girara_argument_t* ...@@ -211,6 +211,19 @@ bool girara_sc_toggle_tabbar(girara_session_t* session, girara_argument_t*
bool girara_sc_set(girara_session_t* session, girara_argument_t* argument, bool girara_sc_set(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t); girara_event_t* event, unsigned int t);
/**
* Default shortcut function to activate
*
* @param session The used girara session
* @param argument The argument
* @param event Girara event
* @param t Number of executions
* @return true No error occured
* @return false An error occured (abort execution)
*/
bool girara_isc_activate(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
/** /**
* Default inputbar shortcut to abort * Default inputbar shortcut to abort
* *
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) #if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__)
#define _XOPEN_SOURCE 700 #define _XOPEN_SOURCE 700
#endif #endif
#define _FILE_OFFSET_BITS 64
#include <ctype.h> #include <ctype.h>
#include <glib.h> #include <glib.h>
......
...@@ -117,22 +117,22 @@ void* girara_safe_realloc(void** ptr, size_t size) GIRARA_ALLOC_SIZE(2); ...@@ -117,22 +117,22 @@ void* girara_safe_realloc(void** ptr, size_t size) GIRARA_ALLOC_SIZE(2);
* Prints a debug message. The arguments are passed to @ref _girara_debug as * Prints a debug message. The arguments are passed to @ref _girara_debug as
* last argument. * last argument.
*/ */
#define girara_debug(...) _girara_debug(__FUNCTION__, __LINE__, GIRARA_DEBUG, __VA_ARGS__) #define girara_debug(...) _girara_debug(__func__, __LINE__, GIRARA_DEBUG, __VA_ARGS__)
/** /**
* Prints an info message. The arguments are passed to @ref _girara_debug as * Prints an info message. The arguments are passed to @ref _girara_debug as
* last argument. * last argument.
*/ */
#define girara_info(...) _girara_debug(__FUNCTION__, __LINE__, GIRARA_INFO, __VA_ARGS__) #define girara_info(...) _girara_debug(__func__, __LINE__, GIRARA_INFO, __VA_ARGS__)
/** /**
* Prints a warning message. The arguments are passed to @ref _girara_debug as * Prints a warning message. The arguments are passed to @ref _girara_debug as
* last argument. * last argument.
*/ */
#define girara_warning(...) _girara_debug(__FUNCTION__, __LINE__, GIRARA_WARNING, __VA_ARGS__) #define girara_warning(...) _girara_debug(__func__, __LINE__, GIRARA_WARNING, __VA_ARGS__)
/** /**
* Prints an error message. The arguments are passed to @ref _girara_debug as * Prints an error message. The arguments are passed to @ref _girara_debug as
* last argument. * last argument.
*/ */
#define girara_error(...) _girara_debug(__FUNCTION__, __LINE__, GIRARA_ERROR, __VA_ARGS__) #define girara_error(...) _girara_debug(__func__, __LINE__, GIRARA_ERROR, __VA_ARGS__)
/** /**
* Print a message. * Print a message.
......
...@@ -6,7 +6,7 @@ include ../colors.mk ...@@ -6,7 +6,7 @@ include ../colors.mk
PROJECTNV = girara PROJECTNV = girara
PROJECT = girara-gtk3 PROJECT = girara-gtk3
CATALOGS = $(wildcard *.po) CATALOGS = $(sort $(wildcard *.po))
LINGUAS ?= $(patsubst %.po, %, $(CATALOGS)) LINGUAS ?= $(patsubst %.po, %, $(CATALOGS))
ifeq ($(LINGUAS),) ifeq ($(LINGUAS),)
ALINGUAS = ALINGUAS =
...@@ -20,7 +20,7 @@ all: ${MOS} ...@@ -20,7 +20,7 @@ all: ${MOS}
clean: clean:
$(QUIET)rm -rf POTFILES.in POTFILES.in.tmp $(patsubst %.po, %, $(CATALOGS)) ${PROJECT}.pot $(QUIET)rm -rf POTFILES.in POTFILES.in.tmp $(patsubst %.po, %, $(CATALOGS)) ${PROJECT}.pot
POTFILES.in: $(wildcard ../girara/*.c) POTFILES.in: $(sort $(wildcard ../girara/*.c))
$(QUIET) set -e && rm -f $@.tmp && touch $@.tmp && \ $(QUIET) set -e && rm -f $@.tmp && touch $@.tmp && \
for f in $(^F) ; do \ for f in $(^F) ; do \
echo girara/$$f >> $@.tmp ; \ echo girara/$$f >> $@.tmp ; \
......
...@@ -10,8 +10,8 @@ msgid "" ...@@ -10,8 +10,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: girara\n" "Project-Id-Version: girara\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2015-04-13 19:37+0200\n" "POT-Creation-Date: 2015-12-14 22:01+0100\n"
"PO-Revision-Date: 2015-01-01 21:24+0100\n" "PO-Revision-Date: 2015-12-14 21:49+0100\n"
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n" "Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
"Language-Team: German (http://www.transifex.com/projects/p/girara/language/" "Language-Team: German (http://www.transifex.com/projects/p/girara/language/"
"de/)\n" "de/)\n"
...@@ -22,17 +22,73 @@ msgstr "" ...@@ -22,17 +22,73 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.6.10\n" "X-Generator: Poedit 1.6.10\n"
#: ../girara/settings.c:244
#, c-format
msgid "Invalid number of arguments passed: %zu instead of 1"
msgstr "Ungültige Anzahl an Argumente übergeben: %zu anstatt von 1"
#. unhandled command #. unhandled command
#: ../girara/callbacks.c:501 #: ../girara/callbacks.c:501
#, c-format #, c-format
msgid "Not a valid command: %s" msgid "Not a valid command: %s"
msgstr "Ungültige zugewiesene Funktion: %s" msgstr "Ungültige zugewiesene Funktion: %s"
#: ../girara/commands.c:110 ../girara/commands.c:310
#, c-format
msgid "Invalid number of arguments passed: %zu instead of at least %u"
msgstr "Ungültige Anzahl an Argumente übergeben: %zu anstatt von mindestens %u"
#: ../girara/commands.c:144
#, c-format
msgid "Unregistered mode specified: %s"
msgstr "Modus ist nicht registriert: %s"
#: ../girara/commands.c:176
#, c-format
msgid "Invalid modifier in %s"
msgstr "Ungültiger Modifikator in %s"
#: ../girara/commands.c:215
#, c-format
msgid "Invalid special key value for %s"
msgstr "Ungültige Sondertaste für %s"
#: ../girara/commands.c:251
#, c-format
msgid "Invalid special key value or mode %s"
msgstr "Ungültige Sondertaste oder Modus %s"
#: ../girara/commands.c:332
#, c-format
msgid "Not a valid shortcut function: %s"
msgstr "Ungültige zugewiesene Funktion: %s"
#: ../girara/commands.c:420
msgid "Not enough arguments."
msgstr "Zu wenige Argumente."
#: ../girara/commands.c:425
msgid "Too many arguments."
msgstr "Zu viele Argumente."
#: ../girara/commands.c:438
#, c-format
msgid "Unknown option: %s"
msgstr "Unbekannte Otion: %s"
#: ../girara/commands.c:452
msgid "true"
msgstr "wahr"
#: ../girara/commands.c:452
msgid "false"
msgstr "falsch"
#: ../girara/commands.c:484
#, c-format
msgid "No value defined for option: %s"
msgstr "Kein Wert für Option definiert: %s"
#: ../girara/commands.c:499
#, c-format
msgid "Unknown value for option: %s"
msgstr "Unbekannter Wert für Option: %s"
#. settings #. settings
#: ../girara/config.c:202 #: ../girara/config.c:202
msgid "Font" msgid "Font"
...@@ -111,158 +167,110 @@ msgid "Notification background color" ...@@ -111,158 +167,110 @@ msgid "Notification background color"
msgstr "Hintergrundfarbe der Benachrichtigung" msgstr "Hintergrundfarbe der Benachrichtigung"
#: ../girara/config.c:221 #: ../girara/config.c:221
msgid "Scrollbar foreground color"
msgstr "Vordergrundfarbe der Bildlaufleiste"
#: ../girara/config.c:222
msgid "Scrollbar background color"
msgstr "Hintergrundfarbe der Bildlaufleiste"
#: ../girara/config.c:223
msgid "Tab bar foreground color" msgid "Tab bar foreground color"
msgstr "Registerleisten Vordergrundfarbe" msgstr "Registerleisten Vordergrundfarbe"
#: ../girara/config.c:222 #: ../girara/config.c:224
msgid "Tab bar background color" msgid "Tab bar background color"
msgstr "Registerleisten Hintergrundfarbe" msgstr "Registerleisten Hintergrundfarbe"
#: ../girara/config.c:223 #: ../girara/config.c:225
msgid "Tab bar foreground color (active)" msgid "Tab bar foreground color (active)"
msgstr "Registerleisten Vordergrundfarbe (aktiv)" msgstr "Registerleisten Vordergrundfarbe (aktiv)"
#: ../girara/config.c:224 #: ../girara/config.c:226
msgid "Tab bar background color (active)" msgid "Tab bar background color (active)"
msgstr "Registerleisten Hintergrundfarbe (aktiv)" msgstr "Registerleisten Hintergrundfarbe (aktiv)"
#: ../girara/config.c:226 #: ../girara/config.c:228
msgid "Initial window width" msgid "Initial window width"
msgstr "Ausgangsbreite des Fensters" msgstr "Ausgangsbreite des Fensters"
#: ../girara/config.c:227 #: ../girara/config.c:229
msgid "Initial window height" msgid "Initial window height"
msgstr "Ausgangshöhe des Fensters" msgstr "Ausgangshöhe des Fensters"
#: ../girara/config.c:228 #: ../girara/config.c:230
msgid "Horizontal padding for the status input and notification bars" msgid "Horizontal padding for the status input and notification bars"
msgstr "" msgstr ""
"Horizontaler innerer Rand für das Statusfeld und die Benachrichtigungsleiste" "Horizontaler innerer Rand für das Statusfeld und die Benachrichtigungsleiste"
#: ../girara/config.c:229 #: ../girara/config.c:231
msgid "Vertical padding for the status input and notification bars" msgid "Vertical padding for the status input and notification bars"
msgstr "" msgstr ""
"Vertikaler innerer Rand für das Statusfeld und die Benachrichtigungsleiste" "Vertikaler innerer Rand für das Statusfeld und die Benachrichtigungsleiste"
#: ../girara/config.c:230 #: ../girara/config.c:232
msgid "Number of completion items" msgid "Number of completion items"
msgstr "Anzahl der Elemente in der Vervollständigung" msgstr "Anzahl der Elemente in der Vervollständigung"
#: ../girara/config.c:231 #: ../girara/config.c:233
msgid "Show both the horizontal and vertical scrollbars" msgid "Show both the horizontal and vertical scrollbars"
msgstr "Zeige horizontale und vertikale Bildlaufleiste" msgstr "Zeige horizontale und vertikale Bildlaufleiste"
#: ../girara/config.c:232 #: ../girara/config.c:234
msgid "Show the horizontal scrollbar" msgid "Show the horizontal scrollbar"
msgstr "Zeige horizontale Bildlaufleiste" msgstr "Zeige horizontale Bildlaufleiste"
#: ../girara/config.c:233 #: ../girara/config.c:235
msgid "Show the vertical scrollbar" msgid "Show the vertical scrollbar"
msgstr "Zeige vertikale Bildlaufleiste" msgstr "Zeige vertikale Bildlaufleiste"
#: ../girara/config.c:234 #: ../girara/config.c:236
msgid "Window icon" msgid "Window icon"
msgstr "Fenstericon" msgstr "Fenstericon"
#: ../girara/config.c:235 #: ../girara/config.c:237
msgid "Command to execute in :exec" msgid "Command to execute in :exec"
msgstr "Befehl, der von :exec ausgeführt werden soll" msgstr "Befehl, der von :exec ausgeführt werden soll"
#: ../girara/config.c:236 #: ../girara/config.c:238
msgid "Show or hide certain GUI elements" msgid "Show or hide certain GUI elements"
msgstr "Zeige oder verstecke bestimmte GUI Elemente" msgstr "Zeige oder verstecke bestimmte GUI Elemente"
#: ../girara/config.c:237 #: ../girara/config.c:239
msgid "Enable smooth scrolling and zooming" msgid "Enable smooth scrolling and zooming"
msgstr "" msgstr "Aktiviere glattes Bildschirmrollen und Vergrößern"
#. commands #. commands
#: ../girara/config.c:273 #: ../girara/config.c:278
msgid "Execute a command" msgid "Execute a command"
msgstr "Führe einen Befehl aus." msgstr "Führe einen Befehl aus."
#: ../girara/config.c:274 #: ../girara/config.c:279
msgid "Map a key sequence" msgid "Map a key sequence"
msgstr "Tastenfolge zuweisen" msgstr "Tastenfolge zuweisen"
#: ../girara/config.c:275 #: ../girara/config.c:280
msgid "Quit the program" msgid "Quit the program"
msgstr "Beende das Programm" msgstr "Beende das Programm"
#: ../girara/config.c:276 #: ../girara/config.c:281
msgid "Set an option" msgid "Set an option"
msgstr "Setze eine Option" msgstr "Setze eine Option"
#: ../girara/config.c:277 #: ../girara/config.c:282
msgid "Unmap a key sequence" msgid "Unmap a key sequence"
msgstr "Tastenfolge entbinden" msgstr "Tastenfolge entbinden"
#: ../girara/config.c:279 #: ../girara/config.c:284