21 Commits 4e951840db ... de816f3f0b

Author SHA1 Message Date
  Oliver Galvin de816f3f0b fix debuild errors 6 years ago
  Oliver Galvin 2d8057199d fix debuild errors 6 years ago
  Oliver Galvin 552e2a4f30 add build-essential as deb build dependency 6 years ago
  Oliver Galvin cc8e399bfc deb package name should be lowercase 6 years ago
  Oliver Galvin 0377fd089e more ci fixes 6 years ago
  Oliver Galvin 2b39b4603b more ci fixes 6 years ago
  Oliver Galvin e70f945e4f update aclocal.m4 6 years ago
  Oliver Galvin b80759a031 fix bug in getdata 6 years ago
  Oliver Galvin b10fb14639 update po/.gitignore 6 years ago
  Oliver Galvin ee9627d7f6 stop tracking generated file and update translation template 6 years ago
  Oliver Galvin 89db042869 tidy scripts and ditch boilerplate file 6 years ago
  Oliver Galvin 326f9df848 add gtk to the PKGBUILDs 6 years ago
  Oliver Galvin 13eba187db Update copyrights 6 years ago
  Oliver Galvin 4ac3d26695 tidy README, fix headers, remove sqlcipher, update copyright 6 years ago
  Oliver Galvin 1b503fde76 fix ci 6 years ago
  Oliver Galvin f3dc90f29a Improve error handling, readme viewing, fix ci 6 years ago
  Oliver Galvin 1ab6b8fd52 fix ci dependency 6 years ago
  Oliver Galvin d19b6973cd fix configure.ac and remove unnecessary stuff 6 years ago
  Oliver Galvin 0eb51bd2c8 fix ci dependency 6 years ago
  Oliver Galvin b0bdc0eebd fix ci 6 years ago
  Oliver Galvin a6feb44243 Add gitlab CI 6 years ago
10 changed files with 177 additions and 267 deletions
  1. 50 0
      .gitlab-ci.yml
  2. 50 54
      README.md
  3. 46 150
      aclocal.m4
  4. 0 2
      bootstrap
  5. 1 3
      configure.ac
  6. 0 12
      docs/boilerplate
  7. 27 43
      gtk/tubeman-gtk.c
  8. 2 3
      gtk/tubeman.glade
  9. 1 0
      po/.gitignore
  10. 0 0
      po/POTFILES

+ 50 - 0
.gitlab-ci.yml

@@ -0,0 +1,50 @@
+image: gcc
+
+before_script:
+  - apt-get -qq update
+  - apt-get -qq install make automake autoconf autoconf-archive gettext autopoint pkgconf libgtk-3-dev
+  - ./bootstrap
+
+cache:
+  paths:
+    - "src/*.o"
+    - "src/tubeman"
+    - "gtk/*.o"
+    - "gtk/tubeman-gtk"
+    - configure
+    - makefile
+
+stages:
+  - build
+  - deploy
+
+build:
+  stage: build
+  script:
+    - ./configure
+    - make
+test:
+  stage: build
+  before_script:
+    - apt-get -qq update
+    - apt-get -qq install cppcheck
+  script:
+    - testing/cppcheck
+
+dist:
+  stage: deploy
+  script:
+    - ./configure
+    - make dist
+  artifacts:
+    paths:
+      - tubeman-*.tar.gz
+
+package:
+  stage: deploy
+  script:
+    - apt-get -qq install build-essential devscripts debhelper autotools-dev lintian
+    - scripts/gendeb.sh
+  artifacts:
+    paths:
+      - tubeman-*.deb

+ 50 - 54
README.md

@@ -1,10 +1,10 @@
 ```
-   _______    _          __  __
-  |__   __|  | |        |  \/  |
-     | |_   _| |__   ___| \  / | __ _ _ __
-     | | | | | '_ \ / _ \ |\/| |/ _' | '_ \
-     | | |_| | |_) |  __/ |  | | (_| | | | |
-     |_|\__,_|_.__/ \___|_|  |_|\__,_|_| |_|
+              _______    _          __  __
+             |__   __|  | |        |  \/  |
+                | |_   _| |__   ___| \  / | __ _ _ __
+                | | | | | '_ \ / _ \ |\/| |/ _' | '_ \
+                | | |_| | |_) |  __/ |  | | (_| | | | |
+                |_|\__,_|_.__/ \___|_|  |_|\__,_|_| |_|
 ```
 
 **Please note TubeMan is not yet complete and so is unusable currently.  
