Skip to content

Commit

Permalink
Update version, change user themes on CSS based, change context menu,…
Browse files Browse the repository at this point in the history
… update GTK API
  • Loading branch information
Cactus64k committed Aug 11, 2019
1 parent 938a0cf commit ecf07cd
Show file tree
Hide file tree
Showing 29 changed files with 167 additions and 290 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include (GNUInstallDirs)
include (FindPkgConfig)

set (PROJECT simple-fb2-reader)
set (VERSION 1.1.2)
set (VERSION 1.1.3)

if (NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr")
Expand Down Expand Up @@ -55,6 +55,7 @@ target_link_libraries (${PROJECT} ${LIBRARIES})

install (TARGETS ${PROJECT} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES res/${PROJECT}.glade DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT}/)
install (FILES res/${PROJECT}.css DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT}/)

install (FILES intl/mo/en_US/${PROJECT}.mo DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/en_US/LC_MESSAGES/)
install (FILES intl/mo/ru/${PROJECT}.mo DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/ru/LC_MESSAGES/)
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@

1.1.1 (12/07/2016):
Autoscroll, refactoring.

1.1.3 (12/08/2019):
User themes based on css, update GTK API
28 changes: 15 additions & 13 deletions README.md → README
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@ Features:
- full 2.1 format support(without stylesheet and partial table support)
- navigation
- russian and english gui
- user themes(see ~/.config/simple-fb2-reader/config.cfg)
- user themes
edit ~/.config/simple-fb2-reader/simple-fb2-reader.css
example dark theme /usr/share/simple-fb2-reader/simple-fb2-reader.css
- auto scrolling(see config for customise scrolling speed)
- hotkeys

All features located in context menu.
Hotkeys description in "About" menu item.

Depends:
- libxml2 >= 2.9.1
- libgtk-3-0 >= 3.14.5
- libzip2 >= 0.11.2
- libsqlite3-0 >= 3.8.7.1
- libxml2 >= 2.9.4
- libgtk-3-0 >= 3.24.10
- libzip >= 1.5.1
- libsqlite3-0 >= 3.29.0


Build Depends:
- debhelper >= 9.0.0
- libxml2-dev >= 2.9.1
- libgtk-3-dev >= 3.14.5
- libzip-dev >= 0.11.2
- pkg-config >= 0.28
- gettext >= 0.19.3
- libsqlite3-dev >= 3.8.7.1
- cmake >= 3.0.2
- debhelper >= 12.3
- libxml2-dev >= 2.9.4
- libgtk-3-dev >= 3.24.10
- libzip-dev >= 1.5.1
- pkg-config >= 0.29
- gettext >= 0.19.8
- libsqlite3-dev >= 3.29.0
- cmake >= 3.13.4
6 changes: 3 additions & 3 deletions autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([simple-fb2-reader], [1.1.1], [[email protected]], [], [https://github.com/Cactus64k/simple-fb2-reader])
AC_INIT([simple-fb2-reader], [1.1.3], [[email protected]], [], [https://github.com/Cactus64k/simple-fb2-reader])
# AM_INIT_AUTOMAKE
# AC_CONFIG_SRCDIR([src/])
# AC_CONFIG_HEADERS([src/config.h.in])
Expand All @@ -15,7 +15,7 @@ PKG_CHECK_MODULES([XML], [libxml-2.0 >= 2.9.1])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32.4])
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.14.5])
PKG_CHECK_MODULES([ZIP], [libzip >= 0.11.2])
PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.8.7.1])
PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.8.7.1])


# Checks for header files.
Expand All @@ -29,7 +29,7 @@ AC_TYPE_SSIZE_T
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset setlocale strchr strerror])

AC_DEFINE_UNQUOTED([PACKAGE_VERSION], "${PACKAGE_VERSION}")
AC_DEFINE_UNQUOTED([PACKAGE_VERSION], "${PACKAGE_VERSION}")
AC_DEFINE_UNQUOTED([PACKAGE_NAME], "${PACKAGE_NAME}")


Expand Down
23 changes: 12 additions & 11 deletions autoconf/makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ SOURCES = $(shell find . -name '*.c' -printf './%P ')
OBJECTS = $(SOURCES:.c=.o)

