Include a build status badge in the Readme file
[geeqie.git] / src / main.h
index b28c2b6..2112ee3 100644 (file)
@@ -1,31 +1,34 @@
 /*
- * Geeqie
- * (C) 2006 John Ellis
- * Copyright (C) 2008 - 2009 The Geeqie Team
+ * Copyright (C) 2006 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
  * Author: John Ellis
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * 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 2 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, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-
 #ifndef MAIN_H
 #define MAIN_H
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
-#ifdef HAVE_STRVERSCMP
-#  ifndef _GNU_SOURCE
-#    define _GNU_SOURCE
-#  endif
-#endif
+#include <config.h>
 
 #include "intl.h"
 
+#ifdef HAVE_DEVELOPER
+#include "backward.h"
+#endif
 
 /*
  *-------------------------------------
  *----------------------------------------------------------------------------
  */
 
-#define USE_XDG 0
+#define USE_XDG 1
 
 #define GQ_APPNAME "Geeqie"
 #define GQ_APPNAME_LC "geeqie"
-#define GQ_WEBSITE "geeqie.sourceforge.net"
-#define GQ_EMAIL_ADDRESS "geeqie-devel@lists.sourceforge.net"
+#define GQ_WEBSITE "https://www.geeqie.org/"
+#define GQ_EMAIL_ADDRESS "geeqie@freelists.org"
 
 #define GQ_RC_DIR              "." GQ_APPNAME_LC
 #define GQ_COLLECTIONS_DIR     "collections"
 #define GQ_TRASH_DIR           "trash"
+#define GQ_WINDOW_LAYOUTS_DIR  "layouts"
+#define GQ_ARCHIVE_DIR "geeqie-archive"
+#define GQ_RESOURCE_PATH_ICONS "/org/geeqie/icons"
+#define GQ_RESOURCE_PATH_CREDITS "/org/geeqie/credits"
 
 #define GQ_SYSTEM_WIDE_DIR    "/etc/" GQ_APPNAME_LC
 
 #define RC_FILE_NAME GQ_APPNAME_LC "rc.xml"
+#define DEFAULT_WINDOW_LAYOUT "default_window_layout.xml"
 
 #define GQ_COLLECTION_EXT ".gqv"
 
 #define DEFAULT_THUMB_WIDTH    96
 #define DEFAULT_THUMB_HEIGHT   72
 
-#define DEFAULT_MINIMAL_WINDOW_SIZE 32
+#define DEFAULT_MINIMAL_WINDOW_SIZE 100
 
 #define IMAGE_MIN_WIDTH 100
 #define SIDEBAR_DEFAULT_WIDTH 250
                                "(%number%/%total%) [%zoom%] <b>%name%</b>\n" \
                                "%res%|%date%|%size%\n" \
                                "%formatted.Aperture%|%formatted.ShutterSpeed%|%formatted.ISOSpeedRating:ISO *%|%formatted.FocalLength%|%formatted.ExposureBias:* Ev%\n" \
-                               "%formatted.Camera:40%|%formatted.Flash%"
+                               "%formatted.Camera:40%|%formatted.Flash%\n"            \
+                               "%formatted.star_rating%"
 
 #define GQ_LINK_STR "↗"
 #include "typedefs.h"
 #include "debug.h"
 #include "options.h"
 
-#define DESKTOP_FILE_TEMPLATE GQ_APP_DIR "/template.desktop"
+#define APPIMAGE_VERSION_FILE "https://raw.githubusercontent.com/geeqie/geeqie.github.io/master/AppImage/appimages.txt"
+#define TIMEZONE_DATABASE_WEB "https://cdn.bertold.org/zonedetect/db/db.zip"
+#define TIMEZONE_DATABASE_FILE "timezone21.bin"
+#define TIMEZONE_DATABASE_VERSION "out_v1"
+#define HELP_SEARCH_ENGINE "https://duckduckgo.com/?q=site:geeqie.org/help "
+
+#define STAR_RATING_NOT_READ -12345
+#define STAR_RATING_REJECTED 0x274C //Unicode Character 'Cross Mark'
+#define STAR_RATING_STAR 0x2738 //Unicode Character 'Heavy Eight Pointed Rectilinear Black Star'
+
+/* From http://stackoverflow.com/questions/3417837/ */
+#ifdef UNUSED
+#elif defined(__GNUC__)
+# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
+#elif defined(__LCLINT__)
+# define UNUSED(x) /*@unused@*/ x
+#else
+# define UNUSED(x) x
+#endif
+
 /*
  *----------------------------------------------------------------------------
- * main.c
+ * main.cc
  *----------------------------------------------------------------------------
  */
 
 /*
- * This also doubles as the main.c header.
+ * This also doubles as the main.cc header.
  */
 
 extern gboolean thumb_format_changed;
 
+extern gchar *gq_prefix;
+extern gchar *gq_localedir;
+extern gchar *gq_helpdir;
+extern gchar *gq_htmldir;
+extern gchar *gq_appdir;
+extern gchar *gq_bindir;
+extern gchar *gq_executable_path;
+extern gchar *desktop_file_template;
+extern gchar *instance_identifier;
+
 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event);
 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);