@@ -12,15 +12,15 @@ This README describes both planned and implemented features.**
 
 ![TubeMan Icon](gtk/icon.png)
 
-## Summary
+# Summary
 
 A lightweight YouTube subscription manager and browser, with a 
-[NewPipe](https://github.com/TeamNewPipe/NewPipe) compatible database and 
-[pacman](https://archlinux.org/pacman)-style interface. 
-Follow Youtube channels without needing the Youtube API, a Google account, 
-running [nonfree Javascript](https://gnu.org/philosophy/javascript-trap.html) 
-or a bloated web interface. Stores subscriptions in a local database, is 
-configurable, and includes an optional curses based interface and GUI.
+[NewPipe](https://newpipe.schabi.org) compatible database and 
+[pacman](https://archlinux.org/pacman) style command line interface. Follow 
+channels and watch videos without needing the YouTube API, a Google account, 
+or a bloated [nonfree](https://gnu.org/philosophy/javascript-trap) website. 
+Stores your data locally, is configurable, and includes optional text based 
+and graphical frontends.
 
 ## Goals
 
@@ -77,56 +77,53 @@ subscriptions. See the man page for more details.
 Displaying thumbnails in the terminal is an optional feature in the ncurses 
 interface. The following methods are supported:
 
-* w3m - this works only with: urxvt, xterm and st
-* tycat - this works only in terminology
+* w3m    - this works only with: urxvt, xterm and st
+* tycat  - this works only in terminology
 * iterm2 - this works only in iTerm2 on macOS
 
-## Dependencies
+# Dependencies
 
 * [SQLite](https://www.sqlite.org)
 * [libcurl](https://curl.haxx.se/libcurl)
 * [GNU ncurses](https://gnu.org/software/ncurses)
 
-**Optional:**
+## Optional
 
-* [w3m (w3mimgdisplay)](http://w3m.sourceforge.net/)
-* [SQLCipher](https://www.zetetic.net/sqlcipher)
+* [w3m](http://w3m.sourceforge.net)
 
-**Build dependencies:**
+## Build dependencies
 
-* sed
-* [GNU gettext (libintl)](https://gnu.org/software/gettext)
+* [GNU gettext/libintl](https://gnu.org/software/gettext)
 
-## Building
+# Building
 
-As TubeMan is in its early stages, there are no prebuilt packages yet, so you 
-need to compile from source.  
-Other than the dependencies, you should only need standard tools like a C 
-compiler (gcc, clang, etc.) and make to build.
+As TubeMan is in its early stages there are no prebuilt binaries yet, so you 
+need to compile from source. Other than the dependencies, you should only need 
+standard tools like a C compiler and make to build.
 
 On Arch based GNU/Linux distros use the PKGBUILD 
 [in the AUR](https://aur.archlinux.org), 
-on macOS use [Homebrew](https://brew.sh/).  
-Otherwise, use one of the following to get what you need:  
-```
- apt-get install build-essential gettext libsqlite3-0 libncurses5 libcurl3
+on macOS use [Homebrew](https://brew.sh).  
+Otherwise, use one of the following commands to get what you need:  
 
- dnf install gcc make gettext sqlite3 ncurses-libs curl
+    apt-get install build-essential gettext libsqlite3-0 libncurses5 libcurl3
 
- brew install gcc make gettext sqlite ncurses curl
-```
+    dnf install gcc make gettext sqlite3 ncurses-libs curl
+
+    brew install gcc make gettext sqlite ncurses curl
 
 Then get the code by cloning this git repo, then build and install by running:
-```
- ./configure
- make
- sudo make install
-```
+
+    ./bootstrap
+    ./configure
+    make
+    sudo make install
+
 **HACKING.md** has more information on building and configure options.
 
-## Credits
+# Credits
 
-### Libraries
+## Libraries
 
 These are the libraries that TubeMan depends on.  
 
@@ -136,10 +133,9 @@ These are the libraries that TubeMan depends on.
 | libcurl                | Downloading data     | X11           |
 | GNU ncurses            | Interactive mode     | X11           |
 | GNU gettext            | Internationalisation | GPLv2+        |
-| SQLCipher              | Encrypting databases | Modified BSD  |
 | w3m                    | Displaying images    | Expat         |
 
-**Included:**
+### Included
 
 These are small libraries included with TubeMan. They may have small changes 
 but are written by their respective authors.  
@@ -154,28 +150,28 @@ See the **AUTHORS** file.
 
 Test Tube icon by [Peter van Driel](https://thenounproject.com/petervandriel) 
 from the Noun Project, released under the 
-[CC BY](https://creativecommons.org/licenses/by/3.0/us/legalcode) license.
+[CC BY](https://creativecommons.org/licenses/by/3.0/us) license.
 
-### Prior Art
+## Prior Art
 
 No code is used from these projects, but they inspired certain features.
 
 * [NewPipe](https://github.com/TeamNewPipe/NewPipe) - a Youtube app for 
- Android that does not use the Youtube API and can store local subscriptions
+  Android that does not use the Youtube API and can store local subscriptions
 * [ranger](https://ranger.github.io) - a terminal based file manager, for its 
- ncurses interface and image preview functionality
+  ncurses interface and image preview functionality
 * [pacman](https://www.archlinux.org/pacman) -
- a package manager for Arch Linux, uses similar command line options
+  a package manager for Arch Linux, uses similar command line options
 * [newsboat](https://github.com/newsboat/newsboat) -
- an active fork of newsbeuter, an ncurses-based feed reader
+  an active fork of newsbeuter, an ncurses-based feed reader
 
-### Author
+## Author
 
-Copyright (C) Oliver Galvin, 2017-2018  
+Copyright (C) Oliver Galvin, 2017-2019  
 TubeMan is free software, released under the terms of the GNU 
-[General Public License](https://www.gnu.org/copyleft/gpl.html),  
-either version 3 of the License, or any later version. 
-See the **COPYING** file for the full license text.
+[General Public License](https://www.gnu.org/copyleft/gpl.html), either 
+version 3 of the License, or any later version. See the **COPYING** file for 
+the full license text.
 
 Email: **odg at riseup dot net**  
 PGP: **491E 0D9E E7AA 9E15 D089 950A 7879 6625 7046 CC21**

+ 46 - 150
aclocal.m4

@@ -52,33 +52,12 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 #
 #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
 #
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
 
-#serial 6
+#serial 7
 
 AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
 [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
@@ -113,33 +92,12 @@ done
 #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
 #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
 #
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
 
-#serial 7
+#serial 8
 
 AC_DEFUN([AX_APPEND_FLAG],
 [dnl
@@ -190,33 +148,12 @@ AS_VAR_POPDEF([FLAGS])dnl
 #
 #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
 #
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
 
-#serial 6
+#serial 7
 
 AC_DEFUN([AX_APPEND_LINK_FLAGS],
 [AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
@@ -380,33 +317,12 @@ AC_LANG_POP([Fortran])
 #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
 #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
 #
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
 
-#serial 5
+#serial 6
 
 AC_DEFUN([AX_CHECK_COMPILE_FLAG],
 [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
@@ -468,7 +384,7 @@ AS_VAR_POPDEF([CACHEVAR])dnl
 #   permitted in any medium without royalty provided the copyright notice
 #   and this notice are preserved.
 
-#serial 8
+#serial 9
 
 AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[
     AC_BEFORE([$0],[AC_PROG_CC])dnl
@@ -544,8 +460,8 @@ AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[
     dnl Define various variables if debugging is disabled.
     dnl assert.h is a NOP if NDEBUG is defined, so define it by default.
     AS_IF([test "x$enable_debug" = "xyes"],
-      [m4_map_args_w(ax_enable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is enabled])])],
-      [m4_map_args_w(ax_disable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is disabled])])])
+      [m4_map_args_w(ax_enable_debug_vars, [AC_DEFINE(], [,[1],[Define if debugging is enabled])])],
+      [m4_map_args_w(ax_disable_debug_vars, [AC_DEFINE(], [,[1],[Define if debugging is disabled])])])
     ax_enable_debug=$enable_debug
 ])
 
@@ -580,33 +496,12 @@ AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[
 #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
 #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
 #
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
 
-#serial 5
+#serial 6
 
 AC_DEFUN([AX_CHECK_LINK_FLAG],
 [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
@@ -989,7 +884,7 @@ AC_DEFUN([AX_COMPILER_FLAGS],[
 #   and this notice are preserved.  This file is offered as-is, without any
 #   warranty.
 
-#serial 16
+#serial 17
 
 AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
     AC_REQUIRE([AC_PROG_SED])
@@ -1035,6 +930,19 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
     ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
 
     AS_IF([test "$ax_enable_compile_warnings" != "no"],[
+        if test "$ax_compiler_cxx" = "no" ; then
+            # C-only flags. Warn in C++
+            AX_APPEND_COMPILE_FLAGS([ dnl
+                -Wnested-externs dnl
+                -Wmissing-prototypes dnl
+                -Wstrict-prototypes dnl
+                -Wdeclaration-after-statement dnl
+                -Wimplicit-function-declaration dnl
+                -Wold-style-definition dnl
+                -Wjump-misses-init dnl
+            ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
+        fi
+
         # "yes" flags
         AX_APPEND_COMPILE_FLAGS([ dnl
             -Wall dnl
@@ -1076,18 +984,6 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
             $6 dnl
             $7 dnl
         ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
-        if test "$ax_compiler_cxx" = "no" ; then
-            # C-only flags. Warn in C++
-            AX_APPEND_COMPILE_FLAGS([ dnl
-            -Wnested-externs dnl
-            -Wmissing-prototypes dnl
-            -Wstrict-prototypes dnl
-            -Wdeclaration-after-statement dnl
-            -Wimplicit-function-declaration dnl
-            -Wold-style-definition dnl
-            -Wjump-misses-init dnl
-            ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
-        fi
     ])
     AS_IF([test "$ax_enable_compile_warnings" = "error"],[
         # "error" flags; -Werror has to be appended unconditionally because
@@ -1355,19 +1251,19 @@ AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 5
+#serial 6
 
 AU_ALIAS([AC_FUNC_MKDIR], [AX_FUNC_MKDIR])
 AC_DEFUN([AX_FUNC_MKDIR],
 [AC_CHECK_FUNCS([mkdir _mkdir])
 AC_CACHE_CHECK([whether mkdir takes one argument],
                [ac_cv_mkdir_takes_one_arg],
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/stat.h>
 #if HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
-], [mkdir (".");],
+]], [[mkdir (".");]])],
 [ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])])
 if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then
   AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
@@ -1388,7 +1284,7 @@ dnl |  may prototype it in dir.h and dirent.h, for instance).
 dnl |
 dnl |Alexandre:
 dnl |  Would it be sufficient to check for these headers and #include
-dnl |  them in the AC_TRY_COMPILE block?  (and is AC_HEADER_DIRENT
+dnl |  them in the AC_COMPILE_IFELSE block?  (and is AC_HEADER_DIRENT
 dnl |  suitable for this?)
 dnl |
 dnl |Thomas:

+ 0 - 2
bootstrap

@@ -5,8 +5,6 @@
 # Copyright (C) Oliver Galvin 2018
 # See COPYING for license information
 
-set -euo pipefail #Strict shell mode
-
 #Check for dependencies
 deps="automake autoconf autopoint pkgconf"
 for dep in $deps; do

+ 1 - 3
configure.ac

@@ -22,13 +22,11 @@ AM_GNU_GETTEXT_VERSION([0.19.8])
 
 # Warning/Error flags
 AX_CFLAGS_WARN_ALL
-#AX_CFLAGS_FORCE_C89([CPPFLAGS])
 AX_APPEND_COMPILE_FLAGS([-Wextra -pedantic-errors])
 AX_COMPILER_FLAGS
 
 # Checks for dependency libraries
-AX_LIB_CURL(,,[AC_MSG_ERROR([missing libcurl])])
-AC_DEFINE([SQLITE_INT64_TYPE], [long])
+AX_LIB_CURL(,,AC_MSG_ERROR([missing libcurl]))
 AX_LIB_SQLITE3()
 AM_PATH_GTK_3_0
 

+ 0 - 12
docs/boilerplate

@@ -1,12 +0,0 @@
- TubeMan is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- .
- TubeMan is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- .
- You should have received a copy of the GNU General Public License
- along with TubeMan.  If not, see <http://www.gnu.org/licenses/>.

+ 27 - 43
gtk/tubeman-gtk.c

@@ -1,29 +1,27 @@
 /*
+  Copyright (c) 2018-2019 Oliver Galvin <odg at riseup dot net>
   This file is part of TubeMan.
   A local YouTube subscription manager and video browser.
-  See 'man tubeman' or read the README.md file for more information.
 
-  Copyright (c) 2018 Oliver Galvin <odg at riseup dot net>
+ TubeMan is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
 
-  TubeMan is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
+ TubeMan is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
 
-  TubeMan is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with TubeMan.  If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License
+ along with TubeMan.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifdef NDEBUG
 # define _FORTIFY_SOURCE 2		/*buffer overflow checks */
 #endif
 
-#include <stdio.h>
+#include <stdlib.h>
 #include <gtk/gtk.h>
 /*#include "tubeman.h"*/
 
@@ -37,32 +35,21 @@ static void setupmainwindow(GtkApplication* app, gpointer user_data)
 
 static void showreadmewindow(GtkBuilder *builder)
 {
-	#define STRSIZE 1000
-	char *str = NULL;
-	long len;
-	GObject *readmewindow;
+	GtkWidget *readmewindow;
 	GtkTextView *readmebox;
 	GtkTextBuffer *buff = gtk_text_buffer_new(NULL);
-	FILE *readme = fopen(DOCDIR"/README", "r");
-	if(readme) {
-		fseek(readme, 0, SEEK_END);
-		len = ftell(readme);
-		fseek(readme, 0, SEEK_SET);
-		str = malloc(len);
-		if(str) {
-			fread(str, 1, len, readme);
+	gchar *str = NULL;
+	readmewindow = GTK_WIDGET(gtk_builder_get_object(builder, "readmewindow"));
+	readmebox = GTK_TEXT_VIEW(gtk_builder_get_object(builder, "readmebox"));
+	if(!gtk_text_view_get_buffer(readmebox)) {
+		if(!g_file_get_contents(DOCDIR"/README", &str, NULL, NULL)) {
+			str = g_strdup("Could not show the README file!");
 		}
-		fclose(readme);
-		str[len] = '\0';
-	} else {
-		str = strdup("Could not open README!");
+		gtk_text_buffer_set_text(buff, str, -1);
+		gtk_text_view_set_buffer(readmebox, buff);
+		g_free(str);
 	}
-	readmewindow = gtk_builder_get_object(builder, "readmewindow");
-	readmebox = (GtkTextView *)gtk_builder_get_object(builder, "readmebox");
-	gtk_text_buffer_set_text(buff, str, -1);
-	gtk_text_view_set_buffer(readmebox, buff);
-	gtk_widget_show_all(GTK_WIDGET(readmewindow));
-	free(str);
+	gtk_widget_show_all(readmewindow);
 }
 
 static void showaboutwindow()
@@ -70,9 +57,9 @@ static void showaboutwindow()
 	const char *description = " \
 GTK frontend for TubeMan, a YouTube subscription manager and browser, with \
 NewPipe compatible database. View and download videos, keep track of channels \
-you subscribe to locally and privately, and with free software.\n \
+you subscribe to locally, privately, and with free software.\n \
 \n \
-Lightweight, written in portable C, with minimal dependencies.";
+Lightweight, written in portable C with minimal dependencies.";
 	gtk_show_about_dialog(NULL,
 	                      "program-name", PACKAGE_NAME,
 	                      "title", "About "PACKAGE_STRING,
@@ -87,16 +74,13 @@ Lightweight, written in portable C, with minimal dependencies.";
 
 int main(int argc, char **argv)
 {
-	GError *err = NULL;
 	GtkBuilder *builder;
 	GObject *aboutopt, *readmeopt, *quitopt;
 	GObject *mainwindow, *aboutwindow;
 
 	gtk_init(&argc, &argv);
-	builder = gtk_builder_new();
-	if(!gtk_builder_add_from_file(builder, PKGDATADIR"/tubeman.glade", &err)) {
-		g_printerr("%s\n", err->message);
-		g_clear_error(&err);
+	if(!(builder = gtk_builder_new_from_file(PKGDATADIR"/tubeman.glade"))) {
+		g_printerr("Could not find XML UI definition file\n");
 		return EXIT_FAILURE;
 	}
 	gtk_window_set_default_icon_from_file(PKGDATADIR"/icon.png", NULL);

+ 2 - 3
gtk/tubeman.glade

@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Generated with glade 3.22.1 
 
-Copyright (C) Oliver Galvin - 2018
-
+Copyright (C) 2018-2019 Oliver Galvin
 This file is part of TubeMan.
 
 TubeMan is free software: you can redistribute it and/or modify
@@ -24,7 +23,7 @@ along with TubeMan.  If not, see <http://www.gnu.org/licenses/>.
   <!-- interface-license-type gplv3 -->
   <!-- interface-name TubeMan -->
   <!-- interface-description YouTube subscription manager and browser -->
-  <!-- interface-copyright Oliver Galvin - 2018 -->
+  <!-- interface-copyright Oliver Galvin - 2018-2019 -->
   <object class="GtkWindow" id="mainwindow">
     <property name="can_focus">False</property>
     <property name="default_width">800</property>

+ 1 - 0
po/.gitignore

@@ -4,4 +4,5 @@
 *.sed
 *.sin
 Makevars.template
+POTFILES
 Rules-quot

+ 0 - 0
po/POTFILES


Some files were not shown because too many files changed in this diff