DEFINIONS = -DGUI_CONSTRUCT_PATH='"$(datarootdir)/$(PACKAGE_NAME)/$(PACKAGE_NAME).glade"' \
-DPACKAGE_VERSION='"$(PACKAGE_VERSION)"' \
-DPACKAGE_NAME='"$(PACKAGE_NAME)"'
CC = @CC@
-DPACKAGE_VERSION='"$(PACKAGE_VERSION)"' \
-DPACKAGE_NAME='"$(PACKAGE_NAME)"'
CC = @CC@
CFLAGS = @CFLAGS@ $(DEFINIONS)
LDFLAGS = -export-dynamic

Expand All @@ -36,7 +36,7 @@ INCLUDE = @GTK_CFLAGS@\
all: $(SOURCES) $(PACKAGE_NAME) TRANSLATE_TARGET

TRANSLATE_TARGET:
msgfmt intl/ru.po --output-file=intl/ru.mo
msgfmt intl/ru.po --output-file=intl/ru.mo
msgfmt intl/en_US.po --output-file=intl/en_US.mo

$(PACKAGE_NAME): $(OBJECTS)
Expand Down Expand Up @@ -66,14 +66,15 @@ mk_folders:

# FIXME for new project
install:mk_folders
install $(PACKAGE_NAME) $(DESTDIR)$(bindir)/$(PACKAGE_NAME)
cp intl/ru.mo $(DESTDIR)$(localedir)/ru/LC_MESSAGES/$(PACKAGE_NAME).mo
cp intl/en_US.mo $(DESTDIR)$(localedir)/en_US/LC_MESSAGES/$(PACKAGE_NAME).mo
cp res/$(PACKAGE_NAME).desktop $(DESTDIR)$(datarootdir)/applications/$(PACKAGE_NAME).desktop
cp res/$(PACKAGE_NAME).svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/$(PACKAGE_NAME).svg
cp res/simple-fb2-reader.xml $(DESTDIR)$(datarootdir)/mime/packages/simple-fb2-reader.xml
install $(PACKAGE_NAME) $(DESTDIR)$(bindir)/$(PACKAGE_NAME)
cp intl/ru.mo $(DESTDIR)$(localedir)/ru/LC_MESSAGES/$(PACKAGE_NAME).mo
cp intl/en_US.mo $(DESTDIR)$(localedir)/en_US/LC_MESSAGES/$(PACKAGE_NAME).mo
cp res/$(PACKAGE_NAME).desktop $(DESTDIR)$(datarootdir)/applications/$(PACKAGE_NAME).desktop
cp res/$(PACKAGE_NAME).svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/$(PACKAGE_NAME).svg
cp res/simple-fb2-reader.xml $(DESTDIR)$(datarootdir)/mime/packages/simple-fb2-reader.xml
cp res/application-x-fictionbook+xml.svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/mimetypes/application-x-fictionbook+xml.svg
cp res/$(PACKAGE_NAME).glade $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/$(PACKAGE_NAME).glade
cp res/$(PACKAGE_NAME).glade $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/$(PACKAGE_NAME).glade
cp res/$(PACKAGE_NAME).css $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/$(PACKAGE_NAME).css
ln -sr $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/mimetypes/application-x-fictionbook+xml.svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/mimetypes/application-x-zip-compressed-fb2.svg


2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simple-fb2-reader (1.1.2) unstable; urgency=low
simple-fb2-reader (1.1.3) unstable; urgency=low

