Fix #314: Remote commands for thumbnail maintenance
[geeqie.git] / src / main.h
index 6cf9cbb..8ac613f 100644 (file)
@@ -1,15 +1,24 @@
 /*
- * Geeqie
- * (C) 2006 John Ellis
+ * 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
 
@@ -25,6 +34,7 @@
 
 #include "intl.h"
 
+
 /*
  *-------------------------------------
  * Standard library includes
@@ -55,6 +65,7 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <gdk-pixbuf/gdk-pixbuf-loader.h>
 
+#include "compat.h"
 
 /*
  *----------------------------------------------------------------------------
  *----------------------------------------------------------------------------
  */
 
+#define USE_XDG 1
+
 #define GQ_APPNAME "Geeqie"
 #define GQ_APPNAME_LC "geeqie"
-#define GQ_WEBSITE "geeqie.sourceforge.net"
+#define GQ_WEBSITE "www.geeqie.org"
 #define GQ_EMAIL_ADDRESS "geeqie-devel@lists.sourceforge.net"
 
-#define GQ_WMCLASS GQ_APPNAME_LC
+#define GQ_RC_DIR              "." GQ_APPNAME_LC
+#define GQ_COLLECTIONS_DIR     "collections"
+#define GQ_TRASH_DIR           "trash"
 
-#define GQ_RC_DIR             "." GQ_APPNAME_LC
-#define GQ_RC_DIR_COLLECTIONS GQ_RC_DIR"/collections"
-#define GQ_RC_DIR_TRASH       GQ_RC_DIR"/trash"
+#define GQ_SYSTEM_WIDE_DIR    "/etc/" GQ_APPNAME_LC
 
-#define RC_FILE_NAME GQ_APPNAME_LC "rc"
+#define RC_FILE_NAME GQ_APPNAME_LC "rc.xml"
 
-#define ZOOM_RESET_ORIGINAL 0
-#define ZOOM_RESET_FIT_WINDOW 1
-#define ZOOM_RESET_NONE 2
+#define GQ_COLLECTION_EXT ".gqv"
 
 #define SCROLL_RESET_TOPLEFT 0
 #define SCROLL_RESET_CENTER 1
 
 #define MOUSEWHEEL_SCROLL_SIZE 20
 
-#define GQ_EDITOR_GENERIC_SLOTS 10
+
+#define GQ_DEFAULT_SHELL_PATH "/bin/sh"
+#define GQ_DEFAULT_SHELL_OPTIONS "-c"
 
 #define COLOR_PROFILE_INPUTS 4
 
 #define DEFAULT_THUMB_WIDTH    96
 #define DEFAULT_THUMB_HEIGHT   72
 
-#if 1 /* set to 0 to disable debugging code and related options */
-# ifndef DEBUG
-# define DEBUG 1
-# endif
-#endif
-#ifndef DEBUG
-# define debug 0
-#endif
-
-#include "typedefs.h"
-
-/*
- *----------------------------------------------------------------------------
- * globals
- *----------------------------------------------------------------------------
- */
-ConfOptions *init_options(ConfOptions *options); /* TODO: move to globals.h */
-
-ConfOptions *options;
-
-/*
- * Since globals are used everywhere,
- * it is easier to define them here.
- */
-
-extern GList *filename_filter;
-
-/* -- options -- */
-
-
-#ifdef DEBUG
-extern gint debug;
-#endif
-
-
-/* layout */
-extern gchar *layout_order;
-extern gint layout_style;
+#define DEFAULT_MINIMAL_WINDOW_SIZE 100
 
-extern gint layout_view_icons;
-extern gint layout_view_tree;
+#define IMAGE_MIN_WIDTH 100
+#define SIDEBAR_DEFAULT_WIDTH 250
 
-extern gint show_icon_names;
 
-extern gint tree_descend_subdirs;
+#define DEFAULT_OVERLAY_INFO   "%collection:<i>*</i>\\n%" \
+                               "(%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%"
 
-extern gint lazy_image_sync;
-extern gint update_on_time_change;
-extern gint exif_rotate_enable;
-
-extern gint color_profile_enabled;
-extern gint color_profile_input_type;
-extern gchar *color_profile_input_file[];
-extern gchar *color_profile_input_name[];
-extern gint color_profile_screen_type;
-extern gchar *color_profile_screen_file;
-extern gint color_profile_use_image;
+#define GQ_LINK_STR "↗"
+#include "typedefs.h"
+#include "debug.h"
+#include "options.h"
 
+#define DESKTOP_FILE_TEMPLATE GQ_APP_DIR "/template.desktop"
 /*
  *----------------------------------------------------------------------------
  * main.c
@@ -160,23 +133,15 @@ extern gint color_profile_use_image;
  * This also doubles as the main.c header.
  */
 
-GtkWidget *window_new(GtkWindowType type, const gchar *name, const gchar *icon,
-                     const gchar *icon_file, const gchar *subtitle);
-void window_set_icon(GtkWidget *window, const gchar *icon, const gchar *file);
-gint window_maximized(GtkWidget *window);
-
-gdouble get_zoom_increment(void);
-
-void help_window_show(const gchar *key);
+extern gboolean thumb_format_changed;
 
 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event);
 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
+
 void exit_program(void);
 
-#define CASE_SORT(a, b) ( (options->file_sort_case_sensitive) ? strcmp((a), (b)) : strcasecmp((a), (b)) )
+#define CASE_SORT(a, b) ( (options->file_sort.case_sensitive) ? strcmp((a), (b)) : strcasecmp((a), (b)) )
 
 
 #endif
-
-
-
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */