GTK2 no longer supported
authorColin Clark <colin.clark@cclark.uk>
Thu, 21 Jul 2022 16:58:47 +0000 (17:58 +0100)
committerColin Clark <colin.clark@cclark.uk>
Thu, 21 Jul 2022 16:58:47 +0000 (17:58 +0100)
- GTK2 no longer supported
- LIRC deleted
- renderer-clutter() deleted
- all compiler warnings eliminated (except deprecated)

126 files changed:
README.lirc [deleted file]
appimages/README.md
config.h.in
doc/docbook/GuideOptionsImage.xml
doc/docbook/GuideReference.xml
doc/docbook/GuideReferenceConfig.xml
doc/docbook/GuideReferenceLIRC.xml [deleted file]
doxygen.conf
geeqie-install-debian.sh
geeqie.spec.in
meson.build
meson_options.txt
scripts/check-compiles.sh
scripts/new-release.sh
scripts/web-help.sh
src/advanced_exif.c
src/bar.c
src/bar_comment.c
src/bar_exif.c
src/bar_gps.c
src/bar_histogram.c
src/bar_keywords.c
src/bar_rating.c
src/bar_sort.c
src/cache-loader.c
src/cache_maint.c
src/cellrenderericon.c
src/collect-dlg.c
src/collect-io.c
src/collect-table.c
src/collect.c
src/color-man.c
src/compat.c
src/compat.h
src/desktop_file.c
src/dnd.c
src/dupe.c
src/editors.c
src/editors.h
src/exif-common.c
src/exif.c
src/exiv2.cc
src/filecache.c
src/filedata.c
src/format_canon.c
src/format_fuji.c
src/format_nikon.c
src/format_olympus.c
src/format_raw.c
src/fullscreen.c
src/histogram.c
src/image-load.c
src/image-overlay.c
src/image.c
src/image_load_collection.c
src/image_load_cr3.c
src/image_load_dds.c
src/image_load_djvu.c
src/image_load_external.c
src/image_load_ffmpegthumbnailer.c
src/image_load_gdk.c
src/image_load_heif.c
src/image_load_j2k.c
src/image_load_jpeg.c
src/image_load_pdf.c
src/image_load_psd.c
src/image_load_svgz.c
src/image_load_tiff.c
src/image_load_webp.c
src/image_load_zxscr.c
src/img-view.c
src/jpeg_parser.c
src/layout.c
src/layout_config.c
src/layout_image.c
src/layout_util.c
src/lirc.c [deleted file]
src/lirc.h [deleted file]
src/logwindow.c
src/main.c
src/main.h
src/menu.c
src/meson.build
src/metadata.c
src/misc.c
src/options.c
src/options.h
src/osd.c
src/pan-view/pan-item.c
src/pan-view/pan-view-filter.c
src/pan-view/pan-view-search.c
src/pan-view/pan-view.c
src/pixbuf-renderer.c
src/pixbuf_util.c
src/preferences.c
src/print.c
src/rcfile.c
src/remote.c
src/renderer-clutter.c [deleted file]
src/renderer-clutter.h [deleted file]
src/renderer-tiles.c
src/search.c
src/search_and_run.c
src/shortcuts.c
src/thumb.c
src/thumb_standard.c
src/toolbar.c
src/typedefs.h
src/ui_bookmark.c
src/ui_fileops.c
src/ui_help.c
src/ui_menu.c
src/ui_misc.c
src/ui_pathsel.c
src/ui_spinner.c
src/ui_tabcomp.c
src/ui_tree_edit.c
src/ui_utildlg.c
src/utilops.c
src/view_dir.c
src/view_dir_list.c
src/view_dir_tree.c
src/view_file/view_file.c
src/view_file/view_file_icon.c
src/view_file/view_file_list.c
src/window.c

diff --git a/README.lirc b/README.lirc
deleted file mode 100644 (file)
index f9306cb..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver, an
-(almost) arbitrary remote control and control your Linux box with it! More
-about it at www.lirc.org. Be sure to read LIRC documentation before going ahead
-in this README.
-
-If you have installed the lirc-package, configure will autodetect it. If LIRC
-support is enabled and an error occurs Geeqie will tell you on startup. The
-application name for Geeqie is geeqie. Here is the list of supported commands:
-
-DOWN [int]         - Move "camera" down by the specified amount. Default=1
-EXIT               - Exit Geeqie
-FIRST              - Jump to first image
-INFO               - Show image information (full screen only)
-LAST               - Jump to last image
-LEFT [int]         - Move "camera" left by the specified amount. Default=1
-NEXT               - Go to next image
-PAUSE              - Pause/unpause slideshow
-PREV               - Go to previous image
-RIGHT [int]        - Move "camera" right by the specified amount. Default=1
-ROTATE_90          - Rotate image 90 degrees clockwise.        
-ROTATE_90_CC       - Rotate image 90 degrees counter-clockwise.
-SET_INV_ZOOM [int] - Zoom to 1/Nx. Default=1x
-SET_ZOOM [int]     - Zoom to Nx. Default=1x
-UP [int]           - Move "camera" up by the specified amount. Default=1
-ZOOM_IN [int]      - Zoom in. Value specifies the amount of zoom.
-ZOOM_MAX           - Zoom to fit image
-ZOOM_OUT [int]     - Zoom out. Value specifies the amount of zoom.
-
-Don't forget to enable the repeat flag in .lircrc when it make sense
-(directional buttons, zoom in and out, ...) 
-Here's an excerpt from my .lircrc: 
-
-begin geeqie
-  begin
-    prog = geeqie
-    button = vol_up
-    config = ZOOM_IN 1
-    repeat = 3
-  end
-  begin
-    prog = geeqie
-    button = vol_down
-    config = ZOOM_OUT 1
-    repeat = 3
-  end
-  begin
-    prog = geeqie
-    button = down
-    config = DOWN 10
-    repeat = 1
-  end
-  begin
-    prog = geeqie
-    button = up
-    config = UP 10
-    repeat = 1
-  end
-  begin
-    prog = geeqie
-    button = right
-    config = RIGHT 10
-    repeat = 1
-  end
-  begin
-    prog = geeqie
-    button = left
-    config = LEFT 10
-    repeat = 1
-  end
-  begin
-    prog = geeqie
-    button = back
-    config = PREV
-  end
-  begin
-    prog = geeqie
-    button = forw
-    config = NEXT
-  end
-  begin
-    prog = geeqie
-    button = skip_back
-    config = FIRST
-  end
-  begin
-    prog = geeqie
-    button = skip_forw
-    config = LAST
-  end
-  begin
-    prog = geeqie
-    button = pause
-    config = PAUSE
-  end
-  begin
-    prog = geeqie
-    button = surround
-    config = SET_ZOOM
-  end
-  begin
-    prog = geeqie
-    button = 1
-    config = ROTATE_90
-  end
-  begin
-    prog = geeqie
-    button = 2
-    config = ROTATE_90_CC
-  end
-  begin
-    prog = geeqie
-    button = 3
-    config = INFO
-  end
-  begin
-    prog = geeqie
-    button = 4
-    config = EXIT
-  end
-end geeqie
-
-At the moment Geeqie uses the standard location for the lirc-config file
-(~/.lircrc).
-
-LIRC support and documentation by Matteo Beniamino 
-<beniamino@tautologica.org>.
-
-(This file is 'inspired' by LIRC documentation from mplayer).
index 984f70b..2766e4b 100644 (file)
@@ -44,10 +44,9 @@ mkdir <target dir>/AppDir
 Generate the Geeqie executable:
 
 ```sh
-sudo make maintainer-clean
-./autogen.sh --prefix="/usr/"
-make -j
-make install DESTDIR=<full path to target dir>/AppDir
+meson setup appimage-build
+meson configure -Dprefix=/usr appimage-build
+DESTDIR=<full path to target dir>/AppDir ninja -C build-appimage install
 ```
 
 ## Generate the AppImage
index 65bdb49..6fdc7e0 100644 (file)
 #define HAVE_STRING_H 1
 
 /* Define to 1 if you have the `strverscmp' function. */
-#define HAVE_STRVERSCMP 1 used
+#define HAVE_STRVERSCMP 1
 
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #define HAVE_SYS_STAT_H 1
 #define HAVE_GETTEXT 1
 
 /* Define if you have gthread library */
-#define HAVE_GTHREAD 1 used
+#define HAVE_GTHREAD 1
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
index d6a9747..19c2b80 100644 (file)
           </para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term>
-          <guilabel>Use GPU acceleration via Clutter library</guilabel>
-        </term>
-        <listitem>
-          <para>Use alternate renderer. Geeqie must be compiled with the --enable-gpu-accel option.</para>
-        </listitem>
-      </varlistentry>
       <varlistentry>
         <term>
           <guilabel>Two pass zooming</guilabel>
index 958028d..706196f 100644 (file)
@@ -9,7 +9,6 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="GuideReferenceLuaAPI.xml" />
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="GuideReferenceConfig.xml" />
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="GuideReferenceFileDates.xml" />
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="GuideReferenceLIRC.xml" />
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="GuideReferenceTags.xml" />
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="GuideReferenceSupportedFormats.xml" />
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="GuideReferencePixbufLoaders.xml" />
index 3cd05a4..d97d4ae 100644 (file)
     <programlisting xml:space="preserve">$XDG_DATA_HOME/geeqie/collections</programlisting>
     <programlisting xml:space="preserve">($HOME/.local/share/geeqie/collections)</programlisting>
   </para>
-  <para>
-    The lirc
-    <link linkend="GuideReferenceLIRC" endterm="titleGuideReferenceLIRC" />
-    configuration file must be located at:
-    <programlisting xml:space="preserve">$HOME/.lircrc</programlisting>
-  </para>
   <para>
     Thumbnails are stored in a location specified in
     <link linkend="PreferencesThumbnails">Thumbnail Preferences</link>
diff --git a/doc/docbook/GuideReferenceLIRC.xml b/doc/docbook/GuideReferenceLIRC.xml
deleted file mode 100644 (file)
index e109a15..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<section id="GuideReferenceLIRC">
-  <title id="titleGuideReferenceLIRC">Infra-red controller</title>
-  <para>Recent Linux kernels have in-built support for ir devices, making lirc support redundant.</para>
-  <para>If you wish to use lirc with Geeqie, the lirc libraries must be installed. If you are compiling from sources, lirc functionality will be available if the library dependencies are met.</para>
-  <para>If you are using a pre-compiled distribution, availability depends on the package maintainer.</para>
-  <para>
-    The website
-    <ulink url="https://www.lirc.org">Linux Infrared Remote Control</ulink>
-    has detailed information on this subject.
-  </para>
-  <para>
-    You will need to create a configuration file for the controller you will use. This file must be installed at the location specified in
-    <link linkend="GuideReferenceConfig" endterm="titleGuideReferenceConfig" />
-    .
-  </para>
-  <para>
-    Here is an excerpt from an .lircrc file:
-    <programlisting>
-      begin geeqie
-      begin
-      prog = geeqie
-      button = vol_up
-      config = ZOOM_IN 1
-      repeat = 3
-      end
-    </programlisting>
-  </para>
-  <para>The commands Geeqie will respond to are:</para>
-  <table frame="all">
-    <tgroup cols="2" rowsep="1" colsep="1">
-      <thead rowsep="1" colsep="1">
-        <row>
-          <entry>Command</entry>
-          <entry>Mapped to</entry>
-        </row>
-      </thead>
-      <tbody rowsep="1" colsep="1">
-        <row>
-          <entry>DOWN [int]</entry>
-          <entry>Pan down by the specified amount. Default=1</entry>
-        </row>
-        <row>
-          <entry>EXIT</entry>
-          <entry>Exit Geeqie</entry>
-        </row>
-        <row>
-          <entry>FIRST</entry>
-          <entry>Jump to first image</entry>
-        </row>
-        <row>
-          <entry>INFO</entry>
-          <entry>Show image overlay (full screen only)</entry>
-        </row>
-        <row>
-          <entry>LAST</entry>
-          <entry>Jump to last image</entry>
-        </row>
-        <row>
-          <entry>LEFT [int]</entry>
-          <entry>Pan left by the specified amount. Default=1</entry>
-        </row>
-        <row>
-          <entry>NEXT</entry>
-          <entry>Go to next image</entry>
-        </row>
-        <row>
-          <entry>PAUSE</entry>
-          <entry>Pause/unpause slideshow</entry>
-        </row>
-        <row>
-          <entry>PREV</entry>
-          <entry>Go to previous image</entry>
-        </row>
-        <row>
-          <entry>RIGHT [int]</entry>
-          <entry>Pan right by the specified amount. Default=1</entry>
-        </row>
-        <row>
-          <entry>ROTATE_90       ]</entry>
-          <entry>Rotate image 90 degrees clockwise.    .</entry>
-        </row>
-        <row>
-          <entry>ROTATE_90_CC</entry>
-          <entry>Rotate image 90 degrees counter-clockwise..</entry>
-        </row>
-        <row>
-          <entry>SET_INV_ZOOM [int]</entry>
-          <entry>Set Zoom level to 1:N. Default=1x</entry>
-        </row>
-        <row>
-          <entry>SET_ZOOM [int]</entry>
-          <entry>Set Zoom level to N:1. Default=1x</entry>
-        </row>
-        <row>
-          <entry>UP [int]</entry>
-          <entry>Pan up by the specified amount. Default=1</entry>
-        </row>
-        <row>
-          <entry>ZOOM_IN  [int]</entry>
-          <entry>Zoom in. Value specifies the amount of zoom.</entry>
-        </row>
-        <row>
-          <entry>ZOOM_MAX       ]</entry>
-          <entry>Zoom to fit image to window</entry>
-        </row>
-        <row>
-          <entry>ZOOM_OUT [int]</entry>
-          <entry>Zoom out. Value specifies the amount of zoom.</entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </table>
-  <para />
-</section>
index 902f5a2..56d20c0 100644 (file)
@@ -2111,7 +2111,6 @@ PREDEFINED             = HAVE_CLUTTER=1 \
                          HAVE_JPEG=1 \
                          HAVE_LIBCHAMPLAIN=1 \
                          HAVE_LIBCHAMPLAIN_GTK=1 \
-                         HAVE_LIRC=1 \
                          HAVE_LUA=1 \
                          HAVE_PDF=1 \
                          HAVE_RAW=1 \
index baf97d2..06ef8b4 100755 (executable)
@@ -8,7 +8,7 @@
 ## Dialogs allow the user to install additional features.
 ##
 
-version="2022-07-17"
+version="2022-07-21"
 description='
 Geeqie is an image viewer.
 This script will download, compile, and install Geeqie on Debian-based systems.
@@ -36,11 +36,13 @@ yelp-tools
 help2man
 doclifter"
 
-# Optional for both GTK2 and GTK3
+# Optional for GTK3
 optional_array="LCMS (for color management)
 liblcms2-dev
 exiv2 (for exif handling)
 libgexiv2-dev
+evince (for print preview)
+evince
 lua (for --remote commands)
 liblua5.1-0-dev
 libffmpegthumbnailer (for mpeg thumbnails)
@@ -82,17 +84,13 @@ libomp-dev
 libarchive (for compressed files e.g. zip, including timezone)
 libarchive-dev
 libgspell (for spelling checks)
-libgspell-1-dev"
-
-# Optional for GTK3 only
-optional_gtk3_array="libchamplain gtk (for GPS maps)
+libgspell-1-dev
+libchamplain gtk (for GPS maps)
 libchamplain-gtk-0.12-dev
 libchamplain (for GPS maps)
 libchamplain-0.12-dev
 libpoppler (for pdf file preview)
-libpoppler-glib-dev
-libgspell (for spelling checks)
-libgspell-1-dev"
+libpoppler-glib-dev"
 
 ####################################################################
 # Get System Info
@@ -367,13 +365,6 @@ then
                printf '%b\n' "$file"
        done
 
-       printf '\n'
-       printf '%b\n' "Optional for GTK3:"
-       for file in $optional_gtk3_array
-       do
-               printf '%b\n' "$file"
-       done
-
        exit
 fi
 
@@ -402,38 +393,24 @@ else
 fi
 
 # Use GTK3 as default
-gtk2_installed=FALSE
 gtk3_installed=TRUE
 
 if [ "$mode" = "install" ]
 then
-       message="This script is for use on Ubuntu and other\nDebian-based installations.\nIt will download, compile, and install Geeqie source\ncode and its dependencies.\n\nA sub-folder named \"geeqie\" will be created in the\nfolder this script is run from, and the source code\nwill be downloaded to that sub-folder.\n\nIn this dialog you must select whether to compile\nfor GTK2 or GTK3.\nIf you want to use GPS maps or pdf preview,\nyou must choose GTK3.\nThe GTK2 version has a slightly different\nlook-and-feel compared to the GTK3 version,\nbut otherwise has the same features.\nYou may easily switch between the two after\ninstallation.\n\nIn subsequent dialogs you may choose which\noptional features to install."
+       message="This script is for use on Ubuntu and other\nDebian-based installations.\nIt will download, compile, and install Geeqie source\ncode and its dependencies.\n\nA sub-folder named \"geeqie\" will be created in the\nfolder this script is run from, and the source code\nwill be downloaded to that sub-folder.\n\nIn subsequent dialogs you may choose which\noptional features to install."
 
        title="Install Geeqie and dependencies"
        install_option=TRUE
 else
-       message="This script is for use on Ubuntu and other\nDebian-based installations.\nIt will update the Geeqie source code and its\ndependencies, and will compile and install Geeqie.\n\nYou may also switch the installed version from\nGTK2 to GTK3 and vice versa.\n\nIn this dialog you must select whether to compile\nfor GTK2 or GTK3.\nIf you want to use GPS maps or pdf preview,\nyou must choose GTK3.\nThe GTK2 version has a slightly different\nlook-and-feel compared to the GTK3 version,\nbut otherwise has the same features.\n\nIn subsequent dialogs you may choose which\noptional features to install."
+       message="This script is for use on Ubuntu and other\nDebian-based installations.\nIt will update the Geeqie source code and its\ndependencies, and will compile and install Geeqie.\n\nIn subsequent dialogs you may choose which\noptional features to install."
 
        title="Update Geeqie and re-install"
        install_option=FALSE
-
-       # When updating, use previous installation as default
-       if [ -f config.log ]
-       then
-               if grep gtk-2.0 config.log > /dev/null
-               then
-                       gtk2_installed=TRUE
-                       gtk3_installed=FALSE
-               else
-                       gtk2_installed=FALSE
-                       gtk3_installed=TRUE
-               fi
-       fi
 fi
 
-# Ask whether to install GTK2 or GTK3 or uninstall
+# Ask whether to install GTK3 or uninstall
 
-if ! gtk_version=$(zenity --title="$title" --width=370 --text="$message" --list --radiolist --column "" --column "" "$gtk3_installed" "GTK3 (required for GPS maps and pdf preview)" "$gtk2_installed" "GTK2" FALSE "Uninstall" --cancel-label="Cancel" --ok-label="OK" --hide-header 2> /dev/null)
+if ! gtk_version=$(zenity --title="$title" --width=370 --text="$message" --list --radiolist --column "" --column "" "$gtk3_installed" "Install" FALSE "Uninstall" --cancel-label="Cancel" --ok-label="OK" --hide-header 2> /dev/null)
 then
        exit
 fi
@@ -483,30 +460,6 @@ do
        i=$((i + 1))
 done
 
-# If GTK3 required, get the GTK3 options not yet installed
-if [ -z "${gtk_version%%GTK3*}" ]
-then
-       i=0
-       for file in $optional_gtk3_array
-       do
-               if [ $((i % 2)) -eq 0 ]
-               then
-                       package_title="$file"
-               else
-                       if package_query "$file"
-                       then
-                               if [ -z "$option_string" ]
-                               then
-                                       option_string="${install_option:+${install_option}}\n${file}\n${file}"
-                               else
-                                       option_string="${option_string:+${option_string}}\n$install_option\n${package_title}\n${file}"
-                               fi
-                       fi
-               fi
-               i=$((i + 1))
-       done
-fi
-
 kill $zen_pid 2> /dev/null
 
 # Ask the user which options to install
index 8dc8bd6..51c0816 100644 (file)
@@ -1,6 +1,6 @@
 # norootforbuild
 
-BuildRequires:  gtk2-devel gcc-c++ intltool gnome-doc-utils libjpeg-devel libtiff-devel
+BuildRequires:  libgtk-3-dev gcc-c++ intltool gnome-doc-utils libjpeg-devel libtiff-devel
 %if 0%{?suse_version}
 BuildRequires:  liblcms-devel update-desktop-files
 %define docname        %{name}
@@ -81,7 +81,7 @@ make install DESTDIR=%{buildroot}
 %suse_update_desktop_file -n geeqie
 %endif
 
-%__install -m 644 AUTHORS COPYING ChangeLog NEWS README.md README.lirc "%{buildroot}/%{_docdir}/%{docname}/"
+%__install -m 644 AUTHORS COPYING ChangeLog NEWS README.md "%{buildroot}/%{_docdir}/%{docname}/"
 
 %clean
 %__rm -rf "%{buildroot}"
index efaaa1f..733107a 100644 (file)
@@ -45,9 +45,12 @@ project(
     version : run_command('./version.sh', check : true).stdout().strip(),
     license : ['GPL-2.0-or-later'],
     meson_version : '>= 0.60.0',
-    default_options : ['warning_level=0', 'buildtype=debugoptimized']
+    default_options : ['warning_level=3', 'buildtype=debugoptimized']
 )
 
+# To inhibit warnings from the generated files icons_inline.h and ui_icons.h
+add_global_arguments('-Wno-overlength-strings', language : 'c')
+
 # Project requirements
 project_sources = []
 gnome = import('gnome')
@@ -123,12 +126,7 @@ conf_data = configuration_data()
 conf_data.set_quoted('VERSION', run_command('./version.sh', check : true).stdout())
 conf_data.set('DEBUG', debug)
 
-if get_option('gtk3')
-    gtk_dep = dependency('gtk+-3.0', version : '>=3.0', required: true) 
-else
-    gtk_dep = dependency('gtk+-2.0', version : '>=2.20', required: true)
-endif
-
+gtk_dep = dependency('gtk+-3.0', version : '>=3.22', required: true)
 glib_dep = dependency('glib-2.0', version: '>=2.52', required: true)
 
 libarchive_dep = []
@@ -137,16 +135,6 @@ if libarchive_dep.found()
     conf_data.set('HAVE_ARCHIVE', 1)
 endif
 
-clutter_dep = []
-clutter_gtk_dep = []
-if get_option('gtk3')
-    clutter_dep = dependency('clutter-1.0', required : get_option('clutter'))
-    clutter_gtk_dep = dependency('clutter-gtk-1.0', required : get_option('clutter'))
-    if clutter_dep.found() and clutter_gtk_dep.found()
-        conf_data.set('HAVE_CLUTTER', 1)
-    endif
-endif
-
 lcms_dep = []
 lcms_dep = dependency('lcms2', version: '>=2.0', required : get_option('cms'))
 if lcms_dep.found()
@@ -195,10 +183,15 @@ endif
 
 champlain_dep = []
 champlain_gtk_dep = []
-if conf_data.has('HAVE_CLUTTER')
-    champlain_dep = dependency('champlain-0.12', version: '>=0.12', required : get_option('gps-map'))
-    champlain_gtk_dep = dependency('champlain-gtk-0.12', version: '>=0.12', required : get_option('gps-map'))
-    if champlain_dep.found() and champlain_gtk_dep.found()
+champlain_dep = dependency('champlain-0.12', version: '>=0.12', required : get_option('gps-map'))
+champlain_gtk_dep = dependency('champlain-gtk-0.12', version: '>=0.12', required : get_option('gps-map'))
+if champlain_dep.found() and champlain_gtk_dep.found()
+    clutter_dep = []
+    clutter_gtk_dep = []
+    clutter_dep = dependency('clutter-1.0', required : true)
+    clutter_gtk_dep = dependency('clutter-gtk-1.0', required : true)
+    if clutter_dep.found() and clutter_gtk_dep.found()
+        conf_data.set('HAVE_CLUTTER', 1)
         conf_data.set('HAVE_LIBCHAMPLAIN', 1)
         conf_data.set('HAVE_LIBCHAMPLAIN_GTK', 1)
     endif
@@ -238,12 +231,6 @@ if libraw_dep.found()
     conf_data.set('HAVE_RAW', 1)
 endif
 
-lirc_dep = []
-lirc_dep = dependency('lirc', version: '>=0.6.1', required : get_option('lirc'))
-if lirc_dep.found()
-    conf_data.set('HAVE_LIRC', 1)
-endif
-
 lua_dep = []
 lua_dep = dependency('lua5.1', required : get_option('lua'))
 if lua_dep.found()
@@ -251,19 +238,15 @@ if lua_dep.found()
 endif
 
 poppler_glib_dep = []
-if get_option('gtk3')
-    poppler_glib_dep = dependency('poppler-glib', version: '>=0.62', required : get_option('pdf'))
-    if poppler_glib_dep.found()
-        conf_data.set('HAVE_PDF', 1)
-    endif
+poppler_glib_dep = dependency('poppler-glib', version: '>=0.62', required : get_option('pdf'))
+if poppler_glib_dep.found()
+    conf_data.set('HAVE_PDF', 1)
 endif
 
 gspell_dep = []
-if get_option('gtk3')
-    gspell_dep = dependency('gspell-1', required: get_option('spell'))
-    if gspell_dep.found()
-        conf_data.set('HAVE_SPELL', 1)
-    endif
+gspell_dep = dependency('gspell-1', required: get_option('spell'))
+if gspell_dep.found()
+    conf_data.set('HAVE_SPELL', 1)
 endif
 
 tiff_dep = []
@@ -328,7 +311,7 @@ run_command(find_program('gen_readme.sh'), meson.project_source_root(), meson.pr
 
 pandoc = find_program('pandoc')
 if pandoc.found()
-    install_data('README.md', 'COPYING', join_paths(meson.project_build_root(), 'ChangeLog'), 'TODO', 'README.lirc', 'AUTHORS', join_paths(meson.project_build_root(), 'README.html'), join_paths(meson.project_build_root(), 'ChangeLog.html'), install_dir : helpdir, install_tag : 'help')
+    install_data('README.md', 'COPYING', join_paths(meson.project_build_root(), 'ChangeLog'), 'TODO', 'AUTHORS', join_paths(meson.project_build_root(), 'README.html'), join_paths(meson.project_build_root(), 'ChangeLog.html'), install_dir : helpdir, install_tag : 'help')
 else
     install_data('README.md', 'COPYING', join_paths(meson.project_build_root(), 'ChangeLog'), 'TODO', 'README.lirc', 'AUTHORS', install_dir : helpdir, install_tag : 'help')
 endif
index cb1a69c..9ac9965 100644 (file)
@@ -23,10 +23,7 @@ option('gq_helpdir', type : 'string', value : '', description : 'Location of doc
 option('gq_htmldir', type : 'string', value : '', description : 'Location of html documentation')
 option('gq_localedir', type : 'string', value : '', description : 'Location where the catalogs will be installed')
 
-option('gtk3', type : 'boolean', value : 'true', description : 'GTK3')
-
 option('archive', type : 'feature', value : 'auto', description : 'archive files e.g. zip, gz')
-option('clutter', type : 'feature', value : 'auto', description : 'clutter (for GPS maps)')
 option('cms', type : 'feature', value : 'auto', description : 'color management system')
 option('djvu', type : 'feature', value : 'auto', description : 'djvu')
 option('exiv2', type : 'feature', value : 'auto', description : 'exiv2')
@@ -37,7 +34,6 @@ option('j2k', type : 'feature', value : 'auto', description : 'j2k')
 option('jpeg', type : 'feature', value : 'auto', description : 'jpeg')
 option('jpegxl', type : 'feature', value : 'auto', description : 'jpegxl')
 option('libraw', type : 'feature', value : 'auto', description : 'libraw')
-option('lirc', type : 'feature', value : 'auto', description : 'lirc')
 option('lua', type : 'feature', value : 'auto', description : 'lua')
 option('markdown', type : 'feature', value : 'auto', description : 'markdown')
 option('pdf', type : 'feature', value : 'auto', description : 'pdf')
index 734c540..0b5f887 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #/*
-# * Copyright (C) 2021 The Geeqie Team
+# * Copyright (C) 2022 The Geeqie Team
 # *
 # * Author: Colin Clark  
 # *  
 
 ## @file
 ## @brief Check that Geeqie compiles with both gcc and clang,
-## for both GTK2 and GTK3, and with and without optional modules.
+## for GTK3, and with and without optional modules.
 ## 
 
 compile()
 {
-       compiler="$1"
+compiler="$1"
 
-       # Cannot have --enable-debug-flags with --disable-gtk3
-       set -- "$disable_list --disable-gtk3" "--disable-gtk3" "$disable_list --enable-debug-flags" "--enable-debug-flags" "$disable_list" ""
+printf '\e[32m%s\n' "$compiler all disabled"
+meson configure build -Darchive=disabled -Dcms=disabled -Ddjvu=disabled -Dexiv2=disabled -Dffmpegthumbnailer=disabled -Dgps-map=disabled -Dheif=disabled -Dj2k=disabled -Djpeg=disabled -Djpegxl=disabled -Dlibraw=disabled -Dlua=disabled -Dmarkdown=disabled -Dpdf=disabled -Dspell=disabled -Dtiff=disabled -Dwebp=disabled
+ninja -C build clean > /dev/null 2>&1
+ninja -C build > /dev/null 2>&1
 
-       i=1
-       while [ $i -le 6 ]
-       do
-               variant=""
-               eval variant="\$${i}"
-
-               if [ "$variant" != "${variant%gtk3*}" ]
-               then
-                       gtk="GTK2"
-               else
-                       gtk="GTK3"
-               fi
-               if [ "$variant" != "${variant%disable-threads*}" ]
-               then
-                       disabled="all disabled"
-               else
-                       disabled="none disabled"
-               fi
-               if [ "$variant" != "${variant%--enable-debug-flags*}" ]
-               then
-                       debug_flags="enable-debug-flags"
-               else
-                       debug_flags=""
-               fi
-
-               printf '\e[32m%s\n' "$compiler $gtk $debug_flags $disabled"
-               sudo make maintainer-clean > /dev/null 2>&1
-               ./autogen.sh "$variant" > /dev/null 2>&1
-               make -j > /dev/null
-
-               i=$((i+1))
-       done
+printf '\e[32m%s\n' "$compiler none disabled"
+meson configure build -Darchive=auto -Dcms=auto -Ddjvu=auto -Dexiv2=auto -Dffmpegthumbnailer=auto -Dgps-map=auto -Dheif=auto -Dj2k=auto -Djpeg=auto -Djpegxl=auto -Dlibraw=auto -Dlua=auto -Dmarkdown=auto -Dpdf=auto -Dspell=auto -Dtiff=auto -Dwebp=auto
+ninja -C build clean > /dev/null 2>&1
+ninja -C build > /dev/null 2>&1
 }
 
-disable_list=" "$(awk -F '[][]' '/AC_HELP_STRING\(\[--disable-/ {if ($2 != "gtk3") print $2}' configure.ac | tr '\n' ' ')
-
-printf '%s\n' "Disabled list: :$disable_list"
-
-export CFLAGS="-Wno-deprecated-declarations"
-
 export CC=clang
 export CXX=clang++
 compile "clang"
index 746aa70..7231cbe 100755 (executable)
@@ -113,10 +113,8 @@ else
        git checkout stable/"$version"
 fi
 
-sudo make maintainer-clean
-./autogen.sh
-make -j
 ./scripts/generate-man-page.sh
+./doc/create-shortcuts-xml.sh
 
 git add NEWS
 git add org.geeqie.Geeqie.appdata.xml.in
@@ -136,9 +134,6 @@ then
        git push git@geeqie.org:geeqie "v$revision"
 fi
 
-sudo make maintainer-clean
-./gen_changelog.sh
-
 rm -rf /tmp/geeqie-"$revision".tar.xz
 rm -rf /tmp/geeqie-"$revision".tar.xz.asc
 
index 0029232..e512125 100755 (executable)
@@ -35,13 +35,9 @@ then
        exit 1
 fi
 
-rm -rf doc/html
-tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/geeqie.XXXXXXXXXX")
-
-make -j install DESTDIR="$tmpdir"
-rm -r "$tmpdir"
+ninja -C build
 
 find ../geeqie.github.io/help/ -type f -exec rm "{}" \;
-cp -a doc/html/* ../geeqie.github.io/help
+cp -a build/doc/html/* ../geeqie.github.io/help
 
 exit 0
index a6851ad..f0b4930 100644 (file)
@@ -189,9 +189,9 @@ static GtkTargetEntry advanced_exif_drag_types[] = {
 static gint n_exif_drag_types = 1;
 
 
-static void advanced_exif_dnd_get(GtkWidget *listview, GdkDragContext *context,
-                                 GtkSelectionData *selection_data, guint info,
-                                 guint time, gpointer data)
+static void advanced_exif_dnd_get(GtkWidget *listview, GdkDragContext *UNUSED(context),
+                                 GtkSelectionData *selection_data, guint UNUSED(info),
+                                 guint UNUSED(time), gpointer UNUSED(data))
 {
        //ExifWin *ew = data;
        GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview));
@@ -211,7 +211,7 @@ static void advanced_exif_dnd_get(GtkWidget *listview, GdkDragContext *context,
 }
 
 
-static void advanced_exif_dnd_begin(GtkWidget *listview, GdkDragContext *context, gpointer data)
+static void advanced_exif_dnd_begin(GtkWidget *listview, GdkDragContext *context, gpointer UNUSED(data))
 {
        //ExifWin *ew = data;
        GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview));
@@ -249,9 +249,7 @@ static void advanced_exif_add_column(GtkWidget *listview, const gchar *title, gi
                gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
                }
 
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_tree_view_column_set_resizable(column, TRUE);
-#endif
        gtk_tree_view_column_set_sort_column_id(column, n);
 
        renderer = gtk_cell_renderer_text_new();
@@ -287,7 +285,7 @@ void advanced_exif_close(ExifWin *ew)
        g_free(ew);
 }
 
-static gboolean advanced_exif_delete_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
+static gboolean advanced_exif_delete_cb(GtkWidget *UNUSED(widget), GdkEvent *UNUSED(event), gpointer data)
 {
        ExifWin *ew = data;
 
@@ -342,8 +340,8 @@ static gint advanced_exif_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIt
        return ret;
 }
 
-static gboolean advanced_exif_mouseclick(GtkWidget *widget,
-                                               GdkEventButton *bevent, gpointer data)
+static gboolean advanced_exif_mouseclick(GtkWidget *UNUSED(widget),
+                                               GdkEventButton *UNUSED(bevent), gpointer data)
 {
        ExifWin *ew = data;
        GtkTreePath *path;
@@ -377,7 +375,7 @@ static gboolean advanced_exif_mouseclick(GtkWidget *widget,
        return TRUE;
 }
 
-static gboolean advanced_exif_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean advanced_exif_keypress(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        ExifWin *ew = data;
        gboolean stop_signal = FALSE;
@@ -401,7 +399,7 @@ static gboolean advanced_exif_keypress(GtkWidget *widget, GdkEventKey *event, gp
        return stop_signal;
 } // static gboolean advanced_exif_...
 
-static gboolean search_function_cb(GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer data)
+static gboolean search_function_cb(GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer UNUSED(data))
 {
        gboolean ret = TRUE;
        gchar *field_contents;
@@ -454,21 +452,18 @@ GtkWidget *advanced_exif_new(LayoutWindow *lw)
        g_object_set_data(G_OBJECT(ew->window), "advanced_exif_data", ew);
        g_signal_connect(G_OBJECT(ew->window), "delete_event", G_CALLBACK(advanced_exif_delete_cb), ew);
 
-       ew->vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       ew->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_container_add(GTK_CONTAINER(ew->window), ew->vbox);
        gtk_widget_show(ew->vbox);
 
-       box = gtk_hbox_new(FALSE, 0);
+       box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
 
        ew->label_file_name = gtk_label_new("");
        gtk_label_set_ellipsize(GTK_LABEL(ew->label_file_name), PANGO_ELLIPSIZE_START);
        gtk_label_set_selectable(GTK_LABEL(ew->label_file_name), TRUE);
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(ew->label_file_name), 0.5);
        gtk_label_set_yalign(GTK_LABEL(ew->label_file_name), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(ew->label_file_name), 0.5, 0.5);
-#endif
+
        gtk_box_pack_start(GTK_BOX(box), ew->label_file_name, TRUE, TRUE, 0);
        gtk_widget_show(ew->label_file_name);
 
index 2aa334d..610652b 100644 (file)
--- a/src/bar.c
+++ b/src/bar.c
@@ -230,7 +230,7 @@ struct _BarData
        gint width;
 };
 
-static void bar_expander_move(GtkWidget *widget, gpointer data, gboolean up, gboolean single_step)
+static void bar_expander_move(GtkWidget *UNUSED(widget), gpointer data, gboolean up, gboolean single_step)
 {
        GtkWidget *expander = data;
        GtkWidget *box;
@@ -282,7 +282,7 @@ static void height_spin_changed_cb(GtkSpinButton *spin, gpointer data)
        gtk_widget_set_size_request(GTK_WIDGET(data), -1, gtk_spin_button_get_value_as_int(spin));
 }
 
-static gboolean height_spin_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean height_spin_key_press_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        if ((event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_Escape))
                {
@@ -292,7 +292,7 @@ static gboolean height_spin_key_press_cb(GtkWidget *widget, GdkEventKey *event,
        return TRUE;
 }
 
-static void bar_expander_height_cb(GtkWidget *widget, gpointer data)
+static void bar_expander_height_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkWidget *expander = data;
        GtkWidget *spin;
@@ -301,20 +301,14 @@ static void bar_expander_height_cb(GtkWidget *widget, gpointer data)
        GList *list;
        gint x, y;
        gint w, h;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDisplay *display;
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
-#if GTK_CHECK_VERSION(3,0,0)
        display = gdk_display_get_default();
        device_manager = gdk_display_get_device_manager(display);
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_device_get_position(device, NULL, &x, &y);
-#else
-       gdk_window_get_pointer(NULL, &x, &y, NULL);
-#endif
 
        list = gtk_container_get_children(GTK_CONTAINER(expander));
        data_box = list->data;
@@ -342,13 +336,13 @@ static void bar_expander_height_cb(GtkWidget *widget, gpointer data)
        g_list_free(list);
 }
 
-static void bar_expander_delete_cb(GtkWidget *widget, gpointer data)
+static void bar_expander_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkWidget *expander = data;
        gtk_widget_destroy(expander);
 }
 
-static void bar_expander_add_cb(GtkWidget *widget, gpointer data)
+static void bar_expander_add_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        //GtkWidget *bar = data;
        const KnownPanes *pane = known_panes;
@@ -447,7 +441,7 @@ static void bar_menu_add_popup(GtkWidget *widget)
 }
 
 
-static gboolean bar_menu_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean bar_menu_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer UNUSED(data))
 {
        if (bevent->button == MOUSE_BUTTON_RIGHT)
                {
@@ -457,7 +451,7 @@ static gboolean bar_menu_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer
        return FALSE;
 }
 
-static void bar_expander_cb(GObject *object, GParamSpec *param_spec, gpointer data)
+static void bar_expander_cb(GObject *object, GParamSpec *UNUSED(param_spec), gpointer UNUSED(data))
 {
        GtkExpander *expander;
        GtkWidget *child;
@@ -475,7 +469,7 @@ static void bar_expander_cb(GObject *object, GParamSpec *param_spec, gpointer da
                }
 }
 
-static gboolean bar_menu_add_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean bar_menu_add_cb(GtkWidget *widget, GdkEventButton *UNUSED(bevent), gpointer UNUSED(data))
 {
        bar_menu_add_popup(widget);
        return TRUE;
@@ -687,7 +681,7 @@ void bar_add(GtkWidget *bar, GtkWidget *pane)
 
 }
 
-void bar_populate_default(GtkWidget *bar)
+void bar_populate_default(GtkWidget *UNUSED(bar))
 {
        const gchar *populate_id[] = {"histogram", "title", "keywords", "comment", "rating", "exif", NULL};
        const gchar **id = populate_id;
@@ -700,7 +694,7 @@ void bar_populate_default(GtkWidget *bar)
                }
 }
 
-static void bar_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer data)
+static void bar_size_allocate(GtkWidget *UNUSED(widget), GtkAllocation *UNUSED(allocation), gpointer data)
 {
        BarData *bd = data;
 
@@ -727,7 +721,7 @@ void bar_close(GtkWidget *bar)
        gtk_widget_destroy(bd->widget);
 }
 
-static void bar_destroy(GtkWidget *widget, gpointer data)
+static void bar_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        BarData *bd = data;
 
@@ -743,7 +737,7 @@ static void bar_destroy(GtkWidget *widget, gpointer data)
    it should be removed as soon as a better solution exists
 */
 
-static void bar_unrealize_clutter_fix_cb(GtkWidget *widget, gpointer data)
+static void bar_unrealize_clutter_fix_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        GtkWidget *child = gtk_bin_get_child(GTK_BIN(widget));
        if (child) gtk_widget_unrealize(child);
@@ -762,7 +756,7 @@ GtkWidget *bar_new(LayoutWindow *lw)
 
        bd->lw = lw;
 
-       bd->widget = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       bd->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        DEBUG_NAME(bd->widget);
        g_object_set_data(G_OBJECT(bd->widget), "bar_data", bd);
        g_signal_connect(G_OBJECT(bd->widget), "destroy",
@@ -775,18 +769,15 @@ GtkWidget *bar_new(LayoutWindow *lw)
 
        bd->width = SIDEBAR_DEFAULT_WIDTH;
 
-       box = gtk_hbox_new(FALSE, 0);
+       box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        DEBUG_NAME(box);
 
        bd->label_file_name = gtk_label_new("");
        gtk_label_set_ellipsize(GTK_LABEL(bd->label_file_name), PANGO_ELLIPSIZE_END);
        gtk_label_set_selectable(GTK_LABEL(bd->label_file_name), TRUE);
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(bd->label_file_name), 0.5);
        gtk_label_set_yalign(GTK_LABEL(bd->label_file_name), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(bd->label_file_name), 0.5, 0.5);
-#endif
+
        gtk_box_pack_start(GTK_BOX(box), bd->label_file_name, TRUE, TRUE, 0);
        gtk_widget_show(bd->label_file_name);
 
@@ -801,11 +792,11 @@ GtkWidget *bar_new(LayoutWindow *lw)
        gtk_widget_show(scrolled);
 
 
-       bd->vbox = gtk_vbox_new(FALSE, 0);
-       gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), bd->vbox);
+       bd->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+       gtk_container_add(GTK_CONTAINER(scrolled), bd->vbox);
        gtk_viewport_set_shadow_type(GTK_VIEWPORT(gtk_bin_get_child(GTK_BIN(scrolled))), GTK_SHADOW_NONE);
 
-       add_box = gtk_vbox_new(FALSE, 0);
+       add_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        DEBUG_NAME(add_box);
        gtk_box_pack_end(GTK_BOX(bd->widget), add_box, FALSE, FALSE, 0);
        tbar = pref_toolbar_new(add_box, GTK_TOOLBAR_ICONS);
index 5dbc5b5..2353b87 100644 (file)
@@ -91,9 +91,9 @@ static void bar_pane_comment_update(PaneCommentData *pcd)
 
        if (strcmp(orig_comment, comment_not_null) != 0)
                {
-               g_signal_handlers_block_by_func(comment_buffer, bar_pane_comment_changed, pcd);
+               g_signal_handlers_block_by_func(comment_buffer, (gpointer)bar_pane_comment_changed, pcd);
                gtk_text_buffer_set_text(comment_buffer, comment_not_null, -1);
-               g_signal_handlers_unblock_by_func(comment_buffer, bar_pane_comment_changed, pcd);
+               g_signal_handlers_unblock_by_func(comment_buffer, (gpointer)bar_pane_comment_changed, pcd);
                }
        g_free(comment);
        g_free(orig_comment);
@@ -133,14 +133,14 @@ static void bar_pane_comment_set_selection(PaneCommentData *pcd, gboolean append
        g_free(comment);
 }
 
-static void bar_pane_comment_sel_add_cb(GtkWidget *button, gpointer data)
+static void bar_pane_comment_sel_add_cb(GtkWidget *UNUSED(button), gpointer data)
 {
        PaneCommentData *pcd = data;
 
        bar_pane_comment_set_selection(pcd, TRUE);
 }
 
-static void bar_pane_comment_sel_replace_cb(GtkWidget *button, gpointer data)
+static void bar_pane_comment_sel_replace_cb(GtkWidget *UNUSED(button), gpointer data)
 {
        PaneCommentData *pcd = data;
 
@@ -220,7 +220,7 @@ static void bar_pane_comment_notify_cb(FileData *fd, NotifyType type, gpointer d
                }
 }
 
-static void bar_pane_comment_changed(GtkTextBuffer *buffer, gpointer data)
+static void bar_pane_comment_changed(GtkTextBuffer *UNUSED(buffer), gpointer data)
 {
        PaneCommentData *pcd = data;
 
@@ -228,7 +228,7 @@ static void bar_pane_comment_changed(GtkTextBuffer *buffer, gpointer data)
 }
 
 
-static void bar_pane_comment_populate_popup(GtkTextView *textview, GtkMenu *menu, gpointer data)
+static void bar_pane_comment_populate_popup(GtkTextView *UNUSED(textview), GtkMenu *menu, gpointer data)
 {
        PaneCommentData *pcd = data;
 
@@ -237,7 +237,7 @@ static void bar_pane_comment_populate_popup(GtkTextView *textview, GtkMenu *menu
        menu_item_add_stock(GTK_WIDGET(menu), _("Replace existing text in selected files"), GTK_STOCK_CONVERT, G_CALLBACK(bar_pane_comment_sel_replace_cb), data);
 }
 
-static void bar_pane_comment_destroy(GtkWidget *widget, gpointer data)
+static void bar_pane_comment_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        PaneCommentData *pcd = data;
 
@@ -297,7 +297,6 @@ static GtkWidget *bar_pane_comment_new(const gchar *id, const gchar *title, cons
        gtk_widget_show(pcd->comment_view);
 
 #ifdef HAVE_SPELL
-#if GTK_CHECK_VERSION(3,20,0)
        if (g_strcmp0(key, "Xmp.xmp.Rating") != 0)
                {
                if (options->metadata.check_spelling)
@@ -306,7 +305,6 @@ static GtkWidget *bar_pane_comment_new(const gchar *id, const gchar *title, cons
                        gspell_text_view_basic_setup(gspell_view);
                        }
        }
-#endif
 #endif
 
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pcd->comment_view));
index fdc6271..a97316c 100644 (file)
@@ -100,7 +100,7 @@ static gboolean bar_pane_exif_menu_cb(GtkWidget *widget, GdkEventButton *bevent,
 static void bar_pane_exif_notify_cb(FileData *fd, NotifyType type, gpointer data);
 static gboolean bar_pane_exif_copy_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data);
 
-static void bar_pane_exif_entry_changed(GtkEntry *text_entry, gpointer data)
+static void bar_pane_exif_entry_changed(GtkEntry *UNUSED(text_entry), gpointer data)
 {
        ExifEntry *ee = data;
        gchar *text;
@@ -111,7 +111,7 @@ static void bar_pane_exif_entry_changed(GtkEntry *text_entry, gpointer data)
        g_free(text);
 }
 
-static void bar_pane_exif_entry_destroy(GtkWidget *widget, gpointer data)
+static void bar_pane_exif_entry_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        ExifEntry *ee = data;
 
@@ -127,17 +127,13 @@ static void bar_pane_exif_setup_entry_box(PaneExifData *ped, ExifEntry *ee)
 
        if (ee->box) gtk_widget_destroy(ee->box);
 
-       ee->box = horizontal ? gtk_hbox_new(FALSE, 0) : gtk_vbox_new(FALSE, 0);
+       ee->box = horizontal ? gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0) : gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_container_add(GTK_CONTAINER(ee->ebox), ee->box);
        gtk_widget_show(ee->box);
 
        ee->title_label = gtk_label_new(NULL);
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(ee->title_label), horizontal ? 1.0 : 0.0);
        gtk_label_set_yalign(GTK_LABEL(ee->title_label), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(ee->title_label), horizontal ? 1.0 : 0.0, 0.5);
-#endif
        gtk_size_group_add_widget(ped->size_group, ee->title_label);
        gtk_box_pack_start(GTK_BOX(ee->box), ee->title_label, FALSE, TRUE, 0);
        gtk_widget_show(ee->title_label);
@@ -155,12 +151,8 @@ static void bar_pane_exif_setup_entry_box(PaneExifData *ped, ExifEntry *ee)
 //             gtk_label_set_width_chars(GTK_LABEL(ee->value_widget), 20);
                gtk_label_set_ellipsize(GTK_LABEL(ee->value_widget), PANGO_ELLIPSIZE_END);
 //             gtk_widget_set_size_request(ee->value_widget, 100, -1);
-#if GTK_CHECK_VERSION(3,16,0)
                gtk_label_set_xalign(GTK_LABEL(ee->value_widget), 0.0);
                gtk_label_set_yalign(GTK_LABEL(ee->value_widget), 0.5);
-#else
-               gtk_misc_set_alignment(GTK_MISC(ee->value_widget), 0.0, 0.5);
-#endif
                }
 
        gtk_box_pack_start(GTK_BOX(ee->box), ee->value_widget, TRUE, TRUE, 1);
@@ -261,9 +253,9 @@ static void bar_pane_exif_update_entry(PaneExifData *ped, GtkWidget *entry, gboo
                {
                if (ee->editable)
                        {
-                       g_signal_handlers_block_by_func(ee->value_widget, bar_pane_exif_entry_changed, ee);
+                       g_signal_handlers_block_by_func(ee->value_widget, (gpointer *)bar_pane_exif_entry_changed, ee);
                        gtk_entry_set_text(GTK_ENTRY(ee->value_widget), text ? text : "");
-                       g_signal_handlers_unblock_by_func(ee->value_widget, bar_pane_exif_entry_changed, ee);
+                       g_signal_handlers_unblock_by_func(ee->value_widget, (gpointer)bar_pane_exif_entry_changed, ee);
                        gtk_widget_set_tooltip_text(ee->box, NULL);
                        }
                else
@@ -366,9 +358,9 @@ static GtkTargetEntry bar_pane_exif_drop_types[] = {
 static gint n_exif_entry_drop_types = 2;
 
 
-static void bar_pane_exif_entry_dnd_get(GtkWidget *entry, GdkDragContext *context,
+static void bar_pane_exif_entry_dnd_get(GtkWidget *entry, GdkDragContext *UNUSED(context),
                                     GtkSelectionData *selection_data, guint info,
-                                    guint time, gpointer data)
+                                    guint UNUSED(time), gpointer UNUSED(data))
 {
        ExifEntry *ee = g_object_get_data(G_OBJECT(entry), "entry_data");
 
@@ -387,10 +379,10 @@ static void bar_pane_exif_entry_dnd_get(GtkWidget *entry, GdkDragContext *contex
 
 }
 
-static void bar_pane_exif_dnd_receive(GtkWidget *pane, GdkDragContext *context,
+static void bar_pane_exif_dnd_receive(GtkWidget *pane, GdkDragContext *UNUSED(context),
                                          gint x, gint y,
                                          GtkSelectionData *selection_data, guint info,
-                                         guint time, gpointer data)
+                                         guint UNUSED(time), gpointer UNUSED(data))
 {
        PaneExifData *ped;
        GList *work, *list;
@@ -438,7 +430,7 @@ static void bar_pane_exif_dnd_receive(GtkWidget *pane, GdkDragContext *context,
        gtk_box_reorder_child(GTK_BOX(ped->vbox), new_entry, pos);
 }
 
-static void bar_pane_exif_entry_dnd_begin(GtkWidget *entry, GdkDragContext *context, gpointer data)
+static void bar_pane_exif_entry_dnd_begin(GtkWidget *entry, GdkDragContext *context, gpointer UNUSED(data))
 {
        ExifEntry *ee = g_object_get_data(G_OBJECT(entry), "entry_data");
 
@@ -446,7 +438,7 @@ static void bar_pane_exif_entry_dnd_begin(GtkWidget *entry, GdkDragContext *cont
        dnd_set_drag_label(entry, context, ee->key);
 }
 
-static void bar_pane_exif_entry_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void bar_pane_exif_entry_dnd_end(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context), gpointer UNUSED(data))
 {
 }
 
@@ -476,24 +468,24 @@ static void bar_pane_exif_dnd_init(GtkWidget *pane)
                         G_CALLBACK(bar_pane_exif_dnd_receive), NULL);
 }
 
-static void bar_pane_exif_edit_close_cb(GtkWidget *widget, gpointer data)
+static void bar_pane_exif_edit_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GenericDialog *gd = data;
        generic_dialog_close(gd);
 }
 
-static void bar_pane_exif_edit_destroy_cb(GtkWidget *widget, gpointer data)
+static void bar_pane_exif_edit_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ConfDialogData *cdd = data;
-       g_signal_handlers_disconnect_by_func(cdd->widget, G_CALLBACK(bar_pane_exif_edit_close_cb), cdd->gd);
+       g_signal_handlers_disconnect_by_func(cdd->widget, (gpointer)(bar_pane_exif_edit_close_cb), cdd->gd);
        g_free(cdd);
 }
 
-static void bar_pane_exif_edit_cancel_cb(GenericDialog *gd, gpointer data)
+static void bar_pane_exif_edit_cancel_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
 }
 
-static void bar_pane_exif_edit_ok_cb(GenericDialog *gd, gpointer data)
+static void bar_pane_exif_edit_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        ConfDialogData *cdd = data;
 
@@ -607,19 +599,19 @@ static void bar_pane_exif_conf_dialog(GtkWidget *widget)
        gtk_widget_show(gd->dialog);
 }
 
-static void bar_pane_exif_conf_dialog_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_exif_conf_dialog_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        GtkWidget *widget = data;
        bar_pane_exif_conf_dialog(widget);
 }
 
-static void bar_pane_exif_delete_entry_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_exif_delete_entry_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        GtkWidget *entry = data;
        gtk_widget_destroy(entry);
 }
 
-static void bar_pane_exif_copy_entry_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_exif_copy_entry_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        GtkWidget *widget = data;
        GtkClipboard *clipboard;
@@ -632,7 +624,7 @@ static void bar_pane_exif_copy_entry_cb(GtkWidget *menu_widget, gpointer data)
        gtk_clipboard_set_text(clipboard, value, -1);
 }
 
-static void bar_pane_exif_toggle_show_all_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_exif_toggle_show_all_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneExifData *ped = data;
        ped->show_all = !ped->show_all;
@@ -682,7 +674,7 @@ static gboolean bar_pane_exif_menu_cb(GtkWidget *widget, GdkEventButton *bevent,
        return FALSE;
 }
 
-static gboolean bar_pane_exif_copy_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean bar_pane_exif_copy_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer UNUSED(data))
 {
        const gchar *value;
        GtkClipboard *clipboard;
@@ -791,7 +783,7 @@ void bar_pane_exif_close(GtkWidget *widget)
        gtk_widget_destroy(ped->vbox);
 }
 
-static void bar_pane_exif_destroy(GtkWidget *widget, gpointer data)
+static void bar_pane_exif_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        PaneExifData *ped = data;
 
@@ -802,24 +794,20 @@ static void bar_pane_exif_destroy(GtkWidget *widget, gpointer data)
        g_free(ped);
 }
 
-#if !GTK_CHECK_VERSION(3,0,0)
-static void bar_pane_exif_size_request(GtkWidget *pane, GtkRequisition *requisition, gpointer data)
-{
-       PaneExifData *ped = data;
-       if (requisition->height < ped->min_height)
-               {
-               requisition->height = ped->min_height;
-               }
-}
-#endif
+//~ static void bar_pane_exif_size_request(GtkWidget *UNUSED(pane), GtkRequisition *requisition, gpointer data)
+//~ {
+       //~ PaneExifData *ped = data;
+       //~ if (requisition->height < ped->min_height)
+               //~ {
+               //~ requisition->height = ped->min_height;
+               //~ }
+//~ }
 
-static void bar_pane_exif_size_allocate(GtkWidget *pane, GtkAllocation *alloc, gpointer data)
+static void bar_pane_exif_size_allocate(GtkWidget *UNUSED(pane), GtkAllocation *alloc, gpointer data)
 {
        PaneExifData *ped = data;
        ped->min_height = alloc->height;
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_widget_set_size_request(ped->widget, -1, ped->min_height);
-#endif
 }
 
 static GtkWidget *bar_pane_exif_new(const gchar *id, const gchar *title, gboolean expanded, gboolean show_all)
@@ -839,7 +827,7 @@ static GtkWidget *bar_pane_exif_new(const gchar *id, const gchar *title, gboolea
 
        ped->size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
        ped->widget = gtk_event_box_new();
-       ped->vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       ped->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_container_add(GTK_CONTAINER(ped->widget), ped->vbox);
        gtk_widget_show(ped->vbox);
 
@@ -847,12 +835,7 @@ static GtkWidget *bar_pane_exif_new(const gchar *id, const gchar *title, gboolea
        g_object_set_data(G_OBJECT(ped->widget), "pane_data", ped);
        g_signal_connect_after(G_OBJECT(ped->widget), "destroy",
                               G_CALLBACK(bar_pane_exif_destroy), ped);
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_widget_set_size_request(ped->widget, -1, ped->min_height);
-#else
-       g_signal_connect(G_OBJECT(ped->widget), "size-request",
-                        G_CALLBACK(bar_pane_exif_size_request), ped);
-#endif
        g_signal_connect(G_OBJECT(ped->widget), "size-allocate",
                         G_CALLBACK(bar_pane_exif_size_allocate), ped);
 
index 61a2275..88c394a 100644 (file)
@@ -99,14 +99,14 @@ static GtkTargetEntry bar_pane_gps_drop_types[] = {
 };
 static gint n_gps_entry_drop_types = 2;
 
-static void bar_pane_gps_close_cancel_cb(GenericDialog *gd, gpointer data)
+static void bar_pane_gps_close_cancel_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        PaneGPSData *pgd = data;
 
        g_list_free(pgd->geocode_list);
 }
 
-static void bar_pane_gps_close_save_cb(GenericDialog *gd, gpointer data)
+static void bar_pane_gps_close_save_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        PaneGPSData *pgd = data;
        FileData *fd;
@@ -127,10 +127,10 @@ static void bar_pane_gps_close_save_cb(GenericDialog *gd, gpointer data)
        g_list_free(pgd->geocode_list);
 }
 
- static void bar_pane_gps_dnd_receive(GtkWidget *pane, GdkDragContext *context,
+ static void bar_pane_gps_dnd_receive(GtkWidget *pane, GdkDragContext *UNUSED(context),
                                                                          gint x, gint y,
                                                                          GtkSelectionData *selection_data, guint info,
-                                                                         guint time, gpointer data)
+                                                                         guint UNUSED(time), gpointer UNUSED(data))
 {
        PaneGPSData *pgd;
        GenericDialog *gd;
@@ -258,8 +258,8 @@ static void bar_pane_gps_dnd_init(gpointer data)
 
 }
 
-static gboolean bar_gps_draw_direction (ClutterCanvas *canvas,
-                               cairo_t *cr, gpointer data)
+static gboolean bar_gps_draw_direction (ClutterCanvas *UNUSED(canvas),
+                               cairo_t *cr, gpointer UNUSED(data))
 {
        cairo_set_source_rgb(cr, 255, 0, 0);
 
@@ -289,12 +289,12 @@ static void bar_pane_gps_thumb_done_cb(ThumbLoader *tl, gpointer data)
        thumb_loader_free(tl);
 }
 
-static void bar_pane_gps_thumb_error_cb(ThumbLoader *tl, gpointer data)
+static void bar_pane_gps_thumb_error_cb(ThumbLoader *tl, gpointer UNUSED(data))
 {
        thumb_loader_free(tl);
 }
 
-static gboolean bar_pane_gps_marker_keypress_cb(GtkWidget *widget, ClutterButtonEvent *bevent, gpointer data)
+static gboolean bar_pane_gps_marker_keypress_cb(GtkWidget *widget, ClutterButtonEvent *bevent, gpointer UNUSED(data))
 {
        //PaneGPSData *pgd = data;
        FileData *fd;
@@ -585,7 +585,7 @@ void bar_pane_gps_set_map_source(PaneGPSData *pgd, const gchar *map_id)
        g_object_unref(map_factory);
 }
 
-void bar_pane_gps_enable_markers_checked_toggle_cb(GtkWidget *menu_widget, gpointer data)
+void bar_pane_gps_enable_markers_checked_toggle_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneGPSData *pgd = data;
 
@@ -599,7 +599,7 @@ void bar_pane_gps_enable_markers_checked_toggle_cb(GtkWidget *menu_widget, gpoin
                }
 }
 
-static void bar_pane_gps_centre_map_checked_toggle_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_gps_centre_map_checked_toggle_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneGPSData *pgd = data;
 
@@ -737,7 +737,7 @@ static void bar_pane_gps_slider_changed_cb(GtkScaleButton *slider,
 
 }
 static void bar_pane_gps_view_state_changed_cb(ChamplainView *view,
-                                              GParamSpec *gobject,
+                                              GParamSpec *UNUSED(gobject),
                                               gpointer data)
 {
        PaneGPSData *pgd = data;
@@ -862,7 +862,7 @@ void bar_pane_gps_map_centreing(PaneGPSData *pgd)
        g_string_free(message, TRUE);
 }
 
-static gboolean bar_pane_gps_map_keypress_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean bar_pane_gps_map_keypress_cb(GtkWidget *UNUSED(widget), GdkEventButton *bevent, gpointer data)
 {
        PaneGPSData *pgd = data;
        GtkWidget *menu;
@@ -900,7 +900,7 @@ static gboolean bar_pane_gps_map_keypress_cb(GtkWidget *widget, GdkEventButton *
                }
 }
 
-static void bar_pane_gps_destroy(GtkWidget *widget, gpointer data)
+static void bar_pane_gps_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        PaneGPSData *pgd = data;
 
@@ -960,10 +960,9 @@ GtkWidget *bar_pane_gps_new(const gchar *id, const gchar *title, const gchar *ma
        gtk_scale_button_set_value(GTK_SCALE_BUTTON(slider), (gdouble)zoom);
 
        progress = gtk_progress_bar_new();
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress), "");
        gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(progress), TRUE);
-#endif
+
        state = gtk_label_new("");
        gtk_label_set_justify(GTK_LABEL(state), GTK_JUSTIFY_LEFT);
        gtk_label_set_ellipsize(GTK_LABEL(state), PANGO_ELLIPSIZE_START);
index 58af06c..41d25db 100644 (file)
@@ -148,8 +148,7 @@ static void bar_pane_histogram_notify_cb(FileData *fd, NotifyType type, gpointer
                }
 }
 
-#if GTK_CHECK_VERSION(3,0,0)
-static gboolean bar_pane_histogram_draw_cb(GtkWidget *widget, cairo_t *cr, gpointer data)
+static gboolean bar_pane_histogram_draw_cb(GtkWidget *UNUSED(widget), cairo_t *cr, gpointer data)
 {
        PaneHistogramData *phd = data;
        if (!phd) return TRUE;
@@ -167,29 +166,7 @@ static gboolean bar_pane_histogram_draw_cb(GtkWidget *widget, cairo_t *cr, gpoin
        return TRUE;
 }
 
-#else
-static gboolean bar_pane_histogram_expose_event_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
-{
-       PaneHistogramData *phd = data;
-       if (!phd) return TRUE;
-
-       if (phd->need_update)
-               {
-               bar_pane_histogram_update(phd);
-               }
-
-       if (!phd->pixbuf) return TRUE;
-
-       cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(widget));
-       gdk_cairo_set_source_pixbuf (cr, phd->pixbuf, 0, 0);
-       cairo_paint (cr);
-       cairo_destroy (cr);
-
-       return TRUE;
-}
-#endif
-
-static void bar_pane_histogram_size_cb(GtkWidget *widget, GtkAllocation *allocation, gpointer data)
+static void bar_pane_histogram_size_cb(GtkWidget *UNUSED(widget), GtkAllocation *allocation, gpointer data)
 {
        PaneHistogramData *phd = data;
 
@@ -198,7 +175,7 @@ static void bar_pane_histogram_size_cb(GtkWidget *widget, GtkAllocation *allocat
        bar_pane_histogram_update(phd);
 }
 
-static void bar_pane_histogram_destroy(GtkWidget *widget, gpointer data)
+static void bar_pane_histogram_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        PaneHistogramData *phd = data;
 
@@ -268,7 +245,7 @@ static GtkWidget *bar_pane_histogram_menu(PaneHistogramData *phd)
        return menu;
 }
 
-static gboolean bar_pane_histogram_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean bar_pane_histogram_press_cb(GtkWidget *UNUSED(widget), GdkEventButton *bevent, gpointer data)
 {
        PaneHistogramData *phd = data;
 
@@ -317,13 +294,8 @@ static GtkWidget *bar_pane_histogram_new(const gchar *id, const gchar *title, gi
        g_signal_connect_after(G_OBJECT(phd->drawing_area), "size_allocate",
                                G_CALLBACK(bar_pane_histogram_size_cb), phd);
 
-#if GTK_CHECK_VERSION(3,0,0)
        g_signal_connect(G_OBJECT(phd->drawing_area), "draw",
                         G_CALLBACK(bar_pane_histogram_draw_cb), phd);
-#else
-       g_signal_connect(G_OBJECT(phd->drawing_area), "expose_event",
-                        G_CALLBACK(bar_pane_histogram_expose_event_cb), phd);
-#endif
 
        gtk_box_pack_start(GTK_BOX(phd->widget), phd->drawing_area, TRUE, TRUE, 0);
        gtk_widget_show(phd->drawing_area);
index 709e450..8882189 100644 (file)
@@ -248,10 +248,10 @@ static void bar_pane_keywords_update(PaneKeywordsData *pkd)
 
        if (work1 || work2) /* lists differs */
                {
-               g_signal_handlers_block_by_func(keyword_buffer, bar_pane_keywords_changed, pkd);
+               g_signal_handlers_block_by_func(keyword_buffer, (gpointer)bar_pane_keywords_changed, pkd);
                keyword_list_push(pkd->keyword_view, keywords);
                bar_keyword_tree_sync(pkd);
-               g_signal_handlers_unblock_by_func(keyword_buffer, bar_pane_keywords_changed, pkd);
+               g_signal_handlers_unblock_by_func(keyword_buffer, (gpointer)bar_pane_keywords_changed, pkd);
                }
        string_list_free(keywords);
        string_list_free(orig_keywords);
@@ -353,7 +353,7 @@ gint bar_pane_keywords_event(GtkWidget *bar, GdkEvent *event)
        return FALSE;
 }
 
-static void bar_pane_keywords_keyword_toggle(GtkCellRendererToggle *toggle, const gchar *path, gpointer data)
+static void bar_pane_keywords_keyword_toggle(GtkCellRendererToggle *UNUSED(toggle), const gchar *path, gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeModel *model;
@@ -385,10 +385,10 @@ static void bar_pane_keywords_keyword_toggle(GtkCellRendererToggle *toggle, cons
        else
                keyword_tree_reset(keyword_tree, &child_iter, &list);
 
-       g_signal_handlers_block_by_func(keyword_buffer, bar_pane_keywords_changed, pkd);
+       g_signal_handlers_block_by_func(keyword_buffer, (gpointer)bar_pane_keywords_changed, pkd);
        keyword_list_push(pkd->keyword_view, list);
        string_list_free(list);
-       g_signal_handlers_unblock_by_func(keyword_buffer, bar_pane_keywords_changed, pkd);
+       g_signal_handlers_unblock_by_func(keyword_buffer, (gpointer)bar_pane_keywords_changed, pkd);
 
        /* call this just once in the end */
        bar_pane_keywords_changed(keyword_buffer, pkd);
@@ -468,21 +468,21 @@ static void bar_pane_keywords_set_selection(PaneKeywordsData *pkd, gboolean appe
        string_list_free(keywords);
 }
 
-static void bar_pane_keywords_sel_add_cb(GtkWidget *button, gpointer data)
+static void bar_pane_keywords_sel_add_cb(GtkWidget *UNUSED(button), gpointer data)
 {
        PaneKeywordsData *pkd = data;
 
        bar_pane_keywords_set_selection(pkd, TRUE);
 }
 
-static void bar_pane_keywords_sel_replace_cb(GtkWidget *button, gpointer data)
+static void bar_pane_keywords_sel_replace_cb(GtkWidget *UNUSED(button), gpointer data)
 {
        PaneKeywordsData *pkd = data;
 
        bar_pane_keywords_set_selection(pkd, FALSE);
 }
 
-static void bar_pane_keywords_populate_popup_cb(GtkTextView *textview, GtkMenu *menu, gpointer data)
+static void bar_pane_keywords_populate_popup_cb(GtkTextView *UNUSED(textview), GtkMenu *menu, gpointer data)
 {
        PaneKeywordsData *pkd = data;
 
@@ -512,7 +512,7 @@ static gboolean bar_pane_keywords_changed_idle_cb(gpointer data)
        return FALSE;
 }
 
-static void bar_pane_keywords_changed(GtkTextBuffer *buffer, gpointer data)
+static void bar_pane_keywords_changed(GtkTextBuffer *UNUSED(buffer), gpointer data)
 {
        PaneKeywordsData *pkd = data;
 
@@ -543,9 +543,9 @@ static GtkTargetEntry bar_pane_keywords_drop_types[] = {
 static gint n_keywords_drop_types = 2;
 
 
-static void bar_pane_keywords_dnd_get(GtkWidget *tree_view, GdkDragContext *context,
+static void bar_pane_keywords_dnd_get(GtkWidget *tree_view, GdkDragContext *UNUSED(context),
                                     GtkSelectionData *selection_data, guint info,
-                                    guint time, gpointer data)
+                                    guint UNUSED(time), gpointer UNUSED(data))
 {
        GtkTreeIter iter;
        GtkTreeModel *model;
@@ -580,7 +580,7 @@ static void bar_pane_keywords_dnd_get(GtkWidget *tree_view, GdkDragContext *cont
                }
 }
 
-static void bar_pane_keywords_dnd_begin(GtkWidget *tree_view, GdkDragContext *context, gpointer data)
+static void bar_pane_keywords_dnd_begin(GtkWidget *tree_view, GdkDragContext *context, gpointer UNUSED(data))
 {
        GtkTreeIter iter;
        GtkTreeModel *model;
@@ -602,7 +602,7 @@ static void bar_pane_keywords_dnd_begin(GtkWidget *tree_view, GdkDragContext *co
 
 }
 
-static void bar_pane_keywords_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void bar_pane_keywords_dnd_end(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context), gpointer UNUSED(data))
 {
 }
 
@@ -653,10 +653,10 @@ static gboolean bar_pane_keywords_dnd_skip_existing(GtkTreeModel *keyword_tree,
        return !!*keywords;
 }
 
-static void bar_pane_keywords_dnd_receive(GtkWidget *tree_view, GdkDragContext *context,
+static void bar_pane_keywords_dnd_receive(GtkWidget *tree_view, GdkDragContext *UNUSED(context),
                                          gint x, gint y,
                                          GtkSelectionData *selection_data, guint info,
-                                         guint time, gpointer data)
+                                         guint UNUSED(time), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreePath *tpath = NULL;
@@ -787,7 +787,7 @@ static void bar_pane_keywords_dnd_receive(GtkWidget *tree_view, GdkDragContext *
 }
 
 static gint bar_pane_keywords_dnd_motion(GtkWidget *tree_view, GdkDragContext *context,
-                                       gint x, gint y, guint time, gpointer data)
+                                       gint x, gint y, guint time, gpointer UNUSED(data))
 {
        GtkTreePath *tpath = NULL;
         GtkTreeViewDropPosition pos;
@@ -822,7 +822,7 @@ static gint bar_pane_keywords_dnd_motion(GtkWidget *tree_view, GdkDragContext *c
  *-------------------------------------------------------------------
  */
 
-static void bar_pane_keywords_edit_destroy_cb(GtkWidget *widget, gpointer data)
+static void bar_pane_keywords_edit_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ConfDialogData *cdd = data;
        gtk_tree_path_free(cdd->click_tpath);
@@ -830,12 +830,12 @@ static void bar_pane_keywords_edit_destroy_cb(GtkWidget *widget, gpointer data)
 }
 
 
-static void bar_pane_keywords_edit_cancel_cb(GenericDialog *gd, gpointer data)
+static void bar_pane_keywords_edit_cancel_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
 }
 
 
-static void bar_pane_keywords_edit_ok_cb(GenericDialog *gd, gpointer data)
+static void bar_pane_keywords_edit_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        ConfDialogData *cdd = data;
        PaneKeywordsData *pkd = cdd->pkd;
@@ -907,13 +907,13 @@ static void bar_pane_keywords_edit_ok_cb(GenericDialog *gd, gpointer data)
        string_list_free(keywords);
 }
 
-static void bar_pane_keywords_conf_set_helper(GtkWidget *widget, gpointer data)
+static void bar_pane_keywords_conf_set_helper(GtkWidget *UNUSED(widget), gpointer data)
 {
        ConfDialogData *cdd = data;
        cdd->is_keyword = FALSE;
 }
 
-static void bar_pane_keywords_conf_set_kw(GtkWidget *widget, gpointer data)
+static void bar_pane_keywords_conf_set_kw(GtkWidget *UNUSED(widget), gpointer data)
 {
        ConfDialogData *cdd = data;
        cdd->is_keyword = TRUE;
@@ -1008,13 +1008,13 @@ static void bar_pane_keywords_edit_dialog(PaneKeywordsData *pkd, gboolean edit_e
  *-------------------------------------------------------------------
  */
 
-static void bar_pane_keywords_edit_dialog_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_edit_dialog_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        bar_pane_keywords_edit_dialog(pkd, TRUE);
 }
 
-static void bar_pane_keywords_add_dialog_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_add_dialog_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        bar_pane_keywords_edit_dialog(pkd, FALSE);
@@ -1043,12 +1043,12 @@ static void bar_pane_keywords_connect_mark_cb(GtkWidget *menu_widget, gpointer d
        meta_data_connect_mark_with_keyword(keyword_tree, &kw_iter, mark);
 }
 
-static void bar_pane_keywords_disconnect_marks_ok_cb(GenericDialog *gd, gpointer data)
+static void bar_pane_keywords_disconnect_marks_ok_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        keyword_tree_disconnect_marks();
 }
 
-static void dummy_cancel_cb(GenericDialog *gd, gpointer data)
+static void dummy_cancel_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        /* no op, only so cancel button appears */
 }
@@ -1073,7 +1073,7 @@ static void bar_pane_keywords_disconnect_marks_cb(GtkWidget *menu_widget, gpoint
        g_string_free(message, TRUE);
 }
 
-static void bar_pane_keywords_delete_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_delete_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeModel *model;
@@ -1093,7 +1093,7 @@ static void bar_pane_keywords_delete_cb(GtkWidget *menu_widget, gpointer data)
        keyword_delete(GTK_TREE_STORE(keyword_tree), &kw_iter);
 }
 
-static void bar_pane_keywords_hide_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_hide_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeModel *model;
@@ -1113,7 +1113,7 @@ static void bar_pane_keywords_hide_cb(GtkWidget *menu_widget, gpointer data)
        keyword_hide_in(GTK_TREE_STORE(keyword_tree), &kw_iter, model);
 }
 
-static void bar_pane_keywords_show_all_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_show_all_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeModel *model;
@@ -1136,7 +1136,7 @@ static void bar_pane_keywords_show_all_cb(GtkWidget *menu_widget, gpointer data)
        bar_keyword_tree_sync(pkd);
 }
 
-static void bar_pane_keywords_revert_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_revert_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GList *work;
@@ -1158,7 +1158,7 @@ static void bar_pane_keywords_revert_cb(GtkWidget *menu_widget, gpointer data)
        bar_keyword_tree_sync(pkd);
 }
 
-static void bar_pane_keywords_expand_checked_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_expand_checked_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeModel *model;
@@ -1167,7 +1167,7 @@ static void bar_pane_keywords_expand_checked_cb(GtkWidget *menu_widget, gpointer
        gtk_tree_model_foreach(model, bar_keyword_tree_expand_if_set_cb, pkd);
 }
 
-static void bar_pane_keywords_collapse_all_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_collapse_all_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
 
@@ -1181,7 +1181,7 @@ static void bar_pane_keywords_collapse_all_cb(GtkWidget *menu_widget, gpointer d
        bar_keyword_tree_sync(pkd);
 }
 
-static void bar_pane_keywords_revert_hidden_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_revert_hidden_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeModel *model;
@@ -1195,7 +1195,7 @@ static void bar_pane_keywords_revert_hidden_cb(GtkWidget *menu_widget, gpointer
        bar_keyword_tree_sync(pkd);
 }
 
-static void bar_pane_keywords_collapse_unchecked_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_collapse_unchecked_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeModel *model;
@@ -1204,7 +1204,7 @@ static void bar_pane_keywords_collapse_unchecked_cb(GtkWidget *menu_widget, gpoi
        gtk_tree_model_foreach(model, bar_keyword_tree_collapse_if_unset_cb, pkd);
 }
 
-static void bar_pane_keywords_hide_unchecked_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_hide_unchecked_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeModel *model;
@@ -1221,21 +1221,21 @@ static void bar_pane_keywords_hide_unchecked_cb(GtkWidget *menu_widget, gpointer
        bar_keyword_tree_sync(pkd);
 }
 
-static void bar_pane_keywords_expand_checked_toggle_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_expand_checked_toggle_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        pkd->expand_checked = !pkd->expand_checked;
        bar_keyword_tree_sync(pkd);
 }
 
-static void bar_pane_keywords_collapse_unchecked_toggle_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_collapse_unchecked_toggle_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        pkd->collapse_unchecked = !pkd->collapse_unchecked;
        bar_keyword_tree_sync(pkd);
 }
 
-static void bar_pane_keywords_hide_unchecked_toggle_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_hide_unchecked_toggle_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        pkd->hide_unchecked = !pkd->hide_unchecked;
@@ -1245,7 +1245,7 @@ static void bar_pane_keywords_hide_unchecked_toggle_cb(GtkWidget *menu_widget, g
 /**
  * @brief Callback for adding selected keyword to all selected images.
  */
-static void bar_pane_keywords_add_to_selected_cb(GtkWidget *menu_widget, gpointer data)
+static void bar_pane_keywords_add_to_selected_cb(GtkWidget *UNUSED(menu_widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        GtkTreeIter iter; /* This is the iter which initial holds the current keyword */
@@ -1298,7 +1298,7 @@ static void bar_pane_keywords_add_to_selected_cb(GtkWidget *menu_widget, gpointe
        string_list_free(keywords);
 }
 
-static void bar_pane_keywords_menu_popup(GtkWidget *widget, PaneKeywordsData *pkd, gint x, gint y)
+static void bar_pane_keywords_menu_popup(GtkWidget *UNUSED(widget), PaneKeywordsData *pkd, gint x, gint y)
 {
        GtkWidget *menu;
        GtkWidget *item;
@@ -1441,7 +1441,7 @@ void bar_pane_keywords_close(GtkWidget *bar)
        gtk_widget_destroy(pkd->widget);
 }
 
-static void bar_pane_keywords_destroy(GtkWidget *widget, gpointer data)
+static void bar_pane_keywords_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        gchar *path;
@@ -1491,8 +1491,8 @@ static GtkWidget *bar_pane_keywords_new(const gchar *id, const gchar *title, con
        pkd->expand_checked = TRUE;
        pkd->expanded_rows = NULL;
 
-       vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
-       hbox = gtk_hbox_new(FALSE, PREF_PAD_GAP);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
        gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
 
        pkd->widget = vbox;
@@ -1742,7 +1742,7 @@ void bar_pane_keywords_entry_add_from_config(GtkWidget *pane, const gchar **attr
  *-----------------------------------------------------------------------------
  */
 
-static gboolean autocomplete_activate_cb(GtkWidget *widget, gpointer data)
+static gboolean autocomplete_activate_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PaneKeywordsData *pkd = data;
        gchar *entry_text;
@@ -1800,7 +1800,7 @@ static gboolean autocomplete_activate_cb(GtkWidget *widget, gpointer data)
 gint autocomplete_sort_iter_compare_func (GtkTreeModel *model,
                                                                        GtkTreeIter *a,
                                                                        GtkTreeIter *b,
-                                                                       gpointer userdata)
+                                                                       gpointer UNUSED(userdata))
 {
        gint ret = 0;
        gchar *name1, *name2;
index fae6118..0c07ca0 100644 (file)
@@ -97,7 +97,7 @@ static void bar_pane_rating_notify_cb(FileData *fd, NotifyType type, gpointer da
                }
 }
 
-static void bar_pane_rating_destroy(GtkWidget *widget, gpointer data)
+static void bar_pane_rating_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        PaneRatingData *prd = data;
 
@@ -156,12 +156,12 @@ static GtkWidget *bar_pane_rating_new(const gchar *id, const gchar *title, gbool
 
        prd->pane.expanded = expanded;
 
-       prd->widget = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       prd->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
 
        g_object_set_data(G_OBJECT(prd->widget), "pane_data", prd);
        g_signal_connect(G_OBJECT(prd->widget), "destroy", G_CALLBACK(bar_pane_rating_destroy), prd);
 
-       row_1 = gtk_hbox_new(FALSE, PREF_PAD_GAP);
+       row_1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
        gtk_box_pack_start(GTK_BOX(prd->widget), row_1, FALSE, FALSE, 0);
 
        radio_rejected = gtk_radio_button_new_with_label(NULL, _("Rejected"));
@@ -172,7 +172,7 @@ static GtkWidget *bar_pane_rating_new(const gchar *id, const gchar *title, gbool
        gtk_box_pack_start(GTK_BOX(row_1), radio_unrated, FALSE, FALSE, 0);
        g_signal_connect(radio_unrated, "released", G_CALLBACK(bar_pane_rating_selected_cb), prd);
 
-       row_2 = gtk_hbox_new(FALSE, PREF_PAD_GAP);
+       row_2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
        gtk_box_pack_start(GTK_BOX(prd->widget), row_2, FALSE, FALSE, 0);
 
        i = 1;
index 95615af..d912634 100644 (file)
@@ -292,7 +292,7 @@ static void bar_sort_undo_cb(GtkWidget *button, gpointer data)
                }
 }
 
-static void bar_sort_bookmark_select_folder(SortData *sd, FileData *source, const gchar *path)
+static void bar_sort_bookmark_select_folder(SortData *sd, FileData *UNUSED(source), const gchar *path)
 {
        GList *orig_list;
        GList *action_list;
@@ -421,12 +421,12 @@ static void bar_sort_set_filter_cb(GtkWidget *button, gpointer data)
        bar_sort_set_action(sd, BAR_SORT_FILTER, key);
 }
 
-static void bar_filter_help_cb(GenericDialog *gd, gpointer data)
+static void bar_filter_help_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        help_window_show("GuidePluginsConfig.html#Geeqieextensions");
 }
 
-static gboolean bar_filter_message_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
+static gboolean bar_filter_message_cb(GtkWidget *UNUSED(widget), GdkEventButton *event, gpointer UNUSED(data))
 {
        GenericDialog *gd;
 
@@ -533,7 +533,7 @@ static void bar_sort_add_ok_cb(FileDialog *fd, gpointer data)
        bar_sort_add_close(sd);
 }
 
-static void bar_sort_add_cancel_cb(FileDialog *fd, gpointer data)
+static void bar_sort_add_cancel_cb(FileDialog *UNUSED(fd), gpointer data)
 {
        SortData *sd = data;
 
@@ -600,7 +600,7 @@ void bar_sort_close(GtkWidget *bar)
        gtk_widget_destroy(sd->vbox);
 }
 
-static void bar_sort_destroy(GtkWidget *widget, gpointer data)
+static void bar_sort_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        SortData *sd = data;
 
@@ -747,7 +747,7 @@ static GtkWidget *bar_sort_new(LayoutWindow *lw, SortActionType action,
        return sd->vbox;
 }
 
-GtkWidget *bar_sort_new_from_config(LayoutWindow *lw, const gchar **attribute_names, const gchar **attribute_values)
+GtkWidget *bar_sort_new_from_config(LayoutWindow *lw, const gchar **UNUSED(attribute_names), const gchar **UNUSED(attribute_values))
 {
        GtkWidget *bar;
 
index a6d3b93..a592692 100644 (file)
 
 static gboolean cache_loader_phase2_idle_cb(gpointer data);
 
-static void cache_loader_phase1_done_cb(ImageLoader *il, gpointer data)
+static void cache_loader_phase1_done_cb(ImageLoader *UNUSED(il), gpointer data)
 {
        CacheLoader *cl = data;
 
        cl->idle_id = g_idle_add(cache_loader_phase2_idle_cb, cl);
 }
 
-static void cache_loader_phase1_error_cb(ImageLoader *il, gpointer data)
+static void cache_loader_phase1_error_cb(ImageLoader *UNUSED(il), gpointer data)
 {
        CacheLoader *cl = data;
 
index bac3062..b073bc8 100644 (file)
@@ -62,18 +62,18 @@ struct _CMData
 static gchar *cache_maintenance_path = NULL;
 static GtkStatusIcon *status_icon;
 
-static void cache_maintenance_sim_stop_cb(gpointer data)
+static void cache_maintenance_sim_stop_cb(gpointer UNUSED(data))
 {
        exit(EXIT_SUCCESS);
 }
 
-static void cache_maintenance_render_stop_cb(gpointer data)
+static void cache_maintenance_render_stop_cb(gpointer UNUSED(data))
 {
        gtk_status_icon_set_tooltip_text(status_icon, _("Geeqie: Creating sim data..."));
        cache_manager_sim_remote(cache_maintenance_path, TRUE, (GDestroyNotify *)cache_maintenance_sim_stop_cb);
 }
 
-static void cache_maintenance_clean_stop_cb(gpointer data)
+static void cache_maintenance_clean_stop_cb(gpointer UNUSED(data))
 {
        gtk_status_icon_set_tooltip_text(status_icon, _("Geeqie: Creating thumbs..."));
        cache_manager_render_remote(cache_maintenance_path, TRUE, options->thumbnails.cache_into_dirs, (GDestroyNotify *)cache_maintenance_render_stop_cb);
@@ -84,7 +84,7 @@ static void cache_maintenance_user_cancel_cb()
        exit(EXIT_FAILURE);
 }
 
-static void cache_maintenance_status_icon_activate_cb(GtkStatusIcon *status, gpointer data)
+static void cache_maintenance_status_icon_activate_cb(GtkStatusIcon *UNUSED(status), gpointer UNUSED(data))
 {
        GtkWidget *menu;
        GtkWidget *item;
@@ -318,7 +318,7 @@ static gboolean cache_maintain_home_cb(gpointer data)
        return TRUE;
 }
 
-static void cache_maintain_home_close_cb(GenericDialog *gd, gpointer data)
+static void cache_maintain_home_close_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        CMData *cm = data;
 
@@ -327,7 +327,7 @@ static void cache_maintain_home_close_cb(GenericDialog *gd, gpointer data)
        cache_maintain_home_close(cm);
 }
 
-static void cache_maintain_home_stop_cb(GenericDialog *gd, gpointer data)
+static void cache_maintain_home_stop_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        CMData *cm = data;
 
@@ -396,7 +396,7 @@ void cache_maintain_home(gboolean metadata, gboolean clear, GtkWidget *parent)
        generic_dialog_add_message(cm->gd, NULL, msg, NULL, FALSE);
        gtk_window_set_default_size(GTK_WINDOW(cm->gd->dialog), PURGE_DIALOG_WIDTH, -1);
 
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(cm->gd->vbox), hbox, FALSE, FALSE, 5);
        gtk_widget_show(hbox);
 
@@ -575,7 +575,7 @@ static void cache_maint_copied(FileData *fd)
        g_free(src_cache);
 }
 
-void cache_notify_cb(FileData *fd, NotifyType type, gpointer data)
+void cache_notify_cb(FileData *fd, NotifyType type, gpointer UNUSED(data))
 {
        if (!(type & NOTIFY_CHANGE) || !fd->change) return;
 
@@ -665,7 +665,7 @@ static void cache_manager_render_reset(CacheOpsData *cd)
        cd->tl = NULL;
 }
 
-static void cache_manager_render_close_cb(GenericDialog *fd, gpointer data)
+static void cache_manager_render_close_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -691,7 +691,7 @@ static void cache_manager_render_finish(CacheOpsData *cd)
                }
 }
 
-static void cache_manager_render_stop_cb(GenericDialog *fd, gpointer data)
+static void cache_manager_render_stop_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -722,7 +722,7 @@ static void cache_manager_render_folder(CacheOpsData *cd, FileData *dir_fd)
 
 static gboolean cache_manager_render_file(CacheOpsData *cd);
 
-static void cache_manager_render_thumb_done_cb(ThumbLoader *tl, gpointer data)
+static void cache_manager_render_thumb_done_cb(ThumbLoader *UNUSED(tl), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -796,7 +796,7 @@ static gboolean cache_manager_render_file(CacheOpsData *cd)
        return FALSE;
 }
 
-static void cache_manager_render_start_cb(GenericDialog *fd, gpointer data)
+static void cache_manager_render_start_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        CacheOpsData *cd = data;
        gchar *path;
@@ -960,7 +960,7 @@ void cache_manager_render_remote(const gchar *path, gboolean recurse, gboolean l
        cache_manager_render_start_render_remote(cd, path);
 }
 
-static void cache_manager_standard_clean_close_cb(GenericDialog *gd, gpointer data)
+static void cache_manager_standard_clean_close_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -996,7 +996,7 @@ static void cache_manager_standard_clean_done(CacheOpsData *cd)
        cd->list = NULL;
 }
 
-static void cache_manager_standard_clean_stop_cb(GenericDialog *gd, gpointer data)
+static void cache_manager_standard_clean_stop_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -1078,7 +1078,7 @@ static void cache_manager_standard_clean_valid_cb(const gchar *path, gboolean va
                }
 }
 
-static void cache_manager_standard_clean_start(GenericDialog *gd, gpointer data)
+static void cache_manager_standard_clean_start(GenericDialog *UNUSED(gd), gpointer data)
 {
        CacheOpsData *cd = data;
        GList *list;
@@ -1174,9 +1174,7 @@ static void cache_manager_standard_process(GtkWidget *widget, gboolean clear)
 
        cd->progress = gtk_progress_bar_new();
        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(cd->progress), _("click start to begin"));
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(cd->progress), TRUE);
-#endif
        gtk_box_pack_start(GTK_BOX(cd->gd->vbox), cd->progress, FALSE, FALSE, 0);
        gtk_widget_show(cd->progress);
 
@@ -1201,29 +1199,29 @@ void cache_manager_standard_process_remote(gboolean clear)
        cache_manager_standard_clean_start(NULL, cd);
 }
 
-static void cache_manager_standard_clean_cb(GtkWidget *widget, gpointer data)
+static void cache_manager_standard_clean_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        cache_manager_standard_process(widget, FALSE);
 }
 
-static void cache_manager_standard_clear_cb(GtkWidget *widget, gpointer data)
+static void cache_manager_standard_clear_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        cache_manager_standard_process(widget, TRUE);
 }
 
 
-static void cache_manager_main_clean_cb(GtkWidget *widget, gpointer data)
+static void cache_manager_main_clean_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        cache_maintain_home(FALSE, FALSE, widget);
 }
 
 
-static void dummy_cancel_cb(GenericDialog *gd, gpointer data)
+static void dummy_cancel_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        /* no op, only so cancel button appears */
 }
 
-static void cache_manager_main_clear_ok_cb(GenericDialog *gd, gpointer data)
+static void cache_manager_main_clear_ok_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        cache_maintain_home(FALSE, TRUE, NULL);
 }
@@ -1242,12 +1240,12 @@ void cache_manager_main_clear_confirm(GtkWidget *parent)
        gtk_widget_show(gd->dialog);
 }
 
-static void cache_manager_main_clear_cb(GtkWidget *widget, gpointer data)
+static void cache_manager_main_clear_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        cache_manager_main_clear_confirm(widget);
 }
 
-static void cache_manager_render_cb(GtkWidget *widget, gpointer data)
+static void cache_manager_render_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        const gchar *path = layout_get_path(NULL);
 
@@ -1255,7 +1253,7 @@ static void cache_manager_render_cb(GtkWidget *widget, gpointer data)
        cache_manager_render_dialog(widget, path);
 }
 
-static void cache_manager_metadata_clean_cb(GtkWidget *widget, gpointer data)
+static void cache_manager_metadata_clean_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        cache_maintain_home(TRUE, FALSE, widget);
 }
@@ -1263,7 +1261,7 @@ static void cache_manager_metadata_clean_cb(GtkWidget *widget, gpointer data)
 
 static CacheManager *cache_manager = NULL;
 
-static void cache_manager_close_cb(GenericDialog *gd, gpointer data)
+static void cache_manager_close_cb(GenericDialog *gd, gpointer UNUSED(data))
 {
        generic_dialog_close(gd);
 
@@ -1271,7 +1269,7 @@ static void cache_manager_close_cb(GenericDialog *gd, gpointer data)
        cache_manager = NULL;
 }
 
-static void cache_manager_help_cb(GenericDialog *gd, gpointer data)
+static void cache_manager_help_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        help_window_show("GuideReferenceManagement.html");
 }
@@ -1284,12 +1282,8 @@ static GtkWidget *cache_manager_location_label(GtkWidget *group, const gchar *su
        buf = g_strdup_printf(_("Location: %s"), subdir);
        label = pref_label_new(group, buf);
        g_free(buf);
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(label), 0.0);
        gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-#endif
 
        return label;
 }
@@ -1308,7 +1302,7 @@ static void cache_manager_sim_reset(CacheOpsData *cd)
        cd->cl = NULL;
 }
 
-static void cache_manager_sim_close_cb(GenericDialog *fd, gpointer data)
+static void cache_manager_sim_close_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -1333,7 +1327,7 @@ static void cache_manager_sim_finish(CacheOpsData *cd)
                }
 }
 
-static void cache_manager_sim_stop_cb(GenericDialog *fd, gpointer data)
+static void cache_manager_sim_stop_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -1362,7 +1356,7 @@ static void cache_manager_sim_folder(CacheOpsData *cd, FileData *dir_fd)
        cd->list_dir = g_list_concat(list_d, cd->list_dir);
 }
 
-static void cache_manager_sim_file_done_cb(CacheLoader *cl, gint error, gpointer data)
+static void cache_manager_sim_file_done_cb(CacheLoader *UNUSED(cl), gint UNUSED(error), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -1471,7 +1465,7 @@ static gboolean cache_manager_sim_file(CacheOpsData *cd)
        return FALSE;
 }
 
-static void cache_manager_sim_start_cb(GenericDialog *fd, gpointer data)
+static void cache_manager_sim_start_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        CacheOpsData *cd = data;
        gchar *path;
@@ -1582,7 +1576,7 @@ static void cache_manager_sim_load_dialog(GtkWidget *widget, const gchar *path)
        gtk_widget_show(cd->gd->dialog);
 }
 
-static void cache_manager_sim_load_cb(GtkWidget *widget, gpointer data)
+static void cache_manager_sim_load_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        const gchar *path = layout_get_path(NULL);
 
@@ -1590,7 +1584,7 @@ static void cache_manager_sim_load_cb(GtkWidget *widget, gpointer data)
        cache_manager_sim_load_dialog(widget, path);
 }
 
-static void cache_manager_cache_maintenance_close_cb(GenericDialog *fd, gpointer data)
+static void cache_manager_cache_maintenance_close_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        CacheOpsData *cd = data;
 
@@ -1601,7 +1595,7 @@ static void cache_manager_cache_maintenance_close_cb(GenericDialog *fd, gpointer
        g_free(cd);
 }
 
-static void cache_manager_cache_maintenance_start_cb(GenericDialog *fd, gpointer data)
+static void cache_manager_cache_maintenance_start_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        CacheOpsData *cd = data;
        gchar *path;
@@ -1680,7 +1674,7 @@ static void cache_manager_cache_maintenance_load_dialog(GtkWidget *widget, const
        gtk_widget_show(cd->gd->dialog);
 }
 
-static void cache_manager_cache_maintenance_load_cb(GtkWidget *widget, gpointer data)
+static void cache_manager_cache_maintenance_load_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        const gchar *path = layout_get_path(NULL);
 
@@ -1760,7 +1754,7 @@ void cache_manager_show(void)
 
        table = pref_table_new(group, 2, 1, FALSE, FALSE);
 
-       button = pref_table_button(table, 0, 1, GTK_STOCK_EXECUTE, _("Render"), FALSE,
+       button = pref_table_button(table, 0, 1, "system-run", _("Render"), FALSE,
                                   G_CALLBACK(cache_manager_render_cb), cache_manager);
        gtk_size_group_add_widget(sizegroup, button);
        pref_table_label(table, 1, 1, _("Render thumbnails for a specific folder."), 0.0);
index ed1e33a..9fd996c 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <stdlib.h>
 #include <gtk/gtk.h> /* To define GTK_CHECK_VERSION */
+#include "main.h"
 #include "cellrenderericon.h"
 #include "intl.h"
 
@@ -39,7 +40,6 @@ static void gqv_cell_renderer_icon_init(GQvCellRendererIcon *celltext);
 static void gqv_cell_renderer_icon_class_init_wrapper(void *, void *);
 static void gqv_cell_renderer_icon_class_init(GQvCellRendererIconClass *class);
 static void gqv_cell_renderer_icon_finalize(GObject *object);
-#if GTK_CHECK_VERSION(3,0,0)
 static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
                                            GtkWidget          *widget,
                                            const GdkRectangle *rectangle,
@@ -47,34 +47,14 @@ static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
                                            gint               *y_offset,
                                            gint               *width,
                                            gint               *height);
-#else
-static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
-                                           GtkWidget          *widget,
-                                           GdkRectangle       *rectangle,
-                                           gint               *x_offset,
-                                           gint               *y_offset,
-                                           gint               *width,
-                                           gint               *height);
-#endif
-#if GTK_CHECK_VERSION(3,0,0)
+
 static void gqv_cell_renderer_icon_render(GtkCellRenderer *cell,
                                           cairo_t *cr,
                                           GtkWidget *widget,
                                           const GdkRectangle *background_area,
                                           const GdkRectangle *cell_area,
                                           GtkCellRendererState flags);
-#else
-static void gqv_cell_renderer_icon_render(GtkCellRenderer      *cell,
-                                          GdkWindow            *window,
-                                          GtkWidget            *widget,
-                                          GdkRectangle         *background_area,
-                                          GdkRectangle         *cell_area,
-                                          GdkRectangle         *expose_area,
-                                          GtkCellRendererState flags);
-#endif
-
-
-#if GTK_CHECK_VERSION(3,0,0)
+
 static gboolean gqv_cell_renderer_icon_activate(GtkCellRenderer      *cell,
                                                GdkEvent             *event,
                                                GtkWidget            *widget,
@@ -82,16 +62,6 @@ static gboolean gqv_cell_renderer_icon_activate(GtkCellRenderer      *cell,
                                                const GdkRectangle   *background_area,
                                                const GdkRectangle   *cell_area,
                                                GtkCellRendererState  flags);
-#else
-static gboolean gqv_cell_renderer_icon_activate(GtkCellRenderer      *cell,
-                                               GdkEvent             *event,
-                                               GtkWidget            *widget,
-                                               const gchar          *path,
-                                               GdkRectangle         *background_area,
-                                               GdkRectangle         *cell_area,
-                                               GtkCellRendererState  flags);
-#endif
-
 enum {
   TOGGLED,
   LAST_SIGNAL
@@ -150,7 +120,7 @@ gqv_cell_renderer_icon_get_type(void)
 }
 
 static void
-gqv_cell_renderer_icon_init_wrapper(void *data, void *user_data)
+gqv_cell_renderer_icon_init_wrapper(void *data, void *UNUSED(user_data))
 {
        gqv_cell_renderer_icon_init(data);
 }
@@ -163,7 +133,7 @@ gqv_cell_renderer_icon_init(GQvCellRendererIcon *cellicon)
 }
 
 static void
-gqv_cell_renderer_icon_class_init_wrapper(void *data, void *user_data)
+gqv_cell_renderer_icon_class_init_wrapper(void *data, void *UNUSED(user_data))
 {
        gqv_cell_renderer_icon_class_init(data);
 }
@@ -579,7 +549,6 @@ gqv_cell_renderer_icon_new(void)
        return g_object_new(GQV_TYPE_CELL_RENDERER_ICON, NULL);
 }
 
-#if GTK_CHECK_VERSION(3,0,0)
 static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
                                            GtkWidget          *widget,
                                            const GdkRectangle *cell_area,
@@ -587,15 +556,6 @@ static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
                                            gint               *y_offset,
                                            gint               *width,
                                            gint               *height)
-#else
-static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
-                                           GtkWidget          *widget,
-                                           GdkRectangle       *cell_area,
-                                           gint               *x_offset,
-                                           gint               *y_offset,
-                                           gint               *width,
-                                           gint               *height)
-#endif
 {
        GQvCellRendererIcon *cellicon = (GQvCellRendererIcon *) cell;
        gint calc_width;
@@ -667,52 +627,26 @@ static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
        if (height) *height = calc_height;
 }
 
-#if GTK_CHECK_VERSION(3,0,0)
 static void gqv_cell_renderer_icon_render(GtkCellRenderer *cell,
                                           cairo_t *cr,
                                           GtkWidget *widget,
-                                          const GdkRectangle *background_area,
+                                          const GdkRectangle *UNUSED(background_area),
                                           const GdkRectangle *cell_area,
                                           GtkCellRendererState flags)
 
 {
        GtkStyleContext *context = gtk_widget_get_style_context(widget);
-#else
-static void
-gqv_cell_renderer_icon_render(GtkCellRenderer          *cell,
-                             GdkWindow                 *window,
-                             GtkWidget                 *widget,
-                             GdkRectangle              *background_area,
-                             GdkRectangle              *cell_area,
-                             GdkRectangle              *expose_area,
-                             GtkCellRendererState      flags)
-
-{
-       cairo_t *cr = gdk_cairo_create(window);
-#endif
        GQvCellRendererIcon *cellicon = (GQvCellRendererIcon *) cell;
        GdkPixbuf *pixbuf;
        const gchar *text;
        GdkRectangle cell_rect;
-#if GTK_CHECK_VERSION(3,0,0)
        GtkStateFlags state;
-#else
-       GtkStateType state;
-#endif
        gint xpad, ypad;
 
 
        pixbuf = cellicon->pixbuf;
        text = cellicon->text;
 
-       if (!pixbuf && !text)
-               {
-#if !GTK_CHECK_VERSION(3,0,0)
-               cairo_destroy(cr);
-#endif
-               return;
-               }
-
        gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
 
        gqv_cell_renderer_icon_get_size(cell, widget, cell_area,
@@ -727,33 +661,18 @@ gqv_cell_renderer_icon_render(GtkCellRenderer             *cell,
        if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED)
                {
                if (gtk_widget_has_focus(widget))
-#if GTK_CHECK_VERSION(3,0,0)
                        state = GTK_STATE_FLAG_SELECTED;
                else
                        state = GTK_STATE_FLAG_ACTIVE;
-#else
-                       state = GTK_STATE_SELECTED;
-               else
-                       state = GTK_STATE_ACTIVE;
-#endif
                }
        else
                {
                if (gtk_widget_get_state(widget) == GTK_STATE_INSENSITIVE)
-#if GTK_CHECK_VERSION(3,0,0)
                        state = GTK_STATE_FLAG_INSENSITIVE;
                else
                        state = GTK_STATE_FLAG_NORMAL;
-#else
-                       state = GTK_STATE_INSENSITIVE;
-               else
-                       state = GTK_STATE_NORMAL;
-#endif
                }
-
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_style_context_set_state(context, state);
-#endif
 
        if (pixbuf)
                {
@@ -774,11 +693,7 @@ gqv_cell_renderer_icon_render(GtkCellRenderer              *cell,
                        pix_rect.y = cell_area->y + cell_rect.y;
                        }
 
-               if (gdk_rectangle_intersect(cell_area, &pix_rect, &draw_rect)
-#if !GTK_CHECK_VERSION(3,0,0)
-                   && gdk_rectangle_intersect(expose_area, &draw_rect, &draw_rect)
-#endif
-                  )
+               if (gdk_rectangle_intersect(cell_area, &pix_rect, &draw_rect))
                        {
                        gdk_cairo_set_source_pixbuf(cr, pixbuf, pix_rect.x, pix_rect.y);
                        cairo_rectangle (cr,
@@ -810,23 +725,9 @@ gqv_cell_renderer_icon_render(GtkCellRenderer              *cell,
                        pix_rect.y -= TOGGLE_SPACING;
                        }
 
-               if (gdk_rectangle_intersect(cell_area, &pix_rect, &draw_rect)
-#if !GTK_CHECK_VERSION(3,0,0)
-                   && gdk_rectangle_intersect(expose_area, &draw_rect, &draw_rect)
-#endif
-                   )
+               if (gdk_rectangle_intersect(cell_area, &pix_rect, &draw_rect))
                        {
-#if GTK_CHECK_VERSION(3,0,0)
                        gtk_render_layout(context, cr, pix_rect.x - text_rect.x, pix_rect.y, layout);
-#else
-
-                       gtk_paint_layout(gtk_widget_get_style(widget), window,
-                                        state, TRUE,
-                                        cell_area, widget,
-                                        "cellrenderertext",
-                                        pix_rect.x - text_rect.x, pix_rect.y,
-                                        layout);
-#endif
                        }
                g_object_unref(layout);
                }
@@ -842,26 +743,14 @@ gqv_cell_renderer_icon_render(GtkCellRenderer             *cell,
                pix_rect.x = cell_area->x + xpad + (cell_rect.width - pix_rect.width + 1) / 2 + (TOGGLE_SPACING - TOGGLE_WIDTH) / 2;
                pix_rect.y = cell_area->y + ypad + (cell_rect.height - pix_rect.height) + (TOGGLE_SPACING - TOGGLE_WIDTH) / 2;
 
-               if (gdk_rectangle_intersect(cell_area, &pix_rect, &draw_rect)
-#if !GTK_CHECK_VERSION(3,0,0)
-                   && gdk_rectangle_intersect(expose_area, &draw_rect, &draw_rect)
-#endif
-                   )
+               if (gdk_rectangle_intersect(cell_area, &pix_rect, &draw_rect))
                        {
                        for (i = 0; i < cellicon->num_marks; i++)
                                {
-#if GTK_CHECK_VERSION(3,0,0)
-#if GTK_CHECK_VERSION(3,14,0)
                                state &= ~(GTK_STATE_FLAG_CHECKED);
 
                                if ((cellicon->marks & (1 << i)))
                                        state |= GTK_STATE_FLAG_CHECKED;
-#else
-                               state &= ~(GTK_STATE_FLAG_ACTIVE);
-
-                               if ((cellicon->marks & (1 << i)))
-                                       state |= GTK_STATE_FLAG_ACTIVE;
-#endif
                                cairo_save (cr);
 
                                cairo_rectangle(cr,
@@ -906,50 +795,18 @@ gqv_cell_renderer_icon_render(GtkCellRenderer             *cell,
                                        }
                                gtk_style_context_restore(context);
                                cairo_restore(cr);
-
-#else
-                               gtk_paint_check(gtk_widget_get_style(widget), window,
-                                        state, (cellicon->marks & (1 << i)) ? GTK_SHADOW_IN : GTK_SHADOW_OUT,
-                                        cell_area, widget, "cellcheck",
-                                        pix_rect.x + i * TOGGLE_SPACING + (TOGGLE_WIDTH - TOGGLE_SPACING) / 2,
-                                        pix_rect.y,
-                                        TOGGLE_WIDTH, TOGGLE_WIDTH);
-#endif
                                }
                        }
                }
-
-#if !GTK_CHECK_VERSION(3,0,0)
-       if (cellicon->focused && gtk_widget_has_focus(widget))
-               {
-               gtk_paint_focus(gtk_widget_get_style(widget), window,
-                               state,
-                               cell_area, widget,
-                               "cellrendererfocus",
-                               cell_area->x, cell_area->y,
-                               cell_area->width, cell_area->height);
-               }
-       cairo_destroy(cr);
-#endif
 }
 
-#if GTK_CHECK_VERSION(3,0,0)
 static gboolean gqv_cell_renderer_icon_activate(GtkCellRenderer      *cell,
                                                GdkEvent             *event,
                                                GtkWidget            *widget,
                                                const gchar          *path,
-                                               const GdkRectangle   *background_area,
+                                               const GdkRectangle   *UNUSED(background_area),
                                                const GdkRectangle   *cell_area,
-                                               GtkCellRendererState  flags)
-#else
-static gboolean gqv_cell_renderer_icon_activate(GtkCellRenderer      *cell,
-                                               GdkEvent             *event,
-                                               GtkWidget            *widget,
-                                               const gchar          *path,
-                                               GdkRectangle         *background_area,
-                                               GdkRectangle         *cell_area,
-                                               GtkCellRendererState  flags)
-#endif
+                                               GtkCellRendererState  UNUSED(flags))
 {
        GQvCellRendererIcon *cellicon = (GQvCellRendererIcon *) cell;
        GdkEventButton *bevent = &event->button;
index eae8107..e24d94f 100644 (file)
@@ -41,7 +41,7 @@ enum {
 static gboolean collection_save_confirmed(FileDialog *fd, gboolean overwrite, CollectionData *cd);
 
 
-static void collection_confirm_ok_cb(GenericDialog *gd, gpointer data)
+static void collection_confirm_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        FileDialog *fd = data;
        CollectionData *cd = GENERIC_DIALOG(fd)->data;
@@ -53,7 +53,7 @@ static void collection_confirm_ok_cb(GenericDialog *gd, gpointer data)
                }
 }
 
-static void collection_confirm_cancel_cb(GenericDialog *gd, gpointer data)
+static void collection_confirm_cancel_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        /* this is a no-op, so the cancel button is added */
 }
@@ -202,14 +202,14 @@ static void collection_save_or_load_dialog(const gchar *path,
                if (!cd) return;
                title = _("Save collection");
                btntext = NULL;
-               btnfunc = collection_save_cb;
+               btnfunc = (gpointer)collection_save_cb;
                stock_id = GTK_STOCK_SAVE;
                }
        else if (type == DIALOG_LOAD)
                {
                title = _("Open collection");
                btntext = NULL;
-               btnfunc = collection_load_cb;
+               btnfunc = (gpointer)collection_load_cb;
                stock_id = GTK_STOCK_OPEN;
                }
        else
@@ -217,7 +217,7 @@ static void collection_save_or_load_dialog(const gchar *path,
                if (!cd) return;
                title = _("Append collection");
                btntext = _("_Append");
-               btnfunc = collection_append_cb;
+               btnfunc = (gpointer)collection_append_cb;
                stock_id = GTK_STOCK_ADD;
                }
 
@@ -230,7 +230,7 @@ static void collection_save_or_load_dialog(const gchar *path,
                             collection_save_or_load_dialog_close_cb, cd);
 
        generic_dialog_add_message(GENERIC_DIALOG(fd), NULL, title, NULL, FALSE);
-       file_dialog_add_button(fd, stock_id, btntext, btnfunc, TRUE);
+       file_dialog_add_button(fd, stock_id, btntext, (void (*)(FileDialog *, gpointer))btnfunc, TRUE);
 
        file_dialog_add_path_widgets(fd, get_collections_dir(), path,
                                     "collection_load_save", GQ_COLLECTION_EXT, _("Collection Files"));
index 464f997..35973fc 100644 (file)
@@ -294,7 +294,7 @@ static void collection_load_thumb_do(CollectionData *cd)
        if (cd->info_updated_func) cd->info_updated_func(cd, cd->thumb_info, cd->info_updated_data);
 }
 
-static void collection_load_thumb_error_cb(ThumbLoader *tl, gpointer data)
+static void collection_load_thumb_error_cb(ThumbLoader *UNUSED(tl), gpointer data)
 {
        CollectionData *cd = data;
 
@@ -302,7 +302,7 @@ static void collection_load_thumb_error_cb(ThumbLoader *tl, gpointer data)
        collection_load_thumb_step(cd);
 }
 
-static void collection_load_thumb_done_cb(ThumbLoader *tl, gpointer data)
+static void collection_load_thumb_done_cb(ThumbLoader *UNUSED(tl), gpointer data)
 {
        CollectionData *cd = data;
 
@@ -880,7 +880,7 @@ static gboolean collect_manager_process_entry_list(void)
 
 
 
-static gboolean collect_manager_process_cb(gpointer data)
+static gboolean collect_manager_process_cb(gpointer UNUSED(data))
 {
        if (collection_manager_action_list) collect_manager_refresh();
        collect_manager_process_actions(COLLECT_MANAGER_ACTIONS_PER_IDLE);
@@ -892,7 +892,7 @@ static gboolean collect_manager_process_cb(gpointer data)
        return FALSE;
 }
 
-static gboolean collect_manager_timer_cb(gpointer data)
+static gboolean collect_manager_timer_cb(gpointer UNUSED(data))
 {
        DEBUG_1("collection manager timer expired");
 
@@ -997,7 +997,7 @@ void collect_manager_flush(void)
        while (collect_manager_process_cb(NULL));
 }
 
-void collect_manager_notify_cb(FileData *fd, NotifyType type, gpointer data)
+void collect_manager_notify_cb(FileData *fd, NotifyType type, gpointer UNUSED(data))
 {
        if (!(type & NOTIFY_CHANGE) || !fd->change) return;
 
index f07dead..4e1dda7 100644 (file)
@@ -567,23 +567,17 @@ static void tip_show(CollectTable *ct)
 {
        GtkWidget *label;
        gint x, y;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDisplay *display;
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
        if (ct->tip_window) return;
 
-#if GTK_CHECK_VERSION(3,0,0)
        device_manager = gdk_display_get_device_manager(gdk_window_get_display(
                                                                gtk_widget_get_window(ct->listview)));
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_window_get_device_position(gtk_widget_get_window(ct->listview),
                                                                device, &x, &y, NULL);
-#else
-       gdk_window_get_pointer(gtk_widget_get_window(ct->listview), &x, &y, NULL);
-#endif
 
        ct->tip_info = collection_table_find_data_by_coord(ct, x, y, NULL);
        if (!ct->tip_info) return;
@@ -598,14 +592,10 @@ static void tip_show(CollectTable *ct)
        gtk_container_add(GTK_CONTAINER(ct->tip_window), label);
        gtk_widget_show(label);
 
-#if GTK_CHECK_VERSION(3,0,0)
        display = gdk_display_get_default();
        device_manager = gdk_display_get_device_manager(display);
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_device_get_position(device, NULL, &x, &y);
-#else
-       gdk_window_get_pointer(NULL, &x, &y, NULL);
-#endif
 
        if (!gtk_widget_get_realized(ct->tip_window)) gtk_widget_realize(ct->tip_window);
        gtk_window_move(GTK_WINDOW(ct->tip_window), x + 16, y + 16);
@@ -656,22 +646,17 @@ static void tip_unschedule(CollectTable *ct)
 
 static void tip_update(CollectTable *ct, CollectInfo *info)
 {
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDisplay *display = gdk_display_get_default();
        GdkDeviceManager *device_manager = gdk_display_get_device_manager(display);
        GdkDevice *device = gdk_device_manager_get_client_pointer(device_manager);
-#endif
 
        tip_schedule(ct);
 
        if (ct->tip_window)
                {
                gint x, y;
-#if GTK_CHECK_VERSION(3,0,0)
                gdk_device_get_position(device, NULL, &x, &y);
-#else
-               gdk_window_get_pointer(NULL, &x, &y, NULL);
-#endif
+
                gtk_window_move(GTK_WINDOW(ct->tip_window), x + 16, y + 16);
 
                if (info != ct->tip_info)
@@ -697,7 +682,7 @@ static void tip_update(CollectTable *ct, CollectInfo *info)
  *-------------------------------------------------------------------
  */
 
-static void collection_table_popup_save_as_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_save_as_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -744,28 +729,28 @@ static void collection_table_popup_edit_cb(GtkWidget *widget, gpointer data)
        file_util_start_editor_from_filelist(key, collection_table_popup_file_list(ct), NULL, ct->listview);
 }
 
-static void collection_table_popup_copy_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_copy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        file_util_copy(NULL, collection_table_popup_file_list(ct), NULL, ct->listview);
 }
 
-static void collection_table_popup_move_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_move_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        file_util_move(NULL, collection_table_popup_file_list(ct), NULL, ct->listview);
 }
 
-static void collection_table_popup_rename_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        file_util_rename(NULL, collection_table_popup_file_list(ct), ct->listview);
 }
 
-static void collection_table_popup_delete_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -773,7 +758,7 @@ static void collection_table_popup_delete_cb(GtkWidget *widget, gpointer data)
        file_util_delete(NULL, collection_table_popup_file_list(ct), ct->listview);
 }
 
-static void collection_table_popup_move_to_trash_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_move_to_trash_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -781,14 +766,14 @@ static void collection_table_popup_move_to_trash_cb(GtkWidget *widget, gpointer
        file_util_delete(NULL, collection_table_popup_file_list(ct), ct->listview);
 }
 
-static void collection_table_popup_copy_path_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        file_util_copy_path_list_to_clipboard(collection_table_popup_file_list(ct), TRUE);
 }
 
-static void collection_table_popup_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -809,7 +794,7 @@ static void collection_table_popup_sort_cb(GtkWidget *widget, gpointer data)
        collection_set_sort_method(ct->cd, type);
 }
 
-static void collection_table_popup_randomize_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_randomize_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        CollectTable *ct;
 
@@ -820,7 +805,7 @@ static void collection_table_popup_randomize_cb(GtkWidget *widget, gpointer data
        collection_randomize(ct->cd);
 }
 
-static void collection_table_popup_view_new_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_view_new_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -830,7 +815,7 @@ static void collection_table_popup_view_new_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void collection_table_popup_view_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_view_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -840,7 +825,7 @@ static void collection_table_popup_view_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void collection_table_popup_selectall_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_selectall_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -848,7 +833,7 @@ static void collection_table_popup_selectall_cb(GtkWidget *widget, gpointer data
        ct->prev_selection= ct->click_info;
 }
 
-static void collection_table_popup_unselectall_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_unselectall_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -856,7 +841,7 @@ static void collection_table_popup_unselectall_cb(GtkWidget *widget, gpointer da
        ct->prev_selection= ct->click_info;
 }
 
-static void collection_table_popup_select_invert_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_select_invert_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -864,12 +849,12 @@ static void collection_table_popup_select_invert_cb(GtkWidget *widget, gpointer
        ct->prev_selection= ct->click_info;
 }
 
-static void collection_table_popup_rectangular_selection_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_rectangular_selection_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        options->collections.rectangular_selection = !(options->collections.rectangular_selection);
 }
 
-static void collection_table_popup_remove_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_remove_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
        GList *list;
@@ -889,7 +874,7 @@ static void collection_table_popup_remove_cb(GtkWidget *widget, gpointer data)
        g_list_free(list);
 }
 
-static void collection_table_popup_add_file_selection_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_add_file_selection_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
        GList *list;
@@ -906,14 +891,14 @@ static void collection_table_popup_add_file_selection_cb(GtkWidget *widget, gpoi
                }
 }
 
-static void collection_table_popup_add_collection_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_add_collection_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        collection_dialog_append(NULL, ct->cd);
 }
 
-static void collection_table_popup_goto_original_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_goto_original_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
        GList *list;
@@ -933,7 +918,7 @@ static void collection_table_popup_goto_original_cb(GtkWidget *widget, gpointer
        g_list_free(list);
 }
 
-static void collection_table_popup_find_dupes_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_find_dupes_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
        DupeWindow *dw;
@@ -942,7 +927,7 @@ static void collection_table_popup_find_dupes_cb(GtkWidget *widget, gpointer dat
        dupe_window_add_collection(dw, ct->cd);
 }
 
-static void collection_table_popup_print_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_print_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
        FileData *fd;
@@ -952,21 +937,21 @@ static void collection_table_popup_print_cb(GtkWidget *widget, gpointer data)
        print_window_new(fd, collection_table_selection_get_list(ct), collection_table_get_list(ct), gtk_widget_get_toplevel(ct->listview));
 }
 
-static void collection_table_popup_show_names_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_show_names_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        collection_table_toggle_filenames(ct);
 }
 
-static void collection_table_popup_show_stars_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_show_stars_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        collection_table_toggle_stars(ct);
 }
 
-static void collection_table_popup_destroy_cb(GtkWidget *widget, gpointer data)
+static void collection_table_popup_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -1263,7 +1248,7 @@ static gint page_height(CollectTable *ct)
        return ret;
 }
 
-static void collection_table_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void collection_table_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        CollectTable *ct = data;
        GtkTreeModel *store;
@@ -1281,7 +1266,7 @@ static void collection_table_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboole
        popup_menu_position_clamp(menu, x, y, 0);
 }
 
-static gboolean collection_table_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean collection_table_press_key_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        CollectTable *ct = data;
        gint focus_row = 0;
@@ -1410,14 +1395,11 @@ static CollectInfo *collection_table_insert_find(CollectTable *ct, CollectInfo *
        GtkTreeIter iter;
        GtkTreePath *tpath;
        GtkTreeViewColumn *column;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(ct->listview));
 
-#if GTK_CHECK_VERSION(3,0,0)
        if (!use_coord)
                {
                device_manager = gdk_display_get_device_manager(gdk_window_get_display(
@@ -1426,9 +1408,7 @@ static CollectInfo *collection_table_insert_find(CollectTable *ct, CollectInfo *
                gdk_window_get_device_position(gtk_widget_get_window(ct->listview),
                                                                        device, &x, &y, NULL);
                }
-#else
-       if (!use_coord) gdk_window_get_pointer(gtk_widget_get_window(ct->listview), &x, &y, NULL);
-#endif
+
        if (source)
                {
                gint col;
@@ -1557,7 +1537,6 @@ static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info,
 
                ct->marker_window = gdk_window_new(NULL, &attributes, attributes_mask);
 
-#if GTK_CHECK_VERSION(3,0,0)
                cairo_region_t *mask;
                cairo_pattern_t *pattern;
                cairo_surface_t *img = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h);
@@ -1574,17 +1553,6 @@ static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info,
                cairo_pattern_destroy(pattern);
                cairo_destroy(cr);
                cairo_surface_destroy(img);
-#else
-               GdkPixmap *pixmap;
-               GdkBitmap *mask;
-               gdk_pixbuf_render_pixmap_and_mask(pb, &pixmap, &mask, 128);
-
-               gdk_window_set_back_pixmap(ct->marker_window, pixmap, FALSE);
-               gdk_window_shape_combine_mask(ct->marker_window, mask, 0, 0);
-
-               g_object_unref(pixmap);
-               if (mask) g_object_unref(mask);
-#endif
                g_object_unref(pb);
                }
 
@@ -1611,9 +1579,7 @@ static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info,
                y = y + y_parent;
 
                gdk_window_move(ct->marker_window, x, y);
-#if !GTK_CHECK_VERSION(3,0,0)
-               gdk_window_clear(ct->marker_window);
-#endif
+
                if (!gdk_window_is_visible(ct->marker_window)) gdk_window_show(ct->marker_window);
                }
        else
@@ -1651,21 +1617,16 @@ static gboolean collection_table_auto_scroll_idle_cb(gpointer data)
        GdkWindow *window;
        gint x, y;
        gint w, h;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
        if (!ct->drop_idle_id) return FALSE;
 
        window = gtk_widget_get_window(ct->listview);
-#if GTK_CHECK_VERSION(3,0,0)
        device_manager = gdk_display_get_device_manager(gdk_window_get_display(window));
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_window_get_device_position(window, device, &x, &y, NULL);
-#else
-       gdk_window_get_pointer(window, &x, &y, NULL);
-#endif
+
        w = gdk_window_get_width(window);
        h = gdk_window_get_height(window);
        if (x >= 0 && x < w && y >= 0 && y < h)
@@ -1677,7 +1638,7 @@ static gboolean collection_table_auto_scroll_idle_cb(gpointer data)
        return FALSE;
 }
 
-static gboolean collection_table_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer data)
+static gboolean collection_table_auto_scroll_notify_cb(GtkWidget *UNUSED(widget), gint UNUSED(x), gint UNUSED(y), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -1715,7 +1676,7 @@ static void collection_table_scroll(CollectTable *ct, gboolean scroll)
  *-------------------------------------------------------------------
  */
 
-static gboolean collection_table_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
+static gboolean collection_table_motion_cb(GtkWidget *UNUSED(widget), GdkEventMotion *event, gpointer data)
 {
        CollectTable *ct = data;
 
@@ -1724,7 +1685,7 @@ static gboolean collection_table_motion_cb(GtkWidget *widget, GdkEventMotion *ev
        return FALSE;
 }
 
-static gboolean collection_table_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_press_cb(GtkWidget *UNUSED(widget), GdkEventButton *bevent, gpointer data)
 {
        CollectTable *ct = data;
        GtkTreeIter iter;
@@ -1763,7 +1724,7 @@ static gboolean collection_table_press_cb(GtkWidget *widget, GdkEventButton *bev
        return TRUE;
 }
 
-static gboolean collection_table_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_release_cb(GtkWidget *UNUSED(widget), GdkEventButton *bevent, gpointer data)
 {
        CollectTable *ct = data;
        GtkTreeIter iter;
@@ -1823,7 +1784,7 @@ static gboolean collection_table_release_cb(GtkWidget *widget, GdkEventButton *b
        return TRUE;
 }
 
-static gboolean collection_table_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+static gboolean collection_table_leave_cb(GtkWidget *UNUSED(widget), GdkEventCrossing *UNUSED(event), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -1837,7 +1798,7 @@ static gboolean collection_table_leave_cb(GtkWidget *widget, GdkEventCrossing *e
  *-------------------------------------------------------------------
  */
 
-static gboolean collection_table_destroy_node_cb(GtkTreeModel *store, GtkTreePath *tpath, GtkTreeIter *iter, gpointer data)
+static gboolean collection_table_destroy_node_cb(GtkTreeModel *store, GtkTreePath *UNUSED(tpath), GtkTreeIter *iter, gpointer UNUSED(data))
 {
        GList *list;
 
@@ -1936,7 +1897,7 @@ static void collection_table_populate(CollectTable *ct, gboolean resize)
        collection_table_update_status(ct);
 }
 
-static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gboolean force)
+static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint UNUSED(h), gboolean force)
 {
        gint new_cols;
        gint thumb_width;
@@ -2174,12 +2135,12 @@ void collection_table_file_update(CollectTable *ct, CollectInfo *info)
                }
 }
 
-void collection_table_file_add(CollectTable *ct, CollectInfo *info)
+void collection_table_file_add(CollectTable *ct, CollectInfo *UNUSED(info))
 {
        collection_table_sync_idle(ct);
 }
 
-void collection_table_file_insert(CollectTable *ct, CollectInfo *ci)
+void collection_table_file_insert(CollectTable *ct, CollectInfo *UNUSED(ci))
 {
        collection_table_sync_idle(ct);
 }
@@ -2246,21 +2207,21 @@ static void confirm_dir_list_do(CollectTable *ct, GList *list, gboolean recursiv
 }
 
 
-static void confirm_dir_list_add(GtkWidget *widget, gpointer data)
+static void confirm_dir_list_add(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        confirm_dir_list_do(ct, ct->drop_list, FALSE);
 }
 
-static void confirm_dir_list_recurse(GtkWidget *widget, gpointer data)
+static void confirm_dir_list_recurse(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
        confirm_dir_list_do(ct, ct->drop_list, TRUE);
 }
 
-static void confirm_dir_list_skip(GtkWidget *widget, gpointer data)
+static void confirm_dir_list_skip(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -2309,9 +2270,9 @@ static GtkTargetEntry collection_drop_types[] = {
 static gint n_collection_drop_types = 2;
 
 
-static void collection_table_dnd_get(GtkWidget *widget, GdkDragContext *context,
+static void collection_table_dnd_get(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
                                     GtkSelectionData *selection_data, guint info,
-                                    guint time, gpointer data)
+                                    guint UNUSED(time), gpointer data)
 {
        CollectTable *ct = data;
        gboolean selected;
@@ -2360,7 +2321,7 @@ static void collection_table_dnd_get(GtkWidget *widget, GdkDragContext *context,
 }
 
 
-static void collection_table_dnd_receive(GtkWidget *widget, GdkDragContext *context,
+static void collection_table_dnd_receive(GtkWidget *UNUSED(widget), GdkDragContext *context,
                                          gint x, gint y,
                                          GtkSelectionData *selection_data, guint info,
                                          guint time, gpointer data)
@@ -2461,7 +2422,7 @@ static void collection_table_dnd_begin(GtkWidget *widget, GdkDragContext *contex
                }
 }
 
-static void collection_table_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void collection_table_dnd_end(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -2471,8 +2432,8 @@ static void collection_table_dnd_end(GtkWidget *widget, GdkDragContext *context,
        collection_table_scroll(ct, FALSE);
 }
 
-static gint collection_table_dnd_motion(GtkWidget *widget, GdkDragContext *context,
-                                       gint x, gint y, guint time, gpointer data)
+static gint collection_table_dnd_motion(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
+                                       gint x, gint y, guint UNUSED(time), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -2482,7 +2443,7 @@ static gint collection_table_dnd_motion(GtkWidget *widget, GdkDragContext *conte
        return FALSE;
 }
 
-static void collection_table_dnd_leave(GtkWidget *widget, GdkDragContext *context, guint time, gpointer data)
+static void collection_table_dnd_leave(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context), guint UNUSED(time), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -2526,7 +2487,7 @@ struct _ColumnData
        gint number;
 };
 
-static void collection_table_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
+static void collection_table_cell_data_cb(GtkTreeViewColumn *UNUSED(tree_column), GtkCellRenderer *cell,
                                          GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
 {
        ColumnData *cd = data;
@@ -2543,14 +2504,13 @@ static void collection_table_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCel
 
        gtk_tree_model_get(tree_model, iter, CTABLE_COLUMN_POINTER, &list, -1);
 
-#if GTK_CHECK_VERSION(3,0,0)
        /** @FIXME this is a primitive hack to stop a crash.
         * When compiled with GTK3, if a Collection window containing
         * say, 50 or so, images has its width changed, there is a segfault
         * https://github.com/BestImageViewer/geeqie/issues/531
         */
        if (cd->number == COLLECT_TABLE_MAX_COLUMNS) return;
-#endif
+
        info = g_list_nth_data(list, cd->number);
 
        style = gtk_widget_get_style(ct->listview);
@@ -2663,7 +2623,7 @@ static void collection_table_append_column(CollectTable *ct, gint n)
  *-------------------------------------------------------------------
  */
 
-static void collection_table_destroy(GtkWidget *widget, gpointer data)
+static void collection_table_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectTable *ct = data;
 
@@ -2692,7 +2652,7 @@ static void collection_table_destroy(GtkWidget *widget, gpointer data)
        g_free(ct);
 }
 
-static void collection_table_sized(GtkWidget *widget, GtkAllocation *allocation, gpointer data)
+static void collection_table_sized(GtkWidget *UNUSED(widget), GtkAllocation *allocation, gpointer data)
 {
        CollectTable *ct = data;
 
index 2d4ed65..9513d94 100644 (file)
@@ -80,7 +80,7 @@ static void collection_notify_cb(FileData *fd, NotifyType type, gpointer data);
  *-------------------------------------------------------------------
  */
 
-CollectInfo *collection_info_new(FileData *fd, struct stat *st, GdkPixbuf *pixbuf)
+CollectInfo *collection_info_new(FileData *fd, struct stat *UNUSED(st), GdkPixbuf *pixbuf)
 {
        CollectInfo *ci;
 
@@ -437,7 +437,6 @@ GList *collection_contents_fd(const gchar *name)
        CollectionData *cd;
        CollectInfo *ci;
        GList *work;
-       FileData *fd;
        GList *list = NULL;
 
        if (is_collection(name))
@@ -449,7 +448,6 @@ GList *collection_contents_fd(const gchar *name)
                while (work)
                        {
                        ci = work->data;
-                       fd = ci->fd;
                        list = g_list_append(list, ci->fd);
 
                        work = work->next;
@@ -944,7 +942,7 @@ static void collection_notify_cb(FileData *fd, NotifyType type, gpointer data)
  *-------------------------------------------------------------------
  */
 
-static gboolean collection_window_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean collection_window_keypress(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        CollectWindow *cw = data;
        gboolean stop_signal = FALSE;
@@ -1146,7 +1144,7 @@ static void collection_window_update_title(CollectWindow *cw)
        g_free(buf);
 }
 
-static void collection_window_update_info(CollectionData *cd, CollectInfo *ci, gpointer data)
+static void collection_window_update_info(CollectionData *UNUSED(cd), CollectInfo *ci, gpointer data)
 {
        CollectWindow *cw = data;
 
@@ -1321,7 +1319,7 @@ gboolean collection_window_modified_exists(void)
        return ret;
 }
 
-static gboolean collection_window_delete(GtkWidget *widget, GdkEvent *event, gpointer data)
+static gboolean collection_window_delete(GtkWidget *UNUSED(widget), GdkEvent *UNUSED(event), gpointer data)
 {
        CollectWindow *cw = data;
        collection_window_close(cw);
@@ -1386,7 +1384,7 @@ CollectWindow *collection_window_new(const gchar *path)
        g_signal_connect(G_OBJECT(cw->window), "key_press_event",
                         G_CALLBACK(collection_window_keypress), cw);
 
-       vbox = gtk_vbox_new(FALSE, 0);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_container_add(GTK_CONTAINER(cw->window), vbox);
        gtk_widget_show(vbox);
 
@@ -1394,7 +1392,7 @@ CollectWindow *collection_window_new(const gchar *path)
        gtk_box_pack_start(GTK_BOX(vbox), cw->table->scrolled, TRUE, TRUE, 0);
        gtk_widget_show(cw->table->scrolled);
 
-       cw->status_box = gtk_hbox_new(TRUE, 0);
+       cw->status_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(vbox), cw->status_box, FALSE, FALSE, 0);
        gtk_widget_show(cw->status_box);
 
@@ -1410,10 +1408,9 @@ CollectWindow *collection_window_new(const gchar *path)
 
        extra_label = gtk_progress_bar_new();
        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(extra_label), 0.0);
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(extra_label), "");
        gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(extra_label), TRUE);
-#endif
+
        gtk_box_pack_start(GTK_BOX(cw->status_box), extra_label, TRUE, TRUE, 0);
        gtk_widget_show(extra_label);
 
index dda2e2c..5b1f68a 100644 (file)
@@ -317,11 +317,8 @@ void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, g
        rs = gdk_pixbuf_get_rowstride(pixbuf);
 
        /** @FIXME: x,y expected to be = 0. Maybe this is not the right place for scaling */
-       if (!options->image.use_clutter_renderer)
-               {
-               w = w * scale_factor();
-               h = h * scale_factor();
-               }
+       w = w * scale_factor();
+       h = h * scale_factor();
 
        w = MIN(w, pixbuf_width - x);
        h = MIN(h, pixbuf_height - y);
index 5a2c0f3..a4d2da9 100644 (file)
 #include "main.h"
 #include "compat.h"
 
-#if !GTK_CHECK_VERSION(2,24,0)
-gint compat_gdk_window_get_width(GdkWindow *window)
-{
-       gint w, h;
-       gdk_drawable_get_size(window, &w, &h);
-       return w;
-}
-
-gint compat_gdk_window_get_height(GdkWindow *window)
-{
-       gint w, h;
-       gdk_drawable_get_size(window, &w, &h);
-       return h;
-}
-#endif
-
-#if !GTK_CHECK_VERSION(2,22,0)
-cairo_surface_t *compat_gdk_window_create_similar_surface (GdkWindow *window, cairo_content_t content, gint width, gint height)
-{
-       cairo_t *cr = gdk_cairo_create(window);
-       cairo_surface_t *ws = cairo_get_target(cr);
-       cairo_surface_t *ret = cairo_surface_create_similar(ws, content, width, height);
-       cairo_destroy(cr);
-       return ret;
-}
-#endif
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 117c5bd..b914f67 100644 (file)
 #define        MAP_ANON        MAP_ANONYMOUS
 #endif
 
-#if !GTK_CHECK_VERSION(2,22,0)
-#define GDK_KEY_BackSpace      GDK_BackSpace
-#define GDK_KEY_Delete         GDK_Delete
-#define GDK_KEY_Down           GDK_Down
-#define GDK_KEY_End            GDK_End
-#define GDK_KEY_Escape         GDK_Escape
-#define GDK_KEY_F10            GDK_F10
-#define GDK_KEY_F11            GDK_F11
-#define GDK_KEY_Home           GDK_Home
-#define GDK_KEY_ISO_Left_Tab   GDK_ISO_Left_Tab
-#define GDK_KEY_KP_Add         GDK_KP_Add
-#define GDK_KEY_KP_Delete      GDK_KP_Delete
-#define GDK_KEY_KP_Divide      GDK_KP_Divide
-#define GDK_KEY_KP_Down                GDK_KP_Down
-#define GDK_KEY_KP_End         GDK_KP_End
-#define GDK_KEY_KP_Enter       GDK_KP_Enter
-#define GDK_KEY_KP_Home                GDK_KP_Home
-#define GDK_KEY_KP_Left                GDK_KP_Left
-#define GDK_KEY_KP_Multiply    GDK_KP_Multiply
-#define GDK_KEY_KP_Page_Down   GDK_KP_Page_Down
-#define GDK_KEY_KP_Page_Up     GDK_KP_Page_Up
-#define GDK_KEY_KP_Right       GDK_KP_Right
-#define GDK_KEY_KP_Subtract    GDK_KP_Subtract
-#define GDK_KEY_KP_Up          GDK_KP_Up
-#define GDK_KEY_Left           GDK_Left
-#define GDK_KEY_Menu           GDK_Menu
-#define GDK_KEY_Page_Down      GDK_Page_Down
-#define GDK_KEY_Page_Up                GDK_Page_Up
-#define GDK_KEY_plus           GDK_plus
-#define GDK_KEY_Return         GDK_Return
-#define GDK_KEY_Right          GDK_Right
-#define GDK_KEY_space          GDK_space
-#define GDK_KEY_Tab            GDK_Tab
-#define GDK_KEY_Up             GDK_Up
-#endif
-
-#if !GTK_CHECK_VERSION(2,24,0)
-#define gtk_combo_box_text_new gtk_combo_box_new_text
-#define gtk_combo_box_text_append_text gtk_combo_box_append_text
-#define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
-#define gtk_combo_box_new_with_model_and_entry(model) gtk_combo_box_entry_new_with_model(model, FILTER_COLUMN_FILTER)
-#define GTK_COMBO_BOX_TEXT(combo) GTK_COMBO_BOX(combo)
-#define gdk_window_get_width(window) compat_gdk_window_get_width(window)
-#define gdk_window_get_height(window) compat_gdk_window_get_height(window)
-
-gint compat_gdk_window_get_width(GdkWindow *window);
-gint compat_gdk_window_get_height(GdkWindow *window);
-
-#endif
-
-#if !GTK_CHECK_VERSION(2,22,0)
-#define gdk_window_create_similar_surface(window, content, width, height) compat_gdk_window_create_similar_surface(window, content, width, height)
-cairo_surface_t *compat_gdk_window_create_similar_surface (GdkWindow *window, cairo_content_t content, gint width, gint height);
-
-#define gdk_drag_context_get_selected_action(context) ((context)->action)
-#define gdk_drag_context_get_suggested_action(context) ((context)->suggested_action)
-#define gdk_drag_context_get_actions(context) ((context)->actions)
-#endif
-
-#if GTK_CHECK_VERSION(3,0,0)
-#define gtk_hbox_new(homogeneous, spacing) gtk_box_new(GTK_ORIENTATION_HORIZONTAL, spacing)
-#define gtk_vbox_new(homogeneous, spacing) gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing)
-#define gdk_cursor_unref(cursor) g_object_unref(G_OBJECT(cursor))
-#endif
-
-#if GTK_CHECK_VERSION(3,2,0)
-#define gtk_hpaned_new() gtk_paned_new(GTK_ORIENTATION_HORIZONTAL)
-#define gtk_vpaned_new() gtk_paned_new(GTK_ORIENTATION_VERTICAL)
-#endif
-
-#if GTK_CHECK_VERSION(3,8,0)
-#define gtk_scrolled_window_add_with_viewport(viewport, child) gtk_container_add(GTK_CONTAINER(viewport), child)
-#endif
-
-#if GTK_CHECK_VERSION(3,20,0)
-#define gtk_hbutton_box_new() gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL)
-#endif
-
 #endif /* COMPAT_H */
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index c74cc88..853997d 100644 (file)
@@ -112,7 +112,7 @@ static gboolean editor_window_save(EditorWindow *ew)
        return ret;
 }
 
-static void editor_window_close_cb(GtkWidget *widget, gpointer data)
+static void editor_window_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        EditorWindow *ew = data;
 
@@ -121,13 +121,13 @@ static void editor_window_close_cb(GtkWidget *widget, gpointer data)
        g_free(ew);
 }
 
-static gint editor_window_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
+static gint editor_window_delete_cb(GtkWidget *w, GdkEventAny *UNUSED(event), gpointer data)
 {
        editor_window_close_cb(w, data);
        return TRUE;
 }
 
-static void editor_window_save_cb(GtkWidget *widget, gpointer data)
+static void editor_window_save_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        EditorWindow *ew = data;
 
@@ -141,7 +141,7 @@ static void editor_window_save_cb(GtkWidget *widget, gpointer data)
        ew->modified = FALSE;
 }
 
-static void editor_window_text_modified_cb(GtkWidget *widget, gpointer data)
+static void editor_window_text_modified_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        EditorWindow *ew = data;
 
@@ -152,7 +152,7 @@ static void editor_window_text_modified_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void editor_window_entry_changed_cb(GtkWidget *widget, gpointer data)
+static void editor_window_entry_changed_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        EditorWindow *ew = data;
        const gchar *content = gtk_entry_get_text(GTK_ENTRY(ew->entry));
@@ -199,11 +199,11 @@ static void editor_window_new(const gchar *src_path, const gchar *desktop_name)
        gtk_window_set_resizable(GTK_WINDOW(ew->window), TRUE);
        gtk_container_set_border_width(GTK_CONTAINER(ew->window), PREF_PAD_BORDER);
 
-       win_vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE);
+       win_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
        gtk_container_add(GTK_CONTAINER(ew->window), win_vbox);
        gtk_widget_show(win_vbox);
 
-       hbox = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        gtk_box_pack_end(GTK_BOX(win_vbox), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
 
@@ -268,14 +268,14 @@ static void editor_window_new(const gchar *src_path, const gchar *desktop_name)
 }
 
 
-static void editor_list_window_close_cb(GtkWidget *widget, gpointer data)
+static void editor_list_window_close_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        gtk_widget_destroy(editor_list_window->window);
        g_free(editor_list_window);
        editor_list_window = NULL;
 }
 
-static gboolean editor_list_window_delete(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean editor_list_window_delete(GtkWidget *UNUSED(widget), GdkEventAny *UNUSED(event), gpointer UNUSED(data))
 {
        editor_list_window_close_cb(NULL, NULL);
        return TRUE;
@@ -283,7 +283,7 @@ static gboolean editor_list_window_delete(GtkWidget *widget, GdkEventAny *event,
 
 static void editor_list_window_delete_dlg_cancel(GenericDialog *gd, gpointer data);
 
-static void editor_list_window_delete_dlg_cancel(GenericDialog *gd, gpointer data)
+static void editor_list_window_delete_dlg_cancel(GenericDialog *UNUSED(gd), gpointer data)
 {
        EditorWindowDel_Data *ewdl = data;
 
@@ -313,7 +313,7 @@ static void editor_list_window_delete_dlg_ok_cb(GenericDialog *gd, gpointer data
        editor_list_window_delete_dlg_cancel(gd, data);
 }
 
-static void editor_list_window_delete_cb(GtkWidget *widget, gpointer data)
+static void editor_list_window_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        EditorListWindow *ewl = data;
        GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(ewl->view));
@@ -358,7 +358,7 @@ static void editor_list_window_delete_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void editor_list_window_edit_cb(GtkWidget *widget, gpointer data)
+static void editor_list_window_edit_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        EditorListWindow *ewl = data;
        GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(ewl->view));
@@ -379,17 +379,17 @@ static void editor_list_window_edit_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void editor_list_window_new_cb(GtkWidget *widget, gpointer data)
+static void editor_list_window_new_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        editor_window_new(desktop_file_template, _("new.desktop"));
 }
 
-static void editor_list_window_help_cb(GtkWidget *widget, gpointer data)
+static void editor_list_window_help_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        help_window_show("GuidePluginsConfig.html");
 }
 
-static void editor_list_window_selection_changed_cb(GtkWidget *widget, gpointer data)
+static void editor_list_window_selection_changed_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        EditorListWindow *ewl = data;
        GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(ewl->view));
@@ -470,7 +470,7 @@ static gint editor_list_window_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkT
        return ret;
 }
 
-static void plugin_disable_cb(GtkCellRendererToggle *renderer, gchar *path_str, gpointer data)
+static void plugin_disable_cb(GtkCellRendererToggle *UNUSED(renderer), gchar *path_str, gpointer data)
 {
        EditorListWindow *ewl = data;
        GtkTreePath *tpath;
@@ -514,8 +514,8 @@ static void plugin_disable_cb(GtkCellRendererToggle *renderer, gchar *path_str,
        layout_editors_reload_finish();
 }
 
-static void plugin_disable_set_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
-                                                       GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
+static void plugin_disable_set_func(GtkTreeViewColumn *UNUSED(tree_column), GtkCellRenderer *cell,
+                                                       GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer UNUSED(data))
 {
        gboolean disabled;
 
@@ -555,7 +555,7 @@ static void editor_list_window_create(void)
        gtk_window_set_resizable(GTK_WINDOW(ewl->window), TRUE);
        gtk_container_set_border_width(GTK_CONTAINER(ewl->window), PREF_PAD_BORDER);
 
-       win_vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE);
+       win_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
        gtk_container_add(GTK_CONTAINER(ewl->window), win_vbox);
        gtk_widget_show(win_vbox);
 
index 1fe2cad..e8aab91 100644 (file)
--- a/src/dnd.c
+++ b/src/dnd.c
@@ -172,10 +172,10 @@ void dnd_set_drag_icon(GtkWidget *widget, GdkDragContext *context, GdkPixbuf *pi
        g_object_unref(dest);
 }
 
-static void dnd_set_drag_label_end_cb(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void dnd_set_drag_label_end_cb(GtkWidget *widget, GdkDragContext *UNUSED(context), gpointer data)
 {
        GtkWidget *window = data;
-       g_signal_handlers_disconnect_by_func(widget, dnd_set_drag_label_end_cb, data);
+       g_signal_handlers_disconnect_by_func(widget, (gpointer)dnd_set_drag_label_end_cb, data);
        gtk_widget_destroy(window);
 }
 
index 0cedf8b..5a5e870 100644 (file)
@@ -401,7 +401,7 @@ static void widget_set_cursor(GtkWidget *widget, gint icon)
 
        gdk_window_set_cursor(gtk_widget_get_window(widget), cursor);
 
-       if (cursor) gdk_cursor_unref(cursor);
+       if (cursor) g_object_unref(G_OBJECT(cursor));
 }
 
 /*
@@ -813,7 +813,7 @@ static void dupe_listview_remove(DupeWindow *dw, DupeItem *di)
 }
 
 
-static GList *dupe_listview_get_filelist(DupeWindow *dw, GtkWidget *listview)
+static GList *dupe_listview_get_filelist(DupeWindow *UNUSED(dw), GtkWidget *listview)
 {
        GtkTreeModel *store;
        GtkTreeIter iter;
@@ -835,7 +835,7 @@ static GList *dupe_listview_get_filelist(DupeWindow *dw, GtkWidget *listview)
 }
 
 
-static GList *dupe_listview_get_selection(DupeWindow *dw, GtkWidget *listview)
+static GList *dupe_listview_get_selection(DupeWindow *UNUSED(dw), GtkWidget *listview)
 {
        GtkTreeModel *store;
        GtkTreeSelection *selection;
@@ -866,7 +866,7 @@ static GList *dupe_listview_get_selection(DupeWindow *dw, GtkWidget *listview)
        return g_list_reverse(list);
 }
 
-static gboolean dupe_listview_item_is_selected(DupeWindow *dw, DupeItem *di, GtkWidget *listview)
+static gboolean dupe_listview_item_is_selected(DupeWindow *UNUSED(dw), DupeItem *di, GtkWidget *listview)
 {
        GtkTreeModel *store;
        GtkTreeSelection *selection;
@@ -2112,7 +2112,7 @@ static void dupe_thumb_do(DupeWindow *dw)
        dupe_listview_set_thumb(dw, di, NULL);
 }
 
-static void dupe_thumb_error_cb(ThumbLoader *tl, gpointer data)
+static void dupe_thumb_error_cb(ThumbLoader *UNUSED(tl), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -2120,7 +2120,7 @@ static void dupe_thumb_error_cb(ThumbLoader *tl, gpointer data)
        dupe_thumb_step(dw);
 }
 
-static void dupe_thumb_done_cb(ThumbLoader *tl, gpointer data)
+static void dupe_thumb_done_cb(ThumbLoader *UNUSED(tl), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -2250,7 +2250,7 @@ static void dupe_check_stop(DupeWindow *dw)
        dw->img_loader = NULL;
 }
 
-static void dupe_check_stop_cb(GtkWidget *widget, gpointer data)
+static void dupe_check_stop_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -2841,7 +2841,7 @@ static gboolean dupe_files_add_queue_cb(gpointer data)
                }
 }
 
-static void dupe_files_add(DupeWindow *dw, CollectionData *collection, CollectInfo *info,
+static void dupe_files_add(DupeWindow *dw, CollectionData *UNUSED(collection), CollectInfo *info,
                           FileData *fd, gboolean recurse)
 {
        DupeItem *di = NULL;
@@ -3118,7 +3118,7 @@ static GtkWidget *dupe_display_label(GtkWidget *vbox, const gchar *description,
        GtkWidget *hbox;
        GtkWidget *label;
 
-       hbox = gtk_hbox_new(FALSE, 10);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10);
 
        label = gtk_label_new(description);
        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
@@ -3319,21 +3319,21 @@ static void dupe_window_append_file_list(DupeWindow *dw, gint on_second)
  *-------------------------------------------------------------------
  */
 
-static void dupe_menu_view_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_view_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        if (dw->click_item) dupe_menu_view(dw, dw->click_item, dw->listview, FALSE);
 }
 
-static void dupe_menu_viewnew_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_viewnew_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        if (dw->click_item) dupe_menu_view(dw, dw->click_item, dw->listview, TRUE);
 }
 
-static void dupe_menu_select_all_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_select_all_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
        GtkTreeSelection *selection;
@@ -3343,7 +3343,7 @@ static void dupe_menu_select_all_cb(GtkWidget *widget, gpointer data)
        gtk_tree_selection_select_all(selection);
 }
 
-static void dupe_menu_select_none_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_select_none_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
        GtkTreeSelection *selection;
@@ -3353,7 +3353,7 @@ static void dupe_menu_select_none_cb(GtkWidget *widget, gpointer data)
        gtk_tree_selection_unselect_all(selection);
 }
 
-static void dupe_menu_select_dupes_set1_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_select_dupes_set1_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -3361,7 +3361,7 @@ static void dupe_menu_select_dupes_set1_cb(GtkWidget *widget, gpointer data)
        dupe_listview_select_dupes(dw, DUPE_SELECT_GROUP1);
 }
 
-static void dupe_menu_select_dupes_set2_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_select_dupes_set2_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -3380,7 +3380,7 @@ static void dupe_menu_edit_cb(GtkWidget *widget, gpointer data)
        dupe_window_edit_selected(dw, key);
 }
 
-static void dupe_menu_print_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_print_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
        FileData *fd;
@@ -3392,28 +3392,28 @@ static void dupe_menu_print_cb(GtkWidget *widget, gpointer data)
                         dupe_listview_get_filelist(dw, dw->listview), dw->window);
 }
 
-static void dupe_menu_copy_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_copy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        file_util_copy(NULL, dupe_listview_get_selection(dw, dw->listview), NULL, dw->window);
 }
 
-static void dupe_menu_move_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_move_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        file_util_move(NULL, dupe_listview_get_selection(dw, dw->listview), NULL, dw->window);
 }
 
-static void dupe_menu_rename_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        file_util_rename(NULL, dupe_listview_get_selection(dw, dw->listview), dw->window);
 }
 
-static void dupe_menu_delete_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -3421,7 +3421,7 @@ static void dupe_menu_delete_cb(GtkWidget *widget, gpointer data)
        file_util_delete_notify_done(NULL, dupe_listview_get_selection(dw, dw->listview), dw->window, delete_finished_cb, dw);
 }
 
-static void dupe_menu_move_to_trash_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_move_to_trash_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -3429,42 +3429,42 @@ static void dupe_menu_move_to_trash_cb(GtkWidget *widget, gpointer data)
        file_util_delete_notify_done(NULL, dupe_listview_get_selection(dw, dw->listview), dw->window, delete_finished_cb, dw);
 }
 
-static void dupe_menu_copy_path_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        file_util_copy_path_list_to_clipboard(dupe_listview_get_selection(dw, dw->listview), TRUE);
 }
 
-static void dupe_menu_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        file_util_copy_path_list_to_clipboard(dupe_listview_get_selection(dw, dw->listview), FALSE);
 }
 
-static void dupe_menu_remove_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_remove_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        dupe_window_remove_selection(dw, dw->listview);
 }
 
-static void dupe_menu_clear_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_clear_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        dupe_window_clear(dw);
 }
 
-static void dupe_menu_close_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        dupe_window_close(dw);
 }
 
-static void dupe_menu_popup_destroy_cb(GtkWidget *widget, gpointer data)
+static void dupe_menu_popup_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GList *editmenu_fd_list = data;
 
@@ -3801,21 +3801,21 @@ static void dupe_second_clear(DupeWindow *dw)
        dupe_second_update_status(dw);
 }
 
-static void dupe_second_menu_view_cb(GtkWidget *widget, gpointer data)
+static void dupe_second_menu_view_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        if (dw->click_item) dupe_menu_view(dw, dw->click_item, dw->second_listview, FALSE);
 }
 
-static void dupe_second_menu_viewnew_cb(GtkWidget *widget, gpointer data)
+static void dupe_second_menu_viewnew_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        if (dw->click_item) dupe_menu_view(dw, dw->click_item, dw->second_listview, TRUE);
 }
 
-static void dupe_second_menu_select_all_cb(GtkWidget *widget, gpointer data)
+static void dupe_second_menu_select_all_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkTreeSelection *selection;
        DupeWindow *dw = data;
@@ -3824,7 +3824,7 @@ static void dupe_second_menu_select_all_cb(GtkWidget *widget, gpointer data)
        gtk_tree_selection_select_all(selection);
 }
 
-static void dupe_second_menu_select_none_cb(GtkWidget *widget, gpointer data)
+static void dupe_second_menu_select_none_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkTreeSelection *selection;
        DupeWindow *dw = data;
@@ -3833,14 +3833,14 @@ static void dupe_second_menu_select_none_cb(GtkWidget *widget, gpointer data)
        gtk_tree_selection_unselect_all(selection);
 }
 
-static void dupe_second_menu_remove_cb(GtkWidget *widget, gpointer data)
+static void dupe_second_menu_remove_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
        dupe_window_remove_selection(dw, dw->second_listview);
 }
 
-static void dupe_second_menu_clear_cb(GtkWidget *widget, gpointer data)
+static void dupe_second_menu_clear_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -4036,7 +4036,7 @@ static GdkColor *dupe_listview_color_shifted(GtkWidget *widget)
        return &color;
 }
 
-static void dupe_listview_color_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
+static void dupe_listview_color_cb(GtkTreeViewColumn *UNUSED(tree_column), GtkCellRenderer *cell,
                                   GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
 {
        DupeWindow *dw = data;
@@ -4199,7 +4199,7 @@ static void dupe_window_custom_threshold_cb(GtkWidget *widget, gpointer data)
        dupe_window_recompare(dw);
 }
 
-static void dupe_popup_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void dupe_popup_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        GtkWidget *view = data;
        GtkTreePath *tpath;
@@ -4226,7 +4226,7 @@ static void dupe_popup_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *pu
        *y = cy;
 }
 
-static gboolean dupe_window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean dupe_window_keypress_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        DupeWindow *dw = data;
        gboolean stop_signal = FALSE;
@@ -4472,7 +4472,7 @@ void dupe_window_close(DupeWindow *dw)
        g_free(dw);
 }
 
-static gint dupe_window_close_cb(GtkWidget *widget, gpointer data)
+static gint dupe_window_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -4481,7 +4481,7 @@ static gint dupe_window_close_cb(GtkWidget *widget, gpointer data)
        return TRUE;
 }
 
-static gint dupe_window_delete(GtkWidget *widget, GdkEvent *event, gpointer data)
+static gint dupe_window_delete(GtkWidget *UNUSED(widget), GdkEvent *UNUSED(event), gpointer data)
 {
        DupeWindow *dw = data;
        dupe_window_close(dw);
@@ -4489,12 +4489,12 @@ static gint dupe_window_delete(GtkWidget *widget, GdkEvent *event, gpointer data
        return TRUE;
 }
 
-static void dupe_help_cb(GtkAction *action, gpointer data)
+static void dupe_help_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
 {
        help_window_show("GuideImageSearchFindingDuplicates.html");
 }
 
-static gint default_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data)
+static gint default_sort_cb(GtkTreeModel *UNUSED(model), GtkTreeIter *UNUSED(a), GtkTreeIter *UNUSED(b), gpointer UNUSED(data))
 {
        return 0;
 }
@@ -4588,7 +4588,7 @@ static gint column_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b,
        return ret;
 }
 
-static void column_clicked_cb(GtkWidget *widget,  gpointer data)
+static void column_clicked_cb(GtkWidget *UNUSED(widget),  gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -4664,7 +4664,7 @@ DupeWindow *dupe_window_new()
        g_signal_connect(G_OBJECT(dw->window), "key_press_event",
                         G_CALLBACK(dupe_window_keypress_cb), dw);
 
-       vbox = gtk_vbox_new(FALSE, 0);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_container_add(GTK_CONTAINER(dw->window), vbox);
        gtk_widget_show(vbox);
 
@@ -4717,7 +4717,7 @@ DupeWindow *dupe_window_new()
        gtk_container_add(GTK_CONTAINER(scrolled), dw->listview);
        gtk_widget_show(dw->listview);
 
-       dw->second_vbox = gtk_vbox_new(FALSE, 0);
+       dw->second_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_table_attach_defaults(GTK_TABLE(dw->table), dw->second_vbox, 2, 3, 0, 1);
        if (dw->second_set)
                {
@@ -4755,7 +4755,7 @@ DupeWindow *dupe_window_new()
 
        pref_line(dw->second_vbox, GTK_ORIENTATION_HORIZONTAL);
 
-       status_box = gtk_hbox_new(FALSE, 0);
+       status_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(vbox), status_box, FALSE, FALSE, 0);
        gtk_widget_show(status_box);
 
@@ -4771,10 +4771,8 @@ DupeWindow *dupe_window_new()
 
        dw->extra_label = gtk_progress_bar_new();
        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(dw->extra_label), 0.0);
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(dw->extra_label), "");
        gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(dw->extra_label), TRUE);
-#endif
        gtk_box_pack_start(GTK_BOX(status_box), dw->extra_label, FALSE, FALSE, PREF_PAD_SPACE);
        gtk_widget_show(dw->extra_label);
 
@@ -4830,7 +4828,7 @@ DupeWindow *dupe_window_new()
        gtk_box_pack_start(GTK_BOX(controls_box), button, FALSE, FALSE, PREF_PAD_SPACE);
        gtk_widget_show(button);
 
-       button_box = gtk_hbox_new(FALSE, 0);
+       button_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(vbox), button_box, FALSE, FALSE, 0);
        gtk_widget_show(button_box);
 
@@ -4901,12 +4899,12 @@ typedef struct {
        GList *list;
 } CDupeConfirmD;
 
-static void confirm_dir_list_cancel(GtkWidget *widget, gpointer data)
+static void confirm_dir_list_cancel(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        /* do nothing */
 }
 
-static void confirm_dir_list_add(GtkWidget *widget, gpointer data)
+static void confirm_dir_list_add(GtkWidget *UNUSED(widget), gpointer data)
 {
        CDupeConfirmD *d = data;
        GList *work;
@@ -4933,19 +4931,19 @@ static void confirm_dir_list_add(GtkWidget *widget, gpointer data)
                }
 }
 
-static void confirm_dir_list_recurse(GtkWidget *widget, gpointer data)
+static void confirm_dir_list_recurse(GtkWidget *UNUSED(widget), gpointer data)
 {
        CDupeConfirmD *d = data;
        dupe_window_add_files(d->dw, d->list, TRUE);
 }
 
-static void confirm_dir_list_skip(GtkWidget *widget, gpointer data)
+static void confirm_dir_list_skip(GtkWidget *UNUSED(widget), gpointer data)
 {
        CDupeConfirmD *d = data;
        dupe_window_add_files(d->dw, d->list, FALSE);
 }
 
-static void confirm_dir_list_destroy(GtkWidget *widget, gpointer data)
+static void confirm_dir_list_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        CDupeConfirmD *d = data;
        filelist_free(d->list);
@@ -4994,9 +4992,9 @@ static GtkTargetEntry dupe_drop_types[] = {
 };
 static gint n_dupe_drop_types = 2;
 
-static void dupe_dnd_data_set(GtkWidget *widget, GdkDragContext *context,
+static void dupe_dnd_data_set(GtkWidget *widget, GdkDragContext *UNUSED(context),
                              GtkSelectionData *selection_data, guint info,
-                             guint time, gpointer data)
+                             guint UNUSED(time), gpointer data)
 {
        DupeWindow *dw = data;
        GList *list;
@@ -5016,7 +5014,7 @@ static void dupe_dnd_data_set(GtkWidget *widget, GdkDragContext *context,
 }
 
 static void dupe_dnd_data_get(GtkWidget *widget, GdkDragContext *context,
-                             gint x, gint y,
+                             gint UNUSED(x), gint UNUSED(y),
                              GtkSelectionData *selection_data, guint info,
                              guint time, gpointer data)
 {
@@ -5126,7 +5124,7 @@ static void dupe_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointer
                }
 }
 
-static void dupe_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void dupe_dnd_end(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context), gpointer data)
 {
        DupeWindow *dw = data;
        dupe_dest_set(dw->listview, TRUE);
@@ -5206,7 +5204,7 @@ static void dupe_notify_cb(FileData *fd, NotifyType type, gpointer data)
  * the UI slows to an unacceptable level. The #FileUtilDoneFunc is used
  * to call this function once, when the entire delete operation is completed.
  */
-static void delete_finished_cb(gboolean success, const gchar *dest_path, gpointer data)
+static void delete_finished_cb(gboolean success, const gchar *UNUSED(dest_path), gpointer data)
 {
        DupeWindow *dw = data;
 
@@ -5243,7 +5241,7 @@ static void export_duplicates_close(ExportDupesData *edd)
        edd->dialog = NULL;
 }
 
-static void export_duplicates_data_cancel_cb(FileDialog *fdlg, gpointer data)
+static void export_duplicates_data_cancel_cb(FileDialog *UNUSED(fdlg), gpointer data)
 {
        ExportDupesData *edd = data;
 
@@ -5382,7 +5380,7 @@ static void export_duplicates_data_save_cb(FileDialog *fdlg, gpointer data)
        export_duplicates_close(edd);
 }
 
-static void pop_menu_export(GList *selection_list, gpointer dupe_window, gpointer data)
+static void pop_menu_export(GList *UNUSED(selection_list), gpointer dupe_window, gpointer data)
 {
        const gint index = GPOINTER_TO_INT(data);
        DupeWindow *dw = dupe_window;
index dbcbd66..2347afb 100644 (file)
@@ -383,7 +383,7 @@ gboolean editor_read_desktop_file(const gchar *path)
        return TRUE;
 }
 
-static gboolean editor_remove_desktop_file_cb(gpointer key, gpointer value, gpointer user_data)
+static gboolean editor_remove_desktop_file_cb(gpointer UNUSED(key), gpointer value, gpointer UNUSED(user_data))
 {
        EditorDescription *editor = value;
        return editor->hidden || editor->ignored;
@@ -478,7 +478,7 @@ GList *editor_get_desktop_files(void)
        return list;
 }
 
-static void editor_list_add_cb(gpointer key, gpointer value, gpointer data)
+static void editor_list_add_cb(gpointer UNUSED(key), gpointer value, gpointer data)
 {
        GList **listp = data;
        EditorDescription *editor = value;
@@ -563,7 +563,7 @@ static void editor_verbose_window_close(GenericDialog *gd, gpointer data)
        if (ed->pid == -1) editor_data_free(ed); /* the process has already terminated */
 }
 
-static void editor_verbose_window_stop(GenericDialog *gd, gpointer data)
+static void editor_verbose_window_stop(GenericDialog *UNUSED(gd), gpointer data)
 {
        EditorData *ed = data;
        ed->stopping = TRUE;
@@ -595,7 +595,9 @@ static EditorVerboseData *editor_verbose_window(EditorData *ed, const gchar *tex
        buf = g_strdup_printf(_("Output of %s"), text);
        generic_dialog_add_message(vd->gd, NULL, buf, NULL, FALSE);
        g_free(buf);
-       vd->button_stop = generic_dialog_add_button(vd->gd, GTK_STOCK_STOP, NULL,
+       //~ vd->button_stop = generic_dialog_add_button(vd->gd, GTK_STOCK_STOP, NULL,
+                                                  //~ editor_verbose_window_stop, FALSE);
+       vd->button_stop = generic_dialog_add_button(vd->gd, "process-stop", NULL,
                                                   editor_verbose_window_stop, FALSE);
        gtk_widget_set_sensitive(vd->button_stop, FALSE);
        vd->button_close = generic_dialog_add_button(vd->gd, GTK_STOCK_CLOSE, NULL,
@@ -615,17 +617,15 @@ static EditorVerboseData *editor_verbose_window(EditorData *ed, const gchar *tex
        gtk_container_add(GTK_CONTAINER(scrolled), vd->text);
        gtk_widget_show(vd->text);
 
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(vd->gd->vbox), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
 
        vd->progress = gtk_progress_bar_new();
        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(vd->progress), 0.0);
        gtk_box_pack_start(GTK_BOX(hbox), vd->progress, TRUE, TRUE, 0);
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(vd->progress), "");
        gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(vd->progress), TRUE);
-#endif
        gtk_widget_show(vd->progress);
 
        vd->spinner = spinner_new(NULL, SPINNER_SPEED);
index 2ca570b..1d7b58b 100644 (file)
@@ -42,7 +42,7 @@ typedef enum {
        EDITOR_ERROR_STATUS       = 0x00400000,
        EDITOR_ERROR_SKIPPED      = 0x00800000,
        /**< mask to match errors only */
-       EDITOR_ERROR_MASK         = 0xffff0000,
+       EDITOR_ERROR_MASK         = ~0xffff,
 } EditorFlags;
 
 struct _EditorDescription {
index b6b01f6..12d60fb 100644 (file)
@@ -1187,7 +1187,7 @@ static gchar *mode_number(mode_t m)
        return g_strdup_printf("%s (%d%d%d%d)", pbuf, mb, mu, mg, mo);
 }
 
-gchar *metadata_file_info(FileData *fd, const gchar *key, MetadataFormat format)
+gchar *metadata_file_info(FileData *fd, const gchar *key, MetadataFormat UNUSED(format))
 {
        gchar *page_n_of_m;
 
@@ -1239,7 +1239,7 @@ gchar *metadata_file_info(FileData *fd, const gchar *key, MetadataFormat format)
 }
 
 #ifdef HAVE_LUA
-gchar *metadata_lua_info(FileData *fd, const gchar *key, MetadataFormat format)
+gchar *metadata_lua_info(FileData *fd, const gchar *key, MetadataFormat UNUSED(format))
 {
        gchar *script_name;
        gchar *script_name_utf8;
index 5eed8ea..44b59ff 100644 (file)
@@ -1712,7 +1712,8 @@ void exif_free_preview(guchar *buf)
 void exif_init(void)
 {
 }
-
+#else
+typedef int dummy_variable;
 #endif
 /* not HAVE_EXIV2 */
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index dbfc588..5c4bf16 100644 (file)
@@ -124,7 +124,7 @@ struct _ExifData
        {
        }
 
-       virtual void writeMetadata(gchar *path = NULL)
+       virtual void writeMetadata(gchar *UNUSED(path) = NULL)
        {
                g_critical("Unsupported method of writing metadata");
        }
@@ -767,7 +767,7 @@ guint exif_item_get_format_id(ExifItem *item)
        }
 }
 
-const char *exif_item_get_format_name(ExifItem *item, gboolean brief)
+const char *exif_item_get_format_name(ExifItem *item, gboolean UNUSED(brief))
 {
        try {
                if (!item) return NULL;
index 9e9db8b..91a4b6f 100644 (file)
@@ -69,10 +69,10 @@ gboolean file_cache_get(FileCacheData *fc, FileData *fd)
                if (fce->fd == fd)
                        {
                        /* entry exists */
-                       DEBUG_2("cache hit: fc=%p %s", fc, fd->path);
+                       DEBUG_2("cache hit: fc=%p %s", (void *)fc, fd->path);
                        if (work == fc->list) return TRUE; /* already at the beginning */
                        /* move it to the beginning */
-                       DEBUG_2("cache move to front: fc=%p %s", fc, fd->path);
+                       DEBUG_2("cache move to front: fc=%p %s", (void *)fc, fd->path);
                        fc->list = g_list_remove_link(fc->list, work);
                        fc->list = g_list_concat(work, fc->list);
 
@@ -86,7 +86,7 @@ gboolean file_cache_get(FileCacheData *fc, FileData *fd)
                        }
                work = work->next;
                }
-       DEBUG_2("cache miss: fc=%p %s", fc, fd->path);
+       DEBUG_2("cache miss: fc=%p %s", (void *)fc, fd->path);
        return FALSE;
 }
 
@@ -106,7 +106,7 @@ void file_cache_set_size(FileCacheData *fc, gulong size)
                fc->list = g_list_delete_link(fc->list, work);
                work = prev;
 
-               DEBUG_2("file changed - cache remove: fc=%p %s", fc, last_fe->fd->path);
+               DEBUG_2("file changed - cache remove: fc=%p %s", (void *)fc, last_fe->fd->path);
                fc->size -= last_fe->size;
                fc->release(last_fe->fd);
                file_data_unref(last_fe->fd);
@@ -120,7 +120,7 @@ void file_cache_put(FileCacheData *fc, FileData *fd, gulong size)
 
        if (file_cache_get(fc, fd)) return;
 
-       DEBUG_2("cache add: fc=%p %s", fc, fd->path);
+       DEBUG_2("cache add: fc=%p %s", (void *)fc, fd->path);
        fe = g_new(FileCacheEntry, 1);
        fe->fd = file_data_ref(fd);
        fe->size = size;
@@ -164,7 +164,7 @@ static void file_cache_remove_fd(FileCacheData *fc, FileData *fd)
                        {
                        fc->list = g_list_delete_link(fc->list, current);
 
-                       DEBUG_1("cache remove: fc=%p %s", fc, fe->fd->path);
+                       DEBUG_1("cache remove: fc=%p %s", (void *)fc, fe->fd->path);
                        fc->size -= fe->size;
                        fc->release(fe->fd);
                        file_data_unref(fe->fd);
@@ -178,13 +178,13 @@ void file_cache_dump(FileCacheData *fc)
        GList *work = fc->list;
        gulong n = 0;
 
-       DEBUG_1("cache dump: fc=%p max size:%ld size:%ld", fc, fc->max_size, fc->size);
+       DEBUG_1("cache dump: fc=%p max size:%ld size:%ld", (void *)fc, fc->max_size, fc->size);
 
        while (work)
                {
                FileCacheEntry *fe = work->data;
                work = work->next;
-               DEBUG_1("cache entry: fc=%p [%lu] %s %ld", fc, ++n, fe->fd->path, fe->size);
+               DEBUG_1("cache entry: fc=%p [%lu] %s %ld", (void *)fc, ++n, fe->fd->path, fe->size);
                }
 }
 
index e25b9d0..319d3ff 100644 (file)
@@ -282,7 +282,6 @@ static void file_data_set_collate_keys(FileData *fd)
        g_free(fd->collate_key_name);
        g_free(fd->collate_key_name_nocase);
 
-#if GTK_CHECK_VERSION(2, 8, 0)
        if (options->file_sort.natural)
                {
                fd->collate_key_name = g_utf8_collate_key_for_filename(fd->name, -1);
@@ -293,10 +292,6 @@ static void file_data_set_collate_keys(FileData *fd)
                fd->collate_key_name = g_utf8_collate_key(valid_name, -1);
                fd->collate_key_name_nocase = g_utf8_collate_key(caseless_name, -1);
                }
-#else
-       fd->collate_key_name = g_utf8_collate_key(valid_name, -1);
-       fd->collate_key_name_nocase = g_utf8_collate_key(caseless_name, -1);
-#endif
 
        g_free(valid_name);
        g_free(caseless_name);
@@ -513,7 +508,7 @@ void read_exif_time_data(FileData *file)
        if (file->exif)
                {
                gchar *tmp = exif_get_data_as_text(file->exif, "Exif.Photo.DateTimeOriginal");
-               DEBUG_2("%s set_exif_time_data: reading %p %s", get_exec_time(), file, file->path);
+               DEBUG_2("%s set_exif_time_data: reading %p %s", get_exec_time(), (void *)file, file->path);
 
                if (tmp)
                        {
@@ -551,7 +546,7 @@ void read_exif_time_digitized_data(FileData *file)
        if (file->exif)
                {
                gchar *tmp = exif_get_data_as_text(file->exif, "Exif.Photo.DateTimeDigitized");
-               DEBUG_2("%s set_exif_time_digitized_data: reading %p %s", get_exec_time(), file, file->path);
+               DEBUG_2("%s set_exif_time_digitized_data: reading %p %s", get_exec_time(), (void *)file, file->path);
 
                if (tmp)
                        {
@@ -677,7 +672,7 @@ FileData *file_data_ref(FileData *fd)
        if (fd == NULL) return NULL;
        if (fd->magick != FD_MAGICK)
 #ifdef DEBUG_FILEDATA
-               log_printf("Error: fd magick mismatch @ %s:%d  fd=%p", file, line, fd);
+               log_printf("Error: fd magick mismatch @ %s:%d  fd=%p", file, line, (void *)fd);
 #else
                log_printf("Error: fd magick mismatch fd=%p", fd);
 #endif
@@ -685,7 +680,7 @@ FileData *file_data_ref(FileData *fd)
        fd->ref++;
 
 #ifdef DEBUG_FILEDATA
-       DEBUG_2("file_data_ref fd=%p (%d): '%s' @ %s:%d", fd, fd->ref, fd->path, file, line);
+       DEBUG_2("file_data_ref fd=%p (%d): '%s' @ %s:%d", (void *)fd, fd->ref, fd->path, file, line);
 #else
        DEBUG_2("file_data_ref fd=%p (%d): '%s'", fd, fd->ref, fd->path);
 #endif
@@ -783,7 +778,7 @@ void file_data_unref(FileData *fd)
        if (fd == NULL) return;
        if (fd->magick != FD_MAGICK)
 #ifdef DEBUG_FILEDATA
-               log_printf("Error: fd magick mismatch @ %s:%d  fd=%p", file, line, fd);
+               log_printf("Error: fd magick mismatch @ %s:%d  fd=%p", file, line, (void *)fd);
 #else
                log_printf("Error: fd magick mismatch fd=%p", fd);
 #endif
@@ -791,7 +786,7 @@ void file_data_unref(FileData *fd)
 
        fd->ref--;
 #ifdef DEBUG_FILEDATA
-       DEBUG_2("file_data_unref fd=%p (%d:%d): '%s' @ %s:%d", fd, fd->ref, fd->locked, fd->path,
+       DEBUG_2("file_data_unref fd=%p (%d:%d): '%s' @ %s:%d", (void *)fd, fd->ref, fd->locked, fd->path,
                file, line);
 #else
        DEBUG_2("file_data_unref fd=%p (%d:%d): '%s'", fd, fd->ref, fd->locked, fd->path);
@@ -815,12 +810,12 @@ void file_data_unref(FileData *fd)
 void file_data_lock(FileData *fd)
 {
        if (fd == NULL) return;
-       if (fd->magick != FD_MAGICK) log_printf("Error: fd magick mismatch fd=%p", fd);
+       if (fd->magick != FD_MAGICK) log_printf("Error: fd magick mismatch fd=%p", (void *)fd);
 
        g_assert(fd->magick == FD_MAGICK);
        fd->locked = TRUE;
 
-       DEBUG_2("file_data_ref fd=%p (%d): '%s'", fd, fd->ref, fd->path);
+       DEBUG_2("file_data_ref fd=%p (%d): '%s'", (void *)fd, fd->ref, fd->path);
 }
 
 /**
@@ -833,7 +828,7 @@ void file_data_lock(FileData *fd)
 void file_data_unlock(FileData *fd)
 {
        if (fd == NULL) return;
-       if (fd->magick != FD_MAGICK) log_printf("Error: fd magick mismatch fd=%p", fd);
+       if (fd->magick != FD_MAGICK) log_printf("Error: fd magick mismatch fd=%p", (void *)fd);
 
        g_assert(fd->magick == FD_MAGICK);
        fd->locked = FALSE;
@@ -935,11 +930,11 @@ static void file_data_check_sidecars(const GList *basename_list)
                FileData *fd = work->data;
                work = work->next;
                g_assert(fd->magick == FD_MAGICK);
-               DEBUG_2("basename: %p %s", fd, fd->name);
+               DEBUG_2("basename: %p %s", (void *)fd, fd->name);
                if (fd->parent)
                        {
                        g_assert(fd->parent->magick == FD_MAGICK);
-                       DEBUG_2("                  parent: %p", fd->parent);
+                       DEBUG_2("                  parent: %p", (void *)fd->parent);
                        }
                s_work = fd->sidecar_files;
                while (s_work)
@@ -947,7 +942,7 @@ static void file_data_check_sidecars(const GList *basename_list)
                        FileData *sfd = s_work->data;
                        s_work = s_work->next;
                        g_assert(sfd->magick == FD_MAGICK);
-                       DEBUG_2("                  sidecar: %p %s", sfd, sfd->name);
+                       DEBUG_2("                  sidecar: %p %s", (void *)sfd, sfd->name);
                        }
 
                g_assert(fd->parent == NULL || fd->sidecar_files == NULL);
@@ -1289,7 +1284,7 @@ static void file_data_basename_hash_insert_cb(gpointer fd, gpointer basename_has
        file_data_basename_hash_insert((GHashTable *)basename_hash, (FileData *)fd);
 }
 
-static void file_data_basename_hash_remove_list(gpointer key, gpointer value, gpointer data)
+static void file_data_basename_hash_remove_list(gpointer UNUSED(key), gpointer value, gpointer UNUSED(data))
 {
        filelist_free((GList *)value);
 }
@@ -1326,7 +1321,7 @@ static GList *filelist_filter_out_sidecars(GList *flist)
        return flist_filtered;
 }
 
-static void file_data_basename_hash_to_sidecars(gpointer key, gpointer value, gpointer data)
+static void file_data_basename_hash_to_sidecars(gpointer UNUSED(key), gpointer value, gpointer UNUSED(data))
 {
        GList *basename_list = (GList *)value;
        file_data_check_sidecars(basename_list);
@@ -1935,7 +1930,7 @@ GList *file_data_filter_class_list(GList *list, guint filter)
        return list;
 }
 
-static void file_data_notify_mark_func(gpointer key, gpointer value, gpointer user_data)
+static void file_data_notify_mark_func(gpointer UNUSED(key), gpointer value, gpointer UNUSED(user_data))
 {
        FileData *fd = value;
        file_data_increment_version(fd);
@@ -3176,7 +3171,7 @@ gboolean file_data_register_notify_func(FileDataNotifyFunc func, gpointer data,
        nd->priority = priority;
 
        notify_func_list = g_list_insert_sorted(notify_func_list, nd, file_data_notify_sort);
-       DEBUG_2("Notify func registered: %p", nd);
+       DEBUG_2("Notify func registered: %p", (void *)nd);
 
        return TRUE;
 }
@@ -3193,7 +3188,7 @@ gboolean file_data_unregister_notify_func(FileDataNotifyFunc func, gpointer data
                        {
                        notify_func_list = g_list_delete_link(notify_func_list, work);
                        g_free(nd);
-                       DEBUG_2("Notify func unregistered: %p", nd);
+                       DEBUG_2("Notify func unregistered: %p", (void *)nd);
                        return TRUE;
                        }
                work = work->next;
@@ -3243,7 +3238,7 @@ void file_data_send_notification(FileData *fd, NotifyType type)
 static GHashTable *file_data_monitor_pool = NULL;
 static guint realtime_monitor_id = 0; /* event source id */
 
-static void realtime_monitor_check_cb(gpointer key, gpointer value, gpointer data)
+static void realtime_monitor_check_cb(gpointer key, gpointer UNUSED(value), gpointer UNUSED(data))
 {
        FileData *fd = key;
 
@@ -3252,7 +3247,7 @@ static void realtime_monitor_check_cb(gpointer key, gpointer value, gpointer dat
        DEBUG_1("monitor %s", fd->path);
 }
 
-static gboolean realtime_monitor_cb(gpointer data)
+static gboolean realtime_monitor_cb(gpointer UNUSED(data))
 {
        if (!options->update_on_time_change) return TRUE;
        g_hash_table_foreach(file_data_monitor_pool, realtime_monitor_check_cb, NULL);
@@ -3412,7 +3407,7 @@ gboolean marks_list_save(gchar *path, gboolean save)
        return (secure_close(ssi) == 0);
 }
 
-static void marks_clear(gpointer key, gpointer value, gpointer userdata)
+static void marks_clear(gpointer key, gpointer value, gpointer UNUSED(userdata))
 {
        gchar *file_name = key;
        gint mark_no;
index cc9b6d2..c6599c5 100644 (file)
@@ -528,7 +528,8 @@ gboolean format_canon_makernote(ExifData *exif, guchar *tiff, guint offset,
        return TRUE;
 }
 
-
+#else
+typedef int dummy_variable;
 #endif
 /* not HAVE_EXIV2 */
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index de4fda4..98ba8b8 100644 (file)
@@ -201,7 +201,8 @@ gboolean format_fuji_makernote(ExifData *exif, guchar *tiff, guint offset,
 
        return TRUE;
 }
-
+#else
+typedef int dummy_variable;
 #endif
 /* not HAVE_EXIV2 */
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 5e296fe..2984f14 100644 (file)
@@ -431,6 +431,8 @@ gboolean format_nikon_makernote(ExifData *exif, guchar *tiff, guint offset,
        return TRUE;
 }
 
+#else
+typedef int dummy_variable;
 #endif
 /* not HAVE_EXIV2 */
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 7ae1a0f..70b1104 100644 (file)
@@ -380,7 +380,8 @@ gboolean format_olympus_makernote(ExifData *exif, guchar *tiff, guint offset,
        return TRUE;
 }
 
-
+#else
+typedef int dummy_variable;
 #endif
 /* not HAVE_EXIV2 */
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 4ba9823..a8b5c90 100644 (file)
@@ -568,7 +568,8 @@ gboolean format_debug_tiff_raw(guchar *data, const guint len,
        return FALSE;
 }
 #endif
-
+#else
+typedef int dummy_variable;
 #endif
 /* not HAVE_EXIV2 */
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 54b2160..b9ff3c0 100644 (file)
@@ -54,7 +54,7 @@ static void clear_mouse_cursor(GtkWidget *widget, gint state)
 
                cursor = gdk_cursor_new(GDK_WATCH);
                gdk_window_set_cursor(window, cursor);
-               gdk_cursor_unref(cursor);
+               g_object_unref(G_OBJECT(cursor));
                }
        else if (state & FULLSCREEN_CURSOR_NORMAL)
                {
@@ -66,7 +66,7 @@ static void clear_mouse_cursor(GtkWidget *widget, gint state)
 
                cursor = gdk_cursor_new(GDK_BLANK_CURSOR);
                gdk_window_set_cursor(window, cursor);
-               gdk_cursor_unref(cursor);
+               g_object_unref(G_OBJECT(cursor));
                }
 }
 
@@ -99,7 +99,7 @@ static void fullscreen_hide_mouse_reset(FullScreenData *fs)
        fs->hide_mouse_id = g_timeout_add(FULL_SCREEN_HIDE_MOUSE_DELAY, fullscreen_hide_mouse_cb, fs);
 }
 
-static gboolean fullscreen_mouse_moved(GtkWidget *widget, GdkEventMotion *event, gpointer data)
+static gboolean fullscreen_mouse_moved(GtkWidget *UNUSED(widget), GdkEventMotion *UNUSED(event), gpointer data)
 {
        FullScreenData *fs = data;
 
@@ -158,7 +158,7 @@ static void fullscreen_mouse_set_busy_idle(FullScreenData *fs)
                }
 }
 
-static void fullscreen_image_update_cb(ImageWindow *imd, gpointer data)
+static void fullscreen_image_update_cb(ImageWindow *UNUSED(imd), gpointer data)
 {
        FullScreenData *fs = data;
 
@@ -169,7 +169,7 @@ static void fullscreen_image_update_cb(ImageWindow *imd, gpointer data)
                }
 }
 
-static void fullscreen_image_complete_cb(ImageWindow *imd, gboolean preload, gpointer data)
+static void fullscreen_image_complete_cb(ImageWindow *UNUSED(imd), gboolean preload, gpointer data)
 {
        FullScreenData *fs = data;
 
@@ -196,7 +196,7 @@ static void fullscreen_saver_deactivate(void)
                }
 }
 
-static gboolean fullscreen_saver_block_cb(gpointer data)
+static gboolean fullscreen_saver_block_cb(gpointer UNUSED(data))
 {
        if (options->fullscreen.disable_saver)
                {
@@ -206,7 +206,7 @@ static gboolean fullscreen_saver_block_cb(gpointer data)
        return TRUE;
 }
 
-static gboolean fullscreen_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean fullscreen_delete_cb(GtkWidget *UNUSED(widget), GdkEventAny *UNUSED(event), gpointer data)
 {
        FullScreenData *fs = data;
 
@@ -274,7 +274,7 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
                        GDK_HINT_WIN_GRAVITY | GDK_HINT_USER_POS | GDK_HINT_USER_SIZE);
 
        gtk_widget_realize(fs->window);
-#if GTK_CHECK_VERSION(3,8,0)
+
        if ((options->fullscreen.screen % 100) == 0)
                {
                GdkWindow *gdkwin;
@@ -282,7 +282,7 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
                if (gdkwin != NULL)
                        gdk_window_set_fullscreen_mode(gdkwin, GDK_FULLSCREEN_ON_ALL_MONITORS);
                }
-#endif
+
        /* make window fullscreen -- let Gtk do it's job, don't screw it in any way */
        gtk_window_fullscreen(GTK_WINDOW(fs->window));
 
@@ -643,7 +643,7 @@ static void fullscreen_prefs_selection_add(GtkListStore *store, const gchar *tex
                                         FS_MENU_COLUMN_VALUE, value, -1);
 }
 
-GtkWidget *fullscreen_prefs_selection_new(const gchar *text, gint *screen_value, gboolean *above_value)
+GtkWidget *fullscreen_prefs_selection_new(const gchar *text, gint *screen_value, gboolean *UNUSED(above_value))
 {
        GtkWidget *vbox;
        GtkWidget *hbox;
index 7ef9f76..b34d19f 100644 (file)
@@ -386,7 +386,7 @@ gboolean histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf
        return TRUE;
 }
 
-void histogram_notify_cb(FileData *fd, NotifyType type, gpointer data)
+void histogram_notify_cb(FileData *fd, NotifyType type, gpointer UNUSED(data))
 {
        if ((type & NOTIFY_REREAD) && fd->histmap)
                {
index 7c75f01..ddda396 100644 (file)
@@ -94,7 +94,7 @@ GType image_loader_get_type(void)
        return type;
 }
 
-static void image_loader_init(GTypeInstance *instance, gpointer g_class)
+static void image_loader_init(GTypeInstance *instance, gpointer UNUSED(g_class))
 {
        ImageLoader *il = (ImageLoader *)instance;
 
@@ -133,10 +133,10 @@ static void image_loader_init(GTypeInstance *instance, gpointer g_class)
        il->can_destroy_cond = g_cond_new();
 #endif
 #endif
-       DEBUG_1("new image loader %p, bufsize=%" G_GSIZE_FORMAT " idle_loop=%u", il, il->read_buffer_size, il->idle_read_loop_count);
+       DEBUG_1("new image loader %p, bufsize=%" G_GSIZE_FORMAT " idle_loop=%u", (void *)il, il->read_buffer_size, il->idle_read_loop_count);
 }
 
-static void image_loader_class_init_wrapper(void *data, void *user_data)
+static void image_loader_class_init_wrapper(void *data, void *UNUSED(user_data))
 {
        image_loader_class_init(data);
 }
@@ -213,7 +213,7 @@ static void image_loader_finalize(GObject *object)
 
        if (il->error) DEBUG_1("%s", image_loader_get_error(il));
 
-       DEBUG_1("freeing image loader %p bytes_read=%" G_GSIZE_FORMAT, il, il->bytes_read);
+       DEBUG_1("freeing image loader %p bytes_read=%" G_GSIZE_FORMAT, (void *)il, il->bytes_read);
 
        if (il->idle_done_id)
                {
@@ -484,7 +484,7 @@ static void image_loader_sync_pixbuf(ImageLoader *il)
        g_mutex_unlock(il->data_mutex);
 }
 
-static void image_loader_area_updated_cb(gpointer loader,
+static void image_loader_area_updated_cb(gpointer UNUSED(loader),
                                 guint x, guint y, guint w, guint h,
                                 gpointer data)
 {
@@ -1250,7 +1250,7 @@ static void image_loader_thread_wait_high(void)
 }
 
 
-static void image_loader_thread_run(gpointer data, gpointer user_data)
+static void image_loader_thread_run(gpointer data, gpointer UNUSED(user_data))
 {
        ImageLoader *il = data;
        gboolean cont;
index 8e0423b..0b599df 100644 (file)
@@ -740,7 +740,7 @@ static void image_osd_timer_schedule(OverlayStateData *osd)
                }
 }
 
-static void image_osd_state_cb(ImageWindow *imd, ImageState state, gpointer data)
+static void image_osd_state_cb(ImageWindow *UNUSED(imd), ImageState state, gpointer data)
 {
        OverlayStateData *osd = data;
 
@@ -786,7 +786,7 @@ static void image_osd_free(OverlayStateData *osd)
        g_free(osd);
 }
 
-static void image_osd_destroy_cb(GtkWidget *widget, gpointer data)
+static void image_osd_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        OverlayStateData *osd = data;
 
index 1326ff1..73fc550 100644 (file)
@@ -63,7 +63,7 @@ static gint rect_id = 0;
  *-------------------------------------------------------------------
  */
 
-static void image_click_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer data)
+static void image_click_cb(PixbufRenderer *UNUSED(pr), GdkEventButton *event, gpointer data)
 {
        ImageWindow *imd = data;
        if (!options->image_lm_click_nav && event->button == MOUSE_BUTTON_MIDDLE)
@@ -292,7 +292,7 @@ static void image_complete_util(ImageWindow *imd, gboolean preload)
        if (imd->func_complete) imd->func_complete(imd, preload, imd->data_complete);
 }
 
-static void image_render_complete_cb(PixbufRenderer *pr, gpointer data)
+static void image_render_complete_cb(PixbufRenderer *UNUSED(pr), gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -318,7 +318,7 @@ static void image_state_unset(ImageWindow *imd, ImageState state)
        if (imd->func_state) imd->func_state(imd, state, imd->data_state);
 }
 
-static void image_zoom_cb(PixbufRenderer *pr, gdouble zoom, gpointer data)
+static void image_zoom_cb(PixbufRenderer *UNUSED(pr), gdouble UNUSED(zoom), gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -560,7 +560,7 @@ static gboolean image_post_process_color(ImageWindow *imd, gint start_row, gbool
 }
 
 
-static void image_post_process_tile_color_cb(PixbufRenderer *pr, GdkPixbuf **pixbuf, gint x, gint y, gint w, gint h, gpointer data)
+static void image_post_process_tile_color_cb(PixbufRenderer *UNUSED(pr), GdkPixbuf **pixbuf, gint x, gint y, gint w, gint h, gpointer data)
 {
        ImageWindow *imd = (ImageWindow *)data;
        if (imd->cm) color_man_correct_region(imd->cm, *pixbuf, x, y, w, h);
@@ -726,7 +726,7 @@ static void image_read_ahead_cancel(ImageWindow *imd)
        imd->read_ahead_fd = NULL;
 }
 
-static void image_read_ahead_done_cb(ImageLoader *il, gpointer data)
+static void image_read_ahead_done_cb(ImageLoader *UNUSED(il), gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -812,7 +812,7 @@ static FileCacheData *image_get_cache(void)
        return cache;
 }
 
-static void image_cache_set(ImageWindow *imd, FileData *fd)
+static void image_cache_set(ImageWindow *UNUSED(imd), FileData *fd)
 {
        g_assert(fd->pixbuf);
 
@@ -866,7 +866,7 @@ static void image_load_area_cb(ImageLoader *il, guint x, guint y, guint w, guint
        pixbuf_renderer_area_changed(pr, x, y, w, h);
 }
 
-static void image_load_done_cb(ImageLoader *il, gpointer data)
+static void image_load_done_cb(ImageLoader *UNUSED(il), gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -929,7 +929,7 @@ static void image_load_done_cb(ImageLoader *il, gpointer data)
        image_read_ahead_start(imd);
 }
 
-static void image_load_size_cb(ImageLoader *il, guint width, guint height, gpointer data)
+static void image_load_size_cb(ImageLoader *UNUSED(il), guint width, guint height, gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -1173,7 +1173,7 @@ static void image_change_real(ImageWindow *imd, FileData *fd,
  *-------------------------------------------------------------------
  */
 
-static gboolean image_focus_in_cb(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+static gboolean image_focus_in_cb(GtkWidget *UNUSED(widget), GdkEventFocus *UNUSED(event), gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -1185,7 +1185,7 @@ static gboolean image_focus_in_cb(GtkWidget *widget, GdkEventFocus *event, gpoin
        return TRUE;
 }
 
-static gboolean image_scroll_cb(GtkWidget *widget, GdkEventScroll *event, gpointer data)
+static gboolean image_scroll_cb(GtkWidget *UNUSED(widget), GdkEventScroll *event, gpointer data)
 {
        ImageWindow *imd = data;
        gboolean in_lw = FALSE;
@@ -1495,23 +1495,23 @@ CollectionData *image_get_collection(ImageWindow *imd, CollectInfo **info)
 
 static void image_loader_sync_read_ahead_data(ImageLoader *il, gpointer old_data, gpointer data)
 {
-       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (GCallback)image_read_ahead_error_cb, old_data))
-               g_signal_connect(G_OBJECT(il), "error", (GCallback)image_read_ahead_error_cb, data);
+       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (gpointer)image_read_ahead_error_cb, old_data))
+               g_signal_connect(G_OBJECT(il), "error", G_CALLBACK(image_read_ahead_error_cb), data);
 
-       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (GCallback)image_read_ahead_done_cb, old_data))
-               g_signal_connect(G_OBJECT(il), "done", (GCallback)image_read_ahead_done_cb, data);
+       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (gpointer)image_read_ahead_done_cb, old_data))
+               g_signal_connect(G_OBJECT(il), "done", G_CALLBACK(image_read_ahead_done_cb), data);
 }
 
 static void image_loader_sync_data(ImageLoader *il, gpointer old_data, gpointer data)
 {
-       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (GCallback)image_load_area_cb, old_data))
-               g_signal_connect(G_OBJECT(il), "area_ready", (GCallback)image_load_area_cb, data);
+       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (gpointer)image_load_area_cb, old_data))
+               g_signal_connect(G_OBJECT(il), "area_ready", G_CALLBACK(image_load_area_cb), data);
 
-       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (GCallback)image_load_error_cb, old_data))
-               g_signal_connect(G_OBJECT(il), "error", (GCallback)image_load_error_cb, data);
+       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (gpointer)image_load_error_cb, old_data))
+               g_signal_connect(G_OBJECT(il), "error", G_CALLBACK(image_load_error_cb), data);
 
-       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (GCallback)image_load_done_cb, old_data))
-               g_signal_connect(G_OBJECT(il), "done", (GCallback)image_load_done_cb, data);
+       if (g_signal_handlers_disconnect_by_func(G_OBJECT(il), (gpointer)image_load_done_cb, old_data))
+               g_signal_connect(G_OBJECT(il), "done", G_CALLBACK(image_load_done_cb), data);
 }
 
 /* this is more like a move function
@@ -1800,7 +1800,7 @@ gint image_stereo_get(ImageWindow *imd)
 
 void image_stereo_set(ImageWindow *imd, gint stereo_mode)
 {
-       DEBUG_1("Setting stereo mode %04x for imd %p", stereo_mode, imd);
+       DEBUG_1("Setting stereo mode %04x for imd %p", stereo_mode, (void *)imd);
        pixbuf_renderer_stereo_set((PixbufRenderer *)imd->pr, stereo_mode);
 }
 
@@ -1888,12 +1888,10 @@ void image_background_set_color(ImageWindow *imd, GdkColor *color)
 void image_background_set_color_from_options(ImageWindow *imd, gboolean fullscreen)
 {
        GdkColor *color = NULL;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkColor theme_color;
        GdkRGBA bg_color;
        GtkStyleContext *style_context;
        LayoutWindow *lw = NULL;
-#endif
 
        if ((options->image.use_custom_border_color && !fullscreen) ||
            (options->image.use_custom_border_color_in_fullscreen && fullscreen))
@@ -1901,7 +1899,6 @@ void image_background_set_color_from_options(ImageWindow *imd, gboolean fullscre
                color = &options->image.border_color;
                }
 
-#if GTK_CHECK_VERSION(3,0,0)
        else
                {
                if (!layout_valid(&lw)) return;
@@ -1915,7 +1912,6 @@ void image_background_set_color_from_options(ImageWindow *imd, gboolean fullscre
 
                color = &theme_color;
                }
-#endif
 
        image_background_set_color(imd, color);
 }
@@ -1995,45 +1991,8 @@ void image_set_delay_flip(ImageWindow *imd, gboolean delay)
                }
 }
 
-void image_to_root_window(ImageWindow *imd, gboolean scaled)
+void image_to_root_window(ImageWindow *UNUSED(imd), gboolean UNUSED(scaled))
 {
-#if !GTK_CHECK_VERSION(3,0,0)
-       GdkScreen *screen;
-       GdkWindow *rootwindow;
-       GdkPixmap *pixmap;
-       GdkPixbuf *pixbuf;
-       GdkPixbuf *pb;
-       gint width, height;
-
-       if (!imd) return;
-
-       pixbuf = image_get_pixbuf(imd);
-       if (!pixbuf) return;
-
-       screen = gtk_widget_get_screen(imd->widget);
-       rootwindow = gdk_screen_get_root_window(screen);
-       if (gdk_window_get_visual(rootwindow) != gdk_visual_get_system()) return;
-
-       if (scaled)
-               {
-               width = gdk_screen_width();
-               height = gdk_screen_height();
-               }
-       else
-               {
-               pixbuf_renderer_get_scaled_size((PixbufRenderer *)imd->pr, &width, &height);
-               }
-
-       pb = gdk_pixbuf_scale_simple(pixbuf, width, height, (GdkInterpType)options->image.zoom_quality);
-
-       gdk_pixbuf_render_pixmap_and_mask(pb, &pixmap, NULL, 128);
-       gdk_window_set_back_pixmap(rootwindow, pixmap, FALSE);
-       gdk_window_clear(rootwindow);
-       g_object_unref(pb);
-       g_object_unref(pixmap);
-
-       gdk_flush();
-#endif
 }
 
 void image_select(ImageWindow *imd, gboolean select)
@@ -2142,13 +2101,13 @@ static void image_free(ImageWindow *imd)
        g_free(imd);
 }
 
-static void image_destroy_cb(GtkWidget *widget, gpointer data)
+static void image_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ImageWindow *imd = data;
        image_free(imd);
 }
-#if GTK_CHECK_VERSION(3,0,0)
-gboolean selectable_frame_draw_cb(GtkWidget *widget, cairo_t *cr, gpointer data)
+
+gboolean selectable_frame_draw_cb(GtkWidget *widget, cairo_t *cr, gpointer UNUSED(data))
 {
        GtkAllocation allocation;
        gtk_widget_get_allocation(widget, &allocation);
@@ -2178,40 +2137,6 @@ gboolean selectable_frame_draw_cb(GtkWidget *widget, cairo_t *cr, gpointer data)
        return FALSE;
 }
 
-#else
-gboolean selectable_frame_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
-{
-       GtkAllocation allocation;
-       gtk_widget_get_allocation(widget, &allocation);
-       gtk_paint_flat_box(gtk_widget_get_style(widget),
-                          gtk_widget_get_window(widget),
-                          gtk_widget_get_state(widget),
-                          gtk_frame_get_shadow_type(GTK_FRAME(widget)),
-                          NULL,
-                          widget,
-                          NULL,
-                          allocation.x + 3, allocation.y + 3,
-                          allocation.width - 6, allocation.height - 6);
-
-       if (gtk_widget_has_focus(widget))
-               {
-               gtk_paint_focus(gtk_widget_get_style(widget), gtk_widget_get_window(widget), GTK_STATE_ACTIVE,
-                               &event->area, widget, "image_window",
-                               allocation.x, allocation.y,
-                               allocation.width - 1, allocation.height - 1);
-               }
-       else
-               {
-               gtk_paint_shadow(gtk_widget_get_style(widget), gtk_widget_get_window(widget), GTK_STATE_NORMAL, GTK_SHADOW_IN,
-                                &event->area, widget, "image_window",
-                                allocation.x, allocation.y,
-                                allocation.width - 1, allocation.height - 1);
-               }
-       return FALSE;
-}
-#endif
-
-
 void image_set_frame(ImageWindow *imd, gboolean frame)
 {
        frame = !!frame;
@@ -2232,13 +2157,8 @@ void image_set_frame(ImageWindow *imd, gboolean frame)
                gtk_widget_set_can_focus(imd->frame, TRUE);
                gtk_widget_set_app_paintable(imd->frame, TRUE);
 
-#if GTK_CHECK_VERSION(3,0,0)
                g_signal_connect(G_OBJECT(imd->frame), "draw",
                                 G_CALLBACK(selectable_frame_draw_cb), NULL);
-#else
-               g_signal_connect(G_OBJECT(imd->frame), "expose_event",
-                                G_CALLBACK(selectable_frame_expose_cb), NULL);
-#endif
                g_signal_connect(G_OBJECT(imd->frame), "focus_in_event",
                                 G_CALLBACK(image_focus_in_cb), imd);
 
index 15a8e08..2efdcc3 100644 (file)
@@ -38,7 +38,7 @@ struct _ImageLoaderCOLLECTION {
        gboolean abort;
 };
 
-static gboolean image_loader_collection_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_collection_load(gpointer loader, const guchar *UNUSED(buf), gsize UNUSED(count), GError **UNUSED(error))
 {
        ImageLoaderCOLLECTION *ld = (ImageLoaderCOLLECTION *) loader;
        ImageLoader *il = ld->data;
@@ -137,17 +137,17 @@ static GdkPixbuf* image_loader_collection_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_collection_get_format_name(gpointer loader)
+static gchar* image_loader_collection_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("collection");
 }
-static gchar** image_loader_collection_get_format_mime_types(gpointer loader)
+static gchar** image_loader_collection_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/png", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_collection_close(gpointer loader, GError **error)
+static gboolean image_loader_collection_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index d40a75c..8383656 100644 (file)
@@ -168,7 +168,7 @@ fatal_error_handler (j_common_ptr cinfo)
 }
 
 static void
-output_message_handler (j_common_ptr cinfo)
+output_message_handler (j_common_ptr UNUSED(cinfo))
 {
   /* This method keeps libjpeg from dumping crap to stderr */
 
@@ -208,7 +208,7 @@ static void image_loader_cr3_read_scanline(struct jpeg_decompress_struct *cinfo,
 }
 
 
-static void init_source (j_decompress_ptr cinfo) {}
+static void init_source (j_decompress_ptr UNUSED(cinfo)) {}
 static boolean fill_input_buffer (j_decompress_ptr cinfo)
 {
        ERREXIT(cinfo, JERR_INPUT_EMPTY);
@@ -228,7 +228,7 @@ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
                src->bytes_in_buffer -= (size_t) num_bytes;
                }
 }
-static void term_source (j_decompress_ptr cinfo) {}
+static void term_source (j_decompress_ptr UNUSED(cinfo)) {}
 static void set_mem_src (j_decompress_ptr cinfo, void* buffer, long nbytes)
 {
        struct jpeg_source_mgr* src;
@@ -478,17 +478,17 @@ static GdkPixbuf* image_loader_cr3_get_pixbuf(gpointer loader)
        return lj->pixbuf;
 }
 
-static gchar* image_loader_cr3_get_format_name(gpointer loader)
+static gchar* image_loader_cr3_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("cr3");
 }
-static gchar** image_loader_cr3_get_format_mime_types(gpointer loader)
+static gchar** image_loader_cr3_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/x-canon-cr3", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_cr3_close(gpointer loader, GError **error)
+static gboolean image_loader_cr3_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index d927c39..ed31937 100644 (file)
@@ -41,7 +41,7 @@ struct _ImageLoaderDDS {
        gboolean abort;
 };
 
-static void free_buffer(guchar *pixels, gpointer data)
+static void free_buffer(guchar *pixels, gpointer UNUSED(data))
 {
        g_free(pixels);
 }
@@ -512,7 +512,7 @@ guchar *ddsReadX8R8G8B8(int width, int height, const unsigned char *buffer) {
        return (guchar *) pixels;
 }
 
-static gboolean image_loader_dds_load (gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_dds_load (gpointer loader, const guchar *buf, gsize UNUSED(count), GError **UNUSED(error))
 {
        ImageLoaderDDS *ld = (ImageLoaderDDS *) loader;
        int width = ddsGetWidth(buf);
@@ -568,17 +568,17 @@ static GdkPixbuf* image_loader_dds_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_dds_get_format_name(gpointer loader)
+static gchar* image_loader_dds_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("dds");
 }
-static gchar** image_loader_dds_get_format_mime_types(gpointer loader)
+static gchar** image_loader_dds_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/vnd-ms.dds", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_dds_close(gpointer loader, GError **error)
+static gboolean image_loader_dds_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index 6272681..23aabf6 100644 (file)
@@ -42,12 +42,12 @@ struct _ImageLoaderDJVU {
        gint page_total;
 };
 
-static void free_buffer(guchar *pixels, gpointer data)
+static void free_buffer(guchar *pixels, gpointer UNUSED(data))
 {
        g_free (pixels);;
 }
 
-static gboolean image_loader_djvu_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_djvu_load(gpointer loader, const guchar *buf, gsize count, GError **UNUSED(error))
 {
        ImageLoaderDJVU *ld = (ImageLoaderDJVU *) loader;
        ddjvu_context_t *ctx;
@@ -136,12 +136,12 @@ static GdkPixbuf* image_loader_djvu_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_djvu_get_format_name(gpointer loader)
+static gchar* image_loader_djvu_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("djvu");
 }
 
-static gchar** image_loader_djvu_get_format_mime_types(gpointer loader)
+static gchar** image_loader_djvu_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/vnd.djvu", NULL};
        return g_strdupv(mime);
@@ -161,7 +161,7 @@ static gint image_loader_djvu_get_page_total(gpointer loader)
        return ld->page_total;
 }
 
-static gboolean image_loader_djvu_close(gpointer loader, GError **error)
+static gboolean image_loader_djvu_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index 7eb1770..1b928b1 100644 (file)
@@ -38,7 +38,7 @@ struct _ImageLoaderExternal {
        gboolean abort;
 };
 
-static gboolean image_loader_external_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_external_load(gpointer loader, const guchar *UNUSED(buf), gsize UNUSED(count), GError **UNUSED(error))
 {
        ImageLoaderExternal *ld = (ImageLoaderExternal *) loader;
        ImageLoader *il = ld->data;
@@ -90,18 +90,18 @@ static GdkPixbuf* image_loader_external_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_external_get_format_name(gpointer loader)
+static gchar* image_loader_external_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("external");
 }
 
-static gchar** image_loader_external_get_format_mime_types(gpointer loader)
+static gchar** image_loader_external_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"application/octet-stream", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_external_close(gpointer loader, GError **error)
+static gboolean image_loader_external_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index 8e9f361..cd09ccb 100644 (file)
@@ -52,19 +52,19 @@ static void image_loader_ft_log_cb(ThumbnailerLogLevel log_level, const char* ms
 }
 #endif
 
-void image_loader_ft_destroy_image_data(guchar *pixels, gpointer data)
+void image_loader_ft_destroy_image_data(guchar *UNUSED(pixels), gpointer data)
 {
        image_data *image = (image_data *) data;
 
        video_thumbnailer_destroy_image_data (image);
 }
 
-static gchar* image_loader_ft_get_format_name(gpointer loader)
+static gchar* image_loader_ft_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("ffmpeg");
 }
 
-static gchar** image_loader_ft_get_format_mime_types(gpointer loader)
+static gchar** image_loader_ft_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"video/mp4", NULL};
        return g_strdupv(mime);}
@@ -97,7 +97,7 @@ static void image_loader_ft_set_size(gpointer loader, int width, int height)
 }
 
 // static gboolean image_loader_ft_loadfromdisk(gpointer loader, const gchar *path, GError **error)
-static gboolean image_loader_ft_load (gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_ft_load (gpointer loader, const guchar *UNUSED(buf), gsize UNUSED(count), GError **UNUSED(error))
 {
        ImageLoaderFT *lft = (ImageLoaderFT *) loader;
        ImageLoader *il = lft->data;
@@ -166,11 +166,11 @@ static GdkPixbuf* image_loader_ft_get_pixbuf(gpointer loader)
        return lft->pixbuf;
 }
 
-static void image_loader_ft_abort(gpointer loader)
+static void image_loader_ft_abort(gpointer UNUSED(loader))
 {
 }
 
-static gboolean image_loader_ft_close(gpointer loader, GError **error)
+static gboolean image_loader_ft_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index 91cc875..492ca19 100644 (file)
@@ -53,7 +53,7 @@ static gpointer image_loader_gdk_new(ImageLoaderBackendCbAreaUpdated area_update
        return (gpointer) loader;
 }
 
-static void image_loader_gdk_abort(gpointer loader)
+static void image_loader_gdk_abort(gpointer UNUSED(loader))
 {
 }
 
index 512dcfd..aef507b 100644 (file)
@@ -40,12 +40,12 @@ struct _ImageLoaderHEIF {
        gint page_total;
 };
 
-static void free_buffer(guchar *pixels, gpointer data)
+static void free_buffer(guchar *UNUSED(pixels), gpointer data)
 {
        heif_image_release((const struct heif_image*)data);
 }
 
-static gboolean image_loader_heif_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_heif_load(gpointer loader, const guchar *buf, gsize count, GError **UNUSED(error))
 {
        ImageLoaderHEIF *ld = (ImageLoaderHEIF *) loader;
        struct heif_context* ctx;
@@ -135,12 +135,12 @@ static GdkPixbuf* image_loader_heif_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_heif_get_format_name(gpointer loader)
+static gchar* image_loader_heif_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("heif");
 }
 
-static gchar** image_loader_heif_get_format_mime_types(gpointer loader)
+static gchar** image_loader_heif_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/heic", NULL};
        return g_strdupv(mime);
@@ -160,7 +160,7 @@ static gint image_loader_heif_get_page_total(gpointer loader)
        return ld->page_total;
 }
 
-static gboolean image_loader_heif_close(gpointer loader, GError **error)
+static gboolean image_loader_heif_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index 37c1b11..2ec56a3 100644 (file)
@@ -41,7 +41,7 @@ struct _ImageLoaderJ2K {
        gboolean abort;
 };
 
-static void free_buffer(guchar *pixels, gpointer data)
+static void free_buffer(guchar *pixels, gpointer UNUSED(data))
 {
        g_free (pixels);
 }
@@ -80,7 +80,7 @@ static OPJ_SIZE_T opj_write_to_buffer (void* p_buffer, OPJ_SIZE_T p_nb_bytes,
     if (0 == len)
         len = 1;
 
-    OPJ_SIZE_T dist = pcur - pbuf, n = len - dist;
+    OPJ_SIZE_T dist = (guchar *)pcur - (guchar *)pbuf, n = len - dist;
     g_assert (dist <= len);
 
     while (n < p_nb_bytes) {
@@ -100,7 +100,7 @@ static OPJ_SIZE_T opj_write_to_buffer (void* p_buffer, OPJ_SIZE_T p_nb_bytes,
         }
 
         p_source_buffer->buf = pbuf;
-        p_source_buffer->cur = pbuf + dist;
+        p_source_buffer->cur = (guchar *)pbuf + dist;
         p_source_buffer->len = len;
     }
 
@@ -167,7 +167,7 @@ opj_stream_t* OPJ_CALLCONV opj_stream_create_buffer_stream (opj_buffer_info_t* p
     return ps;
 }
 
-static gboolean image_loader_j2k_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_j2k_load(gpointer loader, const guchar *buf, gsize count, GError **UNUSED(error))
 {
        ImageLoaderJ2K *ld = (ImageLoaderJ2K *) loader;
        opj_stream_t *stream;
@@ -303,18 +303,18 @@ static GdkPixbuf* image_loader_j2k_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_j2k_get_format_name(gpointer loader)
+static gchar* image_loader_j2k_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("j2k");
 }
 
-static gchar** image_loader_j2k_get_format_mime_types(gpointer loader)
+static gchar** image_loader_j2k_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/jp2", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_j2k_close(gpointer loader, GError **error)
+static gboolean image_loader_j2k_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index 2bb27a8..8009c69 100644 (file)
@@ -171,7 +171,7 @@ fatal_error_handler (j_common_ptr cinfo)
 }
 
 static void
-output_message_handler (j_common_ptr cinfo)
+output_message_handler (j_common_ptr UNUSED(cinfo))
 {
   /* This method keeps libjpeg from dumping crap to stderr */
 
@@ -211,7 +211,7 @@ void image_loader_jpeg_read_scanline(struct jpeg_decompress_struct *cinfo, gucha
 }
 
 
-static void init_source (j_decompress_ptr cinfo) {}
+static void init_source (j_decompress_ptr UNUSED(cinfo)) {}
 static boolean fill_input_buffer (j_decompress_ptr cinfo)
 {
        ERREXIT(cinfo, JERR_INPUT_EMPTY);
@@ -231,7 +231,7 @@ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
                src->bytes_in_buffer -= (size_t) num_bytes;
                }
 }
-static void term_source (j_decompress_ptr cinfo) {}
+static void term_source (j_decompress_ptr UNUSED(cinfo)) {}
 static void set_mem_src (j_decompress_ptr cinfo, void* buffer, long nbytes)
 {
        struct jpeg_source_mgr* src;
@@ -440,17 +440,17 @@ static GdkPixbuf* image_loader_jpeg_get_pixbuf(gpointer loader)
        return lj->pixbuf;
 }
 
-static gchar* image_loader_jpeg_get_format_name(gpointer loader)
+static gchar* image_loader_jpeg_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("jpeg");
 }
-static gchar** image_loader_jpeg_get_format_mime_types(gpointer loader)
+static gchar** image_loader_jpeg_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/jpeg", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_jpeg_close(gpointer loader, GError **error)
+static gboolean image_loader_jpeg_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index bdee61f..de212c2 100644 (file)
@@ -40,7 +40,7 @@ struct _ImageLoaderPDF {
        gint page_total;
 };
 
-static gboolean image_loader_pdf_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_pdf_load(gpointer loader, const guchar *buf, gsize count, GError **UNUSED(error))
 {
        ImageLoaderPDF *ld = (ImageLoaderPDF *) loader;
        GError *poppler_error = NULL;
@@ -116,12 +116,12 @@ static GdkPixbuf* image_loader_pdf_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_pdf_get_format_name(gpointer loader)
+static gchar* image_loader_pdf_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("pdf");
 }
 
-static gchar** image_loader_pdf_get_format_mime_types(gpointer loader)
+static gchar** image_loader_pdf_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"application/pdf", NULL};
        return g_strdupv(mime);
@@ -141,7 +141,7 @@ static gint image_loader_pdf_get_page_total(gpointer loader)
        return ld->page_total;
 }
 
-static gboolean image_loader_pdf_close(gpointer loader, GError **error)
+static gboolean image_loader_pdf_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index d37b6e4..8e0ef01 100644 (file)
@@ -205,14 +205,11 @@ feed_buffer (guchar*        buffer,
 static gboolean
 skip_block (PsdContext* context, const guchar** data, guint* size)
 {
-       static guint counter;
-
        if (!context->bytes_to_skip_known) {
                context->bytes_read = 0;
                if (feed_buffer(context->buffer, &context->bytes_read, data, size, 4)) {
                        context->bytes_to_skip = read_uint32(context->buffer);
                        context->bytes_to_skip_known = TRUE;
-                       counter = 0;
                } else {
                        return FALSE;
                }
@@ -220,11 +217,9 @@ skip_block (PsdContext* context, const guchar** data, guint* size)
        if (*size < context->bytes_to_skip) {
                *data += *size;
                context->bytes_to_skip -= *size;
-               counter += *size;
                *size = 0;
                return FALSE;
        } else {
-               counter += context->bytes_to_skip;
                *size -= context->bytes_to_skip;
                *data += context->bytes_to_skip;
                return TRUE;
@@ -289,7 +284,7 @@ static void free_context(PsdContext *ctx)
        g_free(ctx);
 }
 
-static gboolean image_loader_psd_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_psd_load(gpointer loader, const guchar *buf, gsize count, GError **UNUSED(error))
 {
        ImageLoaderPSD *ld = (ImageLoaderPSD *) loader;
        PsdContext* ctx = g_new0(PsdContext, 1);
@@ -555,18 +550,18 @@ static GdkPixbuf* image_loader_psd_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_psd_get_format_name(gpointer loader)
+static gchar* image_loader_psd_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("psd");
 }
 
-static gchar** image_loader_psd_get_format_mime_types(gpointer loader)
+static gchar** image_loader_psd_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"application/psd", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_psd_close(gpointer loader, GError **error)
+static gboolean image_loader_psd_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index 39981d2..9af975b 100644 (file)
 #include "image_load_svgz.h"
 
 
-static gchar* image_loader_svgz_get_format_name(gpointer loader)
+static gchar* image_loader_svgz_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("svg");
 
 }
-static gchar** image_loader_svgz_get_format_mime_types(gpointer loader)
+static gchar** image_loader_svgz_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/svg", NULL};
        return g_strdupv(mime);
@@ -51,7 +51,7 @@ static gpointer image_loader_svgz_new(ImageLoaderBackendCbAreaUpdated area_updat
        return (gpointer) loader;
 }
 
-static void image_loader_svgz_abort(gpointer loader)
+static void image_loader_svgz_abort(gpointer UNUSED(loader))
 {
 }
 
index afc1822..9aaeb49 100644 (file)
@@ -55,7 +55,7 @@ struct _ImageLoaderTiff {
        gint page_total;
 };
 
-static void free_buffer (guchar *pixels, gpointer data)
+static void free_buffer (guchar *pixels, gpointer UNUSED(data))
 {
        g_free (pixels);
 }
@@ -74,7 +74,7 @@ tiff_load_read (thandle_t handle, tdata_t buf, tsize_t size)
 }
 
 static tsize_t
-tiff_load_write (thandle_t handle, tdata_t buf, tsize_t size)
+tiff_load_write (thandle_t UNUSED(handle), tdata_t UNUSED(buf), tsize_t UNUSED(size))
 {
        return -1;
 }
@@ -109,7 +109,7 @@ tiff_load_seek (thandle_t handle, toff_t offset, int whence)
 }
 
 static int
-tiff_load_close (thandle_t context)
+tiff_load_close (thandle_t UNUSED(context))
 {
        return 0;
 }
@@ -133,11 +133,11 @@ tiff_load_map_file (thandle_t handle, tdata_t *buf, toff_t *size)
 }
 
 static void
-tiff_load_unmap_file (thandle_t handle, tdata_t data, toff_t offset)
+tiff_load_unmap_file (thandle_t UNUSED(handle), tdata_t UNUSED(data), toff_t UNUSED(offset))
 {
 }
 
-static gboolean image_loader_tiff_load (gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_tiff_load (gpointer loader, const guchar *buf, gsize count, GError **UNUSED(error))
 {
        ImageLoaderTiff *lt = (ImageLoaderTiff *) loader;
 
@@ -353,17 +353,17 @@ static GdkPixbuf* image_loader_tiff_get_pixbuf(gpointer loader)
        return lt->pixbuf;
 }
 
-static gchar* image_loader_tiff_get_format_name(gpointer loader)
+static gchar* image_loader_tiff_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("tiff");
 }
-static gchar** image_loader_tiff_get_format_mime_types(gpointer loader)
+static gchar** image_loader_tiff_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/tiff", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_tiff_close(gpointer loader, GError **error)
+static gboolean image_loader_tiff_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index e6b614e..6e67aa0 100644 (file)
@@ -38,12 +38,12 @@ struct _ImageLoaderWEBP {
        gboolean abort;
 };
 
-static void free_buffer(guchar *pixels, gpointer data)
+static void free_buffer(guchar *pixels, gpointer UNUSED(data))
 {
        g_free(pixels);
 }
 
-static gboolean image_loader_webp_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_webp_load(gpointer loader, const guchar *buf, gsize count, GError **UNUSED(error))
 {
        ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
        guint8* data;
@@ -105,18 +105,18 @@ static GdkPixbuf* image_loader_webp_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar* image_loader_webp_get_format_name(gpointer loader)
+static gchar* image_loader_webp_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("webp");
 }
 
-static gchar** image_loader_webp_get_format_mime_types(gpointer loader)
+static gchar** image_loader_webp_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"image/webp", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_webp_close(gpointer loader, GError **error)
+static gboolean image_loader_webp_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index 59e6e77..b012f5c 100644 (file)
@@ -57,12 +57,12 @@ const guchar palette[2][8][3] = {
        }
 };
 
-static void free_buffer(guchar *pixels, gpointer data)
+static void free_buffer(guchar *pixels, gpointer UNUSED(data))
 {
        g_free(pixels);
 }
 
-static gboolean image_loader_zxscr_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+static gboolean image_loader_zxscr_load(gpointer loader, const guchar *buf, gsize count, GError **UNUSED(error))
 {
        ImageLoaderZXSCR *ld = (ImageLoaderZXSCR *) loader;
        guint8 *pixels;
@@ -167,18 +167,18 @@ static GdkPixbuf *image_loader_zxscr_get_pixbuf(gpointer loader)
        return ld->pixbuf;
 }
 
-static gchar *image_loader_zxscr_get_format_name(gpointer loader)
+static gchar *image_loader_zxscr_get_format_name(gpointer UNUSED(loader))
 {
        return g_strdup("zxscr");
 }
 
-static gchar **image_loader_zxscr_get_format_mime_types(gpointer loader)
+static gchar **image_loader_zxscr_get_format_mime_types(gpointer UNUSED(loader))
 {
        static gchar *mime[] = {"application/octet-stream", NULL};
        return g_strdupv(mime);
 }
 
-static gboolean image_loader_zxscr_close(gpointer loader, GError **error)
+static gboolean image_loader_zxscr_close(gpointer UNUSED(loader), GError **UNUSED(error))
 {
        return TRUE;
 }
index b5f3bd5..dc564fc 100644 (file)
@@ -386,7 +386,7 @@ static void view_step_to_end(ViewWindow *vw, gboolean last)
  *-----------------------------------------------------------------------------
  */
 
-static void view_window_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void view_window_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -396,7 +396,7 @@ static void view_window_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *p
        popup_menu_position_clamp(menu, x, y, 0);
 }
 
-static gboolean view_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean view_window_key_press_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -753,7 +753,7 @@ static void view_image_set_buttons(ViewWindow *vw, ImageWindow *imd)
        image_set_scroll_func(imd, scroll_cb, vw);
 }
 
-static void view_fullscreen_stop_func(FullScreenData *fs, gpointer data)
+static void view_fullscreen_stop_func(FullScreenData *UNUSED(fs), gpointer data)
 {
        ViewWindow *vw = data;
 
@@ -810,7 +810,7 @@ static void view_slideshow_prev(ViewWindow *vw)
        if (vw->ss) slideshow_prev(vw->ss);
 }
 
-static void view_slideshow_stop_func(SlideShowData *fs, gpointer data)
+static void view_slideshow_stop_func(SlideShowData *UNUSED(fs), gpointer data)
 {
        ViewWindow *vw = data;
        GList *work;
@@ -867,7 +867,7 @@ static void view_slideshow_stop(ViewWindow *vw)
        if (vw->ss) slideshow_free(vw->ss);
 }
 
-static void view_window_destroy_cb(GtkWidget *widget, gpointer data)
+static void view_window_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
@@ -890,7 +890,7 @@ static void view_window_close(ViewWindow *vw)
        gtk_widget_destroy(vw->window);
 }
 
-static gboolean view_window_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
+static gboolean view_window_delete_cb(GtkWidget *UNUSED(w), GdkEventAny *UNUSED(event), gpointer data)
 {
        ViewWindow *vw = data;
 
@@ -995,10 +995,6 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat
        req_size.height = h;
        gtk_widget_size_allocate(GTK_WIDGET(vw->window), &req_size);
 
-#if !GTK_CHECK_VERSION(3,0,0)
-       gtk_widget_set_size_request(vw->imd->pr, w, h);
-#endif
-
        gtk_window_set_focus_on_map(GTK_WINDOW(vw->window), FALSE);
        gtk_widget_show(vw->window);
 
@@ -1017,7 +1013,7 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat
        return vw;
 }
 
-static void view_window_collection_unref_cb(GtkWidget *widget, gpointer data)
+static void view_window_collection_unref_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        CollectionData *cd = data;
 
@@ -1140,7 +1136,7 @@ gboolean view_window_find_image(ImageWindow *imd, gint *index, gint *total)
  *-----------------------------------------------------------------------------
  */
 
-static void view_new_window_cb(GtkWidget *widget, gpointer data)
+static void view_new_window_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        CollectionData *cd;
@@ -1188,46 +1184,35 @@ static void view_alter_cb(GtkWidget *widget, gpointer data)
        image_alter_orientation(vw->imd, vw->imd->image_fd, type);
 }
 
-#if !GTK_CHECK_VERSION(3,0,0)
-static void view_wallpaper_cb(GtkWidget *widget, gpointer data)
-{
-       ViewWindow *vw = data;
-       ImageWindow *imd;
-
-       imd = view_window_active_image(vw);
-       image_to_root_window(imd, (image_zoom_get(imd) == 0.0));
-}
-#endif
-
-static void view_zoom_in_cb(GtkWidget *widget, gpointer data)
+static void view_zoom_in_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
        image_zoom_adjust(view_window_active_image(vw), get_zoom_increment());
 }
 
-static void view_zoom_out_cb(GtkWidget *widget, gpointer data)
+static void view_zoom_out_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
        image_zoom_adjust(view_window_active_image(vw), -get_zoom_increment());
 }
 
-static void view_zoom_1_1_cb(GtkWidget *widget, gpointer data)
+static void view_zoom_1_1_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
        image_zoom_set(view_window_active_image(vw), 1.0);
 }
 
-static void view_zoom_fit_cb(GtkWidget *widget, gpointer data)
+static void view_zoom_fit_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
        image_zoom_set(view_window_active_image(vw), 0.0);
 }
 
-static void view_copy_cb(GtkWidget *widget, gpointer data)
+static void view_copy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -1236,7 +1221,7 @@ static void view_copy_cb(GtkWidget *widget, gpointer data)
        file_util_copy(image_get_fd(imd), NULL, NULL, imd->widget);
 }
 
-static void view_move_cb(GtkWidget *widget, gpointer data)
+static void view_move_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -1245,7 +1230,7 @@ static void view_move_cb(GtkWidget *widget, gpointer data)
        file_util_move(image_get_fd(imd), NULL, NULL, imd->widget);
 }
 
-static void view_rename_cb(GtkWidget *widget, gpointer data)
+static void view_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -1254,7 +1239,7 @@ static void view_rename_cb(GtkWidget *widget, gpointer data)
        file_util_rename(image_get_fd(imd), NULL, imd->widget);
 }
 
-static void view_delete_cb(GtkWidget *widget, gpointer data)
+static void view_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -1264,7 +1249,7 @@ static void view_delete_cb(GtkWidget *widget, gpointer data)
        file_util_delete(image_get_fd(imd), NULL, imd->widget);
 }
 
-static void view_move_to_trash_cb(GtkWidget *widget, gpointer data)
+static void view_move_to_trash_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -1274,7 +1259,7 @@ static void view_move_to_trash_cb(GtkWidget *widget, gpointer data)
        file_util_delete(image_get_fd(imd), NULL, imd->widget);
 }
 
-static void view_copy_path_cb(GtkWidget *widget, gpointer data)
+static void view_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -1283,7 +1268,7 @@ static void view_copy_path_cb(GtkWidget *widget, gpointer data)
        file_util_copy_path_to_clipboard(image_get_fd(imd), TRUE);
 }
 
-static void view_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
+static void view_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        ImageWindow *imd;
@@ -1292,35 +1277,35 @@ static void view_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
        file_util_copy_path_to_clipboard(image_get_fd(imd), FALSE);
 }
 
-static void view_fullscreen_cb(GtkWidget *widget, gpointer data)
+static void view_fullscreen_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
        view_fullscreen_toggle(vw, FALSE);
 }
 
-static void view_slideshow_start_cb(GtkWidget *widget, gpointer data)
+static void view_slideshow_start_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
        view_slideshow_start(vw);
 }
 
-static void view_slideshow_stop_cb(GtkWidget *widget, gpointer data)
+static void view_slideshow_stop_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
        view_slideshow_stop(vw);
 }
 
-static void view_slideshow_pause_cb(GtkWidget *widget, gpointer data)
+static void view_slideshow_pause_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
        slideshow_pause_toggle(vw->ss);
 }
 
-static void view_close_cb(GtkWidget *widget, gpointer data)
+static void view_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
 
@@ -1338,7 +1323,7 @@ static LayoutWindow *view_new_layout_with_fd(FileData *fd)
 }
 
 
-static void view_set_layout_path_cb(GtkWidget *widget, gpointer data)
+static void view_set_layout_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewWindow *vw = data;
        LayoutWindow *lw;
@@ -1356,7 +1341,7 @@ static void view_set_layout_path_cb(GtkWidget *widget, gpointer data)
        view_window_close(vw);
 }
 
-static void view_popup_menu_destroy_cb(GtkWidget *widget, gpointer data)
+static void view_popup_menu_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GList *editmenu_fd_list = data;
 
@@ -1426,9 +1411,7 @@ static GtkWidget *view_popup_menu(ViewWindow *vw)
                         G_CALLBACK(view_popup_menu_destroy_cb), editmenu_fd_list);
        item = submenu_add_edit(menu, NULL, G_CALLBACK(view_edit_cb), vw, editmenu_fd_list);
        menu_item_add_divider(item);
-#if !GTK_CHECK_VERSION(3,0,0)
-       menu_item_add(item, _("Set as _wallpaper"), G_CALLBACK(view_wallpaper_cb), vw);
-#endif
+
        submenu_add_alter(menu, G_CALLBACK(view_alter_cb), vw);
 
        menu_item_add_stock(menu, _("View in _new window"), GTK_STOCK_NEW, G_CALLBACK(view_new_window_cb), vw);
@@ -1506,7 +1489,7 @@ typedef struct {
        GList *list;
 } CViewConfirmD;
 
-static void view_dir_list_cancel(GtkWidget *widget, gpointer data)
+static void view_dir_list_cancel(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        /* do nothing */
 }
@@ -1570,25 +1553,25 @@ static void view_dir_list_do(ViewWindow *vw, GList *list, gboolean skip, gboolea
                }
 }
 
-static void view_dir_list_add(GtkWidget *widget, gpointer data)
+static void view_dir_list_add(GtkWidget *UNUSED(widget), gpointer data)
 {
        CViewConfirmD *d = data;
        view_dir_list_do(d->vw, d->list, FALSE, FALSE);
 }
 
-static void view_dir_list_recurse(GtkWidget *widget, gpointer data)
+static void view_dir_list_recurse(GtkWidget *UNUSED(widget), gpointer data)
 {
        CViewConfirmD *d = data;
        view_dir_list_do(d->vw, d->list, FALSE, TRUE);
 }
 
-static void view_dir_list_skip(GtkWidget *widget, gpointer data)
+static void view_dir_list_skip(GtkWidget *UNUSED(widget), gpointer data)
 {
        CViewConfirmD *d = data;
        view_dir_list_do(d->vw, d->list, TRUE, FALSE);
 }
 
-static void view_dir_list_destroy(GtkWidget *widget, gpointer data)
+static void view_dir_list_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        CViewConfirmD *d = data;
        filelist_free(d->list);
@@ -1625,8 +1608,8 @@ static GtkWidget *view_confirm_dir_list(ViewWindow *vw, GList *list)
  *-----------------------------------------------------------------------------
  */
 
-static void view_window_get_dnd_data(GtkWidget *widget, GdkDragContext *context,
-                                    gint x, gint y,
+static void view_window_get_dnd_data(GtkWidget *UNUSED(widget), GdkDragContext *context,
+                                    gint UNUSED(x), gint UNUSED(y),
                                     GtkSelectionData *selection_data, guint info,
                                     guint time, gpointer data)
 {
@@ -1705,9 +1688,9 @@ static void view_window_get_dnd_data(GtkWidget *widget, GdkDragContext *context,
                }
 }
 
-static void view_window_set_dnd_data(GtkWidget *widget, GdkDragContext *context,
-                                    GtkSelectionData *selection_data, guint info,
-                                    guint time, gpointer data)
+static void view_window_set_dnd_data(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
+                                    GtkSelectionData *selection_data, guint UNUSED(info),
+                                    guint UNUSED(time), gpointer data)
 {
        ViewWindow *vw = data;
        FileData *fd;
index 7340e73..02dd437 100644 (file)
@@ -264,7 +264,7 @@ static gint mpo_parse_Index_IFD_entry(const guchar *tiff, guint offset,
 }
 
 static gint mpo_parse_Attributes_IFD_entry(const guchar *tiff, guint offset,
-                                guint size, TiffByteOrder bo,
+                                guint UNUSED(size), TiffByteOrder bo,
                                 gpointer data)
 {
        guint tag;
index c411d9a..dc0482b 100644 (file)
 #include "bar_sort.h"
 #include "preferences.h"
 #include "shortcuts.h"
-#ifdef HAVE_LIRC
-#include "lirc.h"
-#endif
 #ifdef GDK_WINDOWING_X11
-#if GTK_CHECK_VERSION(3,10,0)
 #include <gdk/gdkx.h>
 #endif
-#endif
 
 #define MAINWINDOW_DEF_WIDTH 700
 #define MAINWINDOW_DEF_HEIGHT 500
@@ -194,14 +189,14 @@ static void layout_set_unique_id(LayoutWindow *lw)
                }
 }
 
-static gboolean layout_set_current_cb(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+static gboolean layout_set_current_cb(GtkWidget *UNUSED(widget), GdkEventFocus *UNUSED(event), gpointer data)
 {
        LayoutWindow *lw = data;
        current_lw = lw;
        return FALSE;
 }
 
-static void layout_box_folders_changed_cb(GtkWidget *widget, gpointer data)
+static void layout_box_folders_changed_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        LayoutWindow *lw;
        GList *work;
@@ -289,14 +284,14 @@ static void layout_path_entry_cb(const gchar *path, gpointer data)
        g_free(buf);
 }
 
-static void layout_vd_select_cb(ViewDir *vd, FileData *fd, gpointer data)
+static void layout_vd_select_cb(ViewDir *UNUSED(vd), FileData *fd, gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_set_fd(lw, fd);
 }
 
-static void layout_path_entry_tab_append_cb(const gchar *path, gpointer data, gint n)
+static void layout_path_entry_tab_append_cb(const gchar *UNUSED(path), gpointer data, gint n)
 {
        LayoutWindow *lw = data;
 
@@ -307,7 +302,7 @@ static void layout_path_entry_tab_append_cb(const gchar *path, gpointer data, gi
        gtk_widget_set_sensitive(lw->back_button, (n > 1));
 }
 
-static gboolean path_entry_tooltip_cb(GtkWidget *widget, gpointer data)
+static gboolean path_entry_tooltip_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        GList *box_child_list;
        GtkComboBox *path_entry;
@@ -335,7 +330,7 @@ static GtkWidget *layout_tool_setup(LayoutWindow *lw)
        GtkWidget *toolbar;
        GtkWidget *scroll_window;
 
-       box = gtk_vbox_new(FALSE, 0);
+       box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
 
        if (!options->expand_menu_toolbar)
                {
@@ -344,7 +339,7 @@ static GtkWidget *layout_tool_setup(LayoutWindow *lw)
                toolbar = layout_actions_toolbar(lw, TOOLBAR_MAIN);
                scroll_window = gtk_scrolled_window_new(NULL, NULL);
                gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_window), GTK_POLICY_AUTOMATIC,GTK_POLICY_NEVER);
-               gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroll_window), menu_bar);
+               gtk_container_add(GTK_CONTAINER(scroll_window), menu_bar);
 
                gtk_widget_show(scroll_window);
                gtk_widget_show(menu_bar);
@@ -372,13 +367,8 @@ static GtkWidget *layout_tool_setup(LayoutWindow *lw)
        gtk_widget_set_has_tooltip(GTK_WIDGET(tabcomp), TRUE);
        g_signal_connect(G_OBJECT(tabcomp), "query_tooltip", G_CALLBACK(path_entry_tooltip_cb), lw);
 
-#if GTK_CHECK_VERSION(3,20,0)
        g_signal_connect(G_OBJECT(gtk_widget_get_parent(gtk_widget_get_parent(lw->path_entry))), "changed",
                         G_CALLBACK(layout_path_entry_changed_cb), lw);
-#else
-       g_signal_connect(G_OBJECT(gtk_widget_get_parent(lw->path_entry)), "changed",
-                        G_CALLBACK(layout_path_entry_changed_cb), lw);
-#endif
 
        box_folders = GTK_WIDGET(gtk_hpaned_new());
        DEBUG_NAME(box_folders);
@@ -433,20 +423,20 @@ static void layout_sort_menu_cb(GtkWidget *widget, gpointer data)
        layout_sort_set(lw, type, lw->sort_ascend);
 }
 
-static void layout_sort_menu_ascend_cb(GtkWidget *widget, gpointer data)
+static void layout_sort_menu_ascend_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_sort_set(lw, lw->sort_method, !lw->sort_ascend);
 }
 
-static void layout_sort_menu_hide_cb(GtkWidget *widget, gpointer data)
+static void layout_sort_menu_hide_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        /* destroy the menu */
        g_object_unref(widget);
 }
 
-static void layout_sort_button_press_cb(GtkWidget *widget, gpointer data)
+static void layout_sort_button_press_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        GtkWidget *menu;
@@ -533,13 +523,13 @@ static void layout_scroll_menu_cb(GtkWidget *widget, gpointer data)
        image_options_sync();
 }
 
-static void layout_zoom_menu_hide_cb(GtkWidget *widget, gpointer data)
+static void layout_zoom_menu_hide_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        /* destroy the menu */
        g_object_unref(widget);
 }
 
-static void layout_zoom_button_press_cb(GtkWidget *widget, gpointer data)
+static void layout_zoom_button_press_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        GtkWidget *menu;
@@ -594,7 +584,7 @@ static void layout_zoom_button_press_cb(GtkWidget *widget, gpointer data)
        gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, etime);
 }
 
-static GtkWidget *layout_zoom_button(LayoutWindow *lw, GtkWidget *box, gint size, gboolean expand)
+static GtkWidget *layout_zoom_button(LayoutWindow *lw, GtkWidget *box, gint size, gboolean UNUSED(expand))
 {
        GtkWidget *button;
        GtkWidget *frame;
@@ -865,12 +855,12 @@ static void layout_status_setup(LayoutWindow *lw, GtkWidget *box, gboolean small
 
        if (small_format)
                {
-               lw->info_box = gtk_vbox_new(FALSE, 0);
+               lw->info_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
                DEBUG_NAME(lw->info_box);
                }
        else
                {
-               lw->info_box = gtk_hbox_new(FALSE, 0);
+               lw->info_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
                DEBUG_NAME(lw->info_box);
                }
        gtk_box_pack_end(GTK_BOX(box), lw->info_box, FALSE, FALSE, 0);
@@ -878,7 +868,7 @@ static void layout_status_setup(LayoutWindow *lw, GtkWidget *box, gboolean small
 
        if (small_format)
                {
-               hbox = gtk_hbox_new(FALSE, 0);
+               hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
                DEBUG_NAME(hbox);
                gtk_box_pack_start(GTK_BOX(lw->info_box), hbox, FALSE, FALSE, 0);
                gtk_widget_show(hbox);
@@ -890,10 +880,10 @@ static void layout_status_setup(LayoutWindow *lw, GtkWidget *box, gboolean small
        lw->info_progress_bar = gtk_progress_bar_new();
        DEBUG_NAME(lw->info_progress_bar);
        gtk_widget_set_size_request(lw->info_progress_bar, PROGRESS_WIDTH, -1);
-#if GTK_CHECK_VERSION(3,0,0)
+
        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(lw->info_progress_bar), "");
        gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(lw->info_progress_bar), TRUE);
-#endif
+
        gtk_box_pack_start(GTK_BOX(hbox), lw->info_progress_bar, FALSE, FALSE, 0);
        gtk_widget_show(lw->info_progress_bar);
 
@@ -907,7 +897,7 @@ static void layout_status_setup(LayoutWindow *lw, GtkWidget *box, gboolean small
 
        if (small_format)
                {
-               hbox = gtk_hbox_new(FALSE, 0);
+               hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
                DEBUG_NAME(hbox);
                gtk_box_pack_start(GTK_BOX(lw->info_box), hbox, FALSE, FALSE, 0);
                gtk_widget_show(hbox);
@@ -930,7 +920,7 @@ static void layout_status_setup(LayoutWindow *lw, GtkWidget *box, gboolean small
 
        if (small_format)
                {
-               hbox = gtk_hbox_new(FALSE, 0);
+               hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
                DEBUG_NAME(hbox);
                gtk_box_pack_start(GTK_BOX(lw->info_box), hbox, FALSE, FALSE, 0);
                gtk_widget_show(hbox);
@@ -953,14 +943,14 @@ static GtkWidget *layout_tools_new(LayoutWindow *lw)
        return lw->dir_view;
 }
 
-static void layout_list_status_cb(ViewFile *vf, gpointer data)
+static void layout_list_status_cb(ViewFile *UNUSED(vf), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_status_update_info(lw, NULL);
 }
 
-static void layout_list_thumb_cb(ViewFile *vf, gdouble val, const gchar *text, gpointer data)
+static void layout_list_thumb_cb(ViewFile *UNUSED(vf), gdouble val, const gchar *text, gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -998,7 +988,7 @@ static void layout_list_sync_marks(LayoutWindow *lw)
        if (lw->vf) vf_marks_set(lw->vf, lw->options.show_marks);
 }
 
-static void layout_list_scroll_to_subpart(LayoutWindow *lw, const gchar *needle)
+static void layout_list_scroll_to_subpart(LayoutWindow *lw, const gchar *UNUSED(needle))
 {
        if (!lw) return;
 }
@@ -1605,7 +1595,7 @@ static void layout_tools_hide(LayoutWindow *lw, gboolean hide)
        lw->options.tools_hidden = hide;
 }
 
-static gboolean layout_tools_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean layout_tools_delete_cb(GtkWidget *UNUSED(widget), GdkEventAny *UNUSED(event), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1670,7 +1660,7 @@ static void layout_tools_setup(LayoutWindow *lw, GtkWidget *tools, GtkWidget *fi
 
        layout_actions_add_window(lw, lw->tools);
 
-       vbox = gtk_vbox_new(FALSE, 0);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        DEBUG_NAME(vbox);
        gtk_container_add(GTK_CONTAINER(lw->tools), vbox);
        if (options->expand_menu_toolbar) gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(lw->menu_tool_bar), FALSE, FALSE, 0);
@@ -1824,7 +1814,7 @@ static void layout_grid_setup(LayoutWindow *lw)
 
        layout_actions_setup(lw);
 
-       lw->group_box = gtk_vbox_new(FALSE, 0);
+       lw->group_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        DEBUG_NAME(lw->group_box);
        if (options->expand_menu_toolbar)
                {
@@ -2200,7 +2190,7 @@ struct _LayoutConfig
 
 static gint layout_config_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data);
 
-static void layout_config_close_cb(GtkWidget *widget, gpointer data)
+static void layout_config_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutConfig *lc = data;
 
@@ -2209,13 +2199,13 @@ static void layout_config_close_cb(GtkWidget *widget, gpointer data)
        g_free(lc);
 }
 
-static gint layout_config_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
+static gint layout_config_delete_cb(GtkWidget *w, GdkEventAny *UNUSED(event), gpointer data)
 {
        layout_config_close_cb(w, data);
        return TRUE;
 }
 
-static void layout_config_apply_cb(GtkWidget *widget, gpointer data)
+static void layout_config_apply_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutConfig *lc = data;
 
@@ -2227,7 +2217,7 @@ static void layout_config_apply_cb(GtkWidget *widget, gpointer data)
        layout_apply_options(lc->lw, &lc->options);
 }
 
-static void layout_config_help_cb(GtkWidget *widget, gpointer data)
+static void layout_config_help_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        help_window_show("GuideOptionsLayout.html");
 }
@@ -2239,7 +2229,7 @@ static void layout_config_ok_cb(GtkWidget *widget, gpointer data)
        layout_config_close_cb(widget, lc);
 }
 
-static void home_path_set_current_cb(GtkWidget *widget, gpointer data)
+static void home_path_set_current_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutConfig *lc = data;
        gtk_entry_set_text(GTK_ENTRY(lc->home_path_entry), layout_get_path(lc->lw));
@@ -2312,7 +2302,7 @@ void layout_show_config_window(LayoutWindow *lw)
        gtk_window_set_resizable(GTK_WINDOW(lc->configwindow), TRUE);
        gtk_container_set_border_width(GTK_CONTAINER(lc->configwindow), PREF_PAD_BORDER);
 
-       win_vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE);
+       win_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
        DEBUG_NAME(win_vbox);
        gtk_container_add(GTK_CONTAINER(lc->configwindow), win_vbox);
        gtk_widget_show(win_vbox);
@@ -2364,7 +2354,7 @@ void layout_show_config_window(LayoutWindow *lw)
        frame = pref_frame_new(win_vbox, TRUE, NULL, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        DEBUG_NAME(frame);
 
-       vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
        DEBUG_NAME(vbox);
        gtk_container_add(GTK_CONTAINER(frame), vbox);
        gtk_widget_show(vbox);
@@ -2419,9 +2409,7 @@ void layout_sync_options_with_current_state(LayoutWindow *lw)
 {
        Histogram *histogram;
 #ifdef GDK_WINDOWING_X11
-#if GTK_CHECK_VERSION(3,10,0)
        GdkWindow *window;
-#endif
 #endif
 
        if (!layout_valid(&lw)) return;
@@ -2453,7 +2441,6 @@ void layout_sync_options_with_current_state(LayoutWindow *lw)
                                         &lw->options.log_window.w, &lw->options.log_window.h);
 
 #ifdef GDK_WINDOWING_X11
-#if GTK_CHECK_VERSION(3,10,0)
        GdkDisplay *display;
 
        if (options->save_window_workspace)
@@ -2466,7 +2453,6 @@ void layout_sync_options_with_current_state(LayoutWindow *lw)
                        lw->options.workspace = gdk_x11_window_get_desktop(window);
                        }
                }
-#endif
 #endif
        return;
 }
@@ -2553,7 +2539,7 @@ void layout_free(LayoutWindow *lw)
        g_free(lw);
 }
 
-static gboolean layout_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean layout_delete_cb(GtkWidget *UNUSED(widget), GdkEventAny *UNUSED(event), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -2574,7 +2560,6 @@ gboolean release_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
 static gboolean move_window_to_workspace_cb(gpointer data)
 {
 #ifdef GDK_WINDOWING_X11
-#if GTK_CHECK_VERSION(3,10,0)
        LayoutWindow *lw = data;
        GdkWindow *window;
        GdkDisplay *display;
@@ -2592,7 +2577,6 @@ static gboolean move_window_to_workspace_cb(gpointer data)
                                }
                        }
                }
-#endif
 #endif
        return FALSE;
 }
@@ -2694,11 +2678,7 @@ LayoutWindow *layout_new_with_geometry(FileData *dir_fd, LayoutOptions *lop,
 
        layout_keyboard_init(lw, lw->window);
 
-#ifdef HAVE_LIRC
-       layout_image_lirc_init(lw);
-#endif
-
-       lw->main_box = gtk_vbox_new(FALSE, 0);
+       lw->main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        DEBUG_NAME(lw->main_box);
        gtk_container_add(GTK_CONTAINER(lw->window), lw->main_box);
        gtk_widget_show(lw->main_box);
index 77185c1..609b842 100644 (file)
@@ -67,7 +67,7 @@ static gint layout_config_style_count = sizeof(layout_config_styles) / sizeof(La
 static gchar *layout_titles[] = { N_("Tools"), N_("Files"), N_("Image") };
 
 
-static void layout_config_destroy(GtkWidget *widget, gpointer data)
+static void layout_config_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutConfig * lc = data;
 
@@ -273,8 +273,8 @@ static GtkWidget *layout_config_widget(GtkWidget *group, GtkWidget *box, gint st
        return group;
 }
 
-static void layout_config_number_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
-                                   GtkTreeModel *store, GtkTreeIter *iter, gpointer data)
+static void layout_config_number_cb(GtkTreeViewColumn *UNUSED(tree_column), GtkCellRenderer *cell,
+                                   GtkTreeModel *store, GtkTreeIter *iter, gpointer UNUSED(data))
 {
        GtkTreePath *tpath;
        gint *indices;
@@ -301,13 +301,13 @@ GtkWidget *layout_config_new(void)
 
        lc = g_new0(LayoutConfig, 1);
 
-       lc->box = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       lc->box = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        g_object_set_data(G_OBJECT(lc->box), "layout_config", lc);
 
        g_signal_connect(G_OBJECT(lc->box), "destroy",
                         G_CALLBACK(layout_config_destroy), lc);
 
-       hbox = gtk_hbox_new(TRUE, PREF_PAD_SPACE);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        gtk_box_pack_start(GTK_BOX(lc->box), hbox, FALSE, FALSE, 0);
        for (i = 0; i < layout_config_style_count; i++)
                {
index 9c38f1f..163df6c 100644 (file)
@@ -158,7 +158,7 @@ static void layout_image_slideshow_prev(LayoutWindow *lw)
        if (lw->slideshow) slideshow_prev(lw->slideshow);
 }
 
-static void layout_image_slideshow_stop_func(SlideShowData *ss, gpointer data)
+static void layout_image_slideshow_stop_func(SlideShowData *UNUSED(ss), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -374,7 +374,7 @@ static void layout_image_animate_update_image(LayoutWindow *lw)
 }
 
 
-static void animation_async_ready_cb(GObject *source_object, GAsyncResult *res, gpointer data)
+static void animation_async_ready_cb(GObject *UNUSED(source_object), GAsyncResult *res, gpointer data)
 {
        GError *error = NULL;
        AnimationData *animation = data;
@@ -475,27 +475,27 @@ void layout_image_animate_toggle(LayoutWindow *lw)
  *----------------------------------------------------------------------------
  */
 
-static void li_pop_menu_zoom_in_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_zoom_in_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_adjust(lw, get_zoom_increment(), FALSE);
 }
 
-static void li_pop_menu_zoom_out_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_zoom_out_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        layout_image_zoom_adjust(lw, -get_zoom_increment(), FALSE);
 }
 
-static void li_pop_menu_zoom_1_1_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_zoom_1_1_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 1.0, FALSE);
 }
 
-static void li_pop_menu_zoom_fit_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_zoom_fit_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -516,15 +516,6 @@ static void li_pop_menu_edit_cb(GtkWidget *widget, gpointer data)
        file_util_start_editor_from_file(key, layout_image_get_fd(lw), lw->window);
 }
 
-#if !GTK_CHECK_VERSION(3,0,0)
-static void li_pop_menu_wallpaper_cb(GtkWidget *widget, gpointer data)
-{
-       LayoutWindow *lw = data;
-
-       layout_image_to_root(lw);
-}
-#endif
-
 static void li_pop_menu_alter_cb(GtkWidget *widget, gpointer data)
 {
        LayoutWindow *lw = data;
@@ -536,7 +527,7 @@ static void li_pop_menu_alter_cb(GtkWidget *widget, gpointer data)
        image_alter_orientation(lw->image, lw->image->image_fd, type);
 }
 
-static void li_pop_menu_new_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_new_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -569,21 +560,21 @@ static void li_pop_menu_copy_cb(GtkWidget *widget, gpointer data)
                       li_pop_menu_click_parent(widget, lw));
 }
 
-static void li_pop_menu_copy_path_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_util_copy_path_to_clipboard(layout_image_get_fd(lw), TRUE);
 }
 
-static void li_pop_menu_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_util_copy_path_to_clipboard(layout_image_get_fd(lw), FALSE);
 }
 
-static void li_pop_menu_copy_image_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_copy_image_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        ImageWindow *imd = lw->image;
@@ -628,49 +619,49 @@ static void li_pop_menu_move_to_trash_cb(GtkWidget *widget, gpointer data)
                         li_pop_menu_click_parent(widget, lw));
 }
 
-static void li_pop_menu_slide_start_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_slide_start_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_slideshow_start(lw);
 }
 
-static void li_pop_menu_slide_stop_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_slide_stop_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_slideshow_stop(lw);
 }
 
-static void li_pop_menu_slide_pause_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_slide_pause_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_slideshow_pause_toggle(lw);
 }
 
-static void li_pop_menu_full_screen_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_full_screen_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_full_screen_toggle(lw);
 }
 
-static void li_pop_menu_animate_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_animate_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_animate_toggle(lw);
 }
 
-static void li_pop_menu_hide_cb(GtkWidget *widget, gpointer data)
+static void li_pop_menu_hide_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_tools_hide_toggle(lw);
 }
 
-static void li_set_layout_path_cb(GtkWidget *widget, gpointer data)
+static void li_set_layout_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        FileData *fd;
@@ -681,7 +672,7 @@ static void li_set_layout_path_cb(GtkWidget *widget, gpointer data)
        if (fd) layout_set_fd(lw, fd);
 }
 
-static void li_open_archive_cb(GtkWidget *widget, gpointer data)
+static void li_open_archive_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        LayoutWindow *lw_new;
@@ -715,7 +706,7 @@ static gboolean li_check_if_current_path(LayoutWindow *lw, const gchar *path)
        return ret;
 }
 
-static void layout_image_popup_menu_destroy_cb(GtkWidget *widget, gpointer data)
+static void layout_image_popup_menu_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GList *editmenu_fd_list = data;
 
@@ -791,9 +782,6 @@ static GtkWidget *layout_image_pop_menu(LayoutWindow *lw)
        submenu = submenu_add_edit(menu, &item, G_CALLBACK(li_pop_menu_edit_cb), lw, editmenu_fd_list);
        if (!path) gtk_widget_set_sensitive(item, FALSE);
        menu_item_add_divider(submenu);
-#if !GTK_CHECK_VERSION(3,0,0)
-       menu_item_add(submenu, _("Set as _wallpaper"), G_CALLBACK(li_pop_menu_wallpaper_cb), lw);
-#endif
        item = submenu_add_alter(menu, G_CALLBACK(li_pop_menu_alter_cb), lw);
 
        item = menu_item_add_stock(menu, _("View in _new window"), GTK_STOCK_NEW, G_CALLBACK(li_pop_menu_new_cb), lw);
@@ -829,7 +817,7 @@ static GtkWidget *layout_image_pop_menu(LayoutWindow *lw)
        if (!path) gtk_widget_set_sensitive(item, FALSE);
        item = menu_item_add_stock(menu,
                                options->file_ops.confirm_delete ? _("_Delete...") :
-                                       _("_Delete"), GTK_STOCK_DELETE,
+                                       _("_Delete"), "edit-delete",
                                                                G_CALLBACK(li_pop_menu_delete_cb), lw);
        if (!path) gtk_widget_set_sensitive(item, FALSE);
        menu_item_add_divider(menu);
@@ -880,7 +868,7 @@ static GtkWidget *layout_image_pop_menu(LayoutWindow *lw)
        return menu;
 }
 
-static void layout_image_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void layout_image_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -902,10 +890,10 @@ void layout_image_menu_popup(LayoutWindow *lw)
  *----------------------------------------------------------------------------
  */
 
-static void layout_image_dnd_receive(GtkWidget *widget, GdkDragContext *context,
-                                    gint x, gint y,
+static void layout_image_dnd_receive(GtkWidget *widget, GdkDragContext *UNUSED(context),
+                                    gint UNUSED(x), gint UNUSED(y),
                                     GtkSelectionData *selection_data, guint info,
-                                    guint time, gpointer data)
+                                    guint UNUSED(time), gpointer data)
 {
        LayoutWindow *lw = data;
        gint i;
@@ -991,9 +979,9 @@ static void layout_image_dnd_receive(GtkWidget *widget, GdkDragContext *context,
                }
 }
 
-static void layout_image_dnd_get(GtkWidget *widget, GdkDragContext *context,
-                                GtkSelectionData *selection_data, guint info,
-                                guint time, gpointer data)
+static void layout_image_dnd_get(GtkWidget *widget, GdkDragContext *UNUSED(context),
+                                GtkSelectionData *selection_data, guint UNUSED(info),
+                                guint UNUSED(time), gpointer data)
 {
        LayoutWindow *lw = data;
        FileData *fd;
@@ -1028,7 +1016,7 @@ static void layout_image_dnd_get(GtkWidget *widget, GdkDragContext *context,
                }
 }
 
-static void layout_image_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void layout_image_dnd_end(GtkWidget *UNUSED(widget), GdkDragContext *context, gpointer data)
 {
        LayoutWindow *lw = data;
        if (gdk_drag_context_get_selected_action(context) == GDK_ACTION_MOVE)
@@ -2147,7 +2135,7 @@ void layout_status_update_pixel_cb(PixbufRenderer *pr, gpointer data)
  *----------------------------------------------------------------------------
  */
 
-static void layout_image_update_cb(ImageWindow *imd, gpointer data)
+static void layout_image_update_cb(ImageWindow *UNUSED(imd), gpointer data)
 {
        LayoutWindow *lw = data;
        layout_status_update_image(lw);
index 40316dd..a676672 100644 (file)
@@ -221,23 +221,23 @@ static void layout_exit_fullscreen(LayoutWindow *lw)
        layout_image_full_screen_stop(lw);
 }
 
-static void clear_marks_cancel_cb(GenericDialog *gd, gpointer data)
+static void clear_marks_cancel_cb(GenericDialog *gd, gpointer UNUSED(data))
 {
        generic_dialog_close(gd);
 }
 
-static void clear_marks_help_cb(GenericDialog *gd, gpointer data)
+static void clear_marks_help_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        help_window_show("GuideMainWindowMenus.html");
 }
 
-void layout_menu_clear_marks_ok_cb(GenericDialog *gd, gpointer data)
+void layout_menu_clear_marks_ok_cb(GenericDialog *gd, gpointer UNUSED(data))
 {
        marks_clear_all();
        generic_dialog_close(gd);
 }
 
-static void layout_menu_clear_marks_cb(GtkAction *action, gpointer data)
+static void layout_menu_clear_marks_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
 {
        GenericDialog *gd;
 
@@ -253,7 +253,7 @@ static void layout_menu_clear_marks_cb(GtkAction *action, gpointer data)
        gtk_widget_show(gd->dialog);
 }
 
-static void layout_menu_new_cb(GtkAction *action, gpointer data)
+static void layout_menu_new_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -261,7 +261,7 @@ static void layout_menu_new_cb(GtkAction *action, gpointer data)
        collection_window_new(NULL);
 }
 
-static void layout_menu_open_cb(GtkAction *action, gpointer data)
+static void layout_menu_open_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -269,7 +269,7 @@ static void layout_menu_open_cb(GtkAction *action, gpointer data)
        collection_dialog_load(NULL);
 }
 
-static void layout_menu_search_cb(GtkAction *action, gpointer data)
+static void layout_menu_search_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -277,7 +277,7 @@ static void layout_menu_search_cb(GtkAction *action, gpointer data)
        search_new(lw->dir_fd, layout_image_get_fd(lw));
 }
 
-static void layout_menu_dupes_cb(GtkAction *action, gpointer data)
+static void layout_menu_dupes_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -285,7 +285,7 @@ static void layout_menu_dupes_cb(GtkAction *action, gpointer data)
        dupe_window_new();
 }
 
-static void layout_menu_pan_cb(GtkAction *action, gpointer data)
+static void layout_menu_pan_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -293,56 +293,56 @@ static void layout_menu_pan_cb(GtkAction *action, gpointer data)
        pan_window_new(lw->dir_fd);
 }
 
-static void layout_menu_print_cb(GtkAction *action, gpointer data)
+static void layout_menu_print_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        print_window_new(layout_image_get_fd(lw), layout_selection_list(lw), layout_list(lw), layout_window(lw));
 }
 
-static void layout_menu_dir_cb(GtkAction *action, gpointer data)
+static void layout_menu_dir_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        if (lw->vd) vd_new_folder(lw->vd, lw->dir_fd);
 }
 
-static void layout_menu_copy_cb(GtkAction *action, gpointer data)
+static void layout_menu_copy_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_util_copy(NULL, layout_selection_list(lw), NULL, layout_window(lw));
 }
 
-static void layout_menu_copy_path_cb(GtkAction *action, gpointer data)
+static void layout_menu_copy_path_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_util_copy_path_list_to_clipboard(layout_selection_list(lw), TRUE);
 }
 
-static void layout_menu_copy_path_unquoted_cb(GtkAction *action, gpointer data)
+static void layout_menu_copy_path_unquoted_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_util_copy_path_list_to_clipboard(layout_selection_list(lw), FALSE);
 }
 
-static void layout_menu_move_cb(GtkAction *action, gpointer data)
+static void layout_menu_move_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_util_move(NULL, layout_selection_list(lw), NULL, layout_window(lw));
 }
 
-static void layout_menu_rename_cb(GtkAction *action, gpointer data)
+static void layout_menu_rename_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_util_rename(NULL, layout_selection_list(lw), layout_window(lw));
 }
 
-static void layout_menu_delete_cb(GtkAction *action, gpointer data)
+static void layout_menu_delete_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -350,7 +350,7 @@ static void layout_menu_delete_cb(GtkAction *action, gpointer data)
        file_util_delete(NULL, layout_selection_list(lw), layout_window(lw));
 }
 
-static void layout_menu_move_to_trash_cb(GtkAction *action, gpointer data)
+static void layout_menu_move_to_trash_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -358,7 +358,7 @@ static void layout_menu_move_to_trash_cb(GtkAction *action, gpointer data)
        file_util_delete(NULL, layout_selection_list(lw), layout_window(lw));
 }
 
-static void layout_menu_move_to_trash_key_cb(GtkAction *action, gpointer data)
+static void layout_menu_move_to_trash_key_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -369,21 +369,21 @@ static void layout_menu_move_to_trash_key_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_disable_grouping_cb(GtkAction *action, gpointer data)
+static void layout_menu_disable_grouping_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_data_disable_grouping_list(layout_selection_list(lw), TRUE);
 }
 
-static void layout_menu_enable_grouping_cb(GtkAction *action, gpointer data)
+static void layout_menu_enable_grouping_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        file_data_disable_grouping_list(layout_selection_list(lw), FALSE);
 }
 
-void layout_menu_close_cb(GtkAction *action, gpointer data)
+void layout_menu_close_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -391,89 +391,89 @@ void layout_menu_close_cb(GtkAction *action, gpointer data)
        layout_close(lw);
 }
 
-static void layout_menu_exit_cb(GtkAction *action, gpointer data)
+static void layout_menu_exit_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
 {
        exit_program();
 }
 
-static void layout_menu_alter_90_cb(GtkAction *action, gpointer data)
+static void layout_menu_alter_90_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_alter_orientation(lw, ALTER_ROTATE_90);
 }
 
-static void layout_menu_rating_0_cb(GtkAction *action, gpointer data)
+static void layout_menu_rating_0_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_rating(lw, "0");
 }
 
-static void layout_menu_rating_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_rating_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_rating(lw, "1");
 }
 
-static void layout_menu_rating_2_cb(GtkAction *action, gpointer data)
+static void layout_menu_rating_2_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_rating(lw, "2");
 }
 
-static void layout_menu_rating_3_cb(GtkAction *action, gpointer data)
+static void layout_menu_rating_3_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_rating(lw, "3");
 }
 
-static void layout_menu_rating_4_cb(GtkAction *action, gpointer data)
+static void layout_menu_rating_4_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_rating(lw, "4");
 }
 
-static void layout_menu_rating_5_cb(GtkAction *action, gpointer data)
+static void layout_menu_rating_5_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_rating(lw, "5");
 }
 
-static void layout_menu_rating_m1_cb(GtkAction *action, gpointer data)
+static void layout_menu_rating_m1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_rating(lw, "-1");
 }
 
-static void layout_menu_alter_90cc_cb(GtkAction *action, gpointer data)
+static void layout_menu_alter_90cc_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_alter_orientation(lw, ALTER_ROTATE_90_CC);
 }
 
-static void layout_menu_alter_180_cb(GtkAction *action, gpointer data)
+static void layout_menu_alter_180_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_alter_orientation(lw, ALTER_ROTATE_180);
 }
 
-static void layout_menu_alter_mirror_cb(GtkAction *action, gpointer data)
+static void layout_menu_alter_mirror_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_alter_orientation(lw, ALTER_MIRROR);
 }
 
-static void layout_menu_alter_flip_cb(GtkAction *action, gpointer data)
+static void layout_menu_alter_flip_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -496,7 +496,7 @@ static void layout_menu_alter_ignore_alpha_cb(GtkToggleAction *action, gpointer
    layout_image_set_ignore_alpha(lw, gtk_toggle_action_get_active(action));
 }
 
-static void layout_menu_alter_none_cb(GtkAction *action, gpointer data)
+static void layout_menu_alter_none_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -511,7 +511,7 @@ static void layout_menu_exif_rotate_cb(GtkToggleAction *action, gpointer data)
        layout_image_reset_orientation(lw);
 }
 
-static void layout_menu_select_rectangle_cb(GtkToggleAction *action, gpointer data)
+static void layout_menu_select_rectangle_cb(GtkToggleAction *action, gpointer UNUSED(data))
 {
        options->draw_rectangle = gtk_toggle_action_get_active(action);
 }
@@ -530,7 +530,7 @@ static void layout_menu_select_overunderexposed_cb(GtkToggleAction *action, gpoi
        layout_image_set_overunderexposed(lw, gtk_toggle_action_get_active(action));
 }
 
-static void layout_menu_write_rotate(GtkToggleAction *action, gpointer data, gboolean keep_date)
+static void layout_menu_write_rotate(GtkToggleAction *UNUSED(action), gpointer data, gboolean keep_date)
 {
        LayoutWindow *lw = data;
        GtkTreeModel *store;
@@ -631,7 +631,7 @@ static void layout_menu_write_rotate_cb(GtkToggleAction *action, gpointer data)
        layout_menu_write_rotate(action, data, FALSE);
 }
 
-static void layout_menu_config_cb(GtkAction *action, gpointer data)
+static void layout_menu_config_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -639,7 +639,7 @@ static void layout_menu_config_cb(GtkAction *action, gpointer data)
        show_config_window(lw);
 }
 
-static void layout_menu_editors_cb(GtkAction *action, gpointer data)
+static void layout_menu_editors_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -647,7 +647,7 @@ static void layout_menu_editors_cb(GtkAction *action, gpointer data)
        show_editor_list_window();
 }
 
-static void layout_menu_layout_config_cb(GtkAction *action, gpointer data)
+static void layout_menu_layout_config_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -655,7 +655,7 @@ static void layout_menu_layout_config_cb(GtkAction *action, gpointer data)
        layout_show_config_window(lw);
 }
 
-static void layout_menu_remove_thumb_cb(GtkAction *action, gpointer data)
+static void layout_menu_remove_thumb_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -663,7 +663,7 @@ static void layout_menu_remove_thumb_cb(GtkAction *action, gpointer data)
        cache_manager_show();
 }
 
-static void layout_menu_wallpaper_cb(GtkAction *action, gpointer data)
+static void layout_menu_wallpaper_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -671,83 +671,83 @@ static void layout_menu_wallpaper_cb(GtkAction *action, gpointer data)
 }
 
 /* single window zoom */
-static void layout_menu_zoom_in_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_in_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_adjust(lw, get_zoom_increment(), FALSE);
 }
 
-static void layout_menu_zoom_out_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_out_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_adjust(lw, -get_zoom_increment(), FALSE);
 }
 
-static void layout_menu_zoom_1_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_1_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 1.0, FALSE);
 }
 
-static void layout_menu_zoom_fit_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_fit_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 0.0, FALSE);
 }
 
-static void layout_menu_zoom_fit_hor_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_fit_hor_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set_fill_geometry(lw, FALSE, FALSE);
 }
 
-static void layout_menu_zoom_fit_vert_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_fit_vert_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set_fill_geometry(lw, TRUE, FALSE);
 }
 
-static void layout_menu_zoom_2_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_2_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 2.0, FALSE);
 }
 
-static void layout_menu_zoom_3_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_3_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 3.0, FALSE);
 }
-static void layout_menu_zoom_4_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_4_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 4.0, FALSE);
 }
 
-static void layout_menu_zoom_1_2_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_1_2_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, -2.0, FALSE);
 }
 
-static void layout_menu_zoom_1_3_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_1_3_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, -3.0, FALSE);
 }
 
-static void layout_menu_zoom_1_4_cb(GtkAction *action, gpointer data)
+static void layout_menu_zoom_1_4_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -755,83 +755,83 @@ static void layout_menu_zoom_1_4_cb(GtkAction *action, gpointer data)
 }
 
 /* connected zoom */
-static void layout_menu_connect_zoom_in_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_in_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_adjust(lw, get_zoom_increment(), TRUE);
 }
 
-static void layout_menu_connect_zoom_out_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_out_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_adjust(lw, -get_zoom_increment(), TRUE);
 }
 
-static void layout_menu_connect_zoom_1_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_1_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 1.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_fit_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_fit_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 0.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_fit_hor_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_fit_hor_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set_fill_geometry(lw, FALSE, TRUE);
 }
 
-static void layout_menu_connect_zoom_fit_vert_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_fit_vert_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set_fill_geometry(lw, TRUE, TRUE);
 }
 
-static void layout_menu_connect_zoom_2_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_2_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 2.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_3_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_3_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 3.0, TRUE);
 }
-static void layout_menu_connect_zoom_4_1_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_4_1_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, 4.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_1_2_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_1_2_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, -2.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_1_3_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_1_3_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_zoom_set(lw, -3.0, TRUE);
 }
 
-static void layout_menu_connect_zoom_1_4_cb(GtkAction *action, gpointer data)
+static void layout_menu_connect_zoom_1_4_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -839,7 +839,7 @@ static void layout_menu_connect_zoom_1_4_cb(GtkAction *action, gpointer data)
 }
 
 
-static void layout_menu_split_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data)
+static void layout_menu_split_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
 {
        LayoutWindow *lw = data;
        ImageSplitMode mode;
@@ -858,7 +858,7 @@ static void layout_menu_thumb_cb(GtkToggleAction *action, gpointer data)
 }
 
 
-static void layout_menu_list_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data)
+static void layout_menu_list_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -882,7 +882,7 @@ static void layout_menu_view_dir_as_cb(GtkToggleAction *action,  gpointer data)
                }
 }
 
-static void layout_menu_view_in_new_window_cb(GtkAction *action, gpointer data)
+static void layout_menu_view_in_new_window_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -890,7 +890,7 @@ static void layout_menu_view_in_new_window_cb(GtkAction *action, gpointer data)
        view_window_new(layout_image_get_fd(lw));
 }
 
-static void layout_menu_open_archive_cb(GtkAction *action, gpointer data)
+static void layout_menu_open_archive_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        LayoutWindow *lw_new;
@@ -916,21 +916,21 @@ static void layout_menu_open_archive_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_fullscreen_cb(GtkAction *action, gpointer data)
+static void layout_menu_fullscreen_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_full_screen_toggle(lw);
 }
 
-static void layout_menu_escape_cb(GtkAction *action, gpointer data)
+static void layout_menu_escape_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_exit_fullscreen(lw);
 }
 
-static void layout_menu_overlay_toggle_cb(GtkAction *action, gpointer data)
+static void layout_menu_overlay_toggle_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -984,12 +984,12 @@ static void layout_menu_animate_cb(GtkToggleAction *action, gpointer data)
        layout_image_animate_toggle(lw);
 }
 
-static void layout_menu_rectangular_selection_cb(GtkToggleAction *action, gpointer data)
+static void layout_menu_rectangular_selection_cb(GtkToggleAction *action, gpointer UNUSED(data))
 {
        options->collections.rectangular_selection = gtk_toggle_action_get_active(action);
 }
 
-static void layout_menu_histogram_toggle_channel_cb(GtkAction *action, gpointer data)
+static void layout_menu_histogram_toggle_channel_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -997,7 +997,7 @@ static void layout_menu_histogram_toggle_channel_cb(GtkAction *action, gpointer
        layout_util_sync_views(lw);
 }
 
-static void layout_menu_histogram_toggle_mode_cb(GtkAction *action, gpointer data)
+static void layout_menu_histogram_toggle_mode_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1005,7 +1005,7 @@ static void layout_menu_histogram_toggle_mode_cb(GtkAction *action, gpointer dat
        layout_util_sync_views(lw);
 }
 
-static void layout_menu_histogram_channel_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data)
+static void layout_menu_histogram_channel_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
 {
        LayoutWindow *lw = data;
        gint channel = gtk_radio_action_get_current_value(action);
@@ -1017,7 +1017,7 @@ static void layout_menu_histogram_channel_cb(GtkRadioAction *action, GtkRadioAct
        image_osd_histogram_set_channel(lw->image, channel);
 }
 
-static void layout_menu_histogram_mode_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data)
+static void layout_menu_histogram_mode_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
 {
        LayoutWindow *lw = data;
        gint mode = gtk_radio_action_get_current_value(action);
@@ -1029,14 +1029,14 @@ static void layout_menu_histogram_mode_cb(GtkRadioAction *action, GtkRadioAction
        image_osd_histogram_set_mode(lw->image, mode);
 }
 
-static void layout_menu_refresh_cb(GtkAction *action, gpointer data)
+static void layout_menu_refresh_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_refresh(lw);
 }
 
-static void layout_menu_bar_exif_cb(GtkAction *action, gpointer data)
+static void layout_menu_bar_exif_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1044,7 +1044,7 @@ static void layout_menu_bar_exif_cb(GtkAction *action, gpointer data)
        layout_exif_window_new(lw);
 }
 
-static void layout_menu_search_and_run_cb(GtkAction *action, gpointer data)
+static void layout_menu_search_and_run_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1063,7 +1063,7 @@ static void layout_menu_float_cb(GtkToggleAction *action, gpointer data)
        layout_tools_float_toggle(lw);
 }
 
-static void layout_menu_hide_cb(GtkAction *action, gpointer data)
+static void layout_menu_hide_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1131,21 +1131,21 @@ static void layout_menu_slideshow_cb(GtkToggleAction *action, gpointer data)
        layout_image_slideshow_toggle(lw);
 }
 
-static void layout_menu_slideshow_pause_cb(GtkAction *action, gpointer data)
+static void layout_menu_slideshow_pause_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_image_slideshow_pause_toggle(lw);
 }
 
-static void layout_menu_slideshow_slower_cb(GtkAction *action, gpointer data)
+static void layout_menu_slideshow_slower_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
 {
        options->slideshow.delay = options->slideshow.delay + 5;
        if (options->slideshow.delay > SLIDESHOW_MAX_SECONDS)
                options->slideshow.delay = SLIDESHOW_MAX_SECONDS;
 }
 
-static void layout_menu_slideshow_faster_cb(GtkAction *action, gpointer data)
+static void layout_menu_slideshow_faster_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
 {
        options->slideshow.delay = options->slideshow.delay - 5;
        if (options->slideshow.delay < SLIDESHOW_MIN_SECONDS * 10)
@@ -1153,7 +1153,7 @@ static void layout_menu_slideshow_faster_cb(GtkAction *action, gpointer data)
 }
 
 
-static void layout_menu_stereo_mode_next_cb(GtkAction *action, gpointer data)
+static void layout_menu_stereo_mode_next_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        gint mode = layout_image_stereo_pixbuf_get(lw);
@@ -1171,14 +1171,14 @@ static void layout_menu_stereo_mode_next_cb(GtkAction *action, gpointer data)
 
 }
 
-static void layout_menu_stereo_mode_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data)
+static void layout_menu_stereo_mode_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
 {
        LayoutWindow *lw = data;
        gint mode = gtk_radio_action_get_current_value(action);
        layout_image_stereo_pixbuf_set(lw, mode);
 }
 
-static void layout_menu_help_cb(GtkAction *action, gpointer data)
+static void layout_menu_help_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1186,7 +1186,7 @@ static void layout_menu_help_cb(GtkAction *action, gpointer data)
        help_window_show("index.html");
 }
 
-static void layout_menu_help_search_cb(GtkAction *action, gpointer data)
+static void layout_menu_help_search_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1194,7 +1194,7 @@ static void layout_menu_help_search_cb(GtkAction *action, gpointer data)
        help_search_window_show();
 }
 
-static void layout_menu_help_keys_cb(GtkAction *action, gpointer data)
+static void layout_menu_help_keys_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1202,7 +1202,7 @@ static void layout_menu_help_keys_cb(GtkAction *action, gpointer data)
        help_window_show("GuideReferenceKeyboardShortcuts.html");
 }
 
-static void layout_menu_notes_cb(GtkAction *action, gpointer data)
+static void layout_menu_notes_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1210,7 +1210,7 @@ static void layout_menu_notes_cb(GtkAction *action, gpointer data)
        help_window_show("release_notes");
 }
 
-static void layout_menu_changelog_cb(GtkAction *action, gpointer data)
+static void layout_menu_changelog_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1253,7 +1253,7 @@ static void layout_menu_foreach_func(
                                        const gchar *accel_path,
                                        guint accel_key,
                                        GdkModifierType accel_mods,
-                                       gboolean changed)
+                                       gboolean UNUSED(changed))
 {
        gchar *path, *name;
        gchar *key_name, *menu_name;
@@ -1289,7 +1289,7 @@ static void layout_menu_foreach_func(
        g_free(path);
 }
 
-static void layout_menu_kbd_map_cb(GtkAction *action, gpointer data)
+static void layout_menu_kbd_map_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
 {
        gint fd = -1;
        GPtrArray *array;
@@ -1380,7 +1380,7 @@ static void layout_menu_kbd_map_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_about_cb(GtkAction *action, gpointer data)
+static void layout_menu_about_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1388,7 +1388,7 @@ static void layout_menu_about_cb(GtkAction *action, gpointer data)
        show_about_window(lw);
 }
 
-static void layout_menu_log_window_cb(GtkAction *action, gpointer data)
+static void layout_menu_log_window_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1403,21 +1403,21 @@ static void layout_menu_log_window_cb(GtkAction *action, gpointer data)
  *-----------------------------------------------------------------------------
  */
 
-static void layout_menu_select_all_cb(GtkAction *action, gpointer data)
+static void layout_menu_select_all_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_select_all(lw);
 }
 
-static void layout_menu_unselect_all_cb(GtkAction *action, gpointer data)
+static void layout_menu_unselect_all_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_select_none(lw);
 }
 
-static void layout_menu_invert_selection_cb(GtkAction *action, gpointer data)
+static void layout_menu_invert_selection_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1519,13 +1519,13 @@ static void layout_menu_mark_filter_toggle_cb(GtkAction *action, gpointer data)
  *-----------------------------------------------------------------------------
  */
 
-static void layout_menu_image_first_cb(GtkAction *action, gpointer data)
+static void layout_menu_image_first_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        layout_image_first(lw);
 }
 
-static void layout_menu_image_prev_cb(GtkAction *action, gpointer data)
+static void layout_menu_image_prev_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        gint i;
@@ -1551,7 +1551,7 @@ static void layout_menu_image_prev_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_image_next_cb(GtkAction *action, gpointer data)
+static void layout_menu_image_next_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        gint i;
@@ -1577,7 +1577,7 @@ static void layout_menu_image_next_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_page_first_cb(GtkAction *action, gpointer data)
+static void layout_menu_page_first_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        FileData *fd = layout_image_get_fd(lw);
@@ -1588,7 +1588,7 @@ static void layout_menu_page_first_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_page_last_cb(GtkAction *action, gpointer data)
+static void layout_menu_page_last_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        FileData *fd = layout_image_get_fd(lw);
@@ -1599,7 +1599,7 @@ static void layout_menu_page_last_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_page_next_cb(GtkAction *action, gpointer data)
+static void layout_menu_page_next_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        FileData *fd = layout_image_get_fd(lw);
@@ -1610,7 +1610,7 @@ static void layout_menu_page_next_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_page_previous_cb(GtkAction *action, gpointer data)
+static void layout_menu_page_previous_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        FileData *fd = layout_image_get_fd(lw);
@@ -1621,7 +1621,7 @@ static void layout_menu_page_previous_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_image_forward_cb(GtkAction *action, gpointer data)
+static void layout_menu_image_forward_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1629,7 +1629,7 @@ static void layout_menu_image_forward_cb(GtkAction *action, gpointer data)
        layout_set_path(lw, image_chain_forward());
 }
 
-static void layout_menu_image_back_cb(GtkAction *action, gpointer data)
+static void layout_menu_image_back_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -1637,7 +1637,7 @@ static void layout_menu_image_back_cb(GtkAction *action, gpointer data)
        layout_set_path(lw, image_chain_back());
 }
 
-static void layout_menu_split_pane_next_cb(GtkAction *action, gpointer data)
+static void layout_menu_split_pane_next_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        gint active_frame;
@@ -1655,7 +1655,7 @@ static void layout_menu_split_pane_next_cb(GtkAction *action, gpointer data)
        layout_image_activate(lw, active_frame, FALSE);
 }
 
-static void layout_menu_split_pane_prev_cb(GtkAction *action, gpointer data)
+static void layout_menu_split_pane_prev_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        gint active_frame;
@@ -1677,7 +1677,7 @@ static void layout_menu_split_pane_prev_cb(GtkAction *action, gpointer data)
        layout_image_activate(lw, active_frame, FALSE);
 }
 
-static void layout_menu_split_pane_updown_cb(GtkAction *action, gpointer data)
+static void layout_menu_split_pane_updown_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        gint active_frame;
@@ -1695,13 +1695,13 @@ static void layout_menu_split_pane_updown_cb(GtkAction *action, gpointer data)
        layout_image_activate(lw, active_frame, FALSE);
 }
 
-static void layout_menu_image_last_cb(GtkAction *action, gpointer data)
+static void layout_menu_image_last_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        layout_image_last(lw);
 }
 
-static void layout_menu_back_cb(GtkAction *action, gpointer data)
+static void layout_menu_back_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        FileData *dir_fd;
@@ -1712,7 +1712,7 @@ static void layout_menu_back_cb(GtkAction *action, gpointer data)
        file_data_unref(dir_fd);
 }
 
-static void layout_menu_forward_cb(GtkAction *action, gpointer data)
+static void layout_menu_forward_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        FileData *dir_fd;
@@ -1723,7 +1723,7 @@ static void layout_menu_forward_cb(GtkAction *action, gpointer data)
        file_data_unref(dir_fd);
 }
 
-static void layout_menu_home_cb(GtkAction *action, gpointer data)
+static void layout_menu_home_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        const gchar *path;
@@ -1741,7 +1741,7 @@ static void layout_menu_home_cb(GtkAction *action, gpointer data)
                }
 }
 
-static void layout_menu_up_cb(GtkAction *action, gpointer data)
+static void layout_menu_up_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        ViewDir *vd = lw->vd;
@@ -1779,13 +1779,13 @@ static void layout_menu_edit_cb(GtkAction *action, gpointer data)
 }
 
 
-static void layout_menu_metadata_write_cb(GtkAction *action, gpointer data)
+static void layout_menu_metadata_write_cb(GtkAction *UNUSED(action), gpointer UNUSED(data))
 {
        metadata_write_queue_confirm(TRUE, NULL, NULL);
 }
 
 static GtkWidget *last_focussed = NULL;
-static void layout_menu_keyword_autocomplete_cb(GtkAction *action, gpointer data)
+static void layout_menu_keyword_autocomplete_cb(GtkAction *UNUSED(action), gpointer data)
 {
        LayoutWindow *lw = data;
        GtkWidget *tmp;
@@ -1838,7 +1838,7 @@ static void layout_color_menu_use_image_cb(GtkToggleAction *action, gpointer dat
 #endif
 }
 
-static void layout_color_menu_input_cb(GtkRadioAction *action, GtkRadioAction *current, gpointer data)
+static void layout_color_menu_input_cb(GtkRadioAction *action, GtkRadioAction *UNUSED(current), gpointer data)
 {
 #ifdef HAVE_LCMS
        LayoutWindow *lw = data;
@@ -1864,7 +1864,7 @@ static void layout_color_menu_input_cb(GtkRadioAction *action, GtkRadioAction *c
  *-----------------------------------------------------------------------------
  */
 
-static void layout_menu_recent_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_recent_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        gint n;
        gchar *path;
@@ -2050,7 +2050,7 @@ static GList *layout_window_menu_list(GList *listin)
        return g_list_sort(listin, layout_window_menu_list_sort_cb);
 }
 
-static void layout_menu_new_window_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_new_window_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        gint n;
 
@@ -2114,7 +2114,7 @@ static void layout_menu_new_window_update(LayoutWindow *lw)
                }
 }
 
-static void window_rename_cancel_cb(GenericDialog *gd, gpointer data)
+static void window_rename_cancel_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        RenameWindow *rw = data;
 
@@ -2122,7 +2122,7 @@ static void window_rename_cancel_cb(GenericDialog *gd, gpointer data)
        g_free(rw);
 }
 
-static void window_rename_ok(GenericDialog *gd, gpointer data)
+static void window_rename_ok(GenericDialog *UNUSED(gd), gpointer data)
 {
        RenameWindow *rw = data;
        gchar *path;
@@ -2189,14 +2189,14 @@ static void window_rename_entry_activate_cb(GenericDialog *gd, gpointer data)
        window_rename_ok(gd, rw);
 }
 
-static void window_delete_cancel_cb(GenericDialog *gd, gpointer data)
+static void window_delete_cancel_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        DeleteWindow *dw = data;
 
        g_free(dw);
 }
 
-static void window_delete_ok_cb(GenericDialog *gd, gpointer data)
+static void window_delete_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        DeleteWindow *dw = data;
        gchar *path;
@@ -2216,12 +2216,12 @@ static void window_delete_ok_cb(GenericDialog *gd, gpointer data)
        g_free(path);
 }
 
-static void layout_menu_window_default_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_window_default_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        layout_new_from_default();
 }
 
-static void layout_menu_windows_menu_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_windows_menu_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        GtkWidget *menu;
@@ -2251,7 +2251,7 @@ static void layout_menu_windows_menu_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void layout_menu_view_menu_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_view_menu_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        GtkWidget *menu;
@@ -2338,7 +2338,7 @@ static void change_window_id(const gchar *infile, const gchar *outfile)
        g_object_unref(in_file);
 }
 
-static void layout_menu_window_from_current_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_window_from_current_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        gint fd_in = -1;
@@ -2374,14 +2374,14 @@ static void layout_menu_window_from_current_cb(GtkWidget *widget, gpointer data)
        g_free(tmp_file_out);
 }
 
-static void layout_menu_window_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_window_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
        layout_menu_new_window_update(lw);
 }
 
-static void layout_menu_window_rename_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_window_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        RenameWindow *rw;
@@ -2412,7 +2412,7 @@ static void layout_menu_window_rename_cb(GtkWidget *widget, gpointer data)
        gtk_widget_show(rw->gd->dialog);
 }
 
-static void layout_menu_window_delete_cb(GtkWidget *widget, gpointer data)
+static void layout_menu_window_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        DeleteWindow *dw;
@@ -2784,9 +2784,6 @@ static const gchar *menu_ui_description =
 "      <menuitem action='Maintenance'/>"
 "      <placeholder name='PreferencesSection'/>"
 "      <separator/>"
-#if !GTK_CHECK_VERSION(3,0,0)
-"      <menuitem action='Wallpaper'/>"
-#endif
 "      <separator/>"
 "    </menu>"
 "    <menu action='PluginsMenu'>"
@@ -2964,7 +2961,7 @@ static const gchar *menu_ui_description =
 "<accelerator action='ConnectZoomFitAlt1'/>"
 "</ui>";
 
-static gchar *menu_translate(const gchar *path, gpointer data)
+static gchar *menu_translate(const gchar *path, gpointer UNUSED(data))
 {
        return (gchar *)(_(path));
 }
@@ -3293,7 +3290,7 @@ void layout_actions_setup(LayoutWindow *lw)
 static gint layout_editors_reload_idle_id = -1;
 static GList *layout_editors_desktop_files = NULL;
 
-static gboolean layout_editors_reload_idle_cb(gpointer data)
+static gboolean layout_editors_reload_idle_cb(gpointer UNUSED(data))
 {
        if (!layout_editors_desktop_files)
                {
@@ -3412,7 +3409,7 @@ GtkWidget *layout_actions_menu_tool_bar(LayoutWindow *lw)
        DEBUG_NAME(menu_bar);
        toolbar = layout_actions_toolbar(lw, TOOLBAR_MAIN);
        DEBUG_NAME(toolbar);
-       lw->menu_tool_bar = gtk_vbox_new(FALSE, 0);
+       lw->menu_tool_bar = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
 
        gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), menu_bar, FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(lw->menu_tool_bar), toolbar, FALSE, FALSE, 0);
@@ -3923,7 +3920,7 @@ static gboolean layout_bar_enabled(LayoutWindow *lw)
        return lw->bar && gtk_widget_get_visible(lw->bar);
 }
 
-static void layout_bar_destroyed(GtkWidget *widget, gpointer data)
+static void layout_bar_destroyed(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -4018,7 +4015,7 @@ static gboolean layout_bar_sort_enabled(LayoutWindow *lw)
 }
 
 
-static void layout_bar_sort_destroyed(GtkWidget *widget, gpointer data)
+static void layout_bar_sort_destroyed(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
 
@@ -4147,7 +4144,7 @@ void layout_bars_new_selection(LayoutWindow *lw, gint count)
 GtkWidget *layout_bars_prepare(LayoutWindow *lw, GtkWidget *image)
 {
        if (lw->utility_box) return lw->utility_box;
-       lw->utility_box = gtk_hbox_new(FALSE, PREF_PAD_GAP);
+       lw->utility_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
        lw->utility_paned = gtk_hpaned_new();
        DEBUG_NAME(lw->utility_paned);
        gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->utility_paned, TRUE, TRUE, 0);
@@ -4167,7 +4164,7 @@ void layout_bars_close(LayoutWindow *lw)
        layout_bar_close(lw);
 }
 
-static gboolean layout_exif_window_destroy(GtkWidget *widget, gpointer data)
+static gboolean layout_exif_window_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = data;
        lw->exif_window = NULL;
diff --git a/src/lirc.c b/src/lirc.c
deleted file mode 100644 (file)
index 52b42aa..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (C) 2008 - 2016 The Geeqie Team
- *
- * 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.
- */
-
-#include <glib/gprintf.h>
-
-#include "lirc.h"
-
-#include "misc.h"
-
-#ifdef HAVE_LIRC
-#include <lirc/lirc_client.h>
-#include "layout_image.h"
-
-gint lirc_fd = -1;
-struct lirc_config *config = NULL;
-guint input_tag = 0; /* event source id */
-GIOChannel *gio_chan;
-
-/*
- *-----------------------------------------------------------------------------
- * LIRC callback
- *-----------------------------------------------------------------------------
- */
-
-static void lirc_cleanup(void)
-{
-       if (config)
-               {
-               g_source_remove(input_tag);
-               lirc_freeconfig(config);
-               config = NULL;
-               }
-       if (lirc_fd != -1)
-               {
-               lirc_deinit();
-               lirc_fd = -1;
-               }
-       if (gio_chan)
-               {
-               g_io_channel_shutdown(gio_chan, TRUE, NULL);
-               g_io_channel_unref(gio_chan);
-               }
-}
-
-static gboolean lirc_input_callback(GIOChannel *source, GIOCondition condition,
-                                   gpointer data)
-{
-       LayoutWindow *lw = data;
-       gchar *ptr;
-       gint ret;
-       gint x = 0;
-       gint y = 0;
-
-       /* LIRC code and corresponding geeqie command (and parameters)*/
-       gchar *code;
-       gchar *cmd;
-
-       /* parameters for geeqie command */
-       gint i_parm;
-       gfloat fl_parm;
-
-       while ((ret = lirc_nextcode(&code)) == 0 && code)
-               {
-               while ((ret = lirc_code2char(config, code, &cmd)) == 0 && cmd)
-                       {
-                       if (g_ascii_strncasecmp("LEFT", cmd, 4) == 0)
-                               {
-                               ptr = cmd + 4;
-                               while (g_ascii_isspace(*ptr)) ptr++;
-                               i_parm = atoi(ptr);
-
-                               if (i_parm <= 0) i_parm = 1;
-                               x -= i_parm;
-                               }
-                       else if (g_ascii_strncasecmp("RIGHT", cmd, 5) == 0)
-                               {
-                               ptr = cmd + 5;
-                               while (g_ascii_isspace(*ptr)) ptr++;
-                               i_parm = atoi(ptr);
-
-                               if (i_parm <= 0) i_parm = 1;
-                               x += i_parm;
-                               }
-                       else if (g_ascii_strncasecmp("UP", cmd, 2) == 0)
-                               {
-                               ptr = cmd + 2;
-                               while (g_ascii_isspace(*ptr)) ptr++;
-                               i_parm = atoi(ptr);
-
-                               if (i_parm <= 0) i_parm = 1;
-                               y -= i_parm;
-                               }
-                       else if (g_ascii_strncasecmp("DOWN", cmd, 4) == 0)
-                               {
-                               ptr = cmd + 4;
-                               while (g_ascii_isspace(*ptr)) ptr++;
-                               i_parm = atoi(ptr);
-
-                               if (i_parm <= 0) i_parm = 1;
-                               y += i_parm;
-                               }
-                       else if (g_ascii_strcasecmp("PREV", cmd) == 0)
-                               {
-                               layout_image_prev(lw);
-                               }
-                       else if (g_ascii_strcasecmp("NEXT", cmd) == 0)
-                               {
-                               layout_image_next(lw);
-                               }
-                       else if (g_ascii_strncasecmp("ZOOM_IN", cmd, 7) == 0)
-                               {
-                               ptr = cmd + 7;
-                               while (g_ascii_isspace(*ptr)) ptr++;
-                               fl_parm = atoi(ptr) / 10.0;
-
-                               if (fl_parm <= 0.01) fl_parm = get_zoom_increment();
-                               layout_image_zoom_adjust(lw, fl_parm, FALSE);
-                               }
-                       else if (g_ascii_strncasecmp("ZOOM_OUT", cmd, 8) == 0)
-                               {
-                               ptr = cmd + 8;
-                               while (g_ascii_isspace(*ptr)) ptr++;
-                               fl_parm = atoi(ptr) / 10.0;
-
-                               if (fl_parm <= 0.01) fl_parm = get_zoom_increment();
-                               layout_image_zoom_adjust(lw, -fl_parm, FALSE);
-                               }
-                       else if (g_ascii_strcasecmp("ZOOM_MAX", cmd) == 0)
-                               {
-                               layout_image_zoom_set(lw, 0.0, FALSE);
-                               }
-                       else if (g_ascii_strcasecmp("FULL_SCREEN", cmd) == 0)
-                               {
-                               layout_image_full_screen_toggle(lw);
-                               }
-                       else if (g_ascii_strncasecmp("SET_ZOOM", cmd, 8) == 0)
-                               {
-                               ptr = cmd + 8;
-                               while (g_ascii_isspace(*ptr)) ptr++;
-                               i_parm = atoi(ptr);
-
-                               if (i_parm <= 0) i_parm = 1;
-                               layout_image_zoom_set(lw, 1.0, FALSE);
-                               }
-                       else if (g_ascii_strncasecmp("SET_INV_ZOOM", cmd, 12) == 0)
-                               {
-                               ptr = cmd + 12;
-                               while (g_ascii_isspace(*ptr)) ptr++;
-                               i_parm = atoi(ptr);
-
-                               if (i_parm <= 0) i_parm = 1;
-                               layout_image_zoom_set(lw, -i_parm, FALSE);
-                               }
-                       else if (g_ascii_strcasecmp("FIRST", cmd) == 0)
-                               {
-                               layout_image_first(lw);
-                               }
-                       else if (g_ascii_strcasecmp("LAST", cmd) == 0)
-                               {
-                               layout_image_last(lw);
-                               }
-                       else if (g_ascii_strcasecmp("PAUSE", cmd) == 0)
-                               {
-                               layout_image_slideshow_pause_toggle(lw);
-                               }
-                       else if (g_ascii_strcasecmp("ROTATE_90", cmd) == 0)
-                               {
-                               layout_image_alter_orientation(lw, ALTER_ROTATE_90);
-                               }
-                       else if (g_ascii_strcasecmp("ROTATE_90_CC", cmd) == 0)
-                               {
-                               layout_image_alter_orientation(lw, ALTER_ROTATE_90_CC);
-                               }
-                       else if (g_ascii_strcasecmp("INFO", cmd) == 0)
-                               {
-                               layout_image_overlay_toggle(lw);
-                               }
-                       else if (g_ascii_strcasecmp("EXIT", cmd) == 0)
-                               {
-                               exit_program();
-                               }
-                       }
-               free(code);
-               if (ret == -1) break;
-               }
-       if (x != 0 || y != 0)
-               {
-               layout_image_scroll(lw, x, y, FALSE);
-               }
-
-       if (ret == -1)
-               {
-               /* something went badly wrong */
-               g_fprintf(stderr, _("disconnected from LIRC\n"));
-               lirc_cleanup();
-               return (gboolean)FALSE;
-               }
-       return (gboolean)TRUE;
-}
-
-void layout_image_lirc_init(LayoutWindow *lw)
-{
-       gint flags;
-       gboolean lirc_verbose = (get_debug_level() >= 2);
-
-       lirc_fd = lirc_init(GQ_APPNAME_LC, lirc_verbose);
-       if (lirc_fd == -1)
-               {
-               DEBUG_1("Initializing LIRC... failed");
-               return;
-               }
-       
-       DEBUG_1("Initializing LIRC... OK");
-       if (lirc_readconfig(NULL, &config, NULL) == -1)
-               {
-               lirc_deinit();
-               
-               g_fprintf(stderr,
-                       _("could not read LIRC config file\n"
-                       "please read the documentation of LIRC to \n"
-                       "know how to create a proper config file\n"));
-               fflush(stderr);
-
-               DEBUG_1("Failed to read LIRC config file");
-               return;
-               }
-       if (lirc_verbose) fflush(stderr);
-
-       gio_chan = g_io_channel_unix_new(lirc_fd);
-       input_tag = g_io_add_watch(gio_chan, G_IO_IN,
-                                  lirc_input_callback, lw);
-       fcntl(lirc_fd, F_SETOWN, getpid());
-       flags = fcntl(lirc_fd, F_GETFL, 0);
-       if (flags != -1) fcntl(lirc_fd, F_SETFL, flags|O_NONBLOCK);
-}
-
-#endif /* HAVE_LIRC */
-/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
diff --git a/src/lirc.h b/src/lirc.h
deleted file mode 100644 (file)
index 3f5ae97..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2008 - 2016 The Geeqie Team
- *
- * 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 LIRC_H
-#define LIRC_H
-
-#include "main.h"
-
-#ifdef HAVE_LIRC
-void layout_image_lirc_init(LayoutWindow *lw);
-#endif
-
-#endif
-/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 5ead469..c4d123f 100644 (file)
@@ -36,13 +36,7 @@ struct _LogWindow
        GtkWidget *window;
        GtkWidget *scrolledwin;
        GtkWidget *text;
-
-#if !GTK_CHECK_VERSION(3,0,0)
-       GdkColor colors[LOG_COUNT];
-#else
        GtkTextTag *color_tags[LOG_COUNT];
-#endif
-
        gint lines;
        GtkWidget *regexp_box;
        GtkWidget *bar;
@@ -55,24 +49,6 @@ struct _LogWindow
        gboolean highlight_all;
 };
 
-#if !GTK_CHECK_VERSION(3,0,0)
-typedef struct _LogDef LogDef;
-struct _LogDef
-{
-       LogType type;
-       const gchar *tag;
-       const gchar *color;
-};
-
-/* Keep LogType order !! */
-static LogDef logdefs[LOG_COUNT] = {
-       { LOG_NORMAL,   "normal",       "black"  },
-       { LOG_MSG,      "message",      "blue"   },
-       { LOG_WARN,     "warning",      "orange" },
-       { LOG_ERROR,    "error",        "red"    },
-};
-#endif
-
 typedef enum {
        LOGWINDOW_SEARCH_BACKWARDS,
        LOGWINDOW_SEARCH_FORWARDS
@@ -80,11 +56,11 @@ typedef enum {
 
 static LogWindow *logwindow = NULL;
 
-static void hide_cb(GtkWidget *widget, LogWindow *logwin)
+static void hide_cb(GtkWidget *UNUSED(widget), LogWindow *UNUSED(logwin))
 {
 }
 
-static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event,
+static gboolean key_pressed(GtkWidget *UNUSED(widget), GdkEventKey *event,
                            LogWindow *logwin)
 {
        if (event && event->keyval == GDK_KEY_Escape)
@@ -93,12 +69,12 @@ static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event,
 }
 
 
-static void log_window_pause_cb(GtkWidget *widget, gpointer data)
+static void log_window_pause_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        options->log_window.paused = !options->log_window.paused;
 }
 
-static void log_window_line_wrap_cb(GtkWidget *widget, gpointer data)
+static void log_window_line_wrap_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LogWindow *logwin = data;
 
@@ -114,12 +90,12 @@ static void log_window_line_wrap_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void log_window_timer_data_cb(GtkWidget *widget, gpointer data)
+static void log_window_timer_data_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        options->log_window.timer_data = !options->log_window.timer_data;
 }
 
-static void log_window_regexp_cb(GtkWidget *text_entry, gpointer data)
+static void log_window_regexp_cb(GtkWidget *text_entry, gpointer UNUSED(data))
 {
        gchar *new_regexp;
 
@@ -162,7 +138,7 @@ static void remove_green_bg(LogWindow *logwin)
                }
 }
 
-static void search_activate_event(GtkEntry *widget, LogWindow *logwin)
+static void search_activate_event(GtkEntry *UNUSED(widget), LogWindow *logwin)
 {
        GtkTextIter start_find;
        GtkTextIter start_match;
@@ -199,7 +175,7 @@ static void search_activate_event(GtkEntry *widget, LogWindow *logwin)
                }
 }
 
-static gboolean search_keypress_event(GtkWidget *widget, GdkEventKey *event, LogWindow *logwin, LogWindowSearchDirection direction)
+static gboolean search_keypress_event(GtkWidget *UNUSED(widget), GdkEventKey *UNUSED(event), LogWindow *logwin, LogWindowSearchDirection direction)
 {
        GtkTextIter start_find;
        GtkTextIter start_match;
@@ -293,14 +269,14 @@ static gboolean all_keypress_event_cb(GtkToggleButton *widget, LogWindow *logwin
        return FALSE;
 }
 
-static gboolean debug_changed_cb(GtkSpinButton *widget, LogWindow *logwin)
+static gboolean debug_changed_cb(GtkSpinButton *widget, LogWindow *UNUSED(logwin))
 {
        set_debug_level((gtk_spin_button_get_value(widget)));
 
        return FALSE;
 }
 
-static void search_entry_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos, GdkEvent *event, gpointer userdata)
+static void search_entry_icon_cb(GtkEntry *UNUSED(entry), GtkEntryIconPosition pos, GdkEvent *UNUSED(event), gpointer userdata)
 {
        LogWindow *logwin = userdata;
        GtkTextIter start_find;
@@ -319,7 +295,7 @@ static void search_entry_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos, GdkE
                }
 }
 
-static void filter_entry_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos, GdkEvent *event, gpointer userdata)
+static void filter_entry_icon_cb(GtkEntry *entry, GtkEntryIconPosition UNUSED(pos), GdkEvent *UNUSED(event), gpointer UNUSED(userdata))
 {
        gtk_entry_set_text(entry, "");
        set_regexp("");
@@ -349,7 +325,7 @@ static LogWindow *log_window_create(LayoutWindow *lw)
 
        window = window_new(GTK_WINDOW_TOPLEVEL, "log", NULL, NULL, _("Log"));
        DEBUG_NAME(window);
-       win_vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE);
+       win_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
        gtk_container_add(GTK_CONTAINER(window), win_vbox);
        gtk_widget_show(win_vbox);
 
@@ -428,7 +404,7 @@ static LogWindow *log_window_create(LayoutWindow *lw)
        g_signal_connect(logwin->timer_data, "toggled", G_CALLBACK(log_window_timer_data_cb), logwin);
        gtk_widget_show_all(logwin->timer_data);
 
-       search_box = gtk_hbox_new(FALSE, 0);
+       search_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_container_add(GTK_CONTAINER(hbox), search_box);
        gtk_widget_show(search_box);
 
@@ -496,47 +472,7 @@ static LogWindow *log_window_create(LayoutWindow *lw)
 static void log_window_init(LogWindow *logwin)
 {
        GtkTextBuffer *buffer;
-#if !GTK_CHECK_VERSION(3,0,0)
-       GdkColormap *colormap;
-       gboolean success[LOG_COUNT];
-       gint i;
 
-       g_assert(logwin != NULL);
-       g_assert(logwin->colors != NULL);
-       for (i = LOG_NORMAL; i < LOG_COUNT; i++)
-               {
-               gboolean ok = gdk_color_parse(logdefs[i].color, &logwin->colors[i]);
-               if (ok == TRUE) continue;
-
-               if (i == LOG_NORMAL) return;
-               memcpy(&logwin->colors[i], &logwin->colors[LOG_NORMAL], sizeof(GdkColor));
-               }
-
-       colormap = gdk_drawable_get_colormap(gtk_widget_get_window(logwin->window));
-       gdk_colormap_alloc_colors(colormap, logwin->colors, LOG_COUNT, FALSE, TRUE, success);
-
-       for (i = LOG_NORMAL; i < LOG_COUNT; i++)
-               {
-               if (success[i] == FALSE)
-                       {
-                       GtkStyle *style;
-                       gint j;
-
-                       g_warning("LogWindow: color allocation failed\n");
-                       style = gtk_widget_get_style(logwin->window);
-                       for (j = LOG_NORMAL; j < LOG_COUNT; j++)
-                               logwin->colors[j] = style->black;
-                       break;
-                       }
-               }
-
-       buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(logwin->text));
-       for (i = LOG_NORMAL; i < LOG_COUNT; i++)
-               gtk_text_buffer_create_tag(buffer, logdefs[i].tag,
-                                          "foreground-gdk", &logwin->colors[i],
-                                          "family", "MonoSpace",
-                                          NULL);
-#else
        g_assert(logwin != NULL);
 
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(logwin->text));
@@ -553,7 +489,6 @@ static void log_window_init(LogWindow *logwin)
        logwin->color_tags[LOG_ERROR] = gtk_text_buffer_create_tag (buffer,
                                                        "red_foreground", "foreground", "red",
                                                        "family", "MonoSpace", NULL);
-#endif
 }
 
 static void log_window_show(LogWindow *logwin)
@@ -600,19 +535,6 @@ struct _LogMsg {
        LogType type;
 };
 
-#if !GTK_CHECK_VERSION(3,0,0)
-static void log_window_insert_text(GtkTextBuffer *buffer, GtkTextIter *iter,
-                                  const gchar *text, const gchar *tag)
-{
-       gchar *str_utf8;
-
-       if (!text || !*text) return;
-
-       str_utf8 = utf8_validate_or_convert(text);
-       gtk_text_buffer_insert_with_tags_by_name(buffer, iter, str_utf8, -1, tag, NULL);
-       g_free(str_utf8);
-}
-#else
 static void log_window_insert_text(GtkTextBuffer *buffer, GtkTextIter *iter,
                                   const gchar *text, GtkTextTag *tag)
 {
@@ -624,7 +546,6 @@ static void log_window_insert_text(GtkTextBuffer *buffer, GtkTextIter *iter,
        gtk_text_buffer_insert_with_tags(buffer, iter, str_utf8, -1, tag, NULL);
        g_free(str_utf8);
 }
-#endif
 
 void log_window_append(const gchar *str, LogType type)
 {
@@ -678,12 +599,8 @@ void log_window_append(const gchar *str, LogType type)
                GList *prev;
                LogMsg *oldest_msg = work->data;
 
-#if !GTK_CHECK_VERSION(3,0,0)
-               log_window_insert_text(buffer, &iter, oldest_msg->text, logdefs[oldest_msg->type].tag);
-#else
                log_window_insert_text(buffer, &iter, oldest_msg->text,
                                                                        logwindow->color_tags[oldest_msg->type]);
-#endif
 
                prev = work->prev;
                memory = g_list_delete_link(memory, work);
@@ -691,11 +608,7 @@ void log_window_append(const gchar *str, LogType type)
                }
        }
 
-#if !GTK_CHECK_VERSION(3,0,0)
-       log_window_insert_text(buffer, &iter, str, logdefs[type].tag);
-#else
        log_window_insert_text(buffer, &iter, str, logwindow->color_tags[type]);
-#endif
 
        if (!options->log_window.paused)
                {
index 0ccd1cd..5285d77 100644 (file)
@@ -152,8 +152,8 @@ static void parse_command_line_add_file(const gchar *file_path, gchar **path, gc
                }
 }
 
-static void parse_command_line_add_dir(const gchar *dir, gchar **path, gchar **file,
-                                      GList **list)
+static void parse_command_line_add_dir(const gchar *dir, gchar **UNUSED(path), gchar **UNUSED(file),
+                                      GList **UNUSED(list))
 {
 #if 0
        /* This is broken because file filter is not initialized yet.
@@ -948,13 +948,13 @@ static void exit_program_final(void)
 
 static GenericDialog *exit_dialog = NULL;
 
-static void exit_confirm_cancel_cb(GenericDialog *gd, gpointer data)
+static void exit_confirm_cancel_cb(GenericDialog *gd, gpointer UNUSED(data))
 {
        exit_dialog = NULL;
        generic_dialog_close(gd);
 }
 
-static void exit_confirm_exit_cb(GenericDialog *gd, gpointer data)
+static void exit_confirm_exit_cb(GenericDialog *gd, gpointer UNUSED(data))
 {
        exit_dialog = NULL;
        generic_dialog_close(gd);
@@ -998,7 +998,7 @@ static gint exit_confirm_dlg(void)
        return TRUE;
 }
 
-static void exit_program_write_metadata_cb(gint success, const gchar *dest_path, gpointer data)
+static void exit_program_write_metadata_cb(gint success, const gchar *UNUSED(dest_path), gpointer UNUSED(data))
 {
        if (success) exit_program();
 }
@@ -1027,7 +1027,7 @@ void exit_program(void)
 /** @FIXME this probably needs some better ifdefs. Please report any compilation problems */
 
 #if defined(SIGBUS) && defined(SA_SIGINFO)
-static void sigbus_handler_cb(int signum, siginfo_t *info, void *context)
+static void sigbus_handler_cb(int UNUSED(signum), siginfo_t *info, void *UNUSED(context))
 {
        unsigned long pagesize = sysconf(_SC_PAGE_SIZE);
        DEBUG_1("SIGBUS %p", info->si_addr);
@@ -1049,7 +1049,6 @@ static void setup_sigbus_handler(void)
 
 static void set_theme_bg_color()
 {
-#if GTK_CHECK_VERSION(3,0,0)
        GdkRGBA bg_color;
        GdkColor theme_color;
        GtkStyleContext *style_context;
@@ -1077,10 +1076,9 @@ static void set_theme_bg_color()
                }
 
        view_window_colors_update();
-#endif
 }
 
-static gboolean theme_change_cb(GObject *gobject, GParamSpec *pspec, gpointer data)
+static gboolean theme_change_cb(GObject *UNUSED(gobject), GParamSpec *UNUSED(pspec), gpointer UNUSED(data))
 {
        set_theme_bg_color();
 
@@ -1096,10 +1094,9 @@ static gboolean theme_change_cb(GObject *gobject, GParamSpec *pspec, gpointer da
  * They are now variables, all defined relative to one level above the
  * directory that the executable is run from.
  */
-static void create_application_paths(gchar *argv[])
+static void create_application_paths()
 {
        gchar *dirname;
-       gchar *tmp;
        gint length;
        gchar *path;
 
@@ -1123,7 +1120,7 @@ static void create_application_paths(gchar *argv[])
        g_free(path);
 }
 
-gboolean stderr_channel_cb(GIOChannel *source, GIOCondition condition, gpointer data)
+gboolean stderr_channel_cb(GIOChannel *source, GIOCondition UNUSED(condition), gpointer UNUSED(data))
 {
        static GString *message_str = NULL;
        gchar buf[10] = {0};
@@ -1168,23 +1165,17 @@ gint main(gint argc, gchar *argv[])
        gint fd_stderr[2];
        GIOChannel *stderr_channel;
 
-#if GTK_CHECK_VERSION(3,10,0)
        gdk_set_allowed_backends("x11,*");
-#endif
 
 #ifdef HAVE_GTHREAD
-#if !GLIB_CHECK_VERSION(2,32,0)
-       g_thread_init(NULL);
-#endif
        gdk_threads_init();
        gdk_threads_enter();
-
 #endif
 
        /* init execution time counter (debug only) */
        init_exec_time();
 
-       create_application_paths(argv);
+       create_application_paths();
 
        /* setup locale, i18n */
        setlocale(LC_ALL, "");
index fe2ac10..f92710d 100644 (file)
 #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
index f4fbdbf..a9aa53b 100644 (file)
@@ -74,7 +74,7 @@ gpointer submenu_item_get_data(GtkWidget *menu)
  * edit menu
  *-----------------------------------------------------------------------------
  */
-static void edit_item_destroy_cb(GtkWidget *widget, gpointer data)
+static void edit_item_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        g_free(data);
 }
@@ -308,7 +308,7 @@ static GtkWidget *submenu_add_zoom_item(GtkWidget *menu,
 }
 
 GtkWidget *submenu_add_zoom(GtkWidget *menu, GCallback func, gpointer data,
-                           gboolean include_none, gboolean include_path,
+                           gboolean UNUSED(include_none), gboolean UNUSED(include_path),
                            gboolean show_current, ZoomMode mode)
 {
        GtkWidget *submenu;
@@ -440,7 +440,7 @@ GtkWidget *submenu_add_alter(GtkWidget *menu, GCallback func, gpointer data)
  *  Used by all image windows
  */
 static void add_collection_list(GtkWidget *menu, GCallback func,
-                                                               GList *collection_list, gpointer data)
+                                                               GList *collection_list, gpointer UNUSED(data))
 {
        GList *work;
        gint index = 0; /* index to existing collection list menu item selected */
index 91d938a..b433a33 100644 (file)
@@ -144,8 +144,6 @@ main_sources = files('advanced_exif.c',
 'layout_image.h',
 'layout_util.c',
 'layout_util.h',
-'lirc.c',
-'lirc.h',
 'logwindow.c',
 'logwindow.h',
 'lua.c',
@@ -176,8 +174,6 @@ main_sources = files('advanced_exif.c',
 'rcfile.h',
 'remote.c',
 'remote.h',
-'renderer-clutter.c',
-'renderer-clutter.h',
 'renderer-tiles.c',
 'renderer-tiles.h',
 'search_and_run.c',
@@ -288,7 +284,6 @@ libjxl_dep,
 libopenjp2_dep,
 libraw_dep,
 libwebp_dep,
-lirc_dep,
 lua_dep,
 poppler_glib_dep,
 thread_dep,
index 5738c98..528c649 100644 (file)
@@ -247,7 +247,7 @@ gboolean metadata_write_queue_remove_list(GList *list)
        return ret;
 }
 
-void metadata_notify_cb(FileData *fd, NotifyType type, gpointer data)
+void metadata_notify_cb(FileData *fd, NotifyType type, gpointer UNUSED(data))
 {
        if (type & (NOTIFY_REREAD | NOTIFY_CHANGE))
                {
@@ -293,7 +293,7 @@ gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc do
        return (metadata_write_queue != NULL);
 }
 
-static gboolean metadata_write_queue_idle_cb(gpointer data)
+static gboolean metadata_write_queue_idle_cb(gpointer UNUSED(data))
 {
        metadata_write_queue_confirm(FALSE, NULL, NULL);
        metadata_write_idle_id = 0;
@@ -1049,7 +1049,7 @@ GList *string_to_keywords_list(const gchar *text)
  */
 
 
-gboolean meta_data_get_keyword_mark(FileData *fd, gint n, gpointer data)
+gboolean meta_data_get_keyword_mark(FileData *fd, gint UNUSED(n), gpointer data)
 {
        /** @FIXME do not use global keyword_tree */
        GList *path = data;
@@ -1067,7 +1067,7 @@ gboolean meta_data_get_keyword_mark(FileData *fd, gint n, gpointer data)
        return found;
 }
 
-gboolean meta_data_set_keyword_mark(FileData *fd, gint n, gboolean value, gpointer data)
+gboolean meta_data_set_keyword_mark(FileData *fd, gint UNUSED(n), gboolean value, gpointer data)
 {
        GList *path = data;
        GList *keywords = NULL;
@@ -1633,7 +1633,7 @@ gboolean keyword_is_hidden_in(GtkTreeModel *keyword_tree, GtkTreeIter *iter, gpo
        return !!g_list_find(list, id);
 }
 
-static gboolean keyword_show_all_in_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+static gboolean keyword_show_all_in_cb(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer data)
 {
        keyword_show_in(GTK_TREE_STORE(model), iter, data);
        return FALSE;
@@ -1644,7 +1644,7 @@ void keyword_show_all_in(GtkTreeStore *keyword_tree, gpointer id)
        gtk_tree_model_foreach(GTK_TREE_MODEL(keyword_tree), keyword_show_all_in_cb, id);
 }
 
-static gboolean keyword_revert_hidden_in_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+static gboolean keyword_revert_hidden_in_cb(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer data)
 {
        if (keyword_is_hidden_in(GTK_TREE_MODEL(keyword_tree), iter, data))
                {
@@ -1687,7 +1687,7 @@ void keyword_hide_unset_in(GtkTreeStore *keyword_tree, gpointer id, GList *keywo
        keyword_hide_unset_in_recursive(keyword_tree, &iter, id, keywords);
 }
 
-static gboolean keyword_show_set_in_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter_ptr, gpointer data)
+static gboolean keyword_show_set_in_cb(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter_ptr, gpointer data)
 {
        GtkTreeIter iter = *iter_ptr;
        GList *keywords = data;
index 51e670e..4d695ac 100644 (file)
@@ -382,7 +382,7 @@ gint get_cpu_cores(void)
     return sysconf(_SC_NPROCESSORS_ONLN);
 }
 
-void tree_path_free_wrapper(void *data, void *useradata)
+void tree_path_free_wrapper(void *data, void *UNUSED(useradata))
 {
        gtk_tree_path_free(data);
 }
index 3819532..6af74de 100644 (file)
@@ -375,7 +375,7 @@ void save_options(ConfOptions *options)
        g_free(rc_path);
 }
 
-gboolean load_options(ConfOptions *options)
+gboolean load_options(ConfOptions *UNUSED(options))
 {
        gboolean success;
        gchar *rc_path;
index 003e988..042b339 100644 (file)
@@ -297,7 +297,7 @@ struct _ConfOptions
 
        /* Stereo */
        struct {
-               gint mode;;
+               gint mode;
                gint fsmode;
                gboolean enable_fsmode;
                gint fixed_w, fixed_h;
index 0b88aee..492face 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -104,9 +104,9 @@ static void tag_button_cb(GtkWidget *widget, gpointer data)
        gtk_widget_grab_focus(GTK_WIDGET(image_overlay_template_view));
 }
 
-static void osd_dnd_get_cb(GtkWidget *btn, GdkDragContext *context,
-                                                               GtkSelectionData *selection_data, guint info,
-                                                               guint time, gpointer data)
+static void osd_dnd_get_cb(GtkWidget *btn, GdkDragContext *UNUSED(context),
+                                                               GtkSelectionData *selection_data, guint UNUSED(info),
+                                                               guint UNUSED(time), gpointer data)
 {
        TagData *td;
        GtkTextView *image_overlay_template_view = data;
@@ -117,9 +117,9 @@ static void osd_dnd_get_cb(GtkWidget *btn, GdkDragContext *context,
        gtk_widget_grab_focus(GTK_WIDGET(image_overlay_template_view));
 }
 
-static void osd_btn_destroy_cb(GtkWidget *btn, GdkDragContext *context,
-                                                               GtkSelectionData *selection_data, guint info,
-                                                               guint time, gpointer data)
+static void osd_btn_destroy_cb(GtkWidget *btn, GdkDragContext *UNUSED(context),
+                                                               GtkSelectionData *UNUSED(selection_data), guint UNUSED(info),
+                                                               guint UNUSED(time), gpointer UNUSED(data))
 {
        TagData *td;
 
index 636a4ff..bbbd205 100644 (file)
@@ -156,7 +156,7 @@ void pan_item_box_shadow(PanItem *pi, gint offset, gint fade)
        pi->data = shadow;
 }
 
-gint pan_item_box_draw(PanWindow *pw, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *pr,
+gint pan_item_box_draw(PanWindow *UNUSED(pw), PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *UNUSED(pr),
                       gint x, gint y, gint width, gint height)
 {
        gint bw, bh;
@@ -250,7 +250,7 @@ gint pan_item_box_draw(PanWindow *pw, PanItem *pi, GdkPixbuf *pixbuf, PixbufRend
  *-----------------------------------------------------------------------------
  */
 
-PanItem *pan_item_tri_new(PanWindow *pw, FileData *fd, gint x, gint y, gint width, gint height,
+PanItem *pan_item_tri_new(PanWindow *pw, FileData *UNUSED(fd), gint x, gint y, gint width, gint height,
                          gint x1, gint y1, gint x2, gint y2, gint x3, gint y3,
                          guint8 r, guint8 g, guint8 b, guint8 a)
 {
@@ -299,7 +299,7 @@ void pan_item_tri_border(PanItem *pi, gint borders,
        pi->color2_a = a;
 }
 
-gint pan_item_tri_draw(PanWindow *pw, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *pr,
+gint pan_item_tri_draw(PanWindow *UNUSED(pw), PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *UNUSED(pr),
                       gint x, gint y, gint width, gint height)
 {
        gint rx, ry, rw, rh;
@@ -434,8 +434,8 @@ PanItem *pan_item_text_new(PanWindow *pw, gint x, gint y, const gchar *text,
        return pi;
 }
 
-gint pan_item_text_draw(PanWindow *pw, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *pr,
-                       gint x, gint y, gint width, gint height)
+gint pan_item_text_draw(PanWindow *UNUSED(pw), PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *pr,
+                       gint x, gint y, gint UNUSED(width), gint UNUSED(height))
 {
        PangoLayout *layout;
 
@@ -473,7 +473,7 @@ PanItem *pan_item_thumb_new(PanWindow *pw, FileData *fd, gint x, gint y)
        return pi;
 }
 
-gint pan_item_thumb_draw(PanWindow *pw, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *pr,
+gint pan_item_thumb_draw(PanWindow *pw, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *UNUSED(pr),
                         gint x, gint y, gint width, gint height)
 {
        gint tx, ty, tw, th;
@@ -658,7 +658,7 @@ PanItem *pan_item_image_new(PanWindow *pw, FileData *fd, gint x, gint y, gint w,
        return pi;
 }
 
-gint pan_item_image_draw(PanWindow *pw, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *pr,
+gint pan_item_image_draw(PanWindow *UNUSED(pw), PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *UNUSED(pr),
                         gint x, gint y, gint width, gint height)
 {
        gint rx, ry, rw, rh;
index 98a6f29..2242a6b 100644 (file)
@@ -265,7 +265,7 @@ void pan_filter_toggle_visible(PanWindow *pw, gboolean enable)
                }
 }
 
-void pan_filter_toggle_button_cb(GtkWidget *button, gpointer data)
+void pan_filter_toggle_button_cb(GtkWidget *UNUSED(button), gpointer data)
 {
        PanWindow *pw = data;
        PanViewFilterUi *ui = pw->filter_ui;
index 5ddef13..862479d 100644 (file)
@@ -36,11 +36,11 @@ PanViewSearchUi *pan_search_ui_new(PanWindow *pw)
        GtkWidget *hbox;
 
        // Build the actual search UI.
-       ui->search_box = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+       ui->search_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        pref_spacer(ui->search_box, 0);
        pref_label_new(ui->search_box, _("Find:"));
 
-       hbox = gtk_hbox_new(TRUE, PREF_PAD_SPACE);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        gtk_box_pack_start(GTK_BOX(ui->search_box), hbox, TRUE, TRUE, 0);
        gtk_widget_show(hbox);
 
@@ -57,7 +57,7 @@ PanViewSearchUi *pan_search_ui_new(PanWindow *pw)
        ui->search_button = gtk_toggle_button_new();
        gtk_button_set_relief(GTK_BUTTON(ui->search_button), GTK_RELIEF_NONE);
        gtk_button_set_focus_on_click(GTK_BUTTON(ui->search_button), FALSE);
-       hbox = gtk_hbox_new(FALSE, PREF_PAD_GAP);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
        gtk_container_add(GTK_CONTAINER(ui->search_button), hbox);
        gtk_widget_show(hbox);
        ui->search_button_arrow = gtk_arrow_new(GTK_ARROW_UP, GTK_SHADOW_NONE);
index 7868eca..537cf84 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "pan-view.h"
 
+#include "main.h"
 #include "bar_exif.h"
 #include "dnd.h"
 #include "editors.h"
@@ -407,8 +408,8 @@ static gboolean pan_window_request_tile_cb(PixbufRenderer *pr, gint x, gint y,
        return TRUE;
 }
 
-static void pan_window_dispose_tile_cb(PixbufRenderer *pr, gint x, gint y,
-                                      gint width, gint height, GdkPixbuf *pixbuf, gpointer data)
+static void pan_window_dispose_tile_cb(PixbufRenderer *UNUSED(pr), gint x, gint y,
+                                      gint width, gint height, GdkPixbuf *UNUSED(pixbuf), gpointer data)
 {
        PanWindow *pw = data;
        GList *list;
@@ -617,7 +618,7 @@ static void pan_cache_fill(PanWindow *pw, FileData *dir_fd)
        pw->cache_total = g_list_length(pw->cache_todo);
 }
 
-static void pan_cache_step_done_cb(CacheLoader *cl, gint error, gpointer data)
+static void pan_cache_step_done_cb(CacheLoader *cl, gint UNUSED(error), gpointer data)
 {
        PanWindow *pw = data;
 
@@ -1177,7 +1178,7 @@ FileData *pan_menu_click_fd(PanWindow *pw)
        return NULL;
 }
 
-static void pan_window_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void pan_window_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        PanWindow *pw = data;
 
@@ -1185,7 +1186,7 @@ static void pan_window_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *pu
        popup_menu_position_clamp(menu, x, y, 0);
 }
 
-static gboolean pan_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean pan_window_key_press_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        PanWindow *pw = data;
        PixbufRenderer *pr;
@@ -1601,7 +1602,7 @@ static void button_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer data)
                }
 }
 
-static void scroll_cb(PixbufRenderer *pr, GdkEventScroll *event, gpointer data)
+static void scroll_cb(PixbufRenderer *pr, GdkEventScroll *event, gpointer UNUSED(data))
 {
        gint w, h;
 
@@ -1660,7 +1661,7 @@ static void pan_image_set_buttons(PanWindow *pw, ImageWindow *imd)
                         G_CALLBACK(scroll_cb), pw);
 }
 
-static void pan_fullscreen_stop_func(FullScreenData *fs, gpointer data)
+static void pan_fullscreen_stop_func(FullScreenData *UNUSED(fs), gpointer data)
 {
        PanWindow *pw = data;
 
@@ -1687,7 +1688,7 @@ static void pan_fullscreen_toggle(PanWindow *pw, gboolean force_off)
                }
 }
 
-static void pan_window_image_zoom_cb(PixbufRenderer *pr, gdouble zoom, gpointer data)
+static void pan_window_image_zoom_cb(PixbufRenderer *UNUSED(pr), gdouble UNUSED(zoom), gpointer data)
 {
        PanWindow *pw = data;
        gchar *text;
@@ -1834,7 +1835,7 @@ static void pan_window_close(PanWindow *pw)
        g_free(pw);
 }
 
-static gboolean pan_window_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
+static gboolean pan_window_delete_cb(GtkWidget *UNUSED(w), GdkEventAny *UNUSED(event), gpointer data)
 {
        PanWindow *pw = data;
 
@@ -2051,7 +2052,7 @@ static void pan_warning_ok_cb(GenericDialog *gd, gpointer data)
        file_data_unref(dir_fd);
 }
 
-static void pan_warning_hide_cb(GtkWidget *button, gpointer data)
+static void pan_warning_hide_cb(GtkWidget *button, gpointer UNUSED(data))
 {
        gboolean hide_dlg;
 
@@ -2134,7 +2135,7 @@ void pan_window_new(FileData *dir_fd)
 #define INFO_IMAGE_SIZE_KEY "image_size_data"
 
 
-static void pan_new_window_cb(GtkWidget *widget, gpointer data)
+static void pan_new_window_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
@@ -2147,7 +2148,7 @@ static void pan_new_window_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void pan_go_to_original_cb(GtkWidget *widget, gpointer data)
+static void pan_go_to_original_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        LayoutWindow *lw = NULL;
        PanWindow *pw = data;
@@ -2182,28 +2183,28 @@ static void pan_edit_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void pan_zoom_in_cb(GtkWidget *widget, gpointer data)
+static void pan_zoom_in_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
 
        image_zoom_adjust(pw->imd, ZOOM_INCREMENT);
 }
 
-static void pan_zoom_out_cb(GtkWidget *widget, gpointer data)
+static void pan_zoom_out_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
 
        image_zoom_adjust(pw->imd, -ZOOM_INCREMENT);
 }
 
-static void pan_zoom_1_1_cb(GtkWidget *widget, gpointer data)
+static void pan_zoom_1_1_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
 
        image_zoom_set(pw->imd, 1.0);
 }
 
-static void pan_copy_cb(GtkWidget *widget, gpointer data)
+static void pan_copy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
@@ -2212,7 +2213,7 @@ static void pan_copy_cb(GtkWidget *widget, gpointer data)
        if (fd) file_util_copy(fd, NULL, NULL, pw->imd->widget);
 }
 
-static void pan_move_cb(GtkWidget *widget, gpointer data)
+static void pan_move_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
@@ -2221,7 +2222,7 @@ static void pan_move_cb(GtkWidget *widget, gpointer data)
        if (fd) file_util_move(fd, NULL, NULL, pw->imd->widget);
 }
 
-static void pan_rename_cb(GtkWidget *widget, gpointer data)
+static void pan_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
@@ -2230,7 +2231,7 @@ static void pan_rename_cb(GtkWidget *widget, gpointer data)
        if (fd) file_util_rename(fd, NULL, pw->imd->widget);
 }
 
-static void pan_delete_cb(GtkWidget *widget, gpointer data)
+static void pan_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
@@ -2243,7 +2244,7 @@ static void pan_delete_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void pan_move_to_trash_cb(GtkWidget *widget, gpointer data)
+static void pan_move_to_trash_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
@@ -2256,7 +2257,7 @@ static void pan_move_to_trash_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void pan_copy_path_cb(GtkWidget *widget, gpointer data)
+static void pan_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
@@ -2265,7 +2266,7 @@ static void pan_copy_path_cb(GtkWidget *widget, gpointer data)
        if (fd) file_util_copy_path_to_clipboard(fd, TRUE);
 }
 
-static void pan_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
+static void pan_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
@@ -2298,28 +2299,28 @@ static void pan_info_toggle_image_cb(GtkWidget *widget, gpointer data)
        /** @FIXME sync info now */
 }
 
-static void pan_fullscreen_cb(GtkWidget *widget, gpointer data)
+static void pan_fullscreen_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
 
        pan_fullscreen_toggle(pw, FALSE);
 }
 
-static void pan_close_cb(GtkWidget *widget, gpointer data)
+static void pan_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
 
        pan_window_close(pw);
 }
 
-static void pan_popup_menu_destroy_cb(GtkWidget *widget, gpointer data)
+static void pan_popup_menu_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GList *editmenu_fd_list = data;
 
        filelist_free(editmenu_fd_list);
 }
 
-static void pan_play_cb(GtkWidget *widget, gpointer data)
+static void pan_play_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        PanWindow *pw = data;
 
@@ -2490,10 +2491,10 @@ static GtkWidget *pan_popup_menu(PanWindow *pw)
  *-----------------------------------------------------------------------------
  */
 
-static void pan_window_get_dnd_data(GtkWidget *widget, GdkDragContext *context,
-                                   gint x, gint y,
+static void pan_window_get_dnd_data(GtkWidget *UNUSED(widget), GdkDragContext *context,
+                                   gint UNUSED(x), gint UNUSED(y),
                                    GtkSelectionData *selection_data, guint info,
-                                   guint time, gpointer data)
+                                   guint UNUSED(time), gpointer data)
 {
        PanWindow *pw = data;
 
@@ -2515,9 +2516,9 @@ static void pan_window_get_dnd_data(GtkWidget *widget, GdkDragContext *context,
                }
 }
 
-static void pan_window_set_dnd_data(GtkWidget *widget, GdkDragContext *context,
-                                   GtkSelectionData *selection_data, guint info,
-                                   guint time, gpointer data)
+static void pan_window_set_dnd_data(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
+                                   GtkSelectionData *selection_data, guint UNUSED(info),
+                                   guint UNUSED(time), gpointer data)
 {
        PanWindow *pw = data;
        FileData *fd;
index f88152e..f2eb176 100644 (file)
@@ -27,7 +27,6 @@
 #include "main.h"
 #include "pixbuf-renderer.h"
 #include "renderer-tiles.h"
-#include "renderer-clutter.h"
 
 #include "intl.h"
 #include "layout.h"
@@ -149,12 +148,12 @@ static void pr_stereo_temp_disable(PixbufRenderer *pr, gboolean disable);
  *-------------------------------------------------------------------
  */
 
-static void pixbuf_renderer_class_init_wrapper(void *g_class, void *class_data)
+static void pixbuf_renderer_class_init_wrapper(void *g_class, void *UNUSED(class_data))
 {
        pixbuf_renderer_class_init(g_class);
 }
 
-static void pixbuf_renderer_init_wrapper(PixbufRenderer *pr, void *class_data)
+static void pixbuf_renderer_init_wrapper(PixbufRenderer *pr, void *UNUSED(class_data))
 {
        pixbuf_renderer_init(pr);
 }
@@ -411,14 +410,14 @@ static void pixbuf_renderer_class_init(PixbufRendererClass *class)
 
 static RendererFuncs *pr_backend_renderer_new(PixbufRenderer *pr)
 {
-       if (options->image.use_clutter_renderer && !options->disable_gpu)
-               {
-#ifdef HAVE_CLUTTER
-               return renderer_clutter_new(pr);
-#else
-               log_printf("Warning: Geeqie is built without clutter renderer support");
-#endif
-               }
+       //~ if (options->image.use_clutter_renderer && !options->disable_gpu)
+               //~ {
+//~ #ifdef HAVE_CLUTTER
+               //~ return renderer_clutter_new(pr);
+//~ #else
+               //~ log_printf("Warning: Geeqie is built without clutter renderer support");
+//~ #endif
+               //~ }
        return renderer_tiles_new(pr);
 }
 
@@ -650,7 +649,7 @@ static void widget_set_cursor(GtkWidget *widget, gint icon)
 
        gdk_window_set_cursor(gtk_widget_get_window(widget), cursor);
 
-       if (cursor) gdk_cursor_unref(cursor);
+       if (cursor) g_object_unref(G_OBJECT(cursor));
 }
 
 gboolean pr_clip_region(gint x, gint y, gint w, gint h,
@@ -1336,7 +1335,7 @@ static void pr_zoom_adjust_real(PixbufRenderer *pr, gdouble increment,
 
 static void pr_update_signal(PixbufRenderer *pr)
 {
-       DEBUG_1("%s pixbuf renderer updated - started drawing %p, img: %dx%d", get_exec_time(), pr, pr->image_width, pr->image_height);
+       DEBUG_1("%s pixbuf renderer updated - started drawing %p, img: %dx%d", get_exec_time(), (void *)pr, pr->image_width, pr->image_height);
        pr->debug_updated = TRUE;
 }
 
@@ -1364,7 +1363,7 @@ void pr_render_complete_signal(PixbufRenderer *pr)
                }
        if (pr->debug_updated)
                {
-               DEBUG_1("%s pixbuf renderer done %p", get_exec_time(), pr);
+               DEBUG_1("%s pixbuf renderer done %p", get_exec_time(), (void *)pr);
                pr->debug_updated = FALSE;
                }
 }
@@ -1943,7 +1942,7 @@ static void pr_size_sync(PixbufRenderer *pr, gint new_width, gint new_height)
        pr_update_signal(pr);
 }
 
-static void pr_size_cb(GtkWidget *widget, GtkAllocation *allocation, gpointer data)
+static void pr_size_cb(GtkWidget *UNUSED(widget), GtkAllocation *allocation, gpointer data)
 {
        PixbufRenderer *pr = data;
 
@@ -2031,25 +2030,20 @@ void pixbuf_renderer_set_scroll_center(PixbufRenderer *pr, gdouble x, gdouble y)
  *-------------------------------------------------------------------
  */
 
-static gboolean pr_mouse_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
+static gboolean pr_mouse_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer UNUSED(data))
 {
        PixbufRenderer *pr;
        gint accel;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
        /* This is a hack, but work far the best, at least for single pointer systems.
         * See https://bugzilla.gnome.org/show_bug.cgi?id=587714 for more. */
        gint x, y;
-#if GTK_CHECK_VERSION(3,0,0)
        device_manager = gdk_display_get_device_manager(gdk_window_get_display(event->window));
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_window_get_device_position(event->window, device, &x, &y, NULL);
-#else
-       gdk_window_get_pointer (event->window, &x, &y, NULL);
-#endif
+
        event->x = x;
        event->y = y;
 
@@ -2104,7 +2098,7 @@ static gboolean pr_mouse_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpo
        return FALSE;
 }
 
-static gboolean pr_leave_notify_cb(GtkWidget *widget, GdkEventCrossing *cevent, gpointer data)
+static gboolean pr_leave_notify_cb(GtkWidget *widget, GdkEventCrossing *UNUSED(cevent), gpointer UNUSED(data))
 {
        PixbufRenderer *pr;
 
@@ -2116,7 +2110,7 @@ static gboolean pr_leave_notify_cb(GtkWidget *widget, GdkEventCrossing *cevent,
        return FALSE;
 }
 
-static gboolean pr_mouse_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean pr_mouse_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer UNUSED(data))
 {
        PixbufRenderer *pr;
        GtkWidget *parent;
@@ -2156,7 +2150,7 @@ static gboolean pr_mouse_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpo
        return FALSE;
 }
 
-static gboolean pr_mouse_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean pr_mouse_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer UNUSED(data))
 {
        PixbufRenderer *pr;
 
@@ -2192,7 +2186,7 @@ static gboolean pr_mouse_release_cb(GtkWidget *widget, GdkEventButton *bevent, g
        return FALSE;
 }
 
-static gboolean pr_mouse_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+static gboolean pr_mouse_leave_cb(GtkWidget *widget, GdkEventCrossing *UNUSED(event), gpointer UNUSED(data))
 {
        PixbufRenderer *pr;
 
@@ -2209,7 +2203,7 @@ static gboolean pr_mouse_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gp
        return FALSE;
 }
 
-static void pr_mouse_drag_cb(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void pr_mouse_drag_cb(GtkWidget *widget, GdkDragContext *UNUSED(context), gpointer UNUSED(data))
 {
        PixbufRenderer *pr;
 
@@ -3011,7 +3005,7 @@ gboolean pixbuf_renderer_get_virtual_rect(PixbufRenderer *pr, GdkRectangle *rect
        return TRUE;
 }
 
-void pixbuf_renderer_set_size_early(PixbufRenderer *pr, guint width, guint height)
+void pixbuf_renderer_set_size_early(PixbufRenderer *UNUSED(pr), guint UNUSED(width), guint UNUSED(height))
 {
 #if 0
        /** @FIXME this function does not consider the image orientation,
index 85f5845..d1a29b9 100644 (file)
@@ -847,7 +847,7 @@ static void pixbuf_copy_font(GdkPixbuf *src, gint sx, gint sy,
                }
 }
 
-void pixbuf_draw_layout(GdkPixbuf *pixbuf, PangoLayout *layout, GtkWidget *widget,
+void pixbuf_draw_layout(GdkPixbuf *pixbuf, PangoLayout *layout, GtkWidget *UNUSED(widget),
                        gint x, gint y,
                        guint8 r, guint8 g, guint8 b, guint8 a)
 {
@@ -1283,7 +1283,7 @@ static void pixbuf_draw_fade_linear(guchar *p_pix, gint prs, gboolean has_alpha,
 static void pixbuf_draw_fade_radius(guchar *p_pix, gint prs, gboolean has_alpha,
                                    gint sx, gint sy, gint border,
                                    gint x1, gint y1, gint x2, gint y2,
-                                   guint8 r, guint8 g, guint8 b, guint8 a)
+                                   guint8 UNUSED(r), guint8 g, guint8 b, guint8 a)
 {
        guchar *pp;
        gint p_step;
index 641962b..62ccf26 100644 (file)
@@ -170,12 +170,12 @@ static GtkWidget *help_search_engine_entry;
  *-----------------------------------------------------------------------------
  */
 
-static void zoom_increment_cb(GtkWidget *spin, gpointer data)
+static void zoom_increment_cb(GtkWidget *spin, gpointer UNUSED(data))
 {
        c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 100.0 + 0.01);
 }
 
-static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer data)
+static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer UNUSED(data))
 {
        gint mins_secs_tenths, delay;
 
@@ -190,7 +190,7 @@ static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer data)
                                                                                                        SLIDESHOW_SUBSECOND_PRECISION;
 }
 
-static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer data)
+static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer UNUSED(data))
 {
        gint hours, secs_tenths, delay;
 
@@ -205,7 +205,7 @@ static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer data)
                                                                                                        SLIDESHOW_SUBSECOND_PRECISION;
 }
 
-static void slideshow_delay_seconds_cb(GtkWidget *spin, gpointer data)
+static void slideshow_delay_seconds_cb(GtkWidget *spin, gpointer UNUSED(data))
 {
        gint hours_mins, delay;
 
@@ -242,7 +242,7 @@ void config_entry_to_option(GtkWidget *entry, gchar **option, gchar *(*func)(con
 }
 
 
-static gboolean accel_apply_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+static gboolean accel_apply_cb(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer UNUSED(data))
 {
        gchar *accel_path, *accel;
 
@@ -300,7 +300,7 @@ static void config_window_apply(void)
        options->image.limit_autofit_size = c_options->image.limit_autofit_size;
        options->image.max_autofit_size = c_options->image.max_autofit_size;
        options->image.max_enlargement_size = c_options->image.max_enlargement_size;
-       options->image.use_clutter_renderer = c_options->image.use_clutter_renderer;
+       //~ options->image.use_clutter_renderer = c_options->image.use_clutter_renderer;
        options->image.tile_size = c_options->image.tile_size;
        options->progressive_key_scrolling = c_options->progressive_key_scrolling;
        options->keyboard_scroll_step = c_options->keyboard_scroll_step;
@@ -515,14 +515,14 @@ static void config_window_apply(void)
  *-----------------------------------------------------------------------------
  */
 
-static void config_window_close_cb(GtkWidget *widget, gpointer data)
+static void config_window_close_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        gtk_widget_destroy(configwindow);
        configwindow = NULL;
        filter_store = NULL;
 }
 
-static void config_window_help_cb(GtkWidget *widget, gpointer data)
+static void config_window_help_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkWidget *notebook = data;
        gint i;
@@ -549,7 +549,7 @@ static void config_window_help_cb(GtkWidget *widget, gpointer data)
        help_window_show(html_section[i]);
 }
 
-static gboolean config_window_delete(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean config_window_delete(GtkWidget *UNUSED(widget), GdkEventAny *UNUSED(event), gpointer UNUSED(data))
 {
        config_window_close_cb(NULL, NULL);
        return TRUE;
@@ -913,7 +913,7 @@ static void add_mouse_selection_menu(GtkWidget *table, gint column, gint row, co
        gtk_widget_show(combo);
 }
 
-static void thumb_size_menu_cb(GtkWidget *combo, gpointer data)
+static void thumb_size_menu_cb(GtkWidget *combo, gpointer UNUSED(data))
 {
        gint n;
 
@@ -1162,7 +1162,7 @@ static void filter_store_populate(void)
                }
 }
 
-static void filter_store_ext_edit_cb(GtkCellRendererText *cell, gchar *path_str,
+static void filter_store_ext_edit_cb(GtkCellRendererText *UNUSED(cell), gchar *path_str,
                                     gchar *new_text, gpointer data)
 {
        GtkWidget *model = data;
@@ -1183,7 +1183,7 @@ static void filter_store_ext_edit_cb(GtkCellRendererText *cell, gchar *path_str,
        filter_rebuild();
 }
 
-static void filter_store_class_edit_cb(GtkCellRendererText *cell, gchar *path_str,
+static void filter_store_class_edit_cb(GtkCellRendererText *UNUSED(cell), gchar *path_str,
                                       gchar *new_text, gpointer data)
 {
        GtkWidget *model = data;
@@ -1211,7 +1211,7 @@ static void filter_store_class_edit_cb(GtkCellRendererText *cell, gchar *path_st
        filter_rebuild();
 }
 
-static void filter_store_desc_edit_cb(GtkCellRendererText *cell, gchar *path_str,
+static void filter_store_desc_edit_cb(GtkCellRendererText *UNUSED(cell), gchar *path_str,
                                      gchar *new_text, gpointer data)
 {
        GtkWidget *model = data;
@@ -1231,7 +1231,7 @@ static void filter_store_desc_edit_cb(GtkCellRendererText *cell, gchar *path_str
        gtk_tree_path_free(tpath);
 }
 
-static void filter_store_enable_cb(GtkCellRendererToggle *renderer,
+static void filter_store_enable_cb(GtkCellRendererToggle *UNUSED(renderer),
                                   gchar *path_str, gpointer data)
 {
        GtkWidget *model = data;
@@ -1249,7 +1249,7 @@ static void filter_store_enable_cb(GtkCellRendererToggle *renderer,
        filter_rebuild();
 }
 
-static void filter_store_writable_cb(GtkCellRendererToggle *renderer,
+static void filter_store_writable_cb(GtkCellRendererToggle *UNUSED(renderer),
                                     gchar *path_str, gpointer data)
 {
        GtkWidget *model = data;
@@ -1268,7 +1268,7 @@ static void filter_store_writable_cb(GtkCellRendererToggle *renderer,
        filter_rebuild();
 }
 
-static void filter_store_sidecar_cb(GtkCellRendererToggle *renderer,
+static void filter_store_sidecar_cb(GtkCellRendererToggle *UNUSED(renderer),
                                    gchar *path_str, gpointer data)
 {
        GtkWidget *model = data;
@@ -1287,7 +1287,7 @@ static void filter_store_sidecar_cb(GtkCellRendererToggle *renderer,
        filter_rebuild();
 }
 
-static void filter_set_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
+static void filter_set_func(GtkTreeViewColumn *UNUSED(tree_column), GtkCellRenderer *cell,
                            GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
 {
        FilterEntry *fe;
@@ -1370,7 +1370,7 @@ static gboolean filter_add_scroll(gpointer data)
        return(FALSE);
 }
 
-static void filter_add_cb(GtkWidget *widget, gpointer data)
+static void filter_add_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        filter_add_unique("description", ".new", FORMAT_CLASS_IMAGE, TRUE, FALSE, TRUE);
        filter_store_populate();
@@ -1378,7 +1378,7 @@ static void filter_add_cb(GtkWidget *widget, gpointer data)
        g_idle_add((GSourceFunc)filter_add_scroll, data);
 }
 
-static void filter_remove_cb(GtkWidget *widget, gpointer data)
+static void filter_remove_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkWidget *filter_view = data;
        GtkTreeSelection *selection;
@@ -1415,7 +1415,7 @@ static gboolean filter_default_ok_scroll(GtkTreeView *data)
        return(FALSE);
 }
 
-static void filter_default_ok_cb(GenericDialog *gd, gpointer data)
+static void filter_default_ok_cb(GenericDialog *gd, gpointer UNUSED(data))
 {
        filter_reset();
        filter_add_defaults();
@@ -1425,7 +1425,7 @@ static void filter_default_ok_cb(GenericDialog *gd, gpointer data)
        g_idle_add((GSourceFunc)filter_default_ok_scroll, gd->data);
 }
 
-static void dummy_cancel_cb(GenericDialog *gd, gpointer data)
+static void dummy_cancel_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        /* no op, only so cancel button appears */
 }
@@ -1451,17 +1451,17 @@ static void filter_disable_cb(GtkWidget *widget, gpointer data)
                                 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)));
 }
 
-static void safe_delete_view_cb(GtkWidget *widget, gpointer data)
+static void safe_delete_view_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        layout_set_path(NULL, gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry)));
 }
 
-static void safe_delete_clear_ok_cb(GenericDialog *gd, gpointer data)
+static void safe_delete_clear_ok_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        file_util_trash_clear();
 }
 
-static void safe_delete_clear_cb(GtkWidget *widget, gpointer data)
+static void safe_delete_clear_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        GenericDialog *gd;
        GtkWidget *entry;
@@ -1480,7 +1480,7 @@ static void safe_delete_clear_cb(GtkWidget *widget, gpointer data)
        gtk_widget_show(gd->dialog);
 }
 
-static void image_overlay_template_view_changed_cb(GtkWidget *widget, gpointer data)
+static void image_overlay_template_view_changed_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkWidget *pTextView;
        GtkTextBuffer *pTextBuffer;
@@ -1497,7 +1497,7 @@ static void image_overlay_template_view_changed_cb(GtkWidget *widget, gpointer d
                                          gtk_text_buffer_get_text(pTextBuffer, &iStart, &iEnd, TRUE));
 }
 
-static void image_overlay_default_template_ok_cb(GenericDialog *gd, gpointer data)
+static void image_overlay_default_template_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        GtkTextView *text_view = data;
        GtkTextBuffer *buffer;
@@ -1522,14 +1522,13 @@ static void image_overlay_default_template_cb(GtkWidget *widget, gpointer data)
        gtk_widget_show(gd->dialog);
 }
 
-static void image_overlay_help_cb(GtkWidget *widget, gpointer data)
+static void image_overlay_help_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        help_window_show("GuideOptionsOSD.html");
 }
 
-static void image_overlay_set_font_cb(GtkWidget *widget, gpointer data)
+static void image_overlay_set_font_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
-#if GTK_CHECK_VERSION(3,4,0)
        GtkWidget *dialog;
        char *font;
        PangoFontDescription *font_desc;
@@ -1547,18 +1546,11 @@ static void image_overlay_set_font_cb(GtkWidget *widget, gpointer data)
                }
 
        gtk_widget_destroy(dialog);
-#else
-       const char *font;
-
-       font = gtk_font_button_get_font_name(GTK_FONT_BUTTON(widget));
-       c_options->image_overlay.font = g_strdup(font);
-#endif
 }
 
-static void image_overlay_set_text_colour_cb(GtkWidget *widget, gpointer data)
+static void image_overlay_set_text_colour_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        GtkWidget *dialog;
-#if GTK_CHECK_VERSION(3,4,0)
        GdkRGBA colour;
 
        dialog = gtk_color_chooser_dialog_new("Image Overlay Text Colour", GTK_WINDOW(gtk_widget_get_toplevel(widget)));
@@ -1578,37 +1570,12 @@ static void image_overlay_set_text_colour_cb(GtkWidget *widget, gpointer data)
                c_options->image_overlay.text_alpha = colour.alpha*255;
                }
        gtk_widget_destroy(dialog);
-#else
-       GdkColor colour;
-       GtkColorSelection *colorsel;
-
-       dialog = gtk_color_selection_dialog_new("Image Overlay Text Colour");
-       gtk_window_set_keep_above(GTK_WINDOW(dialog),TRUE);
-       colour.red = options->image_overlay.text_red*257;
-       colour.green = options->image_overlay.text_green*257;
-       colour.blue = options->image_overlay.text_blue*257;
-       colorsel = GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog)));
-       gtk_color_selection_set_has_opacity_control(colorsel, TRUE);
-       gtk_color_selection_set_current_color(colorsel, &colour);
-       gtk_color_selection_set_current_alpha(colorsel, options->image_overlay.text_alpha*257);
-
-       if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
-               {
-               gtk_color_selection_get_current_color(colorsel, &colour);
-               c_options->image_overlay.text_red = colour.red/257;
-               c_options->image_overlay.text_green = colour.green/257;
-               c_options->image_overlay.text_blue = colour.blue/257;
-               c_options->image_overlay.text_alpha = gtk_color_selection_get_current_alpha(colorsel)/257;
-               }
-       gtk_widget_destroy (dialog);
-#endif
 }
 
 
-static void image_overlay_set_background_colour_cb(GtkWidget *widget, gpointer data)
+static void image_overlay_set_background_colour_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        GtkWidget *dialog;
-#if GTK_CHECK_VERSION(3,4,0)
        GdkRGBA colour;
 
        dialog = gtk_color_chooser_dialog_new("Image Overlay Background Colour", GTK_WINDOW(gtk_widget_get_toplevel(widget)));
@@ -1628,30 +1595,6 @@ static void image_overlay_set_background_colour_cb(GtkWidget *widget, gpointer d
                c_options->image_overlay.background_alpha = colour.alpha*255;
                }
        gtk_widget_destroy(dialog);
-#else
-       GdkColor colour;
-       GtkColorSelection *colorsel;
-
-       dialog = gtk_color_selection_dialog_new("Image Overlay Background Colour");
-       gtk_window_set_keep_above(GTK_WINDOW(dialog),TRUE);
-       colour.red = options->image_overlay.background_red*257;
-       colour.green = options->image_overlay.background_green*257;
-       colour.blue = options->image_overlay.background_blue*257;
-       colorsel = GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog)));
-       gtk_color_selection_set_has_opacity_control(colorsel, TRUE);
-       gtk_color_selection_set_current_color(colorsel, &colour);
-       gtk_color_selection_set_current_alpha(colorsel, options->image_overlay.background_alpha*257);
-
-       if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
-               {
-               gtk_color_selection_get_current_color(colorsel, &colour);
-               c_options->image_overlay.background_red = colour.red/257;
-               c_options->image_overlay.background_green = colour.green/257;
-               c_options->image_overlay.background_blue = colour.blue/257;
-               c_options->image_overlay.background_alpha = gtk_color_selection_get_current_alpha(colorsel)/257;
-               }
-       gtk_widget_destroy(dialog);
-#endif
 }
 
 static void accel_store_populate(void)
@@ -1715,12 +1658,12 @@ static void accel_store_populate(void)
                }
 }
 
-static void accel_store_cleared_cb(GtkCellRendererAccel *accel, gchar *path_string, gpointer user_data)
+static void accel_store_cleared_cb(GtkCellRendererAccel *UNUSED(accel), gchar *UNUSED(path_string), gpointer UNUSED(user_data))
 {
 
 }
 
-static gboolean accel_remove_key_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+static gboolean accel_remove_key_cb(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer data)
 {
        gchar *accel1 = data;
        gchar *accel2;
@@ -1744,7 +1687,7 @@ static gboolean accel_remove_key_cb(GtkTreeModel *model, GtkTreePath *path, GtkT
 }
 
 
-static void accel_store_edited_cb(GtkCellRendererAccel *accel, gchar *path_string, guint accel_key, GdkModifierType accel_mods, guint hardware_keycode, gpointer user_data)
+static void accel_store_edited_cb(GtkCellRendererAccel *UNUSED(accel), gchar *path_string, guint accel_key, GdkModifierType accel_mods, guint UNUSED(hardware_keycode), gpointer UNUSED(user_data))
 {
        GtkTreeModel *model = (GtkTreeModel *)accel_store;
        GtkTreeIter iter;
@@ -1793,19 +1736,19 @@ static gboolean accel_default_scroll(GtkTreeView *data)
        return(FALSE);
 }
 
-static void accel_default_cb(GtkWidget *widget, gpointer data)
+static void accel_default_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        accel_store_populate();
 
        g_idle_add((GSourceFunc)accel_default_scroll, data);
 }
 
-void accel_remove_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+void accel_remove_selection(GtkTreeModel *UNUSED(model), GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer UNUSED(data))
 {
        gtk_tree_store_set(accel_store, iter, AE_KEY, "", -1);
 }
 
-void accel_reset_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+void accel_reset_selection(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer UNUSED(data))
 {
        GtkAccelKey key;
        gchar *accel_path, *accel;
@@ -1821,7 +1764,7 @@ void accel_reset_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *
        g_free(accel);
 }
 
-static void accel_reset_cb(GtkWidget *widget, gpointer data)
+static void accel_reset_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkTreeSelection *selection;
 
@@ -1852,14 +1795,14 @@ static GtkWidget *scrolled_notebook_page(GtkWidget *notebook, const gchar *title
        gtk_container_add(GTK_CONTAINER(scrolled), viewport);
        gtk_widget_show(viewport);
 
-       vbox = gtk_vbox_new(FALSE, 0);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_container_add(GTK_CONTAINER(viewport), vbox);
        gtk_widget_show(vbox);
 
        return vbox;
 }
 
-static void cache_standard_cb(GtkWidget *widget, gpointer data)
+static void cache_standard_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
                {
@@ -1868,7 +1811,7 @@ static void cache_standard_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void cache_geeqie_cb(GtkWidget *widget, gpointer data)
+static void cache_geeqie_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
                {
@@ -1877,7 +1820,7 @@ static void cache_geeqie_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void cache_local_cb(GtkWidget *widget, gpointer data)
+static void cache_local_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
                {
@@ -1886,8 +1829,8 @@ static void cache_local_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void help_search_engine_entry_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos,
-                                                                       GdkEvent *event, gpointer userdata)
+static void help_search_engine_entry_icon_cb(GtkEntry *UNUSED(entry), GtkEntryIconPosition pos,
+                                                                       GdkEvent *UNUSED(event), gpointer userdata)
 {
        if (pos == GTK_ENTRY_ICON_PRIMARY)
                {
@@ -1899,8 +1842,8 @@ static void help_search_engine_entry_icon_cb(GtkEntry *entry, GtkEntryIconPositi
                }
 }
 
-static void star_rating_star_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos,
-                                                                       GdkEvent *event, gpointer userdata)
+static void star_rating_star_icon_cb(GtkEntry *UNUSED(entry), GtkEntryIconPosition pos,
+                                                                       GdkEvent *UNUSED(event), gpointer userdata)
 {
        gchar *rating_symbol;
 
@@ -1918,8 +1861,8 @@ static void star_rating_star_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos,
                }
 }
 
-static void star_rating_rejected_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos,
-                                                                       GdkEvent *event, gpointer userdata)
+static void star_rating_rejected_icon_cb(GtkEntry *UNUSED(entry), GtkEntryIconPosition pos,
+                                                                       GdkEvent *UNUSED(event), gpointer userdata)
 {
        gchar *rating_symbol;
 
@@ -1937,7 +1880,7 @@ static void star_rating_rejected_icon_cb(GtkEntry *entry, GtkEntryIconPosition p
                }
 }
 
-static guint star_rating_symbol_test(GtkWidget *widget, gpointer data)
+static guint star_rating_symbol_test(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkContainer *hbox = data;
        GString *str = g_string_new(NULL);
@@ -2292,10 +2235,9 @@ static void config_tab_image(GtkWidget *notebook)
        GtkWidget *enlargement_button;
        GtkWidget *table;
        GtkWidget *spin;
-       GtkWidget *two_pass;
-#ifdef HAVE_CLUTTER
-       GtkWidget *gpu_accel;
-#endif
+//~ #ifdef HAVE_CLUTTER
+       //~ GtkWidget *gpu_accel;
+//~ #endif
 
        vbox = scrolled_notebook_page(notebook, _("Image"));
 
@@ -2303,26 +2245,26 @@ static void config_tab_image(GtkWidget *notebook)
 
        table = pref_table_new(group, 2, 1, FALSE, FALSE);
        add_quality_menu(table, 0, 0, _("Quality:"), options->image.zoom_quality, &c_options->image.zoom_quality);
-       if (options->image.use_clutter_renderer && !options->disable_gpu)
-               {
-               gtk_widget_set_sensitive(table, FALSE);
-               }
-
-#ifdef HAVE_CLUTTER
-       gpu_accel = pref_checkbox_new_int(group, _("Use GPU acceleration via Clutter library (Requires restart)"),
-                             options->image.use_clutter_renderer, &c_options->image.use_clutter_renderer);
-       if (options->disable_gpu && !options->override_disable_gpu)
-               {
-               gtk_widget_set_sensitive(gpu_accel, FALSE);
-               }
-#endif
-
-       two_pass = pref_checkbox_new_int(group, _("Two pass rendering (apply HQ zoom and color correction in second pass)"),
+       //~ if (options->image.use_clutter_renderer && !options->disable_gpu)
+               //~ {
+               //~ gtk_widget_set_sensitive(table, FALSE);
+               //~ }
+
+//~ #ifdef HAVE_CLUTTER
+       //~ gpu_accel = pref_checkbox_new_int(group, _("Use GPU acceleration via Clutter library (Requires restart)"),
+                             //~ options->image.use_clutter_renderer, &c_options->image.use_clutter_renderer);
+       //~ if (options->disable_gpu && !options->override_disable_gpu)
+               //~ {
+               //~ gtk_widget_set_sensitive(gpu_accel, FALSE);
+               //~ }
+//~ #endif
+
+       pref_checkbox_new_int(group, _("Two pass rendering (apply HQ zoom and color correction in second pass)"),
                              options->image.zoom_2pass, &c_options->image.zoom_2pass);
-       if (options->image.use_clutter_renderer && !options->disable_gpu)
-               {
-               gtk_widget_set_sensitive(two_pass, FALSE);
-               }
+       //~ if (options->image.use_clutter_renderer && !options->disable_gpu)
+               //~ {
+               //~ gtk_widget_set_sensitive(two_pass, FALSE);
+               //~ }
 
        c_options->image.zoom_increment = options->image.zoom_increment;
        spin = pref_spin_new(group, _("Zoom increment:"), NULL,
@@ -2355,7 +2297,7 @@ static void config_tab_image(GtkWidget *notebook)
        gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("This value will set the virtual size of the window when \"Fit image to window\" is set. Instead of using the actual size of the window, the specified percentage of the window will be used. It allows one to keep a border around the image (values lower than 100%) or to auto zoom the image (values greater than 100%). It affects fullscreen mode too."));
 
        group = pref_group_new(vbox, FALSE, _("Tile size"), GTK_ORIENTATION_VERTICAL);
-       gtk_widget_set_sensitive(group, !options->image.use_clutter_renderer);
+       //~ gtk_widget_set_sensitive(group, !options->image.use_clutter_renderer);
 
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        spin = pref_spin_new_int(hbox, _("Pixels"), _("(Requires restart)"),
@@ -2388,7 +2330,7 @@ static void config_tab_image(GtkWidget *notebook)
 
 /* windows tab */
 
-static void save_default_window_layout_cb(GtkWidget *widget, gpointer data)
+static void save_default_window_layout_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        LayoutWindow *lw = NULL;
        gchar *default_path;
@@ -2407,7 +2349,6 @@ static void save_default_window_layout_cb(GtkWidget *widget, gpointer data)
        g_free(default_path);
 }
 
-#if GTK_CHECK_VERSION(3,22,0)
 static gboolean popover_cb(gpointer data)
 {
        GtkPopover *popover = data;
@@ -2417,7 +2358,7 @@ static gboolean popover_cb(gpointer data)
        return FALSE;
 }
 
-static void default_layout_changed_cb(GtkWidget *button, GtkPopover *popover)
+static void default_layout_changed_cb(GtkWidget *UNUSED(button), GtkPopover *popover)
 {
        gtk_popover_popup(popover);
 
@@ -2436,7 +2377,6 @@ static GtkWidget *create_popover(GtkWidget *parent, GtkWidget *child, GtkPositio
 
        return popover;
 }
-#endif
 
 static void config_tab_windows(GtkWidget *notebook)
 {
@@ -2476,13 +2416,11 @@ static void config_tab_windows(GtkWidget *notebook)
        pref_label_new(subgroup, _("Use current layout for default: "));
        button = pref_button_new(subgroup, NULL, _("Set"), FALSE, G_CALLBACK(save_default_window_layout_cb), NULL);
 
-#if GTK_CHECK_VERSION(3,22,0)
        GtkWidget *popover;
 
        popover = create_popover(button, gtk_label_new(_("Current window layout\nhas been set as default")), GTK_POS_TOP);
        gtk_popover_set_modal(GTK_POPOVER (popover), FALSE);
        g_signal_connect(button, "clicked", G_CALLBACK(default_layout_changed_cb), popover);
-#endif
 
        group = pref_group_new(vbox, FALSE, _("Size"), GTK_ORIENTATION_VERTICAL);
 
@@ -2559,16 +2497,9 @@ static void config_tab_osd(GtkWidget *notebook)
 
        hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
 
-#if GTK_CHECK_VERSION(3,4,0)
        button = pref_button_new(NULL, GTK_STOCK_SELECT_FONT, _("Font"), FALSE,
                                 G_CALLBACK(image_overlay_set_font_cb), notebook);
-#else
-       button = gtk_font_button_new();
-       gtk_font_button_set_title(GTK_FONT_BUTTON(button), "Image Overlay Font");
-       gtk_font_button_set_font_name(GTK_FONT_BUTTON(button), options->image_overlay.font);
-       g_signal_connect(G_OBJECT(button), "font-set",
-                                G_CALLBACK(image_overlay_set_font_cb),NULL);
-#endif
+
        gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
@@ -2601,7 +2532,7 @@ static void config_tab_osd(GtkWidget *notebook)
        pref_line(group, PREF_PAD_GAP);
 
        group = pref_group_new(vbox, FALSE, _("Exif, XMP or IPTC tags"), GTK_ORIENTATION_VERTICAL);
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("%Exif.Image.Orientation%"));
@@ -2610,7 +2541,7 @@ static void config_tab_osd(GtkWidget *notebook)
        pref_spacer(group,TRUE);
 
        group = pref_group_new(vbox, FALSE, _("Field separators"), GTK_ORIENTATION_VERTICAL);
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("Separator shown only if both fields are non-null:\n%formatted.ShutterSpeed%|%formatted.ISOSpeedRating%"));
@@ -2619,7 +2550,7 @@ static void config_tab_osd(GtkWidget *notebook)
        pref_spacer(group,TRUE);
 
        group = pref_group_new(vbox, FALSE, _("Field maximum length"), GTK_ORIENTATION_VERTICAL);
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("%path:39%"));
@@ -2628,7 +2559,7 @@ static void config_tab_osd(GtkWidget *notebook)
        pref_spacer(group,TRUE);
 
        group = pref_group_new(vbox, FALSE, _("Pre- and post- text"), GTK_ORIENTATION_VERTICAL);
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("Text shown only if the field is non-null:\n%formatted.Aperture:F no. * setting%\n %formatted.Aperture:10:F no. * setting%"));
@@ -2637,7 +2568,7 @@ static void config_tab_osd(GtkWidget *notebook)
        pref_spacer(group,TRUE);
 
        group = pref_group_new(vbox, FALSE, _("Pango markup"), GTK_ORIENTATION_VERTICAL);
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
        label = gtk_label_new(_("<b>bold</b>\n<u>underline</u>\n<i>italic</i>\n<s>strikethrough</s>"));
@@ -2712,7 +2643,7 @@ static gint filter_table_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIte
        return ret;
 }
 
-static gboolean search_function_cb(GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer search_data)
+static gboolean search_function_cb(GtkTreeModel *model, gint UNUSED(column), const gchar *key, GtkTreeIter *iter, gpointer UNUSED(search_data))
 {
        FilterEntry *fe;
        gboolean ret = TRUE;
@@ -2925,12 +2856,9 @@ static void config_tab_metadata(GtkWidget *notebook)
        label = pref_label_new(group, _("Warning: Geeqie is built without Exiv2. Some options are disabled."));
 #endif
        label = pref_label_new(group, _("When writing metadata, Geeqie will follow these steps, if selected. This process will stop when the first successful write occurs."));
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(label), 0.0);
        gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-#endif
+
        gtk_widget_set_tooltip_text(label, _("A flowchart of the sequence is shown in the Help file"));
 
        ct_button = pref_checkbox_new_int(group, "", options->metadata.save_in_image_file, &c_options->metadata.save_in_image_file);
@@ -2957,12 +2885,8 @@ static void config_tab_metadata(GtkWidget *notebook)
        gtk_label_set_markup (GTK_LABEL(label), markup);
        g_free(markup);
 
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(label), 0.0);
        gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-#endif
        gtk_misc_set_padding(GTK_MISC(label), 22, 0);
        pref_spacer(group, PREF_PAD_GROUP);
 
@@ -3031,12 +2955,10 @@ static void config_tab_metadata(GtkWidget *notebook)
        pref_spacer(group, PREF_PAD_GROUP);
 
 #ifdef HAVE_SPELL
-#if GTK_CHECK_VERSION(3,20,0)
        group = pref_group_new(vbox, FALSE, _("Spelling checks"), GTK_ORIENTATION_VERTICAL);
 
        ct_button = pref_checkbox_new_int(group, _("Check spelling - Requires restart"), options->metadata.check_spelling, &c_options->metadata.check_spelling);
        gtk_widget_set_tooltip_text(ct_button, _("Spelling checks are performed on info sidebar panes Comment, Headline and Title"));
-#endif
 #endif
 
        pref_spacer(group, PREF_PAD_GROUP);
@@ -3103,7 +3025,7 @@ static void keywords_find_reset(KeywordFindData *kfd)
        kfd->list_dir = NULL;
 }
 
-static void keywords_find_close_cb(GenericDialog *fd, gpointer data)
+static void keywords_find_close_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        KeywordFindData *kfd = data;
 
@@ -3127,7 +3049,7 @@ static void keywords_find_finish(KeywordFindData *kfd)
        gtk_widget_set_sensitive(kfd->button_close, TRUE);
 }
 
-static void keywords_find_stop_cb(GenericDialog *fd, gpointer data)
+static void keywords_find_stop_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        KeywordFindData *kfd = data;
 
@@ -3188,7 +3110,7 @@ static gboolean keywords_find_file(gpointer data)
        return FALSE;
 }
 
-static void keywords_find_start_cb(GenericDialog *fd, gpointer data)
+static void keywords_find_start_cb(GenericDialog *UNUSED(fd), gpointer data)
 {
        KeywordFindData *kfd = data;
        gchar *path;
@@ -3280,7 +3202,7 @@ static void keywords_find_dialog(GtkWidget *widget, const gchar *path)
        gtk_widget_show(kfd->gd->dialog);
 }
 
-static void keywords_find_cb(GtkWidget *widget, gpointer data)
+static void keywords_find_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        const gchar *path = layout_get_path(NULL);
 
@@ -3362,13 +3284,11 @@ static void config_tab_keywords(GtkWidget *notebook)
        gtk_widget_show(scrolled);
 
 #ifdef HAVE_SPELL
-#if GTK_CHECK_VERSION(3,20,0)
        if (options->metadata.check_spelling)
                {
                gspell_view = gspell_text_view_get_from_gtk_text_view(GTK_TEXT_VIEW(keyword_text));
                gspell_text_view_basic_setup(gspell_view);
                }
-#endif
 #endif
 
        gtk_container_add(GTK_CONTAINER(scrolled), keyword_text);
@@ -3542,7 +3462,7 @@ static void config_tab_color(GtkWidget *notebook)
 }
 
 /* advanced entry tab */
-static void use_geeqie_trash_cb(GtkWidget *widget, gpointer data)
+static void use_geeqie_trash_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
                {
@@ -3551,7 +3471,7 @@ static void use_geeqie_trash_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void use_system_trash_cb(GtkWidget *widget, gpointer data)
+static void use_system_trash_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
                {
@@ -3560,7 +3480,7 @@ static void use_system_trash_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void use_no_cache_cb(GtkWidget *widget, gpointer data)
+static void use_no_cache_cb(GtkWidget *widget, gpointer UNUSED(data))
 {
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
                {
@@ -4077,7 +3997,7 @@ static void config_window_create(LayoutWindow *lw)
        gtk_window_set_resizable(GTK_WINDOW(configwindow), TRUE);
        gtk_container_set_border_width(GTK_CONTAINER(configwindow), PREF_PAD_BORDER);
 
-       win_vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE);
+       win_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
        gtk_container_add(GTK_CONTAINER(configwindow), win_vbox);
        gtk_widget_show(win_vbox);
 
@@ -4331,7 +4251,7 @@ static void timezone_progress_cb(goffset current_num_bytes, goffset total_num_by
                }
 }
 
-static void timezone_cancel_button_cb(GenericDialog *gd, gpointer data)
+static void timezone_cancel_button_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        TZData *tz = data;
 
index 4528974..71ad7e0 100644 (file)
@@ -134,7 +134,6 @@ static void print_set_font_cb(GtkWidget *widget, gpointer data)
                option = options->printer.page_font;
                }
 
-#if GTK_CHECK_VERSION(3,4,0)
        GtkWidget *dialog;
        char *font;
        PangoFontDescription *font_desc;
@@ -152,12 +151,6 @@ static void print_set_font_cb(GtkWidget *widget, gpointer data)
                }
 
        gtk_widget_destroy(dialog);
-#else
-       const char *font;
-
-       font = gtk_font_button_get_font_name(GTK_FONT_BUTTON(widget));
-       option = g_strdup(font);
-#endif
 }
 
 static gint set_toggle(GSList *list, TextPosition pos)
@@ -316,7 +309,7 @@ static void set_print_image_text_string(gchar **template_string, const gchar *va
        *template_string = g_strdup(value);
 }
 
-static void image_text_template_view_changed_cb(GtkWidget *widget, gpointer data)
+static void image_text_template_view_changed_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkWidget *pTextView;
        GtkTextBuffer *pTextBuffer;
@@ -359,7 +352,7 @@ static void print_text_menu(GtkWidget *box, PrintWindow *pw)
 
        pref_checkbox_link_sensitivity(image_text_button, subgroup);
 
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(subgroup), hbox, FALSE, FALSE, 0);
 
        /* order is important */
@@ -406,16 +399,9 @@ static void print_text_menu(GtkWidget *box, PrintWindow *pw)
 
        hbox = pref_box_new(subgroup, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
 
-#if GTK_CHECK_VERSION(3,4,0)
        button = pref_button_new(NULL, GTK_STOCK_SELECT_FONT, _("Font"), FALSE,
                                 G_CALLBACK(print_set_font_cb), "Image text font");
-#else
-       button = gtk_font_button_new();
-       gtk_font_button_set_title(GTK_FONT_BUTTON(button), "Image text Font");
-       gtk_font_button_set_font_name(GTK_FONT_BUTTON(button), options->printer.image_font);
-       g_signal_connect(G_OBJECT(button), "font-set",
-                                G_CALLBACK(print_set_font_cb), "Image text font");
-#endif
+
        gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 
@@ -429,7 +415,7 @@ static void print_text_menu(GtkWidget *box, PrintWindow *pw)
        subgroup = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        pref_checkbox_link_sensitivity(page_text_button, subgroup);
 
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(subgroup), hbox, FALSE, FALSE, 0);
 
        /* order is important */
@@ -467,22 +453,15 @@ static void print_text_menu(GtkWidget *box, PrintWindow *pw)
 
        hbox = pref_box_new(subgroup, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
 
-#if GTK_CHECK_VERSION(3,4,0)
        button = pref_button_new(NULL, GTK_STOCK_SELECT_FONT, _("Font"), FALSE,
                                 G_CALLBACK(print_set_font_cb), "Page text font");
-#else
-       button = gtk_font_button_new();
-       gtk_font_button_set_title(GTK_FONT_BUTTON(button), "Page text Font");
-       gtk_font_button_set_font_name(GTK_FONT_BUTTON(button), options->printer.page_font);
-       g_signal_connect(G_OBJECT(button), "font-set",
-                                G_CALLBACK(print_set_font_cb), "Page text font");
-#endif
+
        gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
        gtk_widget_show(button);
 }
 
-static gboolean paginate_cb(GtkPrintOperation *operation,
-                                                                       GtkPrintContext *context,
+static gboolean paginate_cb(GtkPrintOperation *UNUSED(operation),
+                                                                       GtkPrintContext *UNUSED(context),
                                                                        gpointer data)
 {
        PrintWindow *pw = data;
@@ -560,7 +539,7 @@ gchar *form_image_text(const gchar *template_string, FileData *fd, PrintWindow *
        return text;
 }
 
-static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
+static void draw_page(GtkPrintOperation *UNUSED(operation), GtkPrintContext *context,
                                                                        gint page_nr, gpointer data)
 {
        PrintWindow *pw = data;
@@ -775,7 +754,7 @@ static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
 }
 
 static void begin_print(GtkPrintOperation *operation,
-                                               GtkPrintContext *context,
+                                               GtkPrintContext *UNUSED(context),
                                                gpointer user_data)
 {
        PrintWindow *pw = user_data;
@@ -788,7 +767,7 @@ static void begin_print(GtkPrintOperation *operation,
 }
 
 
-GObject *option_tab_cb(GtkPrintOperation *operation, gpointer user_data)
+GObject *option_tab_cb(GtkPrintOperation *UNUSED(operation), gpointer user_data)
 {
        PrintWindow *pw = user_data;
 
@@ -808,7 +787,7 @@ static void print_pref_store(PrintWindow *pw)
 }
 
 static void end_print_cb(GtkPrintOperation *operation,
-                                                               GtkPrintContext *context, gpointer data)
+                                                               GtkPrintContext *UNUSED(context), gpointer data)
 {
        PrintWindow *pw = data;
        GList *work;
@@ -861,7 +840,7 @@ static void end_print_cb(GtkPrintOperation *operation,
        g_free(pw);
 }
 
-void print_window_new(FileData *fd, GList *selection, GList *list, GtkWidget *parent)
+void print_window_new(FileData *UNUSED(fd), GList *selection, GList *UNUSED(list), GtkWidget *parent)
 {
        PrintWindow *pw;
        GtkWidget *vbox;
@@ -884,7 +863,7 @@ void print_window_new(FileData *fd, GList *selection, GList *list, GtkWidget *pa
 
        pw->parent = parent;
 
-       vbox = gtk_vbox_new(FALSE, 0);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_container_set_border_width(GTK_CONTAINER(vbox), PREF_PAD_BORDER);
        gtk_widget_show(vbox);
 
index 56dc0d0..23e64c3 100644 (file)
@@ -58,7 +58,7 @@ void write_indent(GString *str, gint indent)
        g_string_append_printf(str, "\n%*s", indent * 4, "");
 }
 
-void write_char_option(GString *str, gint indent, const gchar *label, const gchar *text)
+void write_char_option(GString *str, gint UNUSED(indent), const gchar *label, const gchar *text)
 {
        /* this is needed for overlay string, because g_markup_escape_text does not handle \n and such,
           ideas for improvement are welcome
@@ -134,7 +134,7 @@ gboolean read_color_option(const gchar *option, const gchar *label, const gchar
        return TRUE;
 }
 
-void write_int_option(GString *str, gint indent, const gchar *label, gint n)
+void write_int_option(GString *str, gint UNUSED(indent), const gchar *label, gint n)
 {
        g_string_append_printf(str, "%s = \"%d\" ", label, n);
 }
@@ -159,7 +159,7 @@ gboolean read_int_option(const gchar *option, const gchar *label, const gchar *v
        return TRUE;
 }
 
-void write_ushort_option(GString *str, gint indent, const gchar *label, guint16 n)
+void write_ushort_option(GString *str, gint UNUSED(indent), const gchar *label, guint16 n)
 {
        g_string_append_printf(str, "%s = \"%uh\" ", label, n);
 }
@@ -184,7 +184,7 @@ gboolean read_ushort_option(const gchar *option, const gchar *label, const gchar
        return TRUE;
 }
 
-void write_uint_option(GString *str, gint indent, const gchar *label, guint n)
+void write_uint_option(GString *str, gint UNUSED(indent), const gchar *label, guint n)
 {
        g_string_append_printf(str, "%s = \"%u\" ", label, n);
 }
@@ -230,7 +230,7 @@ gboolean read_int_option_clamp(const gchar *option, const gchar *label, const gc
        return ret;
 }
 
-void write_int_unit_option(GString *str, gint indent, gchar *label, gint n, gint subunits)
+void write_int_unit_option(GString *str, gint UNUSED(indent), gchar *label, gint n, gint subunits)
 {
        gint l, r;
 
@@ -279,7 +279,7 @@ gboolean read_int_unit_option(const gchar *option, const gchar *label, const gch
        return TRUE;
 }
 
-void write_bool_option(GString *str, gint indent, gchar *label, gint n)
+void write_bool_option(GString *str, gint UNUSED(indent), gchar *label, gint n)
 {
        g_string_append_printf(str, "%s = \"%s\" ", label, n ? "true" : "false");
 }
@@ -402,7 +402,7 @@ static void write_global_attributes(GString *outstr, gint indent)
        WRITE_NL(); WRITE_COLOR(*options, image.border_color);
        WRITE_NL(); WRITE_COLOR(*options, image.alpha_color_1);
        WRITE_NL(); WRITE_COLOR(*options, image.alpha_color_2);
-       WRITE_NL(); WRITE_BOOL(*options, image.use_clutter_renderer);
+       //~ WRITE_NL(); WRITE_BOOL(*options, image.use_clutter_renderer);
        WRITE_NL(); WRITE_INT(*options, image.tile_size);
 
        /* Thumbnails Options */
@@ -742,7 +742,7 @@ gboolean save_config_to_file(const gchar *utf8_path, ConfOptions *options, Layou
        return TRUE;
 }
 
-gboolean save_default_layout_options_to_file(const gchar *utf8_path, ConfOptions *options, LayoutWindow *lw)
+gboolean save_default_layout_options_to_file(const gchar *utf8_path, ConfOptions *UNUSED(options), LayoutWindow *lw)
 {
        SecureSaveInfo *ssi;
        gchar *rc_pathl;
@@ -890,7 +890,7 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar **
                if (READ_COLOR(*options, image.border_color)) continue;
                if (READ_COLOR(*options, image.alpha_color_1)) continue;
                if (READ_COLOR(*options, image.alpha_color_2)) continue;
-               if (READ_BOOL(*options, image.use_clutter_renderer)) continue;
+               //~ if (READ_BOOL(*options, image.use_clutter_renderer)) continue;
                if (READ_INT(*options, image.tile_size)) continue;
 
                /* Thumbnails options */
@@ -1039,7 +1039,7 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar **
        return TRUE;
 }
 
-static void options_load_color_profiles(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_load_color_profiles(GQParserData *UNUSED(parser_data), GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), const gchar **attribute_names, const gchar **attribute_values, gpointer UNUSED(data), GError **UNUSED(error))
 {
        while (*attribute_names)
                {
@@ -1058,7 +1058,7 @@ static void options_load_color_profiles(GQParserData *parser_data, GMarkupParseC
 
 }
 
-static void options_load_profile(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_load_profile(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        gint i = GPOINTER_TO_INT(data);
        if (i < 0 || i >= COLOR_PROFILE_INPUTS) return;
@@ -1077,7 +1077,7 @@ static void options_load_profile(GQParserData *parser_data, GMarkupParseContext
 
 }
 
-static void options_load_marks_tooltips(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_load_marks_tooltips(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        gint i = GPOINTER_TO_INT(data);
        if (i < 0 || i >= FILEDATA_MARKS_SIZE) return;
@@ -1094,7 +1094,7 @@ static void options_load_marks_tooltips(GQParserData *parser_data, GMarkupParseC
 
 }
 
-static void options_load_disabled_plugins(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_load_disabled_plugins(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        gint i = GPOINTER_TO_INT(data);
        struct {
@@ -1143,7 +1143,7 @@ static const gchar *options_get_id(const gchar **attribute_names, const gchar **
 }
 
 
-void options_parse_leaf(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+void options_parse_leaf(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **UNUSED(attribute_names), const gchar **UNUSED(attribute_values), gpointer UNUSED(data), GError **UNUSED(error))
 {
        log_printf("unexpected: %s\n", element_name);
        options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
@@ -1206,7 +1206,7 @@ static void class_filter_load_filter_type(const gchar **attribute_names, const g
                }
 }
 
-static void options_parse_class_filter(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_class_filter(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer UNUSED(data), GError **UNUSED(error))
 {
        if (g_ascii_strcasecmp(element_name, "filter_type") == 0)
                {
@@ -1234,7 +1234,7 @@ static void options_parse_disabled_plugins(GQParserData *parser_data, GMarkupPar
                }
 }
 
-static void options_parse_filter(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_filter(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer UNUSED(data), GError **UNUSED(error))
 {
        if (g_ascii_strcasecmp(element_name, "file_type") == 0)
                {
@@ -1248,20 +1248,20 @@ static void options_parse_filter(GQParserData *parser_data, GMarkupParseContext
                }
 }
 
-static void options_parse_filter_end(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, gpointer data, GError **error)
+static void options_parse_filter_end(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), gpointer UNUSED(data), GError **UNUSED(error))
 {
        if (parser_data->startup) filter_add_defaults();
        filter_rebuild();
 }
 
-static void options_parse_keyword_end(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, gpointer data, GError **error)
+static void options_parse_keyword_end(GQParserData *UNUSED(parser_data), GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), gpointer data, GError **UNUSED(error))
 {
        GtkTreeIter *iter_ptr = data;
        gtk_tree_iter_free(iter_ptr);
 }
 
 
-static void options_parse_keyword(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_keyword(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        GtkTreeIter *iter_ptr = data;
        if (g_ascii_strcasecmp(element_name, "keyword") == 0)
@@ -1278,7 +1278,7 @@ static void options_parse_keyword(GQParserData *parser_data, GMarkupParseContext
 
 
 
-static void options_parse_keyword_tree(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_keyword_tree(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer UNUSED(data), GError **UNUSED(error))
 {
        if (g_ascii_strcasecmp(element_name, "keyword") == 0)
                {
@@ -1330,7 +1330,7 @@ static void options_parse_global(GQParserData *parser_data, GMarkupParseContext
                }
 }
 
-static void options_parse_global_end(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, gpointer data, GError **error)
+static void options_parse_global_end(GQParserData *UNUSED(parser_data), GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), gpointer UNUSED(data), GError **UNUSED(error))
 {
 #ifndef HAVE_EXIV2
        /* some options do not work without exiv2 */
@@ -1341,7 +1341,7 @@ static void options_parse_global_end(GQParserData *parser_data, GMarkupParseCont
 #endif
 }
 
-static void options_parse_pane_exif(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_pane_exif(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        GtkWidget *pane = data;
        if (g_ascii_strcasecmp(element_name, "entry") == 0)
@@ -1356,7 +1356,7 @@ static void options_parse_pane_exif(GQParserData *parser_data, GMarkupParseConte
                }
 }
 
-static void options_parse_pane_keywords(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_pane_keywords(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        GtkWidget *pane = data;
 
@@ -1372,7 +1372,7 @@ static void options_parse_pane_keywords(GQParserData *parser_data, GMarkupParseC
                }
 }
 
-static void options_parse_bar(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_bar(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        GtkWidget *bar = data;
        if (g_ascii_strcasecmp(element_name, "pane_comment") == 0)
@@ -1479,7 +1479,7 @@ static void options_parse_bar(GQParserData *parser_data, GMarkupParseContext *co
                }
 }
 
-static void options_parse_toolbar(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_toolbar(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        LayoutWindow *lw = data;
        if (g_ascii_strcasecmp(element_name, "toolitem") == 0)
@@ -1499,7 +1499,7 @@ static void options_parse_toolbar(GQParserData *parser_data, GMarkupParseContext
                }
 }
 
-static void options_parse_statusbar(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_statusbar(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        LayoutWindow *lw = data;
        if (g_ascii_strcasecmp(element_name, "toolitem") == 0)
@@ -1519,7 +1519,7 @@ static void options_parse_statusbar(GQParserData *parser_data, GMarkupParseConte
                }
 }
 
-static void options_parse_dialogs(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_dialogs(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer UNUSED(data), GError **UNUSED(error))
 {
        if (g_ascii_strcasecmp(element_name, "window") == 0)
                {
@@ -1533,7 +1533,7 @@ static void options_parse_dialogs(GQParserData *parser_data, GMarkupParseContext
                }
 }
 
-static void options_parse_layout(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_layout(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **UNUSED(error))
 {
        LayoutWindow *lw = data;
        if (g_ascii_strcasecmp(element_name, "bar") == 0)
@@ -1574,13 +1574,13 @@ static void options_parse_layout(GQParserData *parser_data, GMarkupParseContext
                }
 }
 
-static void options_parse_layout_end(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, gpointer data, GError **error)
+static void options_parse_layout_end(GQParserData *UNUSED(parser_data), GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), gpointer data, GError **UNUSED(error))
 {
        LayoutWindow *lw = data;
        layout_util_sync(lw);
 }
 
-static void options_parse_toplevel(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_toplevel(GQParserData *parser_data, GMarkupParseContext *UNUSED(context), const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer UNUSED(data), GError **UNUSED(error))
 {
        if (g_ascii_strcasecmp(element_name, "gq") == 0)
                {
index 2a088dc..7c31272 100644 (file)
@@ -211,7 +211,7 @@ static void remote_server_clients_close(RemoteConnection *rc)
                }
 }
 
-static gboolean remote_server_read_cb(GIOChannel *source, GIOCondition condition, gpointer data)
+static gboolean remote_server_read_cb(GIOChannel *UNUSED(source), GIOCondition UNUSED(condition), gpointer data)
 {
        RemoteConnection *rc = data;
        gint fd;
@@ -330,7 +330,7 @@ static RemoteConnection *remote_client_open(const gchar *path)
 
 static sig_atomic_t sigpipe_occurred = FALSE;
 
-static void sighandler_sigpipe(gint sig)
+static void sighandler_sigpipe(gint UNUSED(sig))
 {
        sigpipe_occurred = TRUE;
 }
@@ -449,12 +449,12 @@ void remote_close(RemoteConnection *rc)
  *-----------------------------------------------------------------------------
  */
 
-static void gr_image_next(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_image_next(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_next(lw_id);
 }
 
-static void gr_new_window(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_new_window(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        LayoutWindow *lw = NULL;
 
@@ -474,42 +474,42 @@ static gboolean gr_close_window_cb()
        return FALSE;
 }
 
-static void gr_close_window(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_close_window(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        g_idle_add(gr_close_window_cb, NULL);
 }
 
-static void gr_image_prev(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_image_prev(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_prev(lw_id);
 }
 
-static void gr_image_first(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_image_first(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_first(lw_id);
 }
 
-static void gr_image_last(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_image_last(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_last(lw_id);
 }
 
-static void gr_fullscreen_toggle(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_fullscreen_toggle(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_full_screen_toggle(lw_id);
 }
 
-static void gr_fullscreen_start(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_fullscreen_start(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_full_screen_start(lw_id);
 }
 
-static void gr_fullscreen_stop(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_fullscreen_stop(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_full_screen_stop(lw_id);
 }
 
-static void gr_lw_id(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_lw_id(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        lw_id = layout_find_by_layout_id(text);
        if (!lw_id)
@@ -519,7 +519,7 @@ static void gr_lw_id(const gchar *text, GIOChannel *channel, gpointer data)
        layout_valid(&lw_id);
 }
 
-static void gr_slideshow_start_rec(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_slideshow_start_rec(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        GList *list;
        gchar *tilde_filename;
@@ -538,7 +538,7 @@ static void gr_slideshow_start_rec(const gchar *text, GIOChannel *channel, gpoin
        layout_image_slideshow_start_from_list(lw_id, list);
 }
 
-static void gr_cache_thumb(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_cache_thumb(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        if (!g_strcmp0(text, "clear"))
                {
@@ -550,7 +550,7 @@ static void gr_cache_thumb(const gchar *text, GIOChannel *channel, gpointer data
                }
 }
 
-static void gr_cache_shared(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_cache_shared(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        if (!g_strcmp0(text, "clear"))
                cache_manager_standard_process_remote(TRUE);
@@ -558,22 +558,22 @@ static void gr_cache_shared(const gchar *text, GIOChannel *channel, gpointer dat
                cache_manager_standard_process_remote(FALSE);
 }
 
-static void gr_cache_metadata(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_cache_metadata(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        cache_maintain_home_remote(TRUE, FALSE, NULL);
 }
 
-static void gr_cache_render(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_cache_render(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        cache_manager_render_remote(text, FALSE, FALSE, NULL);
 }
 
-static void gr_cache_render_recurse(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_cache_render_recurse(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        cache_manager_render_remote(text, TRUE, FALSE, NULL);
 }
 
-static void gr_cache_render_standard(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_cache_render_standard(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        if(options->thumbnails.spec_standard)
                {
@@ -581,7 +581,7 @@ static void gr_cache_render_standard(const gchar *text, GIOChannel *channel, gpo
                }
 }
 
-static void gr_cache_render_standard_recurse(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_cache_render_standard_recurse(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        if(options->thumbnails.spec_standard)
                {
@@ -589,22 +589,22 @@ static void gr_cache_render_standard_recurse(const gchar *text, GIOChannel *chan
                }
 }
 
-static void gr_slideshow_toggle(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_slideshow_toggle(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_slideshow_toggle(lw_id);
 }
 
-static void gr_slideshow_start(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_slideshow_start(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_slideshow_start(lw_id);
 }
 
-static void gr_slideshow_stop(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_slideshow_stop(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        layout_image_slideshow_stop(lw_id);
 }
 
-static void gr_slideshow_delay(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_slideshow_delay(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        gdouble t1, t2, t3, n;
        gint res;
@@ -650,7 +650,7 @@ static void gr_slideshow_delay(const gchar *text, GIOChannel *channel, gpointer
        options->slideshow.delay = (gint)(n * 10.0 + 0.01);
 }
 
-static void gr_tools_show(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_tools_show(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        gboolean popped;
        gboolean hidden;
@@ -661,7 +661,7 @@ static void gr_tools_show(const gchar *text, GIOChannel *channel, gpointer data)
                }
 }
 
-static void gr_tools_hide(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_tools_hide(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        gboolean popped;
        gboolean hidden;
@@ -672,14 +672,14 @@ static void gr_tools_hide(const gchar *text, GIOChannel *channel, gpointer data)
                }
 }
 
-static gboolean gr_quit_idle_cb(gpointer data)
+static gboolean gr_quit_idle_cb(gpointer UNUSED(data))
 {
        exit_program();
 
        return FALSE;
 }
 
-static void gr_quit(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_quit(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        /* schedule exit when idle, if done from within a
         * remote handler remote_close will crash
@@ -687,7 +687,7 @@ static void gr_quit(const gchar *text, GIOChannel *channel, gpointer data)
        g_idle_add(gr_quit_idle_cb, NULL);
 }
 
-static void gr_file_load_no_raise(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_file_load_no_raise(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        gchar *filename;
        gchar *tilde_filename;
@@ -730,7 +730,7 @@ static void gr_file_load(const gchar *text, GIOChannel *channel, gpointer data)
        gr_raise(text, channel, data);
 }
 
-static void gr_pixel_info(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_pixel_info(const gchar *UNUSED(text), GIOChannel *channel, gpointer UNUSED(data))
 {
        gchar *pixel_info;
        gint x_pixel, y_pixel;
@@ -774,7 +774,7 @@ static void gr_pixel_info(const gchar *text, GIOChannel *channel, gpointer data)
                }
 }
 
-static void gr_rectangle(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_rectangle(const gchar *UNUSED(text), GIOChannel *channel, gpointer UNUSED(data))
 {
        gchar *rectangle_info;
        PixbufRenderer *pr;
@@ -801,7 +801,7 @@ static void gr_rectangle(const gchar *text, GIOChannel *channel, gpointer data)
                }
 }
 
-static void gr_render_intent(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_render_intent(const gchar *UNUSED(text), GIOChannel *channel, gpointer UNUSED(data))
 {
        gchar *render_intent;
 
@@ -924,7 +924,7 @@ static void get_filelist(const gchar *text, GIOChannel *channel, gboolean recurs
        file_data_unref(dir_fd);
 }
 
-static void gr_collection(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_collection(const gchar *text, GIOChannel *channel, gpointer UNUSED(data))
 {
        GString *contents = g_string_new(NULL);
 
@@ -943,7 +943,7 @@ static void gr_collection(const gchar *text, GIOChannel *channel, gpointer data)
        g_string_free(contents, TRUE);
 }
 
-static void gr_collection_list(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_collection_list(const gchar *UNUSED(text), GIOChannel *channel, gpointer UNUSED(data))
 {
 
        GList *collection_list = NULL;
@@ -980,7 +980,7 @@ static gboolean wait_cb(const gpointer data)
        return FALSE;
 }
 
-static void gr_geometry(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_geometry(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        gchar **geometry;
 
@@ -1013,17 +1013,17 @@ static void gr_geometry(const gchar *text, GIOChannel *channel, gpointer data)
        g_strfreev(geometry);
 }
 
-static void gr_filelist(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_filelist(const gchar *text, GIOChannel *channel, gpointer UNUSED(data))
 {
        get_filelist(text, channel, FALSE);
 }
 
-static void gr_filelist_recurse(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_filelist_recurse(const gchar *text, GIOChannel *channel, gpointer UNUSED(data))
 {
        get_filelist(text, channel, TRUE);
 }
 
-static void gr_file_tell(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_file_tell(const gchar *UNUSED(text), GIOChannel *channel, gpointer UNUSED(data))
 {
        gchar *out_string;
        gchar *collection_name = NULL;
@@ -1054,7 +1054,7 @@ static void gr_file_tell(const gchar *text, GIOChannel *channel, gpointer data)
        g_free(out_string);
 }
 
-static void gr_file_info(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_file_info(const gchar *UNUSED(text), GIOChannel *channel, gpointer UNUSED(data))
 {
        gchar *filename;
        FileData *fd;
@@ -1162,7 +1162,7 @@ static gboolean is_config_file(const gchar *param)
        return FALSE;
 }
 
-static void gr_config_load(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_config_load(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        gchar *filename = expand_tilde(text);
 
@@ -1189,7 +1189,7 @@ static void gr_config_load(const gchar *text, GIOChannel *channel, gpointer data
        g_free(filename);
 }
 
-static void gr_get_sidecars(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_get_sidecars(const gchar *text, GIOChannel *channel, gpointer UNUSED(data))
 {
        gchar *filename = expand_tilde(text);
        FileData *fd = file_data_new_group(filename);
@@ -1212,7 +1212,7 @@ static void gr_get_sidecars(const gchar *text, GIOChannel *channel, gpointer dat
        g_free(filename);
 }
 
-static void gr_get_destination(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_get_destination(const gchar *text, GIOChannel *channel, gpointer UNUSED(data))
 {
        gchar *filename = expand_tilde(text);
        FileData *fd = file_data_new_group(filename);
@@ -1225,7 +1225,7 @@ static void gr_get_destination(const gchar *text, GIOChannel *channel, gpointer
        g_free(filename);
 }
 
-static void gr_file_view(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_file_view(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        gchar *filename;
        gchar *tilde_filename = expand_tilde(text);
@@ -1237,7 +1237,7 @@ static void gr_file_view(const gchar *text, GIOChannel *channel, gpointer data)
        g_free(tilde_filename);
 }
 
-static void gr_list_clear(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_list_clear(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer data)
 {
        RemoteData *remote_data = data;
 
@@ -1246,7 +1246,7 @@ static void gr_list_clear(const gchar *text, GIOChannel *channel, gpointer data)
        remote_data->single_dir = TRUE;
 }
 
-static void gr_list_add(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_list_add(const gchar *text, GIOChannel *UNUSED(channel), gpointer data)
 {
        RemoteData *remote_data = data;
        gboolean new = TRUE;
@@ -1325,7 +1325,7 @@ static void gr_list_add(const gchar *text, GIOChannel *channel, gpointer data)
                }
 }
 
-static void gr_raise(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_raise(const gchar *UNUSED(text), GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        if (layout_valid(&lw_id))
                {
@@ -1333,7 +1333,7 @@ static void gr_raise(const gchar *text, GIOChannel *channel, gpointer data)
                }
 }
 
-static void gr_pwd(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_pwd(const gchar *text, GIOChannel *UNUSED(channel), gpointer UNUSED(data))
 {
        LayoutWindow *lw = NULL;
 
@@ -1344,14 +1344,14 @@ static void gr_pwd(const gchar *text, GIOChannel *channel, gpointer data)
        lw_id = lw;
 }
 
-static void gr_print0(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_print0(const gchar *UNUSED(text), GIOChannel *channel, gpointer UNUSED(data))
 {
        g_io_channel_write_chars(channel, "print0", -1, NULL, NULL);
        g_io_channel_write_chars(channel, "<gq_end_of_command>", -1, NULL, NULL);
 }
 
 #ifdef HAVE_LUA
-static void gr_lua(const gchar *text, GIOChannel *channel, gpointer data)
+static void gr_lua(const gchar *text, GIOChannel *channel, gpointer UNUSED(data))
 {
        gchar *result = NULL;
        gchar **lua_command;
@@ -1491,7 +1491,7 @@ static RemoteCommandEntry *remote_command_find(const gchar *text, const gchar **
        return NULL;
 }
 
-static void remote_cb(RemoteConnection *rc, const gchar *text, GIOChannel *channel, gpointer data)
+static void remote_cb(RemoteConnection *UNUSED(rc), const gchar *text, GIOChannel *channel, gpointer data)
 {
        RemoteCommandEntry *entry;
        const gchar *offset;
diff --git a/src/renderer-clutter.c b/src/renderer-clutter.c
deleted file mode 100644 (file)
index 3937275..0000000
+++ /dev/null
@@ -1,832 +0,0 @@
-/*
- * Copyright (C) 2006 John Ellis
- * Copyright (C) 2008 - 2016 The Geeqie Team
- *
- * Author: John Ellis
- *
- * 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "main.h"
-#include "pixbuf-renderer.h"
-#include "renderer-clutter.h"
-
-#include "intl.h"
-#include "layout.h"
-
-#include <gtk/gtk.h>
-
-#ifdef HAVE_CLUTTER
-
-/* for 3d texture */
-#define COGL_ENABLE_EXPERIMENTAL_API
-#define CLUTTER_ENABLE_EXPERIMENTAL_API
-
-#include <clutter/clutter.h>
-
-#include <clutter-gtk/clutter-gtk.h>
-
-
-
-#define GQ_BUILD 1
-
-#ifdef GQ_BUILD
-#include "main.h"
-#include "pixbuf_util.h"
-#include "exif.h"
-#else
-typedef enum {
-       EXIF_ORIENTATION_UNKNOWN        = 0,
-       EXIF_ORIENTATION_TOP_LEFT       = 1,
-       EXIF_ORIENTATION_TOP_RIGHT      = 2,
-       EXIF_ORIENTATION_BOTTOM_RIGHT   = 3,
-       EXIF_ORIENTATION_BOTTOM_LEFT    = 4,
-       EXIF_ORIENTATION_LEFT_TOP       = 5,
-       EXIF_ORIENTATION_RIGHT_TOP      = 6,
-       EXIF_ORIENTATION_RIGHT_BOTTOM   = 7,
-       EXIF_ORIENTATION_LEFT_BOTTOM    = 8
-} ExifOrientationType;
-#endif
-
-#define GET_RIGHT_PIXBUF_OFFSET(rc) \
-        (( (rc->stereo_mode & PR_STEREO_RIGHT) && !(rc->stereo_mode & PR_STEREO_SWAP)) || \
-         (!(rc->stereo_mode & PR_STEREO_RIGHT) &&  (rc->stereo_mode & PR_STEREO_SWAP)) ?  \
-          rc->pr->stereo_pixbuf_offset_right : rc->pr->stereo_pixbuf_offset_left )
-
-#define GET_LEFT_PIXBUF_OFFSET(rc) \
-        ((!(rc->stereo_mode & PR_STEREO_RIGHT) && !(rc->stereo_mode & PR_STEREO_SWAP)) || \
-         ( (rc->stereo_mode & PR_STEREO_RIGHT) &&  (rc->stereo_mode & PR_STEREO_SWAP)) ?  \
-          rc->pr->stereo_pixbuf_offset_right : rc->pr->stereo_pixbuf_offset_left )
-
-
-typedef struct _OverlayData OverlayData;
-struct _OverlayData
-{
-       gint id;
-
-       GdkPixbuf *pixbuf;
-       ClutterActor *actor;
-
-       gint x;
-       gint y;
-
-       OverlayRendererFlags flags;
-};
-
-typedef struct _RendererClutter RendererClutter;
-
-struct _RendererClutter
-{
-       RendererFuncs f;
-       PixbufRenderer *pr;
-
-
-       gint stereo_mode;
-       gint stereo_off_x;
-       gint stereo_off_y;
-
-
-       GList *pending_updates;
-       gint idle_update;
-
-       GList *overlay_list;
-
-       GtkWidget *widget; /* widget and stage may be shared with other renderers */
-       ClutterActor *stage;
-       ClutterActor *texture;
-       ClutterActor *group;
-
-       gboolean clut_updated;
-       gint64 last_pixbuf_change;
-
-       GdkPixbuf *display_pixbuf;
-};
-
-typedef struct _RendererClutterAreaParam RendererClutterAreaParam;
-struct _RendererClutterAreaParam {
-       RendererClutter *rc;
-       gint x;
-       gint y;
-       gint w;
-       gint h;
-};
-
-static void rc_sync_actor(RendererClutter *rc)
-{
-       PixbufRenderer *pr = rc->pr;
-       gint anchor_x = 0;
-       gint anchor_y = 0;
-       gint rot_z = 0;
-       gint rot_y = 0;
-
-       clutter_actor_set_anchor_point(CLUTTER_ACTOR(rc->texture), 0, 0);
-
-       DEBUG_3("scale %d %d", rc->pr->width, rc->pr->height);
-       DEBUG_3("pos   %d %d", rc->pr->x_offset, rc->pr->y_offset);
-
-       clutter_actor_set_scale(CLUTTER_ACTOR(rc->texture),
-                               (gfloat)pr->width / pr->image_width,
-                               (gfloat)pr->height / pr->image_height);
-
-       switch (pr->orientation)
-               {
-               case EXIF_ORIENTATION_TOP_LEFT:
-                       /* 1 - Horizontal (normal)  */
-                       break;
-               case EXIF_ORIENTATION_TOP_RIGHT:
-                       /* 2 - Mirror horizontal */
-                       rot_y = 180;
-                       anchor_x = pr->width;
-                       break;
-               case EXIF_ORIENTATION_BOTTOM_RIGHT:
-                       /* 3 - Rotate 180 */
-                       rot_z = 180;
-                       anchor_x = pr->width;
-                       anchor_y = pr->height;
-                       break;
-               case EXIF_ORIENTATION_BOTTOM_LEFT:
-                       /* 4 - Mirror vertical */
-                       rot_z = 180;
-                       rot_y = 180;
-                       anchor_y = pr->height;
-                       break;
-               case EXIF_ORIENTATION_LEFT_TOP:
-                       /* 5 - Mirror horizontal and rotate 270 CW */
-                       rot_z = 270;
-                       rot_y = 180;
-                       break;
-               case EXIF_ORIENTATION_RIGHT_TOP:
-                       /* 6 - Rotate 90 CW */
-                       rot_z = 90;
-                       anchor_x = pr->width;
-                       break;
-               case EXIF_ORIENTATION_RIGHT_BOTTOM:
-                       /* 7 - Mirror horizontal and rotate 90 CW */
-                       rot_z = 90;
-                       rot_y = 180;
-                       anchor_x = pr->width;
-                       anchor_y = pr->height;
-                       break;
-               case EXIF_ORIENTATION_LEFT_BOTTOM:
-                       /* 8 - Rotate 270 CW */
-                       rot_z = 270;
-                       anchor_y = pr->height;
-                       break;
-               default:
-                       /* The other values are out of range */
-                       break;
-               }
-
-       clutter_actor_set_rotation(     CLUTTER_ACTOR(rc->texture),
-                                                               CLUTTER_Z_AXIS,
-                                                               rot_z, 0, 0, 0);
-       clutter_actor_set_rotation(     CLUTTER_ACTOR(rc->texture),
-                                                               CLUTTER_Y_AXIS,
-                                                               rot_y, 0, 0, 0);
-
-       clutter_actor_set_position(CLUTTER_ACTOR(rc->texture),
-                               pr->x_offset - pr->x_scroll + anchor_x,
-                               pr->y_offset - pr->y_scroll + anchor_y);
-
-}
-
-
-static void rc_area_clip_add(RendererClutter *rc, gfloat x, gfloat y, gfloat w, gfloat h)
-{
-       gfloat x2, y2;
-       gfloat clip_x, clip_y, clip_w, clip_h, clip_x2, clip_y2;
-
-       x2 = x + w;
-       y2 = y + h;
-
-       clutter_actor_get_clip(rc->texture, &clip_x, &clip_y, &clip_w, &clip_h);
-
-       clip_x2 = clip_x + clip_w;
-       clip_y2 = clip_y + clip_h;
-
-       if (clip_x > x) clip_x = x;
-       if (clip_x2 < x2) clip_x2 = x2;
-       if (clip_y > y) clip_y = y;
-       if (clip_y2 < y2) clip_y2 = y2;
-
-       clip_w = clip_x2 - clip_x;
-       clip_h = clip_y2 - clip_y;
-
-       clutter_actor_set_clip(rc->texture, clip_x, clip_y, clip_w, clip_h);
-}
-
-#define MAX_REGION_AREA (32768 * 1024)
-
-static gboolean rc_area_changed_cb(gpointer data);
-
-static void rc_schedule_texture_upload(RendererClutter *rc)
-{
-       if (g_get_monotonic_time() - rc->last_pixbuf_change < 50000)
-               {
-               /* delay clutter redraw until the texture has some data
-                  set priority between gtk redraw and clutter redraw */
-               DEBUG_3("%s tex upload high prio", get_exec_time());
-               rc->idle_update = g_idle_add_full(CLUTTER_PRIORITY_REDRAW - 10, rc_area_changed_cb, rc, NULL);
-               }
-       else
-               {
-               /* higher prio than histogram */
-               DEBUG_3("%s tex upload low prio", get_exec_time());
-
-               rc->idle_update = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE - 5, rc_area_changed_cb, rc, NULL);
-               }
-}
-
-static void update_display_pixbuf(RendererClutter *rc);
-
-static gboolean rc_area_changed_cb(gpointer data)
-{
-       RendererClutter *rc = (RendererClutter *)data;
-       PixbufRenderer *pr = rc->pr;
-
-       RendererClutterAreaParam *par = rc->pending_updates->data;
-
-       gint h = MAX_REGION_AREA / par->w;
-       if (h == 0) h = 1;
-       if (h > par->h) h = par->h;
-
-       if (pr->pixbuf)
-               {
-               CoglHandle texture = clutter_texture_get_cogl_texture(CLUTTER_TEXTURE(rc->texture));
-
-               cogl_texture_set_region(texture,
-                                       par->x + GET_RIGHT_PIXBUF_OFFSET(rc),
-                                       par->y,
-                                       par->x,
-                                       par->y,
-                                       par->w,
-                                       h,
-                                       par->w,
-                                       h,
-                                       gdk_pixbuf_get_has_alpha(pr->pixbuf) ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
-                                       gdk_pixbuf_get_rowstride(pr->pixbuf),
-                                       gdk_pixbuf_get_pixels(pr->pixbuf));
-               }
-       rc_area_clip_add(rc, par->x, par->y, par->w, h);
-
-
-       par->y += h;
-       par->h -= h;
-
-       if (par->h == 0)
-               {
-               rc->pending_updates = g_list_remove(rc->pending_updates, par);
-               g_free(par);
-               }
-       if (!rc->pending_updates)
-               {
-               clutter_actor_queue_redraw(CLUTTER_ACTOR(rc->texture));
-               rc->idle_update = 0;
-
-               update_display_pixbuf(rc);
-
-               if (pr->func_post_process && pr->pixbuf)
-                       {
-                       pr->func_post_process(pr, &rc->display_pixbuf, 0, 0, gdk_pixbuf_get_width(pr->pixbuf), gdk_pixbuf_get_height(pr->pixbuf), pr->post_process_user_data);
-                       }
-
-               if (pr->pixbuf)
-                       {
-                       CoglHandle texture = clutter_texture_get_cogl_texture(CLUTTER_TEXTURE(rc->texture));
-
-                       cogl_texture_set_region(texture,
-                                               0 + GET_RIGHT_PIXBUF_OFFSET(rc),
-                                               0,
-                                               0,
-                                               0,
-                                               gdk_pixbuf_get_width(pr->pixbuf),
-                                               gdk_pixbuf_get_height(pr->pixbuf),
-                                               gdk_pixbuf_get_width(pr->pixbuf),
-                                               gdk_pixbuf_get_height(pr->pixbuf),
-                                               gdk_pixbuf_get_has_alpha(pr->pixbuf) ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
-                                               gdk_pixbuf_get_rowstride(pr->pixbuf),
-                                               gdk_pixbuf_get_pixels(rc->display_pixbuf));
-                       DEBUG_3("%s upload end", get_exec_time());
-                       }
-
-               return FALSE;
-               }
-
-       rc_schedule_texture_upload(rc);
-
-       return FALSE; /* it was rescheduled, possibly with different prio */
-}
-
-
-static void rc_area_changed(void *renderer, gint src_x, gint src_y, gint src_w, gint src_h)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-       PixbufRenderer *pr = rc->pr;
-       RendererClutterAreaParam *par;
-
-       gint width = gdk_pixbuf_get_width(pr->pixbuf);
-       gint height = gdk_pixbuf_get_height(pr->pixbuf);
-
-       if (pr->stereo_data == STEREO_PIXBUF_SBS || pr->stereo_data == STEREO_PIXBUF_CROSS)
-                       {
-                       width /= 2;
-                       }
-
-       if (!pr_clip_region(src_x, src_y, src_w, src_h,
-                                               GET_RIGHT_PIXBUF_OFFSET(rc), 0, width, height,
-                                               &src_x, &src_y, &src_w, &src_h)) return;
-
-       par = g_new0(RendererClutterAreaParam, 1);
-       par->rc = rc;
-       par->x = src_x - GET_RIGHT_PIXBUF_OFFSET(rc);
-       par->y = src_y;
-       par->w = src_w;
-       par->h = src_h;
-       rc->pending_updates = g_list_append(rc->pending_updates, par);
-       if (!rc->idle_update)
-               {
-               rc_schedule_texture_upload(rc);
-               }
-}
-
-static void rc_remove_pending_updates(RendererClutter *rc)
-{
-       if (rc->idle_update) g_idle_remove_by_data(rc);
-       rc->idle_update = 0;
-       while (rc->pending_updates)
-               {
-               RendererClutterAreaParam *par = rc->pending_updates->data;
-               rc->pending_updates = g_list_remove(rc->pending_updates, par);
-               g_free(par);
-               }
-}
-
-static void update_display_pixbuf(RendererClutter *rc)
-{
-       PixbufRenderer *pr = rc->pr;
-       GdkPixbuf* tmppixbuf = NULL;
-
-       if (pr->pixbuf)
-               {
-               if (rc->display_pixbuf)
-                       {
-                       g_object_unref(rc->display_pixbuf);
-                       }
-
-               if (!gdk_pixbuf_get_has_alpha(pr->pixbuf))
-                       {
-                       rc->display_pixbuf = gdk_pixbuf_copy(pr->pixbuf);
-                       }
-               else
-                       {
-                       if (pr->ignore_alpha)
-                               {
-                               tmppixbuf = gdk_pixbuf_add_alpha(pr->pixbuf, FALSE, 0, 0, 0);
-
-                               pixbuf_ignore_alpha_rect(tmppixbuf, 0, 0, gdk_pixbuf_get_width(pr->pixbuf), gdk_pixbuf_get_height(pr->pixbuf));
-
-                               rc->display_pixbuf = gdk_pixbuf_composite_color_simple (tmppixbuf,
-                                               gdk_pixbuf_get_width(pr->pixbuf),
-                                               gdk_pixbuf_get_height(pr->pixbuf),
-                                               GDK_INTERP_BILINEAR,
-                                               255,
-                                               PR_ALPHA_CHECK_SIZE,
-                                               ((options->image.alpha_color_1.red << 8 & 0x00FF0000) +
-                                               (options->image.alpha_color_1.green & 0x00FF00) +
-                                               (options->image.alpha_color_1.blue >> 8 & 0x00FF)),
-                                               ((options->image.alpha_color_2.red << 8 & 0x00FF0000) +
-                                               (options->image.alpha_color_2.green & 0x00FF00) +
-                                               (options->image.alpha_color_2.blue >> 8 & 0x00FF)));
-                               g_object_unref(tmppixbuf);
-                               }
-                       else
-                               {
-                               rc->display_pixbuf = gdk_pixbuf_composite_color_simple (pr->pixbuf,
-                                               gdk_pixbuf_get_width(pr->pixbuf),
-                                               gdk_pixbuf_get_height(pr->pixbuf),
-                                               GDK_INTERP_BILINEAR,
-                                               255,
-                                               PR_ALPHA_CHECK_SIZE,
-                                               ((options->image.alpha_color_1.red << 8 & 0x00FF0000) +
-                                               (options->image.alpha_color_1.green & 0x00FF00) +
-                                               (options->image.alpha_color_1.blue >> 8 & 0x00FF)),
-                                               ((options->image.alpha_color_2.red << 8 & 0x00FF0000) +
-                                               (options->image.alpha_color_2.green & 0x00FF00) +
-                                               (options->image.alpha_color_2.blue >> 8 & 0x00FF)));
-                               }
-                       }
-               }
-}
-
-static void rc_update_pixbuf(void *renderer, gboolean lazy)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-       PixbufRenderer *pr = rc->pr;
-
-       DEBUG_3("rc_update_pixbuf");
-
-       rc_remove_pending_updates(rc);
-
-       rc->last_pixbuf_change = g_get_monotonic_time();
-       DEBUG_3("%s change time reset", get_exec_time());
-
-       if (pr->pixbuf)
-               {
-                       gint width = gdk_pixbuf_get_width(pr->pixbuf);
-                       gint height = gdk_pixbuf_get_height(pr->pixbuf);
-
-                       DEBUG_3("pixbuf size %d x %d (%d)", width, height, gdk_pixbuf_get_has_alpha(pr->pixbuf) ? 32 : 24);
-
-                       gint prev_width, prev_height;
-
-                       if (pr->stereo_data == STEREO_PIXBUF_SBS || pr->stereo_data == STEREO_PIXBUF_CROSS)
-                               {
-                               width /= 2;
-                               }
-
-
-                       clutter_texture_get_base_size(CLUTTER_TEXTURE(rc->texture), &prev_width, &prev_height);
-
-                       if (width != prev_width || height != prev_height)
-                               {
-                               /** @FIXME use CoglMaterial with multiple textures for background, color management, anaglyph, ... */
-                               CoglHandle texture = cogl_texture_new_with_size(width,
-                                                                               height,
-                                                                               COGL_TEXTURE_NO_AUTO_MIPMAP,
-                                                                               gdk_pixbuf_get_has_alpha(pr->pixbuf) ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888);
-
-                               if (texture != COGL_INVALID_HANDLE)
-                                       {
-                                       clutter_texture_set_cogl_texture(CLUTTER_TEXTURE(rc->texture), texture);
-                                       cogl_handle_unref(texture);
-                                       }
-                               }
-                       clutter_actor_set_clip(rc->texture, 0, 0, 0, 0); /* visible area is extended as area_changed events arrive */
-                       if (!lazy)
-                               {
-                               rc_area_changed(renderer, GET_RIGHT_PIXBUF_OFFSET(rc), 0, width, height);
-                               }
-
-               rc->clut_updated = FALSE;
-               }
-}
-
-
-
-static void rc_update_zoom(void *renderer, gboolean lazy)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-
-       DEBUG_3("rc_update_zoom");
-       rc_sync_actor(rc);
-}
-
-static void rc_invalidate_region(void *renderer, gint x, gint y, gint w, gint h)
-{
-}
-
-static OverlayData *rc_overlay_find(RendererClutter *rc, gint id)
-{
-       GList *work;
-
-       work = rc->overlay_list;
-       while (work)
-               {
-               OverlayData *od = work->data;
-               work = work->next;
-
-               if (od->id == id) return od;
-               }
-
-       return NULL;
-}
-
-static void rc_overlay_actor_destroy_cb(ClutterActor *actor, gpointer user_data)
-{
-       OverlayData *od = user_data;
-       od->actor = NULL;
-}
-
-static void rc_overlay_free(RendererClutter *rc, OverlayData *od)
-{
-       rc->overlay_list = g_list_remove(rc->overlay_list, od);
-
-       if (od->pixbuf) g_object_unref(G_OBJECT(od->pixbuf));
-       if (od->actor) clutter_actor_destroy(od->actor);
-       g_free(od);
-}
-
-static void rc_overlay_update_position(RendererClutter *rc, OverlayData *od)
-{
-       gint px, py, pw, ph;
-
-       pw = gdk_pixbuf_get_width(od->pixbuf);
-       ph = gdk_pixbuf_get_height(od->pixbuf);
-       px = od->x;
-       py = od->y;
-
-       if (od->flags & OVL_RELATIVE)
-               {
-               if (px < 0) px = rc->pr->viewport_width - pw + px;
-               if (py < 0) py = rc->pr->viewport_height - ph + py;
-               }
-       if (od->actor) clutter_actor_set_position(od->actor, px, py);
-}
-
-static void rc_overlay_update_positions(RendererClutter *rc)
-{
-       GList *work;
-
-       work = rc->overlay_list;
-       while (work)
-               {
-               OverlayData *od = work->data;
-               work = work->next;
-
-               rc_overlay_update_position(rc, od);
-               }
-}
-
-static void rc_overlay_free_all(RendererClutter *rc)
-{
-       GList *work;
-
-       work = rc->overlay_list;
-       while (work)
-               {
-               OverlayData *od = work->data;
-               work = work->next;
-
-               rc_overlay_free(rc, od);
-               }
-}
-
-static gint rc_overlay_add(void *renderer, GdkPixbuf *pixbuf, gint x, gint y, OverlayRendererFlags flags)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-       PixbufRenderer *pr = rc->pr;
-       OverlayData *od;
-       gint id;
-
-       g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), -1);
-       g_return_val_if_fail(pixbuf != NULL, -1);
-
-       id = 1;
-       while (rc_overlay_find(rc, id)) id++;
-
-       od = g_new0(OverlayData, 1);
-       od->id = id;
-       od->pixbuf = pixbuf;
-       g_object_ref(G_OBJECT(od->pixbuf));
-       od->x = x;
-       od->y = y;
-       od->flags = flags;
-
-       od->actor = gtk_clutter_texture_new();
-       g_signal_connect (od->actor, "destroy", G_CALLBACK(rc_overlay_actor_destroy_cb), od);
-
-       gtk_clutter_texture_set_from_pixbuf(GTK_CLUTTER_TEXTURE (od->actor), pixbuf, NULL);
-       clutter_container_add_actor(CLUTTER_CONTAINER(rc->group), od->actor);
-
-       rc->overlay_list = g_list_append(rc->overlay_list, od);
-       rc_overlay_update_position(rc, od);
-
-       return od->id;
-}
-
-static void rc_overlay_set(void *renderer, gint id, GdkPixbuf *pixbuf, gint x, gint y)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-       PixbufRenderer *pr = rc->pr;
-       OverlayData *od;
-
-       g_return_if_fail(IS_PIXBUF_RENDERER(pr));
-
-       od = rc_overlay_find(rc, id);
-       if (!od) return;
-
-       if (pixbuf)
-               {
-               g_object_ref(G_OBJECT(pixbuf));
-               g_object_unref(G_OBJECT(od->pixbuf));
-               od->pixbuf = pixbuf;
-
-               od->x = x;
-               od->y = y;
-
-               if (od->actor) gtk_clutter_texture_set_from_pixbuf(GTK_CLUTTER_TEXTURE(od->actor), pixbuf, NULL);
-               rc_overlay_update_position(rc, od);
-               }
-       else
-               {
-               rc_overlay_free(rc, od);
-               }
-}
-
-static gboolean rc_overlay_get(void *renderer, gint id, GdkPixbuf **pixbuf, gint *x, gint *y)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-
-       PixbufRenderer *pr = rc->pr;
-       OverlayData *od;
-
-       g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
-
-       od = rc_overlay_find(rc, id);
-       if (!od) return FALSE;
-
-       if (pixbuf) *pixbuf = od->pixbuf;
-       if (x) *x = od->x;
-       if (y) *y = od->y;
-
-       return TRUE;
-}
-
-
-static void rc_update_viewport(void *renderer)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-       ClutterColor stage_color = { rc->pr->color.red / 256, rc->pr->color.green / 256, rc->pr->color.blue / 256, 0xff };
-
-       rc->stereo_off_x = 0;
-       rc->stereo_off_y = 0;
-
-       if (rc->stereo_mode & PR_STEREO_RIGHT)
-               {
-               if (rc->stereo_mode & PR_STEREO_HORIZ)
-                       {
-                       rc->stereo_off_x = rc->pr->viewport_width;
-                       }
-               else if (rc->stereo_mode & PR_STEREO_VERT)
-                       {
-                       rc->stereo_off_y = rc->pr->viewport_height;
-                       }
-               else if (rc->stereo_mode & PR_STEREO_FIXED)
-                       {
-                       rc->stereo_off_x = rc->pr->stereo_fixed_x_right;
-                       rc->stereo_off_y = rc->pr->stereo_fixed_y_right;
-                       }
-               }
-       else
-               {
-               if (rc->stereo_mode & PR_STEREO_FIXED)
-                       {
-                       rc->stereo_off_x = rc->pr->stereo_fixed_x_left;
-                       rc->stereo_off_y = rc->pr->stereo_fixed_y_left;
-                       }
-               }
-       DEBUG_3("rc_update_viewport  scale %d %d", rc->pr->width, rc->pr->height);
-
-       clutter_stage_set_color(CLUTTER_STAGE(rc->stage), &stage_color);
-
-
-       clutter_actor_set_size(rc->group, rc->pr->viewport_width, rc->pr->viewport_height);
-       clutter_actor_set_position(rc->group, rc->stereo_off_x, rc->stereo_off_y);
-
-       clutter_actor_set_rotation(CLUTTER_ACTOR(rc->group),
-                                               CLUTTER_Y_AXIS,
-                                               (rc->stereo_mode & PR_STEREO_MIRROR) ? 180 : 0,
-                                               rc->pr->viewport_width / 2.0, 0, 0);
-
-       clutter_actor_set_rotation(CLUTTER_ACTOR(rc->group),
-                                               CLUTTER_X_AXIS,
-                                               (rc->stereo_mode & PR_STEREO_FLIP) ? 180 : 0,
-                                               0, rc->pr->viewport_height / 2.0, 0);
-
-       rc_sync_actor(rc);
-       rc_overlay_update_positions(rc);
-}
-
-static void rc_scroll(void *renderer, gint x_off, gint y_off)
-{
-       DEBUG_3("rc_scroll");
-       RendererClutter *rc = (RendererClutter *)renderer;
-
-       rc_sync_actor(rc);
-}
-
-static void rc_stereo_set(void *renderer, gint stereo_mode)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-
-       rc->stereo_mode = stereo_mode;
-}
-
-static void rc_free(void *renderer)
-{
-       RendererClutter *rc = (RendererClutter *)renderer;
-       GtkWidget *widget = gtk_bin_get_child(GTK_BIN(rc->pr));
-
-       if (rc->display_pixbuf)
-               {
-               g_object_unref(rc->display_pixbuf);
-               }
-
-       rc_remove_pending_updates(rc);
-
-       rc_overlay_free_all(rc);
-
-       if (widget)
-               {
-               /* widget still exists */
-               clutter_actor_destroy(rc->group);
-               if (clutter_group_get_n_children(CLUTTER_GROUP(rc->stage)) == 0)
-                       {
-                       DEBUG_1("destroy %p", rc->widget);
-                       /* this was the last user */
-                       gtk_widget_destroy(rc->widget);
-                       }
-               else
-                       {
-                       DEBUG_1("keep %p", rc->widget);
-                       g_object_unref(G_OBJECT(rc->widget));
-                       }
-               }
-       g_free(rc);
-}
-
-RendererFuncs *renderer_clutter_new(PixbufRenderer *pr)
-{
-       RendererClutter *rc = g_new0(RendererClutter, 1);
-
-       rc->pr = pr;
-
-       rc->f.area_changed = rc_area_changed;
-       rc->f.update_pixbuf = rc_update_pixbuf;
-       rc->f.free = rc_free;
-       rc->f.update_zoom = rc_update_zoom;
-       rc->f.invalidate_region = rc_invalidate_region;
-       rc->f.scroll = rc_scroll;
-       rc->f.update_viewport = rc_update_viewport;
-
-
-       rc->f.overlay_add = rc_overlay_add;
-       rc->f.overlay_set = rc_overlay_set;
-       rc->f.overlay_get = rc_overlay_get;
-
-       rc->f.stereo_set = rc_stereo_set;
-
-
-       rc->stereo_mode = 0;
-       rc->stereo_off_x = 0;
-       rc->stereo_off_y = 0;
-
-       rc->idle_update = 0;
-       rc->pending_updates = NULL;
-
-       rc->display_pixbuf = NULL;
-
-       rc->widget = gtk_bin_get_child(GTK_BIN(rc->pr));
-
-       if (rc->widget)
-               {
-               if (!GTK_CLUTTER_IS_EMBED(rc->widget))
-                       {
-                       g_free(rc);
-                       DEBUG_3("pixbuf renderer has a child of other type than gtk_clutter_embed");
-                       return NULL;
-                       }
-               }
-       else
-               {
-               rc->widget = gtk_clutter_embed_new();
-               gtk_container_add(GTK_CONTAINER(rc->pr), rc->widget);
-               }
-
-       gtk_event_box_set_above_child (GTK_EVENT_BOX(rc->pr), TRUE);
-       rc->stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (rc->widget));
-
-       rc->group = clutter_group_new();
-       clutter_container_add_actor(CLUTTER_CONTAINER(rc->stage), rc->group);
-       clutter_actor_set_clip_to_allocation(CLUTTER_ACTOR(rc->group), TRUE);
-
-       rc->texture = clutter_texture_new ();
-       clutter_container_add_actor(CLUTTER_CONTAINER(rc->group), rc->texture);
-
-       clutter_actor_set_content_scaling_filters(rc->texture, CLUTTER_SCALING_FILTER_TRILINEAR, CLUTTER_SCALING_FILTER_NEAREST);
-
-       g_object_ref(G_OBJECT(rc->widget));
-
-       gtk_widget_show(rc->widget);
-       return (RendererFuncs *) rc;
-}
-
-#endif
-/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
diff --git a/src/renderer-clutter.h b/src/renderer-clutter.h
deleted file mode 100644 (file)
index b3607c0..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2006 John Ellis
- * Copyright (C) 2008 - 2016 The Geeqie Team
- *
- * Author: John Ellis
- *
- * 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 RENDERER_CLUTTER_H
-#define RENDERER_CLUTTER_H
-
-#ifdef HAVE_CLUTTER
-#include <pixbuf-renderer.h>
-
-
-RendererFuncs *renderer_clutter_new(PixbufRenderer *pr);
-
-#endif
-#endif
-/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 5ebf0d5..7a3cea0 100644 (file)
@@ -207,11 +207,7 @@ static void rt_border_draw(RendererTiles *rt, gint x, gint y, gint w, gint h)
 
        if (!window) return;
 
-#if GTK_CHECK_VERSION(3,0,0)
        cr = cairo_create(rt->surface);
-#else
-       cr = gdk_cairo_create(window);
-#endif
 
        if (!pr->pixbuf && !pr->source_tiles_enabled)
                {
@@ -491,7 +487,7 @@ static ImageTile *rt_tile_get(RendererTiles *rt, gint x, gint y, gboolean only_e
        return rt_tile_add(rt, x, y);
 }
 
-static gint pixmap_calc_size(cairo_surface_t *surface)
+static gint pixmap_calc_size(cairo_surface_t *UNUSED(surface))
 {
 //     gint w, h, d;
 
@@ -507,16 +503,11 @@ static void rt_hidpi_aware_draw(
        double x,
        double y)
 {
-#if GTK_CHECK_VERSION(3, 10, 0)
        cairo_surface_t *surface;
        surface = gdk_cairo_surface_create_from_pixbuf(pixbuf, rt->hidpi_scale, NULL);
        cairo_set_source_surface(cr, surface, x, y);
        cairo_fill(cr);
        cairo_surface_destroy(surface);
-#else
-       gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y);
-       cairo_fill(cr);
-#endif
 }
 
 static void rt_tile_prepare(RendererTiles *rt, ImageTile *it)
@@ -602,9 +593,7 @@ static void rt_overlay_init_window(RendererTiles *rt, OverlayData *od)
        od->window = gdk_window_new(gtk_widget_get_window(GTK_WIDGET(pr)), &attributes, attributes_mask);
        gdk_window_set_user_data(od->window, pr);
        gdk_window_move(od->window, px + rt->stereo_off_x, py + rt->stereo_off_y);
-#if !GTK_CHECK_VERSION(3,0,0)
        gdk_window_show(od->window);
-#endif
 }
 
 static void rt_overlay_draw(RendererTiles *rt, gint x, gint y, gint w, gint h,
@@ -788,11 +777,7 @@ gint renderer_tiles_overlay_add(void *renderer, GdkPixbuf *pixbuf, gint x, gint
 
        rt->overlay_list = g_list_append(rt->overlay_list, od);
 
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_widget_queue_draw(GTK_WIDGET(rt->pr));
-#else
-       rt_overlay_queue_draw(rt, od, 0, 0, 0, 0);
-#endif
 
        return od->id;
 }
@@ -840,8 +825,7 @@ static void rt_overlay_list_reset_window(RendererTiles *rt)
                }
 }
 
-#if GTK_CHECK_VERSION(3,0,0)
-void renderer_tiles_overlay_set(void *renderer, gint id, GdkPixbuf *pixbuf, gint x, gint y)
+void renderer_tiles_overlay_set(void *renderer, gint id, GdkPixbuf *pixbuf, gint UNUSED(x), gint UNUSED(y))
 {
        RendererTiles *rc = (RendererTiles *)renderer;
        PixbufRenderer *pr = rc->pr;
@@ -865,42 +849,6 @@ void renderer_tiles_overlay_set(void *renderer, gint id, GdkPixbuf *pixbuf, gint
 
        gtk_widget_queue_draw(GTK_WIDGET(rc->pr));
 }
-#else
-void renderer_tiles_overlay_set(void *renderer, gint id, GdkPixbuf *pixbuf, gint x, gint y)
-{
-       RendererTiles *rt = (RendererTiles *) renderer;
-       PixbufRenderer *pr = rt->pr;
-       OverlayData *od;
-
-       g_return_if_fail(IS_PIXBUF_RENDERER(pr));
-
-       od = rt_overlay_find(rt, id);
-       if (!od) return;
-
-       if (pixbuf)
-               {
-               gint px, py, pw, ph;
-
-               g_object_ref(G_OBJECT(pixbuf));
-               g_object_unref(G_OBJECT(od->pixbuf));
-               od->pixbuf = pixbuf;
-
-               od->x = x;
-               od->y = y;
-
-               if (!od->window) rt_overlay_init_window(rt, od);
-
-               rt_overlay_queue_draw(rt, od, 0, 0, 0, 0);
-               rt_overlay_get_position(rt, od, &px, &py, &pw, &ph);
-               gdk_window_move_resize(od->window, px + rt->stereo_off_x, py + rt->stereo_off_y, pw, ph);
-               }
-       else
-               {
-               rt_overlay_queue_draw(rt, od, 0, 0, 0, 0);
-               rt_overlay_free(rt, od);
-               }
-}
-#endif
 
 gboolean renderer_tiles_overlay_get(void *renderer, gint id, GdkPixbuf **pixbuf, gint *x, gint *y)
 {
@@ -920,7 +868,7 @@ gboolean renderer_tiles_overlay_get(void *renderer, gint id, GdkPixbuf **pixbuf,
        return TRUE;
 }
 
-static void rt_hierarchy_changed_cb(GtkWidget *widget, GtkWidget *previous_toplevel, gpointer data)
+static void rt_hierarchy_changed_cb(GtkWidget *UNUSED(widget), GtkWidget *UNUSED(previous_toplevel), gpointer data)
 {
        RendererTiles *rt = data;
        rt_overlay_list_reset_window(rt);
@@ -1173,7 +1121,7 @@ static void rt_tile_apply_orientation(RendererTiles *rt, gint orientation, GdkPi
 
 static gboolean rt_source_tile_render(RendererTiles *rt, ImageTile *it,
                                      gint x, gint y, gint w, gint h,
-                                     gboolean new_data, gboolean fast)
+                                     gboolean UNUSED(new_data), gboolean fast)
 {
        PixbufRenderer *pr = rt->pr;
        GList *list;
@@ -1572,8 +1520,8 @@ static void rt_tile_expose(RendererTiles *rt, ImageTile *it,
                           gboolean new_data, gboolean fast)
 {
        PixbufRenderer *pr = rt->pr;
-       GtkWidget *box;
-       GdkWindow *window;
+       //~ GtkWidget *box;
+       //~ GdkWindow *window;
        cairo_t *cr;
 
        /* clamp to visible */
@@ -1600,14 +1548,10 @@ static void rt_tile_expose(RendererTiles *rt, ImageTile *it,
 
        rt_tile_render(rt, it, x, y, w, h, new_data, fast);
 
-       box = GTK_WIDGET(pr);
-       window = gtk_widget_get_window(box);
+       //~ box = GTK_WIDGET(pr);
+       //~ window = gtk_widget_get_window(box);
 
-#if GTK_CHECK_VERSION(3,0,0)
        cr = cairo_create(rt->surface);
-#else
-       cr = gdk_cairo_create(window);
-#endif
        cairo_set_source_surface(cr, it->surface, pr->x_offset + (it->x - rt->x_scroll) + rt->stereo_off_x, pr->y_offset + (it->y - rt->y_scroll) + rt->stereo_off_y);
        cairo_rectangle (cr, pr->x_offset + (it->x - rt->x_scroll) + x + rt->stereo_off_x, pr->y_offset + (it->y - rt->y_scroll) + y + rt->stereo_off_y, w, h);
        cairo_fill (cr);
@@ -1621,9 +1565,7 @@ static void rt_tile_expose(RendererTiles *rt, ImageTile *it,
                                it);
                }
 
-#if GTK_CHECK_VERSION(3,0,0)
        gtk_widget_queue_draw(GTK_WIDGET(rt->pr));
-#endif
 }
 
 
@@ -2047,19 +1989,9 @@ static void rt_scroll(void *renderer, gint x_off, gint y_off)
                        y2 = abs(y_off);
                        }
 
-#if GTK_CHECK_VERSION(3,0,0)
                cr = cairo_create(rt->surface);
                surface = rt->surface;
-#else
-               GtkWidget *box;
-               GdkWindow *window;
-
-               box = GTK_WIDGET(pr);
-               window = gtk_widget_get_window(box);
 
-               cr = gdk_cairo_create(window);
-               surface = cairo_get_target(cr);
-#endif
                /* clipping restricts the intermediate surface's size, so it's a good idea
                 * to use it. */
                cairo_rectangle(cr, x1 + pr->x_offset + rt->stereo_off_x, y1 + pr->y_offset + rt->stereo_off_y, w, h);
@@ -2143,7 +2075,7 @@ static void renderer_redraw(RendererTiles *rt, gint x, gint y, gint w, gint h,
                 clamp, render, new_data, only_existing);
 }
 
-static void renderer_update_pixbuf(void *renderer, gboolean lazy)
+static void renderer_update_pixbuf(void *renderer, gboolean UNUSED(lazy))
 {
        rt_queue_clear((RendererTiles *)renderer);
 }
@@ -2197,7 +2129,7 @@ static void renderer_update_viewport(void *renderer)
                        rt->stereo_off_y = rt->pr->stereo_fixed_y_left;
                        }
                }
-        DEBUG_1("update size: %p  %d %d   %d %d", rt, rt->stereo_off_x, rt->stereo_off_y, rt->pr->viewport_width, rt->pr->viewport_height);
+        DEBUG_1("update size: %p  %d %d   %d %d", (void *)rt, rt->stereo_off_x, rt->stereo_off_y, rt->pr->viewport_width, rt->pr->viewport_height);
        rt_sync_scroll(rt);
        rt_overlay_update_sizes(rt);
        rt_border_clear(rt);
@@ -2224,7 +2156,6 @@ static void renderer_free(void *renderer)
         g_free(rt);
 }
 
-#if GTK_CHECK_VERSION(3,0,0)
 static gboolean rt_realize_cb(GtkWidget *widget, gpointer data)
 {
        RendererTiles *rt = (RendererTiles *)data;
@@ -2269,7 +2200,7 @@ static gboolean rt_size_allocate_cb(GtkWidget *widget,  GdkRectangle *allocation
        return FALSE;
 }
 
-static gboolean rt_draw_cb(GtkWidget *widget, cairo_t *cr, gpointer data)
+static gboolean rt_draw_cb(GtkWidget *UNUSED(widget), cairo_t *cr, gpointer data)
 {
        RendererTiles *rt = (RendererTiles *)data;
        GList *work;
@@ -2329,40 +2260,6 @@ static gboolean rt_draw_cb(GtkWidget *widget, cairo_t *cr, gpointer data)
        return FALSE;
 }
 
-#else
-static gboolean rt_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
-{
-       RendererTiles *rt = (RendererTiles *)data;
-       if (gtk_widget_is_drawable(widget))
-               {
-               if (gtk_widget_get_has_window(widget))
-                       {
-                       if (event->window != gtk_widget_get_window(widget))
-                               {
-                               GdkRectangle area;
-
-                               gdk_window_get_position(event->window, &area.x, &area.y);
-                               area.x += event->area.x;
-                               area.y += event->area.y;
-                               area.width = event->area.width;
-                               area.height = event->area.height;
-                               renderer_redraw(rt, area.x, area.y, area.width, area.height,
-                                               FALSE, TILE_RENDER_ALL, FALSE, FALSE);
-
-                               }
-                       else
-                               {
-                               renderer_redraw(rt, event->area.x, event->area.y, event->area.width, event->area.height,
-                                               FALSE, TILE_RENDER_ALL, FALSE, FALSE);
-                               }
-                       }
-               }
-
-       return FALSE;
-}
-#endif
-
-
 RendererFuncs *renderer_tiles_new(PixbufRenderer *pr)
 {
        RendererTiles *rt = g_new0(RendererTiles, 1);
@@ -2398,24 +2295,15 @@ RendererFuncs *renderer_tiles_new(PixbufRenderer *pr)
        rt->stereo_off_x = 0;
        rt->stereo_off_y = 0;
 
-#if GTK_CHECK_VERSION(3, 10, 0)
        rt->hidpi_scale = gtk_widget_get_scale_factor(GTK_WIDGET(rt->pr));
-#else
-       rt->hidpi_scale = 1;
-#endif
 
        g_signal_connect(G_OBJECT(pr), "hierarchy-changed",
                         G_CALLBACK(rt_hierarchy_changed_cb), rt);
 
-#if GTK_CHECK_VERSION(3,0,0)
        g_signal_connect(G_OBJECT(pr), "draw",
                         G_CALLBACK(rt_draw_cb), rt);
        g_signal_connect(G_OBJECT(pr), "realize", G_CALLBACK(rt_realize_cb), rt);
        g_signal_connect(G_OBJECT(pr), "size-allocate", G_CALLBACK(rt_size_allocate_cb), rt);
-#else
-       g_signal_connect(G_OBJECT(pr), "expose_event",
-                        G_CALLBACK(rt_expose_cb), rt);
-#endif
 
        return (RendererFuncs *) rt;
 }
index 0aaf658..311e1fb 100644 (file)
@@ -664,8 +664,8 @@ static GList *search_result_refine_list(SearchData *sd)
        return g_list_reverse(list);
 }
 
-static gboolean search_result_free_node(GtkTreeModel *store, GtkTreePath *tpath,
-                                       GtkTreeIter *iter, gpointer data)
+static gboolean search_result_free_node(GtkTreeModel *store, GtkTreePath *UNUSED(tpath),
+                                       GtkTreeIter *iter, gpointer UNUSED(data))
 {
        MatchFileData *mfd;
 
@@ -807,8 +807,8 @@ static void search_result_update_idle_cancel(SearchData *sd)
                }
 }
 
-static gboolean search_result_select_cb(GtkTreeSelection *selection, GtkTreeModel *store,
-                                       GtkTreePath *tpath, gboolean selected, gpointer data)
+static gboolean search_result_select_cb(GtkTreeSelection *UNUSED(selection), GtkTreeModel *UNUSED(store),
+                                       GtkTreePath *UNUSED(tpath), gboolean UNUSED(selected), gpointer data)
 {
        SearchData *sd = data;
 
@@ -853,7 +853,7 @@ static void search_result_thumb_do(SearchData *sd)
        search_result_thumb_set(sd, fd, NULL);
 }
 
-static void search_result_thumb_done_cb(ThumbLoader *tl, gpointer data)
+static void search_result_thumb_done_cb(ThumbLoader *UNUSED(tl), gpointer data)
 {
        SearchData *sd = data;
 
@@ -992,14 +992,14 @@ static void search_result_thumb_enable(SearchData *sd, gboolean enable)
  *-------------------------------------------------------------------
  */
 
-static void sr_menu_view_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_view_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
        if (sd->click_fd) layout_set_fd(NULL, sd->click_fd);
 }
 
-static void sr_menu_viewnew_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_viewnew_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
        GList *list;
@@ -1009,7 +1009,7 @@ static void sr_menu_viewnew_cb(GtkWidget *widget, gpointer data)
        filelist_free(list);
 }
 
-static void sr_menu_select_all_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_select_all_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
        GtkTreeSelection *selection;
@@ -1018,7 +1018,7 @@ static void sr_menu_select_all_cb(GtkWidget *widget, gpointer data)
        gtk_tree_selection_select_all(selection);
 }
 
-static void sr_menu_select_none_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_select_none_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
        GtkTreeSelection *selection;
@@ -1038,7 +1038,7 @@ static void sr_menu_edit_cb(GtkWidget *widget, gpointer data)
        search_result_edit_selected(sd, key);
 }
 
-static void sr_menu_print_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_print_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
@@ -1046,28 +1046,28 @@ static void sr_menu_print_cb(GtkWidget *widget, gpointer data)
                         search_result_get_filelist(sd), sd->window);
 }
 
-static void sr_menu_copy_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_copy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
        file_util_copy(NULL, search_result_selection_list(sd), NULL, sd->window);
 }
 
-static void sr_menu_move_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_move_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
        file_util_move(NULL, search_result_selection_list(sd), NULL, sd->window);
 }
 
-static void sr_menu_rename_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
        file_util_rename(NULL, search_result_selection_list(sd), sd->window);
 }
 
-static void sr_menu_delete_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
@@ -1075,7 +1075,7 @@ static void sr_menu_delete_cb(GtkWidget *widget, gpointer data)
        file_util_delete(NULL, search_result_selection_list(sd), sd->window);
 }
 
-static void sr_menu_move_to_trash_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_move_to_trash_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
@@ -1083,28 +1083,28 @@ static void sr_menu_move_to_trash_cb(GtkWidget *widget, gpointer data)
        file_util_delete(NULL, search_result_selection_list(sd), sd->window);
 }
 
-static void sr_menu_copy_path_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
        file_util_copy_path_list_to_clipboard(search_result_selection_list(sd), TRUE);
 }
 
-static void sr_menu_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
        file_util_copy_path_list_to_clipboard(search_result_selection_list(sd), FALSE);
 }
 
-static void sr_menu_play_cb(GtkWidget *widget, gpointer data)
+static void sr_menu_play_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
        start_editor_from_file(options->image_l_click_video_editor, sd->click_fd);
 }
 
-static void search_result_menu_destroy_cb(GtkWidget *widget, gpointer data)
+static void search_result_menu_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GList *editmenu_fd_list = data;
 
@@ -1198,7 +1198,7 @@ static GtkWidget *search_result_menu(SearchData *sd, gboolean on_row, gboolean e
        return menu;
 }
 
-static void search_result_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void search_result_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        SearchData *sd = data;
        GtkTreePath *tpath;
@@ -1473,7 +1473,7 @@ static gboolean search_result_keypress_cb(GtkWidget *widget, GdkEventKey *event,
        return stop_signal;
 }
 
-static gboolean search_window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean search_window_keypress_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        SearchData *sd = data;
        gboolean stop_signal = FALSE;
@@ -1525,9 +1525,9 @@ static GtkTargetEntry result_drop_types[] = {
 };
 static gint n_result_drop_types = 2;
 
-static void search_dnd_data_set(GtkWidget *widget, GdkDragContext *context,
-                               GtkSelectionData *selection_data, guint info,
-                               guint time, gpointer data)
+static void search_dnd_data_set(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
+                               GtkSelectionData *selection_data, guint UNUSED(info),
+                               guint UNUSED(time), gpointer data)
 {
        SearchData *sd = data;
        GList *list;
@@ -1571,10 +1571,10 @@ static void search_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointe
                }
 }
 
-static void search_gps_dnd_received_cb(GtkWidget *pane, GdkDragContext *context,
-                                                                               gint x, gint y,
+static void search_gps_dnd_received_cb(GtkWidget *UNUSED(pane), GdkDragContext *UNUSED(context),
+                                                                               gint UNUSED(x), gint UNUSED(y),
                                                                                GtkSelectionData *selection_data, guint info,
-                                                                               guint time, gpointer data)
+                                                                               guint UNUSED(time), gpointer data)
 {
        SearchData *sd = data;
        GList *list;
@@ -1610,10 +1610,10 @@ static void search_gps_dnd_received_cb(GtkWidget *pane, GdkDragContext *context,
                }
 }
 
-static void search_path_entry_dnd_received_cb(GtkWidget *pane, GdkDragContext *context,
-                                                                               gint x, gint y,
+static void search_path_entry_dnd_received_cb(GtkWidget *UNUSED(pane), GdkDragContext *UNUSED(context),
+                                                                               gint UNUSED(x), gint UNUSED(y),
                                                                                GtkSelectionData *selection_data, guint info,
-                                                                               guint time, gpointer data)
+                                                                               guint UNUSED(time), gpointer data)
 {
        SearchData *sd = data;
        GList *list;
@@ -1639,10 +1639,10 @@ static void search_path_entry_dnd_received_cb(GtkWidget *pane, GdkDragContext *c
                }
 }
 
-static void search_image_content_dnd_received_cb(GtkWidget *pane, GdkDragContext *context,
-                                                                               gint x, gint y,
+static void search_image_content_dnd_received_cb(GtkWidget *UNUSED(pane), GdkDragContext *UNUSED(context),
+                                                                               gint UNUSED(x), gint UNUSED(y),
                                                                                GtkSelectionData *selection_data, guint info,
-                                                                               guint time, gpointer data)
+                                                                               guint UNUSED(time), gpointer data)
 {
        SearchData *sd = data;
        GList *list;
@@ -1829,7 +1829,7 @@ static void search_file_load_process(SearchData *sd, CacheData *cd)
        sd->search_idle_id = g_idle_add(search_step_cb, sd);
 }
 
-static void search_file_load_done_cb(ImageLoader *il, gpointer data)
+static void search_file_load_done_cb(ImageLoader *UNUSED(il), gpointer data)
 {
        SearchData *sd = data;
        search_file_load_process(sd, sd->img_cd);
@@ -2574,7 +2574,7 @@ static gboolean search_step_cb(gpointer data)
        return TRUE;
 }
 
-static void search_similarity_load_done_cb(ImageLoader *il, gpointer data)
+static void search_similarity_load_done_cb(ImageLoader *UNUSED(il), gpointer data)
 {
        SearchData *sd = data;
        search_file_load_process(sd, sd->search_similarity_cd);
@@ -2681,7 +2681,7 @@ static void search_start(SearchData *sd)
        sd->search_idle_id = g_idle_add(search_step_cb, sd);
 }
 
-static void search_start_cb(GtkWidget *widget, gpointer data)
+static void search_start_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
        GtkTreeViewColumn *column;
@@ -3149,7 +3149,7 @@ static GtkWidget *menu_choice(GtkWidget *box, GtkWidget **check, GtkWidget **men
        GtkWidget *button;
        GtkWidget *option;
 
-       base_box = gtk_hbox_new(FALSE, PREF_PAD_GAP);
+       base_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
        gtk_box_pack_start(GTK_BOX(box), base_box, FALSE, FALSE, 0);
        gtk_widget_show(base_box);
 
@@ -3160,7 +3160,7 @@ static GtkWidget *menu_choice(GtkWidget *box, GtkWidget **check, GtkWidget **men
        if (check) *check = button;
        if (value) g_object_set_data(G_OBJECT(button), "check_var", value);
 
-       hbox = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        gtk_box_pack_start(GTK_BOX(base_box), hbox, TRUE, TRUE, 0);
        gtk_widget_show(hbox);
 
@@ -3203,19 +3203,19 @@ static void search_window_close(SearchData *sd)
        gtk_widget_destroy(sd->window);
 }
 
-static void search_window_close_cb(GtkWidget *widget, gpointer data)
+static void search_window_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
        search_window_close(sd);
 }
 
-static void search_window_help_cb(GtkWidget *widget, gpointer data)
+static void search_window_help_cb(GtkWidget *UNUSED(widget), gpointer UNUSED(data))
 {
        help_window_show("GuideImageSearchSearch.html");
 }
 
-static gboolean search_window_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean search_window_delete_cb(GtkWidget *UNUSED(widget), GdkEventAny *UNUSED(event), gpointer data)
 {
        SearchData *sd = data;
 
@@ -3223,7 +3223,7 @@ static gboolean search_window_delete_cb(GtkWidget *widget, GdkEventAny *event, g
        return TRUE;
 }
 
-static void search_window_destroy_cb(GtkWidget *widget, gpointer data)
+static void search_window_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
 
@@ -3257,7 +3257,7 @@ static void search_window_destroy_cb(GtkWidget *widget, gpointer data)
        g_free(sd);
 }
 
-static void select_collection_dialog_close_cb(FileDialog *fdlg, gpointer data)
+static void select_collection_dialog_close_cb(FileDialog *fdlg, gpointer UNUSED(data))
 {
        file_dialog_close(fdlg);
 }
@@ -3281,7 +3281,7 @@ static void select_collection_dialog_ok_cb(FileDialog *fdlg, gpointer data)
        g_free(collection);
 }
 
-static void select_collection_clicked_cb(GtkWidget *widget, gpointer data)
+static void select_collection_clicked_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SearchData *sd = data;
        FileDialog *fdlg;
@@ -3292,13 +3292,13 @@ static void select_collection_clicked_cb(GtkWidget *widget, gpointer data)
 
        title = _("Select collection");
        btntext = NULL;
-       btnfunc = select_collection_dialog_ok_cb;
+       btnfunc = (void *)select_collection_dialog_ok_cb;
        stock_id = GTK_STOCK_OK;
 
        fdlg = file_util_file_dlg(title, "dlg_collection", sd->window, select_collection_dialog_close_cb, sd);
 
        generic_dialog_add_message(GENERIC_DIALOG(fdlg), NULL, title, NULL, FALSE);
-       file_dialog_add_button(fdlg, stock_id, btntext, btnfunc, TRUE);
+       file_dialog_add_button(fdlg, stock_id, btntext, (void(*)(FileDialog *, gpointer))btnfunc, TRUE);
 
        file_dialog_add_path_widgets(fdlg, get_collections_dir(), NULL, "search_collection", GQ_COLLECTION_EXT, _("Collection Files"));
 
@@ -3390,7 +3390,7 @@ void search_new(FileData *dir_fd, FileData *example_file)
        g_signal_connect(G_OBJECT(sd->window), "key_press_event",
                         G_CALLBACK(search_window_keypress_cb), sd);
 
-       vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_container_set_border_width(GTK_CONTAINER(vbox), PREF_PAD_GAP);
        gtk_container_add(GTK_CONTAINER(sd->window), vbox);
        gtk_widget_show(vbox);
@@ -3448,7 +3448,7 @@ void search_new(FileData *dir_fd, FileData *example_file)
                           G_CALLBACK(menu_choice_size_cb), sd);
        sd->spin_size = menu_spin(hbox, 0, 1024*1024*1024, sd->search_size,
                                  G_CALLBACK(menu_choice_spin_cb), &sd->search_size);
-       hbox2 = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 0);
        pref_label_new(hbox2, _("and"));
        sd->spin_size_end = menu_spin(hbox2, 0, 1024*1024*1024, sd->search_size_end,
@@ -3465,7 +3465,7 @@ void search_new(FileData *dir_fd, FileData *example_file)
        gtk_box_pack_start(GTK_BOX(hbox), sd->date_sel, FALSE, FALSE, 0);
        gtk_widget_show(sd->date_sel);
 
-       hbox2 = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 0);
        pref_label_new(hbox2, _("and"));
        sd->date_sel_end = date_selection_new();
@@ -3494,7 +3494,7 @@ void search_new(FileData *dir_fd, FileData *example_file)
        pref_label_new(pad_box, "x");
        sd->spin_height = menu_spin(pad_box, 0, 1000000, sd->search_height,
                                    G_CALLBACK(menu_choice_spin_cb), &sd->search_height);
-       hbox2 = gtk_hbox_new(FALSE, 2);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
        gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 0);
        pref_label_new(hbox2, _("and"));
        pref_spacer(hbox2, PREF_PAD_SPACE - 2*2);
@@ -3557,7 +3557,7 @@ void search_new(FileData *dir_fd, FileData *example_file)
                           G_CALLBACK(menu_choice_rating_cb), sd);
        sd->spin_size = menu_spin(hbox, -1, 5, sd->search_rating,
                                  G_CALLBACK(menu_choice_spin_cb), &sd->search_rating);
-       hbox2 = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 0);
        pref_label_new(hbox2, _("and"));
        sd->spin_rating_end = menu_spin(hbox2, -1, 5, sd->search_rating_end,
@@ -3570,7 +3570,7 @@ void search_new(FileData *dir_fd, FileData *example_file)
                           text_search_menu_gps, sizeof(text_search_menu_gps) / sizeof(MatchList),
                           G_CALLBACK(menu_choice_gps_cb), sd);
 
-       hbox2 = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 0);
        sd->spin_gps = menu_spin(hbox2, 1, 9999, sd->search_gps,
                                                                   G_CALLBACK(menu_choice_spin_cb), &sd->search_gps);
@@ -3724,10 +3724,10 @@ void search_new(FileData *dir_fd, FileData *example_file)
 
        sd->label_progress = gtk_progress_bar_new();
        gtk_widget_set_size_request(sd->label_progress, 50, -1);
-#if GTK_CHECK_VERSION(3,0,0)
+
        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(sd->label_progress), "");
        gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(sd->label_progress), TRUE);
-#endif
+
        gtk_box_pack_start(GTK_BOX(hbox), sd->label_progress, TRUE, TRUE, 0);
        gtk_widget_show(sd->label_progress);
 
index ba758da..226f7f4 100644 (file)
@@ -46,7 +46,7 @@ struct _SarData
        gboolean match_found;
 };
 
-static gint sort_iter_compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data)
+static gint sort_iter_compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer UNUSED(data))
 {
        gint ret = 0;
        gchar *label1, *label2;
@@ -185,7 +185,7 @@ static gboolean search_and_run_destroy(gpointer data)
        return TRUE;
 }
 
-static gboolean entry_box_activate_cb(GtkWidget *widget, gpointer data)
+static gboolean entry_box_activate_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SarData *sar = data;
 
@@ -199,7 +199,7 @@ static gboolean entry_box_activate_cb(GtkWidget *widget, gpointer data)
        return TRUE;
 }
 
-static gboolean keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean keypress_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        SarData *sar = data;
        gboolean ret = FALSE;
@@ -220,7 +220,7 @@ static gboolean keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data
        return ret;
 }
 
-static gboolean match_selected_cb(GtkEntryCompletion *widget, GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
+static gboolean match_selected_cb(GtkEntryCompletion *UNUSED(widget), GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
 {
        SarData *sar = data;
 
@@ -254,7 +254,7 @@ static gboolean match_func(GtkEntryCompletion *completion, const gchar *key, Gtk
 
        normalized = g_utf8_normalize(label, -1, G_NORMALIZE_DEFAULT);
 
-       reg_exp_str = g_string_new("\\b\(\?=.*:)");
+       reg_exp_str = g_string_new("\\b(\?=.*:)");
        reg_exp_str = g_string_append(reg_exp_str, key);
 
        reg_exp = g_regex_new(reg_exp_str->str, G_REGEX_CASELESS, 0, &error);
index fba8831..b74bf93 100644 (file)
@@ -84,7 +84,7 @@ static void shortcuts_add_ok_cb(FileDialog *fd, gpointer data)
        shortcuts_add_close(scd);
 }
 
-static void shortcuts_add_cancel_cb(FileDialog *fd, gpointer data)
+static void shortcuts_add_cancel_cb(FileDialog *UNUSED(fd), gpointer data)
 {
        ShortcutsData *scd = data;
 
@@ -125,7 +125,7 @@ static void shortcuts_add_cb(GtkWidget *button, gpointer data)
        gtk_widget_show(GENERIC_DIALOG(scd->dialog)->dialog);
 }
 
-static void shortcuts_destroy(GtkWidget *widget, gpointer data)
+static void shortcuts_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        ShortcutsData *scd = data;
 
@@ -163,7 +163,7 @@ static GtkWidget *shortcuts_new(LayoutWindow *lw)
        return scd->vbox;
 }
 
-GtkWidget *shortcuts_new_from_config(LayoutWindow *lw, const gchar **attribute_names, const gchar **attribute_values)
+GtkWidget *shortcuts_new_from_config(LayoutWindow *lw, const gchar **UNUSED(attribute_names), const gchar **UNUSED(attribute_values))
 {
        GtkWidget *shortcuts_bar;
 
index 2ab21c6..fdd9b56 100644 (file)
@@ -112,7 +112,7 @@ static gboolean thumb_loader_save_thumbnail(ThumbLoader *tl, gboolean mark_failu
        return success;
 }
 
-static void thumb_loader_percent_cb(ImageLoader *il, gdouble percent, gpointer data)
+static void thumb_loader_percent_cb(ImageLoader *UNUSED(il), gdouble percent, gpointer data)
 {
        ThumbLoader *tl = data;
 
@@ -499,7 +499,7 @@ void thumb_loader_free(ThumbLoader *tl)
 }
 
 /* release thumb_pixbuf on file change - this forces reload. */
-void thumb_notify_cb(FileData *fd, NotifyType type, gpointer data)
+void thumb_notify_cb(FileData *fd, NotifyType type, gpointer UNUSED(data))
 {
        if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) && fd->thumb_pixbuf)
                {
@@ -560,7 +560,7 @@ static guchar *load_xv_thumbnail(gchar *filename, gint *widthp, gint *heightp)
 }
 #undef XV_BUFFER
 
-static void free_rgb_buffer(guchar *pixels, gpointer data)
+static void free_rgb_buffer(guchar *pixels, gpointer UNUSED(data))
 {
        g_free(pixels);
 }
index 6e89260..0e35f8c 100644 (file)
@@ -711,7 +711,7 @@ static void thumb_loader_std_error_cb(ImageLoader *il, gpointer data)
        if (tl->func_error) tl->func_error(tl, tl->data);
 }
 
-static void thumb_loader_std_progress_cb(ImageLoader *il, gdouble percent, gpointer data)
+static void thumb_loader_std_progress_cb(ImageLoader *UNUSED(il), gdouble percent, gpointer data)
 {
        ThumbLoaderStd *tl = data;
 
@@ -909,7 +909,7 @@ static void thumb_loader_std_thumb_file_validate_finish(ThumbValidate *tv, gbool
        thumb_loader_std_thumb_file_validate_free(tv);
 }
 
-static void thumb_loader_std_thumb_file_validate_done_cb(ThumbLoaderStd *tl, gpointer data)
+static void thumb_loader_std_thumb_file_validate_done_cb(ThumbLoaderStd *UNUSED(tl), gpointer data)
 {
        ThumbValidate *tv = data;
        GdkPixbuf *pixbuf;
@@ -967,7 +967,7 @@ static void thumb_loader_std_thumb_file_validate_done_cb(ThumbLoaderStd *tl, gpo
        thumb_loader_std_thumb_file_validate_finish(tv, valid);
 }
 
-static void thumb_loader_std_thumb_file_validate_error_cb(ThumbLoaderStd *tl, gpointer data)
+static void thumb_loader_std_thumb_file_validate_error_cb(ThumbLoaderStd *UNUSED(tl), gpointer data)
 {
        ThumbValidate *tv = data;
 
@@ -1077,7 +1077,7 @@ static void thumb_std_maint_move_step(TMaintMove *tm);
 static gboolean thumb_std_maint_move_idle(gpointer data);
 
 
-static void thumb_std_maint_move_validate_cb(const gchar *path, gboolean valid, gpointer data)
+static void thumb_std_maint_move_validate_cb(const gchar *UNUSED(path), gboolean UNUSED(valid), gpointer data)
 {
        TMaintMove *tm = data;
        GdkPixbuf *pixbuf;
@@ -1160,7 +1160,7 @@ static void thumb_std_maint_move_step(TMaintMove *tm)
                                                      thumb_std_maint_move_validate_cb, tm);
 }
 
-static gboolean thumb_std_maint_move_idle(gpointer data)
+static gboolean thumb_std_maint_move_idle(gpointer UNUSED(data))
 {
        TMaintMove *tm;
        gchar *pathl;
index 6aaff5d..f98ce1f 100644 (file)
@@ -159,7 +159,7 @@ static const UseableToolbarItems useable_toolbar_items[] = {
  * @param single_step Move up/down one step, or to top/bottom
  * 
  */
-static void toolbar_item_move(GtkWidget *widget, gpointer data,
+static void toolbar_item_move(GtkWidget *UNUSED(widget), gpointer data,
                                                                        gboolean up, gboolean single_step)
 {
        GtkWidget *list_item = data;
@@ -205,7 +205,7 @@ static void toolbar_item_move_bottom_cb(GtkWidget *widget, gpointer data)
        toolbar_item_move(widget, data, FALSE, FALSE);
 }
 
-static void toolbar_item_delete_cb(GtkWidget *widget, gpointer data)
+static void toolbar_item_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        gtk_widget_destroy(data);
 }
@@ -233,7 +233,7 @@ static void toolbar_menu_popup(GtkWidget *widget)
        gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, vbox, 0, GDK_CURRENT_TIME);
 }
 
-static gboolean toolbar_press_cb(GtkWidget *button, GdkEventButton *event, gpointer data)
+static gboolean toolbar_press_cb(GtkWidget *UNUSED(button), GdkEventButton *event, gpointer data)
 {
        ToolbarButtonData *button_data = data;
 
@@ -295,7 +295,7 @@ static void toolbarlist_add_button(const gchar *name, const gchar *label,
        g_object_set_data_full(G_OBJECT(toolbar_entry->button), "toolbarbuttondata",
        toolbar_entry, (GDestroyNotify)toolbar_item_free);
 
-       hbox = gtk_hbox_new(FALSE, PREF_PAD_BUTTON_GAP);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
        gtk_container_add(GTK_CONTAINER(toolbar_entry->button), hbox);
        gtk_widget_show(hbox);
 
@@ -514,7 +514,7 @@ GtkWidget *toolbar_select_new(LayoutWindow *lw, ToolbarType bar)
                }
        toolbarlist[bar]->lw = lw;
 
-       toolbarlist[bar]->widget = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       toolbarlist[bar]->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_widget_show(toolbarlist[bar]->widget);
 
        scrolled = gtk_scrolled_window_new(NULL, NULL);
@@ -524,13 +524,13 @@ GtkWidget *toolbar_select_new(LayoutWindow *lw, ToolbarType bar)
        gtk_box_pack_start(GTK_BOX(toolbarlist[bar]->widget), scrolled, TRUE, TRUE, 0);
        gtk_widget_show(scrolled);
 
-       toolbarlist[bar]->vbox = gtk_vbox_new(FALSE, 0);
+       toolbarlist[bar]->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_widget_show(toolbarlist[bar]->vbox);
-       gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), toolbarlist[bar]->vbox);
+       gtk_container_add(GTK_CONTAINER(scrolled), toolbarlist[bar]->vbox);
        gtk_viewport_set_shadow_type(GTK_VIEWPORT(gtk_bin_get_child(GTK_BIN(scrolled))),
                                                                                                                                GTK_SHADOW_NONE);
 
-       add_box = gtk_vbox_new(FALSE, 0);
+       add_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_widget_show(add_box);
        gtk_box_pack_end(GTK_BOX(toolbarlist[bar]->widget), add_box, FALSE, FALSE, 0);
        tbar = pref_toolbar_new(add_box, GTK_TOOLBAR_ICONS);
index 167c59a..6990ced 100644 (file)
@@ -208,7 +208,7 @@ typedef enum {
        CHANGE_WARN_CHANGED_EXT        = 1 << 3,
        CHANGE_WARN_UNSAVED_META       = 1 << 4,
        CHANGE_WARN_NO_WRITE_PERM_DEST_DIR  = 1 << 5,
-       CHANGE_ERROR_MASK              = (~0U) << 8, /**< the values below are fatal errors */
+       CHANGE_ERROR_MASK              = ~0xff, /**< the values below are fatal errors */
        CHANGE_NO_READ_PERM            = 1 << 8,
        CHANGE_NO_WRITE_PERM_DIR       = 1 << 9,
        CHANGE_NO_DEST_DIR             = 1 << 10,
index 19521e0..fe3f18a 100644 (file)
@@ -219,7 +219,7 @@ static void bookmark_select_cb(GtkWidget *button, gpointer data)
        if (bm->select_func) bm->select_func(b->path, bm->select_data);
 }
 
-static void bookmark_edit_destroy_cb(GtkWidget *widget, gpointer data)
+static void bookmark_edit_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        BookPropData *p = data;
 
@@ -227,11 +227,11 @@ static void bookmark_edit_destroy_cb(GtkWidget *widget, gpointer data)
        g_free(p);
 }
 
-static void bookmark_edit_cancel_cb(GenericDialog *gd, gpointer data)
+static void bookmark_edit_cancel_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
 }
 
-static void bookmark_edit_ok_cb(GenericDialog *gd, gpointer data)
+static void bookmark_edit_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        BookPropData *p = data;
        const gchar *name;
@@ -367,17 +367,17 @@ static void bookmark_menu_move(BookMarkData *bm, gint direction)
        bookmark_move(bm, bm->active_button->button, direction);
 }
 
-static void bookmark_menu_up_cb(GtkWidget *widget, gpointer data)
+static void bookmark_menu_up_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        bookmark_menu_move(data, -1);
 }
 
-static void bookmark_menu_down_cb(GtkWidget *widget, gpointer data)
+static void bookmark_menu_down_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        bookmark_menu_move(data, 1);
 }
 
-static void bookmark_menu_remove_cb(GtkWidget *widget, gpointer data)
+static void bookmark_menu_remove_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        BookMarkData *bm = data;
 
@@ -387,7 +387,7 @@ static void bookmark_menu_remove_cb(GtkWidget *widget, gpointer data)
        bookmark_populate_all(bm->key);
 }
 
-static void bookmark_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gint *pushed_in, gpointer data)
+static void bookmark_menu_position_cb(GtkMenu *UNUSED(menu), gint *x, gint *y, gint *UNUSED(pushed_in), gpointer data)
 {
        GtkWidget *button = data;
        GtkAllocation allocation;
@@ -474,18 +474,14 @@ static gboolean bookmark_keypress_cb(GtkWidget *button, GdkEventKey *event, gpoi
 
 static void bookmark_drag_set_data(GtkWidget *button,
                                   GdkDragContext *context, GtkSelectionData *selection_data,
-                                  guint info, guint time, gpointer data)
+                                  guint UNUSED(info), guint UNUSED(time), gpointer data)
 {
        BookMarkData *bm = data;
        BookButtonData *b;
        GList *list = NULL;
 
-#if GTK_CHECK_VERSION(3,0,0)
        return;
        if (gdk_drag_context_get_dest_window(context) == gtk_widget_get_window(bm->widget)) return;
-#else
-       if (context->dest_window == bm->widget->window) return;
-#endif
 
        b = g_object_get_data(G_OBJECT(button), "bookbuttondata");
        if (!b) return;
@@ -505,41 +501,30 @@ static void bookmark_drag_set_data(GtkWidget *button,
        g_list_free(list);
 }
 
-static void bookmark_drag_begin(GtkWidget *button, GdkDragContext *context, gpointer data)
+static void bookmark_drag_begin(GtkWidget *button, GdkDragContext *context, gpointer UNUSED(data))
 {
        GdkPixbuf *pixbuf;
        GdkModifierType mask;
        gint x, y;
        GtkAllocation allocation;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
        gtk_widget_get_allocation(button, &allocation);
 
-#if GTK_CHECK_VERSION(3,0,0)
        pixbuf = gdk_pixbuf_get_from_window(gtk_widget_get_window(button),
                                            allocation.x, allocation.y,
                                            allocation.width, allocation.height);
        device_manager = gdk_display_get_device_manager(gdk_window_get_display(gtk_widget_get_window(button)));
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_window_get_device_position(gtk_widget_get_window(button), device, &x, &y, &mask);
-#else
-       pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8,
-                               allocation.width, allocation.height);
-       gdk_pixbuf_get_from_drawable(pixbuf, gtk_widget_get_window(button), NULL,
-                                    allocation.x, allocation.y,
-                                    0, 0, allocation.width, allocation.height);
-       gdk_window_get_pointer(gtk_widget_get_window(button), &x, &y, &mask);
-#endif
 
        gtk_drag_set_icon_pixbuf(context, pixbuf,
                                 x - allocation.x, y - allocation.y);
        g_object_unref(pixbuf);
 }
 
-static gboolean bookmark_path_tooltip_cb(GtkWidget *button, gpointer data)
+static gboolean bookmark_path_tooltip_cb(GtkWidget *button, gpointer UNUSED(data))
 {
        BookButtonData *b;
 
@@ -642,7 +627,7 @@ static void bookmark_populate(BookMarkData *bm)
                        g_object_set_data_full(G_OBJECT(b->button), "bookbuttondata",
                                               b, (GDestroyNotify)bookmark_free);
 
-                       box = gtk_hbox_new(FALSE, PREF_PAD_BUTTON_GAP);
+                       box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP);
                        gtk_container_add(GTK_CONTAINER(b->button), box);
                        gtk_widget_show(box);
 
@@ -729,10 +714,10 @@ static void bookmark_populate_all(const gchar *key)
                }
 }
 
-static void bookmark_dnd_get_data(GtkWidget *widget,
-                                 GdkDragContext *context, gint x, gint y,
-                                 GtkSelectionData *selection_data, guint info,
-                                 guint time, gpointer data)
+static void bookmark_dnd_get_data(GtkWidget *UNUSED(widget),
+                                 GdkDragContext *UNUSED(context), gint UNUSED(x), gint UNUSED(y),
+                                 GtkSelectionData *selection_data, guint UNUSED(info),
+                                 guint UNUSED(time), gpointer data)
 {
        BookMarkData *bm = data;
        GList *list = NULL;
@@ -773,7 +758,7 @@ static void bookmark_dnd_get_data(GtkWidget *widget,
                }
 }
 
-static void bookmark_list_destroy(GtkWidget *widget, gpointer data)
+static void bookmark_list_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        BookMarkData *bm = data;
 
@@ -803,7 +788,6 @@ GtkWidget *bookmark_list_new(const gchar *key,
 
        scrolled = gtk_scrolled_window_new(NULL, NULL);
 
-#if GTK_CHECK_VERSION(3,0,0)
        PangoLayout *layout;
        gint width, height;
 
@@ -813,12 +797,9 @@ GtkWidget *bookmark_list_new(const gchar *key,
        g_object_unref(layout);
 
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-#else
-       gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-#endif
 
-       bm->box = gtk_vbox_new(FALSE, 0);
-       gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), bm->box);
+       bm->box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+       gtk_container_add(GTK_CONTAINER(scrolled), bm->box);
        gtk_widget_show(bm->box);
 
        bookmark_populate(bm);
@@ -925,7 +906,7 @@ struct _HistoryComboData
        gint history_levels;
 };
 
-static void history_combo_destroy(GtkWidget *widget, gpointer data)
+static void history_combo_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        HistoryComboData *hc = data;
 
index d322e41..474bc17 100644 (file)
@@ -731,7 +731,7 @@ gchar *get_current_dir(void)
        return path8;
 }
 
-void list_free_wrapper(void *data, void *userdata)
+void list_free_wrapper(void *data, void *UNUSED(userdata))
 {
        g_free(data);
 }
@@ -1063,7 +1063,7 @@ static void web_file_progress_cb(goffset current_num_bytes, goffset total_num_by
                }
 }
 
-static void download_web_file_cancel_button_cb(GenericDialog *gd, gpointer data)
+static void download_web_file_cancel_button_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        WebData* web = data;
 
@@ -1078,7 +1078,7 @@ gboolean download_web_file(const gchar *text, gboolean minimized, gpointer data)
        GError *error = NULL;
        WebData *web;
        gchar *base;
-       gboolean ret;
+       gboolean ret = FALSE;
        gchar *message;
        FileFormatClass format_class;
 
@@ -1172,11 +1172,7 @@ gint scale_factor()
 {
        LayoutWindow *lw = NULL;
 
-#if GTK_CHECK_VERSION(3, 10, 0)
        layout_valid(&lw);
        return gtk_widget_get_scale_factor(lw->window);
-#else
-       return 1;
-#endif
 }
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index e5bf3a7..90c62c8 100644 (file)
@@ -149,13 +149,13 @@ static void help_window_load_text(GtkWidget *text, const gchar *path)
        gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(text), &iter, 0.0, TRUE, 0, 0);
 }
 
-static gboolean help_window_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean help_window_delete_cb(GtkWidget *widget, GdkEventAny *UNUSED(event), gpointer UNUSED(data))
 {
        gtk_widget_destroy(widget);
        return TRUE;
 }
 
-static void help_window_close(GtkWidget *widget, gpointer data)
+static void help_window_close(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkWidget *window = data;
        gtk_widget_destroy(window);
@@ -212,7 +212,7 @@ GtkWidget *help_window_new(const gchar *title,
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(help_window_delete_cb), NULL);
 
-       vbox = gtk_vbox_new(FALSE, 0);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_container_add(GTK_CONTAINER(window), vbox);
        gtk_widget_show(vbox);
 
@@ -220,7 +220,7 @@ GtkWidget *help_window_new(const gchar *title,
 
        /* text window */
 
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
        gtk_widget_show(hbox);
 
index 7ad048b..0f06f21 100644 (file)
@@ -355,7 +355,7 @@ GtkWidget *menu_item_add_simple(GtkWidget *menu, const gchar *label,
  *-----------------------------------------------------------------------------
  */
 
-static void popup_menu_short_lived_cb(GtkWidget *widget, gpointer data)
+static void popup_menu_short_lived_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        /* destroy the menu */
        g_object_unref(G_OBJECT(data));
index b3bd002..53e18ba 100644 (file)
@@ -49,11 +49,11 @@ GtkWidget *pref_box_new(GtkWidget *parent_box, gboolean fill,
 
        if (orientation == GTK_ORIENTATION_HORIZONTAL)
                {
-               box = gtk_hbox_new(FALSE, padding);
+               box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, padding);
                }
        else
                {
-               box = gtk_vbox_new(FALSE, padding);
+               box = gtk_box_new(GTK_ORIENTATION_VERTICAL, padding);
                }
 
        gtk_box_pack_start(GTK_BOX(parent_box), box, fill, fill, 0);
@@ -70,7 +70,7 @@ GtkWidget *pref_group_new(GtkWidget *parent_box, gboolean fill,
        GtkWidget *hbox;
        GtkWidget *label;
 
-       vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
 
        /* add additional spacing if necessary */
        if (GTK_IS_VBOX(parent_box))
@@ -87,18 +87,14 @@ GtkWidget *pref_group_new(GtkWidget *parent_box, gboolean fill,
        gtk_widget_show(vbox);
 
        label = gtk_label_new(text);
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(label), 0.0);
        gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-#endif
        pref_label_bold(label, TRUE, FALSE);
 
        gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
        gtk_widget_show(label);
 
-       hbox = gtk_hbox_new(FALSE, PREF_PAD_INDENT);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_INDENT);
        gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
        gtk_widget_show(hbox);
 
@@ -107,11 +103,11 @@ GtkWidget *pref_group_new(GtkWidget *parent_box, gboolean fill,
 
        if (orientation == GTK_ORIENTATION_HORIZONTAL)
                {
-               box = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+               box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
                }
        else
                {
-               box = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+               box = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
                }
        gtk_box_pack_start(GTK_BOX(hbox), box, TRUE, TRUE, 0);
        gtk_widget_show(box);
@@ -152,11 +148,11 @@ GtkWidget *pref_frame_new(GtkWidget *parent_box, gboolean fill,
 
        if (orientation == GTK_ORIENTATION_HORIZONTAL)
                {
-               box = gtk_hbox_new(FALSE, padding);
+               box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, padding);
                }
        else
                {
-               box = gtk_vbox_new(FALSE, padding);
+               box = gtk_box_new(GTK_ORIENTATION_VERTICAL, padding);
                }
        gtk_container_add(GTK_CONTAINER(frame), box);
        gtk_container_set_border_width(GTK_CONTAINER(box), PREF_PAD_BORDER);
@@ -169,7 +165,7 @@ GtkWidget *pref_spacer(GtkWidget *parent_box, gboolean padding)
 {
        GtkWidget *spacer;
 
-       spacer = gtk_hbox_new(FALSE, 0);
+       spacer = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_box_pack_start(GTK_BOX(parent_box), spacer, FALSE, FALSE, padding / 2);
        gtk_widget_show(spacer);
 
@@ -264,16 +260,12 @@ GtkWidget *pref_button_new(GtkWidget *parent_box, const gchar *stock_id,
 
                button = gtk_button_new();
 
-               if (stock_id) image = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_BUTTON);
+               if (stock_id) image = gtk_image_new_from_icon_name(stock_id, GTK_ICON_SIZE_BUTTON);
                if (text)
                        {
                        label = gtk_label_new_with_mnemonic(text);
-#if GTK_CHECK_VERSION(3,16,0)
                        gtk_label_set_xalign(GTK_LABEL(label), 0.5);
                        gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-                       gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5);
-#endif
                        gtk_label_set_mnemonic_widget(GTK_LABEL(label), button);
                        }
 
@@ -282,7 +274,7 @@ GtkWidget *pref_button_new(GtkWidget *parent_box, const gchar *stock_id,
                        GtkWidget *align;
                        GtkWidget *hbox;
 
-                       hbox = gtk_hbox_new(FALSE, PREF_PAD_BUTTON_ICON_GAP);
+                       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_ICON_GAP);
 
                        align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
                        gtk_container_add(GTK_CONTAINER(button), align);
@@ -467,7 +459,7 @@ static void pref_radiobutton_int_cb(GtkWidget *widget, gpointer data)
 GtkWidget *pref_radiobutton_new_int(GtkWidget *parent_box, GtkWidget *sibling,
                                    const gchar *text, gboolean active,
                                    gboolean *result, gboolean value,
-                                   GCallback func, gpointer data)
+                                   GCallback UNUSED(func), gpointer UNUSED(data))
 {
        GtkWidget *button;
 
@@ -561,7 +553,7 @@ GtkWidget *pref_spin_new_int(GtkWidget *parent_box, const gchar *text, const gch
                             G_CALLBACK(pref_spin_int_cb), value_var);
 }
 
-static void pref_link_sensitivity_cb(GtkWidget *watch, GtkStateType prev_state, gpointer data)
+static void pref_link_sensitivity_cb(GtkWidget *watch, GtkStateType UNUSED(prev_state), gpointer data)
 {
        GtkWidget *widget = data;
 
@@ -612,18 +604,18 @@ GtkWidget *pref_table_box(GtkWidget *table, gint column, gint row,
 
        if (text)
                {
-               shell = gtk_vbox_new(FALSE, 0);
+               shell = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
                box = pref_group_new(shell, TRUE, text, orientation);
                }
        else
                {
                if (orientation == GTK_ORIENTATION_HORIZONTAL)
                        {
-                       box = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+                       box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
                        }
                else
                        {
-                       box = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+                       box = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
                        }
                shell = box;
                }
@@ -694,7 +686,7 @@ GtkWidget *pref_table_spin(GtkWidget *table, gint column, gint row,
 
        if (suffix)
                {
-               box = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
+               box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
                gtk_box_pack_start(GTK_BOX(box), spin, FALSE, FALSE, 0);
                gtk_widget_show(spin);
 
@@ -856,7 +848,7 @@ static void date_selection_popup_hide(DateSelection *ds)
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ds->button), FALSE);
 }
 
-static gboolean date_selection_popup_release_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
+static gboolean date_selection_popup_release_cb(GtkWidget *UNUSED(widget), GdkEventButton *UNUSED(event), gpointer data)
 {
        DateSelection *ds = data;
 
@@ -864,7 +856,7 @@ static gboolean date_selection_popup_release_cb(GtkWidget *widget, GdkEventButto
        return TRUE;
 }
 
-static gboolean date_selection_popup_press_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
+static gboolean date_selection_popup_press_cb(GtkWidget *UNUSED(widget), GdkEventButton *event, gpointer data)
 {
        DateSelection *ds = data;
        gint x, y;
@@ -898,7 +890,7 @@ static void date_selection_popup_sync(DateSelection *ds)
        date_selection_set(ds->box, day, month + 1, year);
 }
 
-static gboolean date_selection_popup_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean date_selection_popup_keypress_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        DateSelection *ds = data;
 
@@ -921,14 +913,14 @@ static gboolean date_selection_popup_keypress_cb(GtkWidget *widget, GdkEventKey
        return FALSE;
 }
 
-static void date_selection_day_cb(GtkWidget *widget, gpointer data)
+static void date_selection_day_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DateSelection *ds = data;
 
        date_selection_popup_sync(ds);
 }
 
-static void date_selection_doubleclick_cb(GtkWidget *widget, gpointer data)
+static void date_selection_doubleclick_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DateSelection *ds = data;
 
@@ -995,7 +987,7 @@ static void date_selection_popup(DateSelection *ds)
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ds->button), TRUE);
 }
 
-static void date_selection_button_cb(GtkWidget *widget, gpointer data)
+static void date_selection_button_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DateSelection *ds = data;
 
@@ -1033,7 +1025,7 @@ static void spin_increase(GtkWidget *spin, gint value)
        gtk_widget_set_size_request(spin, req.width + value, -1);
 }
 
-static void date_selection_destroy_cb(GtkWidget *widget, gpointer data)
+static void date_selection_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        DateSelection *ds = data;
 
@@ -1051,7 +1043,7 @@ GtkWidget *date_selection_new(void)
        gchar *date_format;
        gint i;
 
-       ds->box = gtk_hbox_new(FALSE, 2);
+       ds->box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
        g_signal_connect(G_OBJECT(ds->box), "destroy",
                         G_CALLBACK(date_selection_destroy_cb), ds);
 
@@ -1209,7 +1201,7 @@ static gint sizer_default_handle_size(void)
        return handle_size;
 }
 
-static gboolean sizer_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
+static gboolean sizer_motion_cb(GtkWidget *UNUSED(widget), GdkEventMotion *event, gpointer data)
 {
        SizerData *sd = data;
        gint x, y;
@@ -1274,7 +1266,7 @@ static gboolean sizer_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpoint
        return TRUE;
 }
 
-static gboolean sizer_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean sizer_press_cb(GtkWidget *UNUSED(widget), GdkEventButton *bevent, gpointer data)
 {
        SizerData *sd = data;
        GtkAllocation parent_allocation;
@@ -1297,7 +1289,7 @@ static gboolean sizer_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpoint
        return TRUE;
 }
 
-static gboolean sizer_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean sizer_release_cb(GtkWidget *UNUSED(widget), GdkEventButton *bevent, gpointer data)
 {
        SizerData *sd = data;
 
@@ -1324,7 +1316,7 @@ static void sizer_set_prelight(SizerData *sd, gboolean prelit)
                                   sizer_allocation.width, sizer_allocation.height);
 }
 
-static gboolean sizer_enter_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+static gboolean sizer_enter_cb(GtkWidget *UNUSED(widget), GdkEventCrossing *UNUSED(event), gpointer data)
 {
        SizerData *sd = data;
 
@@ -1332,7 +1324,7 @@ static gboolean sizer_enter_cb(GtkWidget *widget, GdkEventCrossing *event, gpoin
        return TRUE;
 }
 
-static gboolean sizer_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+static gboolean sizer_leave_cb(GtkWidget *UNUSED(widget), GdkEventCrossing *UNUSED(event), gpointer data)
 {
        SizerData *sd = data;
 
@@ -1340,9 +1332,8 @@ static gboolean sizer_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpoin
        return TRUE;
 }
 
-static gboolean sizer_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
+static gboolean sizer_expose_cb(GtkWidget *widget, GdkEventExpose *UNUSED(event), gpointer UNUSED(data))
 {
-#if GTK_CHECK_VERSION(3,0,0)
        GtkAllocation allocation;
 
        gtk_widget_get_allocation(widget, &allocation);
@@ -1352,41 +1343,6 @@ static gboolean sizer_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpoint
        gtk_render_handle (gtk_widget_get_style_context (widget),
                           cr, allocation.x, allocation.y, allocation.width, allocation.height);
        cairo_destroy(cr);
-#else
-       SizerData *sd = data;
-       GdkRectangle clip;
-       GtkOrientation orientation;
-       GtkStateType state;
-       GtkAllocation allocation;
-
-       gtk_widget_get_allocation(widget, &allocation);
-
-       if (sd->position & SIZER_POS_LEFT || sd->position & SIZER_POS_RIGHT)
-               {
-               orientation = GTK_ORIENTATION_VERTICAL;
-               }
-       else
-               {
-               orientation = GTK_ORIENTATION_HORIZONTAL;
-               }
-
-       if (sd->handle_prelit)
-               {
-               state = GTK_STATE_PRELIGHT;
-               }
-       else
-               {
-               state = gtk_widget_get_state(widget);
-               }
-
-       gdk_region_get_clipbox(event->region, &clip);
-
-       gtk_paint_handle(gtk_widget_get_style(widget), gtk_widget_get_window(widget), state,
-                        GTK_SHADOW_NONE, &clip, widget, "paned",
-                        0, 0,
-                        allocation.width, allocation.height,
-                        orientation);
-#endif
 
        return TRUE;
 }
@@ -1411,11 +1367,11 @@ static void sizer_realize_cb(GtkWidget *widget, gpointer data)
                GdkCursor *cursor;
                cursor = gdk_cursor_new(n);
                gdk_window_set_cursor(gtk_widget_get_window(widget), cursor);
-               gdk_cursor_unref(cursor);
+               g_object_unref(G_OBJECT(cursor));
                }
 }
 
-static void sizer_destroy_cb(GtkWidget *widget, gpointer data)
+static void sizer_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SizerData *sd = data;
 
@@ -1695,7 +1651,7 @@ GtkWidget *pref_color_button_new(GtkWidget *parent_box,
                gtk_color_button_set_title(GTK_COLOR_BUTTON(button), title);
                label = gtk_label_new(title);
 
-               hbox = gtk_hbox_new(TRUE, 0);
+               hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
                gtk_box_pack_start(GTK_BOX(parent_box), hbox, TRUE, TRUE, 0);
 
                gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
@@ -1768,7 +1724,7 @@ gchar *text_widget_text_pull_selected(GtkWidget *text_widget)
                }
 }
 
-gboolean defined_mouse_buttons(GtkWidget *widget, GdkEventButton *event, gpointer data)
+gboolean defined_mouse_buttons(GtkWidget *UNUSED(widget), GdkEventButton *event, gpointer data)
 {
        LayoutWindow *lw = data;
        GtkAction *action;
index 899bc12..cbd05f8 100644 (file)
@@ -105,7 +105,7 @@ static void dest_view_delete_dlg_cancel(GenericDialog *gd, gpointer data);
  *-----------------------------------------------------------------------------
  */
 
-static void dest_free_data(GtkWidget *widget, gpointer data)
+static void dest_free_data(GtkWidget *UNUSED(widget), gpointer data)
 {
        Dest_Data *dd = data;
 
@@ -336,8 +336,8 @@ static GtkTargetEntry dest_drag_types[] = {
 
 
 static void dest_dnd_set_data(GtkWidget *view,
-                             GdkDragContext *context, GtkSelectionData *selection_data,
-                             guint info, guint time, gpointer data)
+                             GdkDragContext *UNUSED(context), GtkSelectionData *selection_data,
+                             guint UNUSED(info), guint UNUSED(time), gpointer UNUSED(data))
 {
        gchar *path = NULL;
        GList *list = NULL;
@@ -476,7 +476,7 @@ static void dest_view_rename(Dest_Data *dd, GtkTreeView *view)
        g_free(text);
 }
 
-static void dest_view_delete_dlg_cancel(GenericDialog *gd, gpointer data)
+static void dest_view_delete_dlg_cancel(GenericDialog *UNUSED(gd), gpointer data)
 {
        DestDel_Data *dl = data;
 
@@ -564,38 +564,38 @@ static void dest_view_bookmark(Dest_Data *dd, GtkTreeView *view)
        g_free(path);
 }
 
-static void dest_popup_dir_rename_cb(GtkWidget *widget, gpointer data)
+static void dest_popup_dir_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        Dest_Data *dd = data;
        dest_view_rename(dd, GTK_TREE_VIEW(dd->d_view));
 }
 
-static void dest_popup_dir_bookmark_cb(GtkWidget *widget, gpointer data)
+static void dest_popup_dir_bookmark_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        Dest_Data *dd = data;
        dest_view_bookmark(dd, GTK_TREE_VIEW(dd->d_view));
 }
 
-static void dest_popup_file_rename_cb(GtkWidget *widget, gpointer data)
+static void dest_popup_file_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        Dest_Data *dd = data;
        dest_view_rename(dd, GTK_TREE_VIEW(dd->f_view));
 }
 
-static void dest_popup_file_delete_cb(GtkWidget *widget, gpointer data)
+static void dest_popup_file_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        Dest_Data *dd = data;
        dest_view_delete(dd, GTK_TREE_VIEW(dd->f_view));
 }
 
-static void dest_popup_file_bookmark_cb(GtkWidget *widget, gpointer data)
+static void dest_popup_file_bookmark_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        Dest_Data *dd = data;
        dest_view_bookmark(dd, GTK_TREE_VIEW(dd->f_view));
 }
 
 static void dest_popup_position_cb(GtkMenu *menu, gint *x, gint *y,
-                                  gboolean *push_in, gpointer data)
+                                  gboolean *UNUSED(push_in), gpointer data)
 {
        Dest_Data *dd = data;
        GtkTreeView *view;
@@ -816,7 +816,7 @@ static void dest_select_cb(GtkTreeSelection *selection, gpointer data)
        g_free(path);
 }
 
-static void dest_activate_cb(GtkWidget *view, GtkTreePath *tpath, GtkTreeViewColumn *column, gpointer data)
+static void dest_activate_cb(GtkWidget *view, GtkTreePath *tpath, GtkTreeViewColumn *UNUSED(column), gpointer data)
 {
        Dest_Data *dd = data;
        GtkTreeModel *store;
@@ -842,14 +842,14 @@ static void dest_activate_cb(GtkWidget *view, GtkTreePath *tpath, GtkTreeViewCol
        g_free(path);
 }
 
-static void dest_home_cb(GtkWidget *widget, gpointer data)
+static void dest_home_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        Dest_Data *dd = data;
 
        dest_change_dir(dd, homedir(), (dd->f_view != NULL));
 }
 
-static void dest_show_hidden_cb(GtkWidget *widget, gpointer data)
+static void dest_show_hidden_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        Dest_Data *dd = data;
        gchar *buf;
@@ -861,7 +861,7 @@ static void dest_show_hidden_cb(GtkWidget *widget, gpointer data)
        g_free(buf);
 }
 
-static void dest_entry_changed_cb(GtkEditable *editable, gpointer data)
+static void dest_entry_changed_cb(GtkEditable *UNUSED(editable), gpointer data)
 {
        Dest_Data *dd = data;
        const gchar *path;
@@ -980,7 +980,7 @@ static void dest_filter_clear(Dest_Data *dd)
        dest_filter_add(dd, "*", _("All Files"), TRUE);
 }
 
-static void dest_filter_changed_cb(GtkEditable *editable, gpointer data)
+static void dest_filter_changed_cb(GtkEditable *UNUSED(editable), gpointer data)
 {
        Dest_Data *dd = data;
        GtkWidget *entry;
@@ -1055,7 +1055,7 @@ GtkWidget *path_selection_new_with_files(GtkWidget *entry, const gchar *path,
        gtk_box_pack_end(GTK_BOX(hbox2), dd->hidden_button, FALSE, FALSE, 0);
        gtk_widget_show(dd->hidden_button);
 
-       hbox2 = gtk_hbox_new(FALSE, PREF_PAD_GAP);
+       hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
        if (filter)
                {
                paned = gtk_hpaned_new();
index eda3503..d20ccd0 100644 (file)
@@ -100,7 +100,7 @@ static void spinner_set_timeout(SpinnerData *sp, gint interval)
        gtk_widget_set_sensitive(sp->image, (interval >= 0));
 }
 
-static void spinner_destroy_cb(GtkWidget *widget, gpointer data)
+static void spinner_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        SpinnerData *sp = data;
        GList *work;
index cf6175b..b0e2c48 100644 (file)
@@ -164,7 +164,7 @@ static void tab_completion_read_dir(TabCompData *td, const gchar *path)
        g_free(pathl);
 }
 
-static void tab_completion_destroy(GtkWidget *widget, gpointer data)
+static void tab_completion_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
        TabCompData *td = data;
 
@@ -298,7 +298,7 @@ static void tab_completion_popup_cb(GtkWidget *widget, gpointer data)
        tab_completion_emit_tab_signal(td);
 }
 
-static void tab_completion_popup_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void tab_completion_popup_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        TabCompData *td = data;
        gint height;
@@ -656,7 +656,7 @@ static gboolean tab_completion_key_pressed(GtkWidget *widget, GdkEventKey *event
        return (stop_signal);
 }
 
-static void tab_completion_button_pressed(GtkWidget *widget, gpointer data)
+static void tab_completion_button_pressed(GtkWidget *UNUSED(widget), gpointer data)
 {
        TabCompData *td;
        GtkWidget *entry = data;
@@ -735,7 +735,7 @@ GtkWidget *tab_completion_new_with_history(GtkWidget **entry, const gchar *text,
        TabCompData *td;
        gint n = 0;
 
-       box = gtk_hbox_new(FALSE, 0);
+       box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
 
        combo = gtk_combo_box_text_new_with_entry();
        gtk_box_pack_start(GTK_BOX(box), combo, TRUE, TRUE, 0);
@@ -836,7 +836,7 @@ GtkWidget *tab_completion_new(GtkWidget **entry, const gchar *text,
        GtkWidget *button;
        GtkWidget *newentry;
 
-       hbox = gtk_hbox_new(FALSE, 0);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
 
        newentry = gtk_entry_new();
        if (text) gtk_entry_set_text(GTK_ENTRY(newentry), text);
@@ -981,7 +981,7 @@ static void tab_completion_select_show(TabCompData *td)
        gtk_widget_show(GENERIC_DIALOG(td->fd)->dialog);
 }
 
-static void tab_completion_select_pressed(GtkWidget *widget, gpointer data)
+static void tab_completion_select_pressed(GtkWidget *UNUSED(widget), gpointer data)
 {
        TabCompData *td = data;
 
index ef65af5..f45b707 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "compat.h"
 
+#include "main.h"
 #include "ui_tree_edit.h"
 
 /*
@@ -70,7 +71,7 @@ static void tree_edit_do(TreeEditData *ted)
                }
 }
 
-static gboolean tree_edit_click_end_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
+static gboolean tree_edit_click_end_cb(GtkWidget *UNUSED(widget), GdkEventButton *UNUSED(event), gpointer data)
 {
        TreeEditData *ted = data;
 
@@ -80,7 +81,7 @@ static gboolean tree_edit_click_end_cb(GtkWidget *widget, GdkEventButton *event,
        return TRUE;
 }
 
-static gboolean tree_edit_click_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
+static gboolean tree_edit_click_cb(GtkWidget *UNUSED(widget), GdkEventButton *event, gpointer data)
 {
        TreeEditData *ted = data;
        GdkWindow *window = gtk_widget_get_window(ted->window);
@@ -107,7 +108,7 @@ static gboolean tree_edit_click_cb(GtkWidget *widget, GdkEventButton *event, gpo
        return FALSE;
 }
 
-static gboolean tree_edit_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean tree_edit_key_press_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        TreeEditData *ted = data;
 
@@ -282,11 +283,7 @@ gboolean tree_view_get_cell_origin(GtkTreeView *widget, GtkTreePath *tpath, gint
        if (gtk_tree_view_get_headers_visible(widget))
                {
                GtkAllocation allocation;
-#if GTK_CHECK_VERSION(3,0,0)
                gtk_widget_get_allocation(gtk_tree_view_column_get_button(tv_column), &allocation);
-#else
-               gtk_widget_get_allocation(tv_column->button, &allocation);
-#endif
                header_size = allocation.height;
                }
        else
@@ -573,10 +570,8 @@ static gboolean widget_auto_scroll_cb(gpointer data)
        gint x, y;
        gint w, h;
        gint amt = 0;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
        if (sd->max_step < sd->region_size)
                {
@@ -584,13 +579,10 @@ static gboolean widget_auto_scroll_cb(gpointer data)
                }
 
        window = gtk_widget_get_window(sd->widget);
-#if GTK_CHECK_VERSION(3,0,0)
        device_manager = gdk_display_get_device_manager(gdk_window_get_display(window));
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_window_get_device_position(window, device, &x, &y, NULL);
-#else
-       gdk_window_get_pointer(window, &x, &y, NULL);
-#endif
+
        w = gdk_window_get_width(window);
        h = gdk_window_get_height(window);
 
index 5fa4ad4..9afc319 100644 (file)
@@ -145,7 +145,7 @@ static void generic_dialog_click_cb(GtkWidget *widget, gpointer data)
        void (*func)(GenericDialog *, gpointer);
        gboolean auto_close;
 
-       func = g_object_get_data(G_OBJECT(widget), "dialog_function");
+       func = (void(*)(GenericDialog *, gpointer))(g_object_get_data(G_OBJECT(widget), "dialog_function"));
        auto_close = gd->auto_close;
 
        if (func) func(gd, gd->data);
@@ -198,7 +198,7 @@ static gboolean generic_dialog_key_press_cb(GtkWidget *widget, GdkEventKey *even
        return FALSE;
 }
 
-static gboolean generic_dialog_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
+static gboolean generic_dialog_delete_cb(GtkWidget *UNUSED(w), GdkEventAny *UNUSED(event), gpointer data)
 {
        GenericDialog *gd = data;
        gboolean auto_close;
@@ -219,8 +219,7 @@ static void generic_dialog_show_cb(GtkWidget *widget, gpointer data)
                gtk_box_reorder_child(GTK_BOX(gd->hbox), gd->cancel_button, -1);
                }
 
-       g_signal_handlers_disconnect_by_func(G_OBJECT(widget),
-                                            G_CALLBACK(generic_dialog_show_cb), gd);
+       g_signal_handlers_disconnect_by_func(G_OBJECT(widget), (gpointer)(generic_dialog_show_cb), gd);
 }
 
 gboolean generic_dialog_get_alternative_button_order(GtkWidget *widget)
@@ -249,7 +248,7 @@ GtkWidget *generic_dialog_add_button(GenericDialog *gd, const gchar *stock_id, c
                                 G_CALLBACK(generic_dialog_click_cb), gd);
 
        gtk_widget_set_can_default(button, TRUE);
-       g_object_set_data(G_OBJECT(button), "dialog_function", func_cb);
+       g_object_set_data(G_OBJECT(button), "dialog_function", (void *)func_cb);
 
        gtk_container_add(GTK_CONTAINER(gd->hbox), button);
 
@@ -297,12 +296,8 @@ GtkWidget *generic_dialog_add_message(GenericDialog *gd, const gchar *icon_stock
                GtkWidget *image;
 
                image = gtk_image_new_from_stock(icon_stock_id, GTK_ICON_SIZE_DIALOG);
-#if GTK_CHECK_VERSION(3,16,0)
                gtk_widget_set_halign(GTK_WIDGET(image), GTK_ALIGN_CENTER);
                gtk_widget_set_valign(GTK_WIDGET(image), GTK_ALIGN_START);
-#else
-               gtk_misc_set_alignment(GTK_MISC(image), 0.5, 0.0);
-#endif
                gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
                gtk_widget_show(image);
                }
@@ -312,22 +307,14 @@ GtkWidget *generic_dialog_add_message(GenericDialog *gd, const gchar *icon_stock
                {
                label = pref_label_new(vbox, heading);
                pref_label_bold(label, TRUE, TRUE);
-#if GTK_CHECK_VERSION(3,16,0)
                gtk_label_set_xalign(GTK_LABEL(label), 0.0);
                gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-               gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-#endif
                }
        if (text)
                {
                label = pref_label_new(vbox, text);
-#if GTK_CHECK_VERSION(3,16,0)
                gtk_label_set_xalign(GTK_LABEL(label), 0.0);
                gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-               gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-#endif
                gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
                }
 
@@ -453,21 +440,17 @@ static void generic_dialog_setup(GenericDialog *gd,
        gtk_window_set_resizable(GTK_WINDOW(gd->dialog), TRUE);
        gtk_container_set_border_width(GTK_CONTAINER(gd->dialog), PREF_PAD_BORDER);
 
-#if GTK_CHECK_VERSION(3,22,0)
        scrolled = gtk_scrolled_window_new(NULL, NULL);
        gtk_scrolled_window_set_propagate_natural_height(GTK_SCROLLED_WINDOW(scrolled), TRUE);
        gtk_scrolled_window_set_propagate_natural_width(GTK_SCROLLED_WINDOW(scrolled), TRUE);
-       vbox = gtk_vbox_new(FALSE, PREF_PAD_BUTTON_SPACE);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_BUTTON_SPACE);
        gtk_container_add(GTK_CONTAINER(scrolled), vbox);
        gtk_container_add(GTK_CONTAINER(gd->dialog), scrolled);
        gtk_widget_show(scrolled);
-#else
-       vbox = gtk_vbox_new(FALSE, PREF_PAD_BUTTON_SPACE);
-       gtk_container_add(GTK_CONTAINER(gd->dialog), vbox);
-#endif
+
        gtk_widget_show(vbox);
 
-       gd->vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       gd->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_box_pack_start(GTK_BOX(vbox), gd->vbox, TRUE, TRUE, 0);
        gtk_widget_show(gd->vbox);
 
@@ -513,7 +496,7 @@ GenericDialog *generic_dialog_new(const gchar *title,
  *-----------------------------------------------------------------------------
  */
 
-static void warning_dialog_ok_cb(GenericDialog *gd, gpointer data)
+static void warning_dialog_ok_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        /* no op */
 }
@@ -559,7 +542,7 @@ FileDialog *file_dialog_new(const gchar *title,
 
        generic_dialog_setup(GENERIC_DIALOG(fdlg), title,
                             role, parent, FALSE,
-                            (gpointer)cancel_cb, data);
+                            (void(*)(GenericDialog *, gpointer))cancel_cb, data);
 
        return fdlg;
 }
@@ -568,17 +551,17 @@ GtkWidget *file_dialog_add_button(FileDialog *fdlg, const gchar *stock_id, const
                                  void (*func_cb)(FileDialog *, gpointer), gboolean is_default)
 {
        return generic_dialog_add_button(GENERIC_DIALOG(fdlg), stock_id, text,
-                                        (gpointer)func_cb, is_default);
+                                        (void(*)(GenericDialog *, gpointer))func_cb, is_default);
 }
 
-static void file_dialog_entry_cb(GtkWidget *widget, gpointer data)
+static void file_dialog_entry_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        FileDialog *fdlg = data;
        g_free(fdlg->dest_path);
        fdlg->dest_path = remove_trailing_slash(gtk_entry_get_text(GTK_ENTRY(fdlg->entry)));
 }
 
-static void file_dialog_entry_enter_cb(const gchar *path, gpointer data)
+static void file_dialog_entry_enter_cb(const gchar *UNUSED(path), gpointer data)
 {
        GenericDialog *gd = data;
 
index 222c95b..ffe6524 100644 (file)
@@ -75,7 +75,7 @@ static void generic_dialog_add_image(GenericDialog *gd, GtkWidget *box,
 
        /* image 1 */
 
-       vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        if (preview_box)
                {
                GtkWidget *sep;
@@ -98,12 +98,8 @@ static void generic_dialog_add_image(GenericDialog *gd, GtkWidget *box,
 
                head = pref_label_new(vbox, header1);
                pref_label_bold(head, TRUE, FALSE);
-#if GTK_CHECK_VERSION(3,16,0)
                gtk_label_set_xalign(GTK_LABEL(head), 0.0);
                gtk_label_set_yalign(GTK_LABEL(head), 0.5);
-#else
-               gtk_misc_set_alignment(GTK_MISC(head), 0.0, 0.5);
-#endif
                }
 
        imd = image_new(FALSE);
@@ -135,12 +131,8 @@ static void generic_dialog_add_image(GenericDialog *gd, GtkWidget *box,
 
                        head = pref_label_new(vbox, header2);
                        pref_label_bold(head, TRUE, FALSE);
-#if GTK_CHECK_VERSION(3,16,0)
                        gtk_label_set_xalign(GTK_LABEL(head), 0.0);
                        gtk_label_set_yalign(GTK_LABEL(head), 0.5);
-#else
-                       gtk_misc_set_alignment(GTK_MISC(head), 0.0, 0.5);
-#endif
                        }
 
                imd = image_new(FALSE);
@@ -201,7 +193,7 @@ FileDialog *file_util_file_dlg(const gchar *title,
  * because it does not have a mouse center option,
  * and we must center it before show, implement it here.
  */
-static void file_util_warning_dialog_ok_cb(GenericDialog *gd, gpointer data)
+static void file_util_warning_dialog_ok_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        /* no op */
 }
@@ -553,7 +545,7 @@ static gint file_util_perform_ci_cb(gpointer resume_data, EditorFlags flags, GLi
 /* call file_util_perform_ci_internal or start_editor_from_filelist_full */
 
 
-static void file_util_resume_cb(GenericDialog *gd, gpointer data)
+static void file_util_resume_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        UtilityData *ud = data;
        if (ud->external)
@@ -562,7 +554,7 @@ static void file_util_resume_cb(GenericDialog *gd, gpointer data)
                file_util_perform_ci_internal(ud);
 }
 
-static void file_util_abort_cb(GenericDialog *gd, gpointer data)
+static void file_util_abort_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        UtilityData *ud = data;
        if (ud->external)
@@ -860,7 +852,7 @@ static void file_util_perform_ci_dir(UtilityData *ud, gboolean internal, gboolea
        file_util_dialog_run(ud);
 }
 
-static gint file_util_perform_ci_dir_cb(gpointer resume_data, EditorFlags flags, GList *list, gpointer data)
+static gint file_util_perform_ci_dir_cb(gpointer UNUSED(resume_data), EditorFlags flags, GList *UNUSED(list), gpointer data)
 {
        UtilityData *ud = data;
        file_util_perform_ci_dir(ud, FALSE, !EDITOR_ERRORS_BUT_SKIPPED(flags));
@@ -984,14 +976,14 @@ static GdkPixbuf *file_util_get_error_icon(FileData *fd, GList *list, GtkWidget
                }
 }
 
-static void file_util_check_resume_cb(GenericDialog *gd, gpointer data)
+static void file_util_check_resume_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        UtilityData *ud = data;
        ud->phase = UTILITY_PHASE_CHECKED;
        file_util_dialog_run(ud);
 }
 
-static void file_util_check_abort_cb(GenericDialog *gd, gpointer data)
+static void file_util_check_abort_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        UtilityData *ud = data;
        ud->phase = UTILITY_PHASE_START;
@@ -1205,7 +1197,7 @@ static void file_util_fdlg_ok_cb(FileDialog *fdlg, gpointer data)
        return;
 }
 
-static void file_util_dest_folder_entry_cb(GtkWidget *entry, gpointer data)
+static void file_util_dest_folder_entry_cb(GtkWidget *UNUSED(entry), gpointer data)
 {
        UtilityData *ud = data;
        file_util_dest_folder_update_path(ud);
@@ -1426,13 +1418,13 @@ static void file_util_rename_preview_update(UtilityData *ud)
 
 }
 
-static void file_util_rename_preview_entry_cb(GtkWidget *entry, gpointer data)
+static void file_util_rename_preview_entry_cb(GtkWidget *UNUSED(entry), gpointer data)
 {
        UtilityData *ud = data;
        file_util_rename_preview_update(ud);
 }
 
-static void file_util_rename_preview_adj_cb(GtkWidget *spin, gpointer data)
+static void file_util_rename_preview_adj_cb(GtkWidget *UNUSED(spin), gpointer data)
 {
        UtilityData *ud = data;
        file_util_rename_preview_update(ud);
@@ -1448,8 +1440,8 @@ static gboolean file_util_rename_idle_cb(gpointer data)
        return FALSE;
 }
 
-static void file_util_rename_preview_order_cb(GtkTreeModel *treemodel, GtkTreePath *tpath,
-                                             GtkTreeIter *iter, gpointer data)
+static void file_util_rename_preview_order_cb(GtkTreeModel *UNUSED(treemodel), GtkTreePath *UNUSED(tpath),
+                                             GtkTreeIter *UNUSED(iter), gpointer data)
 {
        UtilityData *ud = data;
 
@@ -1459,7 +1451,7 @@ static void file_util_rename_preview_order_cb(GtkTreeModel *treemodel, GtkTreePa
 }
 
 
-static gboolean file_util_preview_cb(GtkTreeSelection *selection, GtkTreeModel *store,
+static gboolean file_util_preview_cb(GtkTreeSelection *UNUSED(selection), GtkTreeModel *store,
                                     GtkTreePath *tpath, gboolean path_currently_selected,
                                     gpointer data)
 {
@@ -1481,10 +1473,10 @@ static gboolean file_util_preview_cb(GtkTreeSelection *selection, GtkTreeModel *
 
                gtk_widget_grab_focus(ud->rename_entry);
                gtk_label_set_text(GTK_LABEL(ud->rename_label), fd->name);
-               g_signal_handlers_block_by_func(ud->rename_entry, G_CALLBACK(file_util_rename_preview_entry_cb), ud);
+               g_signal_handlers_block_by_func(ud->rename_entry, (gpointer)(file_util_rename_preview_entry_cb), ud);
                gtk_entry_set_text(GTK_ENTRY(ud->rename_entry), name);
                gtk_editable_select_region(GTK_EDITABLE(ud->rename_entry), 0, filename_base_length(name));
-               g_signal_handlers_unblock_by_func(ud->rename_entry, G_CALLBACK(file_util_rename_preview_entry_cb), ud);
+               g_signal_handlers_unblock_by_func(ud->rename_entry, (gpointer)file_util_rename_preview_entry_cb, ud);
                }
 
        return TRUE;
@@ -1501,16 +1493,12 @@ static void box_append_safe_delete_status(GenericDialog *gd)
        label = pref_label_new(gd->vbox, buf);
        g_free(buf);
 
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(label), 1.0);
        gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-#endif
        gtk_widget_set_sensitive(label, FALSE);
 }
 
-static void file_util_details_cb(GenericDialog *gd, gpointer data)
+static void file_util_details_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        UtilityData *ud = data;
        if (ud->details_func && ud->sel_fd)
@@ -1607,12 +1595,9 @@ static void file_util_dialog_init_dest_folder(UtilityData *ud)
        generic_dialog_add_message(GENERIC_DIALOG(fdlg), NULL, ud->messages.question, NULL, FALSE);
 
        label = pref_label_new(GENERIC_DIALOG(fdlg)->vbox, _("Choose the destination folder."));
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(label), 0.0);
        gtk_label_set_yalign(GTK_LABEL(label), 0.5);
-#else
-       gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-#endif
+
        pref_spacer(GENERIC_DIALOG(fdlg)->vbox, 0);
 
        if (options->with_rename)
@@ -1640,7 +1625,7 @@ static GtkWidget *furm_simple_vlabel(GtkWidget *box, const gchar *text, gboolean
        GtkWidget *vbox;
        GtkWidget *label;
 
-       vbox = gtk_vbox_new(FALSE, 0);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_box_pack_start(GTK_BOX(box), vbox, expand, expand, 0);
        gtk_widget_show(vbox);
 
@@ -1725,7 +1710,7 @@ static void file_util_dialog_init_source_dest(UtilityData *ud, gboolean second_i
        gtk_widget_show(ud->notebook);
 
 
-       page = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       page = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_notebook_append_page(GTK_NOTEBOOK(ud->notebook), page, gtk_label_new(_("Manual rename")));
        gtk_widget_show(page);
 
@@ -1746,7 +1731,7 @@ static void file_util_dialog_init_source_dest(UtilityData *ud, gboolean second_i
 
        gtk_widget_show(ud->rename_entry);
 
-       page = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       page = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_notebook_append_page(GTK_NOTEBOOK(ud->notebook), page, gtk_label_new(_("Auto rename")));
        gtk_widget_show(page);
 
@@ -1779,7 +1764,7 @@ static void file_util_dialog_init_source_dest(UtilityData *ud, gboolean second_i
                                          1.0, 8.0, 1.0, 0, options->cp_mv_rn.auto_padding,
                                          G_CALLBACK(file_util_rename_preview_adj_cb), ud);
 
-       page = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       page = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_notebook_append_page(GTK_NOTEBOOK(ud->notebook), page, gtk_label_new(_("Formatted rename")));
        gtk_widget_show(page);
 
@@ -1940,7 +1925,7 @@ static void file_util_warn_op_in_progress(const gchar *title)
        file_util_warning_dialog(title, _("Another operation in progress.\n"), GTK_STOCK_DIALOG_ERROR, NULL);
 }
 
-static void file_util_details_dialog_close_cb(GtkWidget *widget, gpointer data)
+static void file_util_details_dialog_close_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        gtk_widget_destroy(data);
 
@@ -1949,11 +1934,11 @@ static void file_util_details_dialog_close_cb(GtkWidget *widget, gpointer data)
 static void file_util_details_dialog_destroy_cb(GtkWidget *widget, gpointer data)
 {
        UtilityData *ud = data;
-       g_signal_handlers_disconnect_by_func(ud->gd->dialog, G_CALLBACK(file_util_details_dialog_close_cb), widget);
+       g_signal_handlers_disconnect_by_func(ud->gd->dialog, (gpointer)(file_util_details_dialog_close_cb), widget);
 }
 
 
-static void file_util_details_dialog_ok_cb(GenericDialog *gd, gpointer data)
+static void file_util_details_dialog_ok_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        /* no op */
 }
@@ -1972,8 +1957,8 @@ static void file_util_details_dialog_exclude(GenericDialog *gd, gpointer data, g
        if (!ud->flist)
                {
                /* both dialogs will be closed anyway, the signals would cause duplicate calls */
-               g_signal_handlers_disconnect_by_func(ud->gd->dialog, G_CALLBACK(file_util_details_dialog_close_cb), gd->dialog);
-               g_signal_handlers_disconnect_by_func(gd->dialog, G_CALLBACK(file_util_details_dialog_destroy_cb), ud);
+               g_signal_handlers_disconnect_by_func(ud->gd->dialog, (gpointer)(file_util_details_dialog_close_cb), gd->dialog);
+               g_signal_handlers_disconnect_by_func(gd->dialog, (gpointer)(file_util_details_dialog_destroy_cb), ud);
 
                file_util_cancel_cb(ud->gd, ud);
                }
@@ -2125,12 +2110,9 @@ static void file_util_write_metadata_details_dialog(UtilityData *ud, FileData *f
 
 
                label = gtk_label_new(title_f);
-#if GTK_CHECK_VERSION(3,16,0)
                gtk_label_set_xalign(GTK_LABEL(label), 1.0);
                gtk_label_set_yalign(GTK_LABEL(label), 0.0);
-#else
-               gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.0);
-#endif
+
                pref_label_bold(label, TRUE, FALSE);
                gtk_table_attach(GTK_TABLE(table), label,
                                 0, 1, i, i + 1,
@@ -2140,12 +2122,9 @@ static void file_util_write_metadata_details_dialog(UtilityData *ud, FileData *f
 
                label = gtk_label_new(value);
 
-#if GTK_CHECK_VERSION(3,16,0)
                gtk_label_set_xalign(GTK_LABEL(label), 0.0);
                gtk_label_set_yalign(GTK_LABEL(label), 0.0);
-#else
-               gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
-#endif
+
                gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
                gtk_table_attach(GTK_TABLE(table), label,
                                 1, 2, i, i + 1,
@@ -2968,7 +2947,7 @@ static gboolean file_util_write_metadata_first_after_done(gpointer data)
        return FALSE;
 }
 
-static void file_util_write_metadata_first_done(gboolean success, const gchar *done_path, gpointer data)
+static void file_util_write_metadata_first_done(gboolean success, const gchar *UNUSED(done_path), gpointer data)
 {
        UtilityDelayData *dd = data;
 
@@ -3179,7 +3158,7 @@ void file_util_copy_path_list_to_clipboard(GList *list, gboolean quoted)
        filelist_free(list);
 }
 
-static void new_folder_entry_activate_cb(GtkWidget *widget, gpointer data)
+static void new_folder_entry_activate_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        GtkDialog *dialog = data;
 
@@ -3226,10 +3205,10 @@ gchar *new_folder(GtkWindow *window , gchar *path)
        gtk_window_set_default_size(GTK_WINDOW(dialog), width * 2, -1);
 
        content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
-       vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
+       vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
        gtk_box_pack_start(GTK_BOX(content_area), vbox, FALSE, FALSE, 0);
 
-       hbox = gtk_hbox_new(FALSE, PREF_PAD_GAP);
+       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_GAP);
        gtk_container_set_border_width(GTK_CONTAINER(hbox), PREF_PAD_GAP);
        gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
        image = gtk_image_new_from_icon_name("dialog-question", GTK_ICON_SIZE_DIALOG);
index 425e7ef..0da221b 100644 (file)
@@ -267,7 +267,7 @@ static void vd_rename_finished_cb(gboolean success, const gchar *new_path, gpoin
                }
 }
 
-static gboolean vd_rename_cb(TreeEditData *td, const gchar *old, const gchar *new, gpointer data)
+static gboolean vd_rename_cb(TreeEditData *td, const gchar *UNUSED(old), const gchar *new, gpointer data)
 {
        ViewDir *vd = data;
        FileData *fd;
@@ -323,7 +323,7 @@ void vd_color_set(ViewDir *vd, FileData *fd, gint color_set)
        }
 }
 
-void vd_popup_destroy_cb(GtkWidget *widget, gpointer data)
+void vd_popup_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -343,7 +343,7 @@ void vd_popup_destroy_cb(GtkWidget *widget, gpointer data)
  *-----------------------------------------------------------------------------
  */
 
-static void vd_drop_menu_copy_cb(GtkWidget *widget, gpointer data)
+static void vd_drop_menu_copy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
        const gchar *path;
@@ -358,7 +358,7 @@ static void vd_drop_menu_copy_cb(GtkWidget *widget, gpointer data)
        file_util_copy_simple(list, path, vd->widget);
 }
 
-static void vd_drop_menu_move_cb(GtkWidget *widget, gpointer data)
+static void vd_drop_menu_move_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
        const gchar *path;
@@ -439,7 +439,7 @@ GtkWidget *vd_drop_menu(ViewDir *vd, gint active)
  *-----------------------------------------------------------------------------
  */
 
-static void vd_pop_menu_up_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_up_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
        gchar *path;
@@ -457,7 +457,7 @@ static void vd_pop_menu_up_cb(GtkWidget *widget, gpointer data)
        g_free(path);
 }
 
-static void vd_pop_menu_slide_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_slide_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -470,7 +470,7 @@ static void vd_pop_menu_slide_cb(GtkWidget *widget, gpointer data)
        layout_image_slideshow_start(vd->layout);
 }
 
-static void vd_pop_menu_slide_rec_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_slide_rec_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
        GList *list;
@@ -507,19 +507,19 @@ static void vd_pop_menu_dupe(ViewDir *vd, gint recursive)
        filelist_free(list);
 }
 
-static void vd_pop_menu_dupe_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_dupe_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
        vd_pop_menu_dupe(vd, FALSE);
 }
 
-static void vd_pop_menu_dupe_rec_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_dupe_rec_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
        vd_pop_menu_dupe(vd, TRUE);
 }
 
-static void vd_pop_menu_delete_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -527,7 +527,7 @@ static void vd_pop_menu_delete_cb(GtkWidget *widget, gpointer data)
        file_util_delete_dir(vd->click_fd, vd->widget);
 }
 
-static void vd_pop_menu_copy_path_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -536,7 +536,7 @@ static void vd_pop_menu_copy_path_cb(GtkWidget *widget, gpointer data)
        file_util_copy_path_to_clipboard(vd->click_fd, TRUE);
 }
 
-static void vd_pop_menu_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -553,14 +553,14 @@ static void vd_pop_submenu_dir_view_as_cb(GtkWidget *widget, gpointer data)
        layout_views_set(vd->layout, new_type, vd->layout->options.file_view_type);
 }
 
-static void vd_pop_menu_refresh_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_refresh_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
        if (vd->layout) layout_refresh(vd->layout);
 }
 
-static void vd_toggle_show_hidden_files_cb(GtkWidget *widget, gpointer data)
+static void vd_toggle_show_hidden_files_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -603,7 +603,7 @@ static void vd_pop_menu_new_folder_cb(gboolean success, const gchar *new_path, g
        gtk_tree_path_free(tpath);
 }
 
-static void vd_pop_menu_new_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_new_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
        FileData *dir_fd = NULL;
@@ -627,7 +627,7 @@ static void vd_pop_menu_new_cb(GtkWidget *widget, gpointer data)
        file_util_create_dir(dir_fd, vd->layout->window, vd_pop_menu_new_folder_cb, vd);
 }
 
-static void vd_pop_menu_rename_cb(GtkWidget *widget, gpointer data)
+static void vd_pop_menu_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -802,9 +802,9 @@ static void vd_dest_set(ViewDir *vd, gint enable)
                }
 }
 
-static void vd_dnd_get(GtkWidget *widget, GdkDragContext *context,
+static void vd_dnd_get(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
                           GtkSelectionData *selection_data, guint info,
-                          guint time, gpointer data)
+                          guint UNUSED(time), gpointer data)
 {
        ViewDir *vd = data;
        GList *list;
@@ -822,7 +822,7 @@ static void vd_dnd_get(GtkWidget *widget, GdkDragContext *context,
                }
 }
 
-static void vd_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void vd_dnd_begin(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -830,7 +830,7 @@ static void vd_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointer da
        vd_dest_set(vd, FALSE);
 }
 
-static void vd_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void vd_dnd_end(GtkWidget *UNUSED(widget), GdkDragContext *context, gpointer data)
 {
        ViewDir *vd = data;
 
@@ -844,14 +844,14 @@ static void vd_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data
 }
 
 static void vd_dnd_drop_receive(GtkWidget *widget,
-                               GdkDragContext *context, gint x, gint y,
+                               GdkDragContext *UNUSED(context), gint x, gint y,
                                GtkSelectionData *selection_data, guint info,
                                guint time, gpointer data)
 {
        ViewDir *vd = data;
        GtkTreePath *tpath;
        FileData *fd = NULL;
-       GdkDragAction action;
+       GdkDragAction action = GDK_ACTION_ASK;
 
        vd->click_fd = NULL;
 
@@ -883,7 +883,6 @@ static void vd_dnd_drop_receive(GtkWidget *widget,
  * shift and control keys during the drag operation. With GTK3 this is not
  * so. This is a workaround.
  */
-#if GTK_CHECK_VERSION(3,0,0)
                        GdkModifierType mask;
 
                        gdk_window_get_pointer(gtk_widget_get_window(widget), NULL, NULL, &mask);
@@ -895,9 +894,7 @@ static void vd_dnd_drop_receive(GtkWidget *widget,
                                {
                                action = GDK_ACTION_MOVE;
                                }
-#else
-                       action = (gdk_drag_context_get_actions(context));
-#endif
+
                        if (action != GDK_ACTION_COPY && action != GDK_ACTION_MOVE)
                                {
                                if (options->dnd_default_action == DND_ACTION_COPY)
@@ -969,10 +966,8 @@ void vd_dnd_drop_scroll_cancel(ViewDir *vd)
 static gboolean vd_auto_scroll_idle_cb(gpointer data)
 {
        ViewDir *vd = data;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
        if (vd->drop_fd)
                {
@@ -981,13 +976,10 @@ static gboolean vd_auto_scroll_idle_cb(gpointer data)
                gint w, h;
 
                window = gtk_widget_get_window(vd->view);
-#if GTK_CHECK_VERSION(3,0,0)
                device_manager = gdk_display_get_device_manager(gdk_window_get_display(window));
                device = gdk_device_manager_get_client_pointer(device_manager);
                gdk_window_get_device_position(window, device, &x, &y, NULL);
-#else
-               gdk_window_get_pointer(window, &x, &y, NULL);
-#endif
+
                w = gdk_window_get_width(window);
                h = gdk_window_get_height(window);
                if (x >= 0 && x < w && y >= 0 && y < h)
@@ -1000,7 +992,7 @@ static gboolean vd_auto_scroll_idle_cb(gpointer data)
        return FALSE;
 }
 
-static gboolean vd_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer data)
+static gboolean vd_auto_scroll_notify_cb(GtkWidget *UNUSED(widget), gint UNUSED(x), gint UNUSED(y), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -1011,7 +1003,7 @@ static gboolean vd_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpoi
        return TRUE;
 }
 
-static gboolean vd_dnd_drop_motion(GtkWidget *widget, GdkDragContext *context,
+static gboolean vd_dnd_drop_motion(GtkWidget *UNUSED(widget), GdkDragContext *context,
                                   gint x, gint y, guint time, gpointer data)
 {
        ViewDir *vd = data;
@@ -1040,7 +1032,7 @@ static gboolean vd_dnd_drop_motion(GtkWidget *widget, GdkDragContext *context,
        return FALSE;
 }
 
-static void vd_dnd_drop_leave(GtkWidget *widget, GdkDragContext *context, guint time, gpointer data)
+static void vd_dnd_drop_leave(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context), guint UNUSED(time), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -1078,7 +1070,7 @@ void vd_dnd_init(ViewDir *vd)
  *----------------------------------------------------------------------------
  */
 
-void vd_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+void vd_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        ViewDir *vd = data;
        GtkTreeModel *store;
@@ -1095,7 +1087,7 @@ void vd_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpo
        popup_menu_position_clamp(menu, x, y, 0);
 }
 
-void vd_activate_cb(GtkTreeView *tview, GtkTreePath *tpath, GtkTreeViewColumn *column, gpointer data)
+void vd_activate_cb(GtkTreeView *tview, GtkTreePath *tpath, GtkTreeViewColumn *UNUSED(column), gpointer data)
 {
        ViewDir *vd = data;
        FileData *fd = vd_get_fd_from_tree_path(vd, tview, tpath);
@@ -1121,7 +1113,7 @@ static GdkColor *vd_color_shifted(GtkWidget *widget)
        return &color;
 }
 
-void vd_color_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
+void vd_color_cb(GtkTreeViewColumn *UNUSED(tree_column), GtkCellRenderer *cell,
                 GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
 {
        ViewDir *vd = data;
index 3721127..5224890 100644 (file)
@@ -435,7 +435,7 @@ gboolean vdlist_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer dat
        return options->view_dir_list_single_click_enter;
 }
 
-void vdlist_destroy_cb(GtkWidget *widget, gpointer data)
+void vdlist_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
 
@@ -445,7 +445,7 @@ void vdlist_destroy_cb(GtkWidget *widget, gpointer data)
        filelist_free(VDLIST(vd)->list);
 }
 
-ViewDir *vdlist_new(ViewDir *vd, FileData *dir_fd)
+ViewDir *vdlist_new(ViewDir *vd, FileData *UNUSED(dir_fd))
 {
        GtkListStore *store;
        GtkTreeSelection *selection;
index e413450..6492b26 100644 (file)
@@ -66,7 +66,7 @@ static void set_cursor(GtkWidget *widget, GdkCursorType cursor_type)
 
        if (cursor_type > -1) cursor = gdk_cursor_new(cursor_type);
        gdk_window_set_cursor(gtk_widget_get_window(widget), cursor);
-       if (cursor) gdk_cursor_unref(cursor);
+       if (cursor) g_object_unref(G_OBJECT(cursor));
        gdk_flush();
 }
 
@@ -143,7 +143,7 @@ static void vdtree_expand_by_iter(ViewDir *vd, GtkTreeIter *iter, gboolean expan
                {
                /* block signal handler, icon is set here, the caller of vdtree_expand_by_iter must make sure
                   that the iter is populated */
-               g_signal_handlers_block_by_func(G_OBJECT(vd->view), vdtree_row_expanded, vd);
+               g_signal_handlers_block_by_func(G_OBJECT(vd->view), (gpointer)vdtree_row_expanded, vd);
                gtk_tree_view_expand_row(GTK_TREE_VIEW(vd->view), tpath, FALSE);
                gtk_tree_model_get(store, iter, DIR_COLUMN_POINTER, &nd, -1);
                fd = (nd) ? nd->fd : NULL;
@@ -157,7 +157,7 @@ static void vdtree_expand_by_iter(ViewDir *vd, GtkTreeIter *iter, gboolean expan
                        vdtree_icon_set_by_iter(vd, iter, vd->pf->open);
                        }
 
-               g_signal_handlers_unblock_by_func(G_OBJECT(vd->view), vdtree_row_expanded, vd);
+               g_signal_handlers_unblock_by_func(G_OBJECT(vd->view), (gpointer)vdtree_row_expanded, vd);
                }
        else
                {
@@ -720,8 +720,7 @@ FileData *vdtree_populate_path(ViewDir *vd, FileData *target_fd, gboolean expand
 
 static gboolean selection_is_ok = FALSE;
 
-static gboolean vdtree_select_cb(GtkTreeSelection *selection, GtkTreeModel *store, GtkTreePath *tpath,
-                                gboolean path_currently_selected, gpointer data)
+static gboolean vdtree_select_cb(GtkTreeSelection *UNUSED(selection), GtkTreeModel *UNUSED(store), GtkTreePath *UNUSED(tpath), gboolean UNUSED(path_currently_selected), gpointer UNUSED(data))
 {
        return selection_is_ok;
 }
@@ -780,7 +779,7 @@ void vdtree_refresh(ViewDir *vd)
        vdtree_populate_path(vd, vd->dir_fd, FALSE, TRUE);
 }
 
-const gchar *vdtree_row_get_path(ViewDir *vd, gint row)
+const gchar *vdtree_row_get_path(ViewDir *UNUSED(vd), gint UNUSED(row))
 {
 /** @FIXME no get row path */
        log_printf("FIXME: no get row path\n");
@@ -849,7 +848,7 @@ gboolean vdtree_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer dat
 }
 
 static gboolean vdtree_clicked_on_expander(GtkTreeView *treeview, GtkTreePath *tpath,
-                                          GtkTreeViewColumn *column, gint x, gint y, gint *left_of_expander)
+                                          GtkTreeViewColumn *column, gint x, gint UNUSED(y), gint *left_of_expander)
 {
        gint depth;
        gint size;
@@ -986,7 +985,7 @@ static void vdtree_row_collapsed(GtkTreeView *treeview, GtkTreeIter *iter, GtkTr
                }
 }
 
-static gint vdtree_sort_cb(GtkTreeModel *store, GtkTreeIter *a, GtkTreeIter *b, gpointer data)
+static gint vdtree_sort_cb(GtkTreeModel *store, GtkTreeIter *a, GtkTreeIter *b, gpointer UNUSED(data))
 {
        NodeData *nda;
        NodeData *ndb;
@@ -1023,7 +1022,7 @@ static void vdtree_setup_root(ViewDir *vd)
        vdtree_populate_path(vd, fd, FALSE, FALSE);
 }
 
-static gboolean vdtree_destroy_node_cb(GtkTreeModel *store, GtkTreePath *tpath, GtkTreeIter *iter, gpointer data)
+static gboolean vdtree_destroy_node_cb(GtkTreeModel *store, GtkTreePath *UNUSED(tpath), GtkTreeIter *iter, gpointer UNUSED(data))
 {
        NodeData *nd;
 
@@ -1033,7 +1032,7 @@ static gboolean vdtree_destroy_node_cb(GtkTreeModel *store, GtkTreePath *tpath,
        return FALSE;
 }
 
-void vdtree_destroy_cb(GtkWidget *widget, gpointer data)
+void vdtree_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewDir *vd = data;
        GtkTreeModel *store;
@@ -1046,7 +1045,7 @@ void vdtree_destroy_cb(GtkWidget *widget, gpointer data)
        gtk_tree_model_foreach(store, vdtree_destroy_node_cb, vd);
 }
 
-ViewDir *vdtree_new(ViewDir *vd, FileData *dir_fd)
+ViewDir *vdtree_new(ViewDir *vd, FileData *UNUSED(dir_fd))
 {
        GtkTreeStore *store;
        GtkTreeSelection *selection;
index 46d823d..5742ae5 100644 (file)
@@ -367,7 +367,7 @@ static void vf_pop_menu_view_cb(GtkWidget *widget, gpointer data)
        }
 }
 
-static void vf_pop_menu_open_archive_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_open_archive_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        LayoutWindow *lw_new;
@@ -397,14 +397,14 @@ static void vf_pop_menu_open_archive_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void vf_pop_menu_copy_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_copy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
        file_util_copy(NULL, vf_pop_menu_file_list(vf), NULL, vf->listview);
 }
 
-static void vf_pop_menu_move_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_move_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -422,7 +422,7 @@ static void vf_pop_menu_rename_cb(GtkWidget *widget, gpointer data)
        }
 }
 
-static void vf_pop_menu_delete_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -430,7 +430,7 @@ static void vf_pop_menu_delete_cb(GtkWidget *widget, gpointer data)
        file_util_delete(NULL, vf_pop_menu_file_list(vf), vf->listview);
 }
 
-static void vf_pop_menu_move_to_trash_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_move_to_trash_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -438,28 +438,28 @@ static void vf_pop_menu_move_to_trash_cb(GtkWidget *widget, gpointer data)
        file_util_delete(NULL, vf_pop_menu_file_list(vf), vf->listview);
 }
 
-static void vf_pop_menu_copy_path_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
        file_util_copy_path_list_to_clipboard(vf_pop_menu_file_list(vf), TRUE);
 }
 
-static void vf_pop_menu_copy_path_unquoted_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
        file_util_copy_path_list_to_clipboard(vf_pop_menu_file_list(vf), FALSE);
 }
 
-static void vf_pop_menu_enable_grouping_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_enable_grouping_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
        file_data_disable_grouping_list(vf_pop_menu_file_list(vf), FALSE);
 }
 
-static void vf_pop_menu_duplicates_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_duplicates_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        DupeWindow *dw;
@@ -468,7 +468,7 @@ static void vf_pop_menu_duplicates_cb(GtkWidget *widget, gpointer data)
        dupe_window_add_files(dw, vf_pop_menu_file_list(vf), FALSE);
 }
 
-static void vf_pop_menu_disable_grouping_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_disable_grouping_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -502,7 +502,7 @@ static void vf_pop_menu_sort_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void vf_pop_menu_sort_ascend_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_sort_ascend_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -516,43 +516,43 @@ static void vf_pop_menu_sort_ascend_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-static void vf_pop_menu_sel_mark_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_sel_mark_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vf_mark_to_selection(vf, vf->active_mark, MTS_MODE_SET);
 }
 
-static void vf_pop_menu_sel_mark_and_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_sel_mark_and_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vf_mark_to_selection(vf, vf->active_mark, MTS_MODE_AND);
 }
 
-static void vf_pop_menu_sel_mark_or_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_sel_mark_or_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vf_mark_to_selection(vf, vf->active_mark, MTS_MODE_OR);
 }
 
-static void vf_pop_menu_sel_mark_minus_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_sel_mark_minus_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vf_mark_to_selection(vf, vf->active_mark, MTS_MODE_MINUS);
 }
 
-static void vf_pop_menu_set_mark_sel_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_set_mark_sel_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vf_selection_to_mark(vf, vf->active_mark, STM_MODE_SET);
 }
 
-static void vf_pop_menu_res_mark_sel_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_res_mark_sel_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vf_selection_to_mark(vf, vf->active_mark, STM_MODE_RESET);
 }
 
-static void vf_pop_menu_toggle_mark_sel_cb(GtkWidget *widget, gpointer data)
+static void vf_pop_menu_toggle_mark_sel_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vf_selection_to_mark(vf, vf->active_mark, STM_MODE_TOGGLE);
@@ -835,7 +835,7 @@ static void vf_destroy_cb(GtkWidget *widget, gpointer data)
        g_free(vf);
 }
 
-static void vf_marks_filter_toggle_cb(GtkWidget *widget, gpointer data)
+static void vf_marks_filter_toggle_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vf_refresh_idle(vf);
@@ -871,8 +871,8 @@ static void vf_marks_tooltip_ok_cb(GenericDialog *gd, gpointer data)
        generic_dialog_close(gd);
 }
 
-void vf_marks_filter_on_icon_press(GtkEntry *entry, GtkEntryIconPosition pos,
-                                                                       GdkEvent *event, gpointer userdata)
+void vf_marks_filter_on_icon_press(GtkEntry *UNUSED(entry), GtkEntryIconPosition UNUSED(pos),
+                                                                       GdkEvent *UNUSED(event), gpointer userdata)
 {
        MarksTextEntry *mte = userdata;
 
@@ -881,7 +881,7 @@ void vf_marks_filter_on_icon_press(GtkEntry *entry, GtkEntryIconPosition pos,
        gtk_entry_set_text(GTK_ENTRY(mte->edit_widget), "");
 }
 
-static void vf_marks_tooltip_help_cb(GenericDialog *gd, gpointer data)
+static void vf_marks_tooltip_help_cb(GenericDialog *UNUSED(gd), gpointer UNUSED(data))
 {
        help_window_show("GuideImageMarks.html");
 }
@@ -939,7 +939,7 @@ static gboolean vf_marks_tooltip_cb(GtkWidget *widget,
        return FALSE;
 }
 
-static void vf_file_filter_save_cb(GtkWidget *widget, gpointer data)
+static void vf_file_filter_save_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        gchar *entry_text;
@@ -998,14 +998,14 @@ static void vf_file_filter_save_cb(GtkWidget *widget, gpointer data)
        g_free(entry_text);
 }
 
-static void vf_file_filter_cb(GtkWidget *widget, gpointer data)
+static void vf_file_filter_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
        vf_refresh(vf);
 }
 
-static gboolean vf_file_filter_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean vf_file_filter_press_cb(GtkWidget *widget, GdkEventButton *UNUSED(bevent), gpointer data)
 {
        ViewFile *vf = data;
        vf->file_filter.last_selected = gtk_combo_box_get_active(GTK_COMBO_BOX(vf->file_filter.combo));
@@ -1018,7 +1018,7 @@ static gboolean vf_file_filter_press_cb(GtkWidget *widget, GdkEventButton *beven
 static GtkWidget *vf_marks_filter_init(ViewFile *vf)
 {
        GtkWidget *frame = gtk_frame_new(NULL);
-       GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
+       GtkWidget *hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
 
        gint i;
 
@@ -1155,7 +1155,7 @@ static void case_sensitive_cb(GtkWidget *widget, gpointer data)
        vf_refresh(vf);
 }
 
-static void file_filter_clear_cb(GtkEntry *entry, GtkEntryIconPosition pos, GdkEvent *event, gpointer userdata)
+static void file_filter_clear_cb(GtkEntry *UNUSED(entry), GtkEntryIconPosition pos, GdkEvent *UNUSED(event), gpointer userdata)
 {
        if (pos == GTK_ENTRY_ICON_SECONDARY)
                {
@@ -1167,7 +1167,7 @@ static void file_filter_clear_cb(GtkEntry *entry, GtkEntryIconPosition pos, GdkE
 static GtkWidget *vf_file_filter_init(ViewFile *vf)
 {
        GtkWidget *frame = gtk_frame_new(NULL);
-       GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
+       GtkWidget *hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        GList *work;
        gint n = 0;
        GtkWidget *combo_entry;
@@ -1266,7 +1266,7 @@ ViewFile *vf_new(FileViewType type, FileData *dir_fd)
        vf->filter = vf_marks_filter_init(vf);
        vf->file_filter.frame = vf_file_filter_init(vf);
 
-       vf->widget = gtk_vbox_new(FALSE, 0);
+       vf->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
        gtk_box_pack_start(GTK_BOX(vf->widget), vf->filter, FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(vf->widget), vf->file_filter.frame, FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(vf->widget), vf->scrolled, TRUE, TRUE, 0);
index 64c9baa..42b2f63 100644 (file)
@@ -76,7 +76,7 @@ static void vficon_populate_at_new_size(ViewFile *vf, gint w, gint h, gboolean f
  *-----------------------------------------------------------------------------
  */
 
-GList *vficon_selection_get_one(ViewFile *vf, FileData *fd)
+GList *vficon_selection_get_one(ViewFile *UNUSED(vf), FileData *fd)
 {
        return g_list_prepend(filelist_copy(fd->sidecar_files), file_data_ref(fd));
 }
@@ -93,7 +93,7 @@ GList *vficon_pop_menu_file_list(ViewFile *vf)
        return vficon_selection_get_one(vf, VFICON(vf)->click_fd);
 }
 
-void vficon_pop_menu_view_cb(GtkWidget *widget, gpointer data)
+void vficon_pop_menu_view_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -113,14 +113,14 @@ void vficon_pop_menu_view_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-void vficon_pop_menu_rename_cb(GtkWidget *widget, gpointer data)
+void vficon_pop_menu_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
        file_util_rename(NULL, vf_pop_menu_file_list(vf), vf->listview);
 }
 
-void vficon_pop_menu_show_names_cb(GtkWidget *widget, gpointer data)
+void vficon_pop_menu_show_names_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -137,21 +137,21 @@ static void vficon_toggle_star_rating(ViewFile *vf)
        vficon_populate_at_new_size(vf, allocation.width, allocation.height, TRUE);
 }
 
-void vficon_pop_menu_show_star_rating_cb(GtkWidget *widget, gpointer data)
+void vficon_pop_menu_show_star_rating_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
        vficon_toggle_star_rating(vf);
 }
 
-void vficon_pop_menu_refresh_cb(GtkWidget *widget, gpointer data)
+void vficon_pop_menu_refresh_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
        vf_refresh(vf);
 }
 
-void vficon_popup_destroy_cb(GtkWidget *widget, gpointer data)
+void vficon_popup_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vficon_selection_remove(vf, VFICON(vf)->click_fd, SELECTION_PRELIGHT, NULL);
@@ -344,23 +344,17 @@ static void tip_show(ViewFile *vf)
 {
        GtkWidget *label;
        gint x, y;
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDisplay *display;
        GdkDeviceManager *device_manager;
        GdkDevice *device;
-#endif
 
        if (VFICON(vf)->tip_window) return;
 
-#if GTK_CHECK_VERSION(3,0,0)
        device_manager = gdk_display_get_device_manager(gdk_window_get_display(
                                                gtk_tree_view_get_bin_window(GTK_TREE_VIEW(vf->listview))));
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_window_get_device_position(gtk_tree_view_get_bin_window(GTK_TREE_VIEW(vf->listview)),
                                                device, &x, &y, NULL);
-#else
-       gdk_window_get_pointer(gtk_tree_view_get_bin_window(GTK_TREE_VIEW(vf->listview)), &x, &y, NULL);
-#endif
 
        VFICON(vf)->tip_fd = vficon_find_data_by_coord(vf, x, y, NULL);
        if (!VFICON(vf)->tip_fd) return;
@@ -375,14 +369,10 @@ static void tip_show(ViewFile *vf)
        gtk_container_add(GTK_CONTAINER(VFICON(vf)->tip_window), label);
        gtk_widget_show(label);
 
-#if GTK_CHECK_VERSION(3,0,0)
        display = gdk_display_get_default();
        device_manager = gdk_display_get_device_manager(display);
        device = gdk_device_manager_get_client_pointer(device_manager);
        gdk_device_get_position(device, NULL, &x, &y);
-#else
-       gdk_window_get_pointer(NULL, &x, &y, NULL);
-#endif
 
        if (!gtk_widget_get_realized(VFICON(vf)->tip_window)) gtk_widget_realize(VFICON(vf)->tip_window);
        gtk_window_move(GTK_WINDOW(VFICON(vf)->tip_window), x + 16, y + 16);
@@ -443,21 +433,16 @@ static void tip_unschedule(ViewFile *vf)
 
 static void tip_update(ViewFile *vf, FileData *fd)
 {
-#if GTK_CHECK_VERSION(3,0,0)
        GdkDisplay *display = gdk_display_get_default();
        GdkDeviceManager *device_manager = gdk_display_get_device_manager(display);
        GdkDevice *device = gdk_device_manager_get_client_pointer(device_manager);
-#endif
 
        if (VFICON(vf)->tip_window)
                {
                gint x, y;
 
-#if GTK_CHECK_VERSION(3,0,0)
                gdk_device_get_position(device, NULL, &x, &y);
-#else
-               gdk_window_get_pointer(NULL, &x, &y, NULL);
-#endif
+
                gtk_window_move(GTK_WINDOW(VFICON(vf)->tip_window), x + 16, y + 16);
 
                if (fd != VFICON(vf)->tip_fd)
@@ -489,9 +474,9 @@ static void tip_update(ViewFile *vf, FileData *fd)
  *-------------------------------------------------------------------
  */
 
-static void vficon_dnd_get(GtkWidget *widget, GdkDragContext *context,
-                          GtkSelectionData *selection_data, guint info,
-                          guint time, gpointer data)
+static void vficon_dnd_get(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
+                          GtkSelectionData *selection_data, guint UNUSED(info),
+                          guint UNUSED(time), gpointer data)
 {
        ViewFile *vf = data;
        GList *list = NULL;
@@ -512,9 +497,9 @@ static void vficon_dnd_get(GtkWidget *widget, GdkDragContext *context,
        filelist_free(list);
 }
 
-static void vficon_drag_data_received(GtkWidget *entry_widget, GdkDragContext *context,
+static void vficon_drag_data_received(GtkWidget *UNUSED(entry_widget), GdkDragContext *UNUSED(context),
                                      int x, int y, GtkSelectionData *selection,
-                                     guint info, guint time, gpointer data)
+                                     guint info, guint UNUSED(time), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -552,7 +537,7 @@ static void vficon_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointe
                }
 }
 
-static void vficon_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void vficon_dnd_end(GtkWidget *UNUSED(widget), GdkDragContext *context, gpointer data)
 {
        ViewFile *vf = data;
 
@@ -633,14 +618,14 @@ static void vficon_selection_remove(ViewFile *vf, FileData *fd, SelectionType ma
        vficon_selection_set(vf, fd, fd->selected & ~mask, iter);
 }
 
-void vficon_marks_set(ViewFile *vf, gint enable)
+void vficon_marks_set(ViewFile *vf, gint UNUSED(enable))
 {
        GtkAllocation allocation;
        gtk_widget_get_allocation(vf->listview, &allocation);
        vficon_populate_at_new_size(vf, allocation.width, allocation.height, TRUE);
 }
 
-void vficon_star_rating_set(ViewFile *vf, gint enable)
+void vficon_star_rating_set(ViewFile *vf, gint UNUSED(enable))
 {
        GtkAllocation allocation;
        gtk_widget_get_allocation(vf->listview, &allocation);
@@ -1134,7 +1119,7 @@ static void vficon_set_focus(ViewFile *vf, FileData *fd)
                        {
                        /* ensure focus row col are correct */
                        vficon_find_position(vf, VFICON(vf)->focus_fd, &VFICON(vf)->focus_row, &VFICON(vf)->focus_column);
-#if GTK_CHECK_VERSION(3,0,0)
+
 /** @FIXME Refer to issue #467 on Github. The thumbnail position is not
  * preserved when the icon view is refreshed. Caused by an unknown call from
  * the idle loop. This patch hides the problem.
@@ -1143,7 +1128,7 @@ static void vficon_set_focus(ViewFile *vf, FileData *fd)
                                {
                                tree_view_row_make_visible(GTK_TREE_VIEW(vf->listview), &iter, FALSE);
                                }
-#endif
+
                        return;
                        }
                vficon_selection_remove(vf, VFICON(vf)->focus_fd, SELECTION_FOCUS, NULL);
@@ -1205,7 +1190,7 @@ static gint page_height(ViewFile *vf)
  *-------------------------------------------------------------------
  */
 
-static void vfi_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void vfi_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        ViewFile *vf = data;
        GtkTreeModel *store;
@@ -1223,7 +1208,7 @@ static void vfi_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push
        popup_menu_position_clamp(menu, x, y, 0);
 }
 
-gboolean vficon_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+gboolean vficon_press_key_cb(GtkWidget *UNUSED(widget), GdkEventKey *event, gpointer data)
 {
        ViewFile *vf = data;
        gint focus_row = 0;
@@ -1355,7 +1340,7 @@ gboolean vficon_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer dat
  *-------------------------------------------------------------------
  */
 
-static gboolean vficon_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
+static gboolean vficon_motion_cb(GtkWidget *UNUSED(widget), GdkEventMotion *event, gpointer data)
 {
        ViewFile *vf = data;
        FileData *fd;
@@ -1366,7 +1351,7 @@ static gboolean vficon_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpoin
        return FALSE;
 }
 
-gboolean vficon_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+gboolean vficon_press_cb(GtkWidget *UNUSED(widget), GdkEventButton *bevent, gpointer data)
 {
        ViewFile *vf = data;
        GtkTreeIter iter;
@@ -1492,7 +1477,7 @@ gboolean vficon_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer d
        return TRUE;
 }
 
-static gboolean vficon_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+static gboolean vficon_leave_cb(GtkWidget *UNUSED(widget), GdkEventCrossing *UNUSED(event), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -1506,7 +1491,7 @@ static gboolean vficon_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpoi
  *-------------------------------------------------------------------
  */
 
-static gboolean vficon_destroy_node_cb(GtkTreeModel *store, GtkTreePath *tpath, GtkTreeIter *iter, gpointer data)
+static gboolean vficon_destroy_node_cb(GtkTreeModel *store, GtkTreePath *UNUSED(tpath), GtkTreeIter *iter, gpointer UNUSED(data))
 {
        GList *list;
 
@@ -1686,7 +1671,7 @@ static void vficon_populate(ViewFile *vf, gboolean resize, gboolean keep_positio
        vf_star_update(vf);
 }
 
-static void vficon_populate_at_new_size(ViewFile *vf, gint w, gint h, gboolean force)
+static void vficon_populate_at_new_size(ViewFile *vf, gint w, gint UNUSED(h), gboolean force)
 {
        gint new_cols;
        gint thumb_width;
@@ -1705,7 +1690,7 @@ static void vficon_populate_at_new_size(ViewFile *vf, gint w, gint h, gboolean f
        DEBUG_1("col tab pop cols=%d rows=%d", VFICON(vf)->columns, VFICON(vf)->rows);
 }
 
-static void vficon_sized_cb(GtkWidget *widget, GtkAllocation *allocation, gpointer data)
+static void vficon_sized_cb(GtkWidget *UNUSED(widget), GtkAllocation *allocation, gpointer data)
 {
        ViewFile *vf = data;
 
@@ -1939,7 +1924,6 @@ static gboolean vficon_refresh_real(ViewFile *vf, gboolean keep_position)
 {
        gboolean ret = TRUE;
        GList *work, *new_work;
-       FileData *focus_fd;
        FileData *first_selected = NULL;
        GList *new_filelist = NULL;
        GList *new_fd_list = NULL;
@@ -1947,8 +1931,6 @@ static gboolean vficon_refresh_real(ViewFile *vf, gboolean keep_position)
        GtkTreePath *end_path = NULL;
        GtkTreePath *start_path = NULL;
 
-       focus_fd = VFICON(vf)->focus_fd;
-
        gtk_tree_view_get_visible_range(GTK_TREE_VIEW(vf->listview), &start_path, &end_path);
 
        if (vf->dir_fd)
@@ -2113,7 +2095,7 @@ struct _ColumnData
        gint number;
 };
 
-static void vficon_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
+static void vficon_cell_data_cb(GtkTreeViewColumn *UNUSED(tree_column), GtkCellRenderer *cell,
                                GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
 {
        GList *list;
@@ -2282,7 +2264,7 @@ gboolean vficon_set_fd(ViewFile *vf, FileData *dir_fd)
        return ret;
 }
 
-void vficon_destroy_cb(GtkWidget *widget, gpointer data)
+void vficon_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -2299,7 +2281,7 @@ void vficon_destroy_cb(GtkWidget *widget, gpointer data)
        g_list_free(VFICON(vf)->selection);
 }
 
-ViewFile *vficon_new(ViewFile *vf, FileData *dir_fd)
+ViewFile *vficon_new(ViewFile *vf, FileData *UNUSED(dir_fd))
 {
        GtkListStore *store;
        GtkTreeSelection *selection;
index 83a483d..7bf7a68 100644 (file)
@@ -99,7 +99,7 @@ typedef struct {
        gint row;
 } ViewFileFindRowData;
 
-static gboolean vflist_find_row_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+static gboolean vflist_find_row_cb(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer data)
 {
        ViewFileFindRowData *find = data;
        FileData *fd;
@@ -130,7 +130,7 @@ static gint vflist_find_row(ViewFile *vf, FileData *fd, GtkTreeIter *iter)
        return -1;
 }
 
-static FileData *vflist_find_data_by_coord(ViewFile *vf, gint x, gint y, GtkTreeIter *iter)
+static FileData *vflist_find_data_by_coord(ViewFile *vf, gint x, gint y, GtkTreeIter *UNUSED(iter))
 {
        GtkTreePath *tpath;
        GtkTreeViewColumn *column;
@@ -153,7 +153,7 @@ static FileData *vflist_find_data_by_coord(ViewFile *vf, gint x, gint y, GtkTree
        return NULL;
 }
 
-static gboolean vflist_store_clear_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+static gboolean vflist_store_clear_cb(GtkTreeModel *model, GtkTreePath *UNUSED(path), GtkTreeIter *iter, gpointer UNUSED(data))
 {
        FileData *fd;
        gtk_tree_model_get(model, iter, FILE_COLUMN_POINTER, &fd, -1);
@@ -218,9 +218,9 @@ static void vflist_move_cursor(ViewFile *vf, GtkTreeIter *iter)
  *-----------------------------------------------------------------------------
  */
 
-static void vflist_dnd_get(GtkWidget *widget, GdkDragContext *context,
-                          GtkSelectionData *selection_data, guint info,
-                          guint time, gpointer data)
+static void vflist_dnd_get(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
+                          GtkSelectionData *selection_data, guint UNUSED(info),
+                          guint UNUSED(time), gpointer data)
 {
        ViewFile *vf = data;
        GList *list = NULL;
@@ -261,7 +261,7 @@ static void vflist_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointe
                }
 }
 
-static void vflist_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer data)
+static void vflist_dnd_end(GtkWidget *UNUSED(widget), GdkDragContext *context, gpointer data)
 {
        ViewFile *vf = data;
 
@@ -273,9 +273,9 @@ static void vflist_dnd_end(GtkWidget *widget, GdkDragContext *context, gpointer
                }
 }
 
-static void vflist_drag_data_received(GtkWidget *entry_widget, GdkDragContext *context,
+static void vflist_drag_data_received(GtkWidget *UNUSED(entry_widget), GdkDragContext *UNUSED(context),
                                      int x, int y, GtkSelectionData *selection,
-                                     guint info, guint time, gpointer data)
+                                     guint info, guint UNUSED(time), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -366,7 +366,7 @@ GList *vflist_pop_menu_file_list(ViewFile *vf)
 }
 
 
-void vflist_pop_menu_view_cb(GtkWidget *widget, gpointer data)
+void vflist_pop_menu_view_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -384,7 +384,7 @@ void vflist_pop_menu_view_cb(GtkWidget *widget, gpointer data)
                }
 }
 
-void vflist_pop_menu_rename_cb(GtkWidget *widget, gpointer data)
+void vflist_pop_menu_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        GList *list;
@@ -415,7 +415,7 @@ void vflist_pop_menu_rename_cb(GtkWidget *widget, gpointer data)
        file_util_rename(NULL, list, vf->listview);
 }
 
-void vflist_pop_menu_thumbs_cb(GtkWidget *widget, gpointer data)
+void vflist_pop_menu_thumbs_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -465,7 +465,7 @@ void vflist_star_rating_set(ViewFile *vf, gboolean enable)
        g_list_free(columns);
 }
 
-void vflist_pop_menu_show_star_rating_cb(GtkWidget *widget, gpointer data)
+void vflist_pop_menu_show_star_rating_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -477,7 +477,7 @@ void vflist_pop_menu_show_star_rating_cb(GtkWidget *widget, gpointer data)
        vflist_star_rating_set(vf, options->show_star_rating);
 }
 
-void vflist_pop_menu_refresh_cb(GtkWidget *widget, gpointer data)
+void vflist_pop_menu_refresh_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -486,7 +486,7 @@ void vflist_pop_menu_refresh_cb(GtkWidget *widget, gpointer data)
        gtk_tree_view_columns_autosize(GTK_TREE_VIEW(vf->listview));
 }
 
-void vflist_popup_destroy_cb(GtkWidget *widget, gpointer data)
+void vflist_popup_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
        vflist_color_set(vf, VFLIST(vf)->click_fd, FALSE);
@@ -501,7 +501,7 @@ void vflist_popup_destroy_cb(GtkWidget *widget, gpointer data)
  *-----------------------------------------------------------------------------
  */
 
-static gboolean vflist_row_rename_cb(TreeEditData *td, const gchar *old, const gchar *new, gpointer data)
+static gboolean vflist_row_rename_cb(TreeEditData *UNUSED(td), const gchar *old, const gchar *new, gpointer data)
 {
        ViewFile *vf = data;
        gchar *new_path;
@@ -530,7 +530,7 @@ static gboolean vflist_row_rename_cb(TreeEditData *td, const gchar *old, const g
        return FALSE;
 }
 
-static void vflist_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
+static void vflist_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
 {
        ViewFile *vf = data;
        GtkTreeModel *store;
@@ -791,8 +791,7 @@ static void vflist_select_idle_cancel(ViewFile *vf)
                }
 }
 
-static gboolean vflist_select_cb(GtkTreeSelection *selection, GtkTreeModel *store, GtkTreePath *tpath,
-                                gboolean path_currently_selected, gpointer data)
+static gboolean vflist_select_cb(GtkTreeSelection *UNUSED(selection), GtkTreeModel *store, GtkTreePath *tpath, gboolean path_currently_selected, gpointer data)
 {
        ViewFile *vf = data;
        GtkTreeIter iter;
@@ -820,13 +819,13 @@ static gboolean vflist_select_cb(GtkTreeSelection *selection, GtkTreeModel *stor
        return TRUE;
 }
 
-static void vflist_expand_cb(GtkTreeView *tree_view, GtkTreeIter *iter, GtkTreePath *path, gpointer data)
+static void vflist_expand_cb(GtkTreeView *UNUSED(tree_view), GtkTreeIter *iter, GtkTreePath *UNUSED(path), gpointer data)
 {
        ViewFile *vf = data;
        vflist_set_expanded(vf, iter, TRUE);
 }
 
-static void vflist_collapse_cb(GtkTreeView *tree_view, GtkTreeIter *iter, GtkTreePath *path, gpointer data)
+static void vflist_collapse_cb(GtkTreeView *UNUSED(tree_view), GtkTreeIter *iter, GtkTreePath *UNUSED(path), gpointer data)
 {
        ViewFile *vf = data;
        vflist_set_expanded(vf, iter, FALSE);
@@ -2017,7 +2016,7 @@ static GdkColor *vflist_listview_color_shifted(GtkWidget *widget)
        return &color;
 }
 
-static void vflist_listview_color_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
+static void vflist_listview_color_cb(GtkTreeViewColumn *UNUSED(tree_column), GtkCellRenderer *cell,
                                     GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
 {
        ViewFile *vf = data;
@@ -2154,7 +2153,7 @@ gboolean vflist_set_fd(ViewFile *vf, FileData *dir_fd)
        return ret;
 }
 
-void vflist_destroy_cb(GtkWidget *widget, gpointer data)
+void vflist_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
 {
        ViewFile *vf = data;
 
@@ -2168,7 +2167,7 @@ void vflist_destroy_cb(GtkWidget *widget, gpointer data)
        filelist_free(vf->list);
 }
 
-ViewFile *vflist_new(ViewFile *vf, FileData *dir_fd)
+ViewFile *vflist_new(ViewFile *vf, FileData *UNUSED(dir_fd))
 {
        GtkTreeStore *store;
        GtkTreeSelection *selection;
index 4a20376..383d876 100644 (file)
@@ -235,7 +235,7 @@ static void help_browser_run(const gchar *path)
 
 static GtkWidget *help_window = NULL;
 
-static void help_window_destroy_cb(GtkWidget *window, gpointer data)
+static void help_window_destroy_cb(GtkWidget *UNUSED(window), gpointer UNUSED(data))
 {
        help_window = NULL;
 }
@@ -328,8 +328,8 @@ struct _HelpSearchData {
        gchar *text_entry;
 };
 
-static void help_search_window_show_icon_press(GtkEntry *entry, GtkEntryIconPosition pos,
-                                                                       GdkEvent *event, gpointer userdata)
+static void help_search_window_show_icon_press(GtkEntry *UNUSED(entry), GtkEntryIconPosition UNUSED(pos),
+                                                                       GdkEvent *UNUSED(event), gpointer userdata)
 {
        HelpSearchData *hsd = userdata;
 
@@ -338,7 +338,7 @@ static void help_search_window_show_icon_press(GtkEntry *entry, GtkEntryIconPosi
        gtk_entry_set_text(GTK_ENTRY(hsd->edit_widget), hsd->text_entry);
 }
 
-static void help_search_window_ok_cb(GenericDialog *gd, gpointer data)
+static void help_search_window_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        HelpSearchData *hsd = data;
        gchar *search_command;
@@ -352,7 +352,7 @@ static void help_search_window_ok_cb(GenericDialog *gd, gpointer data)
        g_free(hsd);
 }
 
-static void help_search_window_cancel_cb(GenericDialog *gd, gpointer data)
+static void help_search_window_cancel_cb(GenericDialog *UNUSED(gd), gpointer data)
 {
        HelpSearchData *hsd = data;
 
@@ -377,20 +377,13 @@ void help_search_window_show()
                                  help_search_window_ok_cb, TRUE);
 
        label1 = pref_label_new(GENERIC_DIALOG(gd)->vbox, _("Search engine:"));
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(label1), 0.0);
        gtk_label_set_yalign(GTK_LABEL(label1), 0.5);
-#else
-   gtk_misc_set_alignment(GTK_MISC(label1), 0.0, 0.5);
-#endif
 
        label2 = pref_label_new(GENERIC_DIALOG(gd)->vbox, options->help_search_engine);
-#if GTK_CHECK_VERSION(3,16,0)
        gtk_label_set_xalign(GTK_LABEL(label2), 0.0);
        gtk_label_set_yalign(GTK_LABEL(label2), 0.5);
-#else
-   gtk_misc_set_alignment(GTK_MISC(label2), 0.0, 0.5);
-#endif
+
        pref_spacer(GENERIC_DIALOG(gd)->vbox, 0);
 
        table = pref_table_new(gd->vbox, 3, 1, FALSE, TRUE);