* Initial release (Closes: #nnnn)

Expand Down
8 changes: 5 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: simple-fb2-reader
Section: text
Priority: optional
Maintainer: Cactus <[email protected]>
Build-Depends: debhelper (>= 9.0.0), libxml2-dev (>= 2.9.1), libgtk-3-dev (>= 3.14.5), libzip-dev (>= 0.11.2), pkg-config (>= 0.28), gettext (>= 0.19.3), libsqlite3-dev (>= 3.8.7.1), cmake
Build-Depends: debhelper (>= 12.3), libxml2-dev (>= 2.9.4), libgtk-3-dev (>= 3.24.10), libzip-dev (>= 1.5.1), pkg-config (>= 0.29), gettext (>= 0.19.8), libsqlite3-dev (>= 3.29.0), cmake (>= 3.13.4)
Standards-Version: 3.9.3
Homepage: https://github.com/Cactus64k/simple-fb2-reader
#Vcs-Git: git://git.debian.org/collab-maint/simple-fb2-reader.git
Expand All @@ -12,7 +12,7 @@ Package: simple-fb2-reader
Architecture: amd64
Depends: ${shlibs:Depends}
Description: Simple tool to read FB2 books. Developed using GTK+3.
Features ("-" - not supported yet, "~" - partial support):
Features:
- supports fb2 and fb2.zip
- saving reading position
- saving window state, size and position
Expand All @@ -21,4 +21,6 @@ Description: Simple tool to read FB2 books. Developed using GTK+3.
- full 2.1 format support(without stylesheet and partial table tag support)
- navigation
- russian and english gui
- user themes(see ~/.config/simple-fb2-reader/config.cfg)
- user themes
edit ~/.config/simple-fb2-reader/simple-fb2-reader.css
example dark theme /usr/share/simple-fb2-reader/simple-fb2-reader.css
2 changes: 1 addition & 1 deletion intl/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export GLADE=`(find ../ -name '*.glade' -printf '../%P ')`

echo ${SRC[0]}

xgettext --package-name=$PROGNAME --package-version=$VERSION --msgid-bugs-address=$MAIL --i --from-code=UTF-8 --output=./$PROGNAME.pot $GLADE
xgettext --package-name=$PROGNAME --package-version=$VERSION --msgid-bugs-address=$MAIL --i --from-code=UTF-8 --output=./$PROGNAME.pot $GLADE
xgettext -j --keyword=$KEYWORD --package-name=$PROGNAME --package-version=$VERSION --msgid-bugs-address=$MAIL --i --from-code=UTF-8 --output=./$PROGNAME.pot $SRC

if [ -f ru.po ];
Expand Down
11 changes: 11 additions & 0 deletions res/simple-fb2-reader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.book_textview text selection {
color: white;
background-color: #888A85;
}

.book_textview text {
color: #e8e2b7;
background-color: #293134;
font-family: Sans;
}

44 changes: 27 additions & 17 deletions res/simple-fb2-reader.glade
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.2"/>
<requires lib="gtk+" version="3.20"/>
<object class="GtkTextBuffer" id="book_textbuff"/>
<object class="GtkAdjustment" id="book_textview_horisontal_adjustment">
<property name="upper">100</property>
Expand All @@ -26,6 +26,9 @@
<signal name="key-press-event" handler="main_wnd_key_press_event_cb" swapped="no"/>
<signal name="size-allocate" handler="main_wnd_size_allocate_cb" object="book_textview" swapped="no"/>
<signal name="window-state-event" handler="main_wnd_window_state_event_cb" swapped="no"/>
<child>
<placeholder/>
</child>
<child>
<object class="GtkScrolledWindow" id="book_scrolledwindow">
<property name="visible">True</property>
Expand All @@ -35,6 +38,7 @@
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="book_textview">
<property name="name">book_textview</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_tooltip">True</property>
Expand All @@ -50,6 +54,9 @@
<signal name="populate-popup" handler="book_textview_populate_popup_cb" swapped="no"/>
<signal name="query-tooltip" handler="book_textview_query_tooltip_cb" swapped="no"/>
<signal name="scroll-event" handler="book_textview_scroll_event_cb" swapped="no"/>
<style>
<class name="book_textview"/>
</style>
</object>
</child>
</object>
Expand All @@ -69,6 +76,9 @@
<property name="authors">Cactus &lt;[email protected]&gt;</property>
<property name="logo_icon_name">simple-fb2-reader</property>
<property name="license_type">gpl-3-0</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="reader_aboutdialog_vbox">
<property name="can_focus">False</property>
Expand All @@ -89,13 +99,13 @@
<object class="GtkLabel" id="about_dialog_hotkeys_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xpad">30</property>
<property name="label" translatable="yes">
ctrl+n Navigation
ctrl+f Search
ctrl+h About
ctrl+o Open book
ctrl+q Exit
ctrl+w Close book
ctrl+c Copy text
ctrl+mouse-wheel Font scale
ctrl+0 Default font scale
Expand All @@ -112,6 +122,9 @@ left-arrow Previous position(link navigation)
</child>
</object>
</child>
<style>
<class name="reader_aboutdialog"/>
</style>
</object>
<object class="GtkWindow" id="search_wnd">
<property name="can_focus">False</property>
Expand All @@ -125,6 +138,9 @@ left-arrow Previous position(link navigation)
<signal name="delete-event" handler="search_wnd_delete_event_cb" swapped="no"/>
<signal name="key-press-event" handler="search_wnd_key_press_event_cb" swapped="no"/>
<signal name="show" handler="search_wnd_show_cb" swapped="no"/>
<child>
<placeholder/>
</child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
Expand Down Expand Up @@ -154,7 +170,6 @@ left-arrow Previous position(link navigation)
</child>
<child>
<object class="GtkButton" id="search_wnd_search_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
Expand Down Expand Up @@ -188,11 +203,9 @@ left-arrow Previous position(link navigation)
<child>
<object class="GtkRadioButton" id="search_backward_radiobutton">
<property name="label" translatable="yes">Backward</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">search_forward_radiobutton</property>
</object>
Expand All @@ -205,11 +218,9 @@ left-arrow Previous position(link navigation)
<child>
<object class="GtkRadioButton" id="search_forward_radiobutton">
<property name="label" translatable="yes">Forward</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
Expand All @@ -221,7 +232,6 @@ left-arrow Previous position(link navigation)
</child>
<child>
<object class="GtkButton" id="search_wnd_close_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
Expand All @@ -246,11 +256,9 @@ left-arrow Previous position(link navigation)
<child>
<object class="GtkCheckButton" id="search_case_sensitive_checkbutton">
<property name="label" translatable="yes">Case ensitive</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
Expand Down Expand Up @@ -282,11 +290,14 @@ left-arrow Previous position(link navigation)
<property name="title" translatable="yes">Navigation</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="default_width">400</property>
<property name="default_height">400</property>
<property name="default_width">640</property>
<property name="default_height">480</property>
<property name="icon_name">simple-fb2-reader</property>
<property name="type_hint">dialog</property>
<property name="transient_for">main_wnd</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="navigation_dialog-vbox">
<property name="can_focus">False</property>
Expand All @@ -299,7 +310,6 @@ left-arrow Previous position(link navigation)
<child>
<object class="GtkButton" id="navigation_dialog-cancel-button">
<property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
Expand All @@ -314,7 +324,6 @@ left-arrow Previous position(link navigation)
<child>
<object class="GtkButton" id="navigation_dialog-jump-button">
<property name="label">gtk-jump-to</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
Expand Down Expand Up @@ -402,6 +411,9 @@ left-arrow Previous position(link navigation)
<property name="transient_for">main_wnd</property>
<property name="filter">fb2_files_filter</property>
<signal name="file-activated" handler="book_filechooserdialog_file_activated_cb" swapped="no"/>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="book_filechooserdialog-vbox">
<property name="can_focus">False</property>
Expand All @@ -414,7 +426,6 @@ left-arrow Previous position(link navigation)
<child>
<object class="GtkButton" id="book_filechooserdialog_cancel_button">
<property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
Expand All @@ -429,7 +440,6 @@ left-arrow Previous position(link navigation)
<child>
<object class="GtkButton" id="book_filechooserdialog_ok_button">
<property name="label">gtk-open</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
Expand Down
4 changes: 2 additions & 2 deletions slackbuild/simple-fb2-reader.info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PRGNAM="simple-fb2-reader"
VERSION="1.1.2"
VERSION="1.1.3"
HOMEPAGE="https://github.com/Cactus64k/simple-fb2-reader"
DOWNLOAD="https://github.com/Cactus64k/simple-fb2-reader/archive/1.1.2.tar.gz"
DOWNLOAD="https://github.com/Cactus64k/simple-fb2-reader/archive/1.1.3.tar.gz"
MD5SUM=""
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
Expand Down
Loading

0 comments on commit ecf07cd

Please sign in to comment.