[gthumb] fixed compiler warnings



commit 547c6901674d23bda74371689d9fb2fa12e1a80b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Nov 17 11:09:59 2013 +0100

    fixed compiler warnings

 configure.ac                                       |   18 +------
 extensions/23hq/actions.c                          |    1 +
 extensions/23hq/callbacks.c                        |    1 +
 extensions/bookmarks/actions.c                     |    1 +
 extensions/bookmarks/callbacks.c                   |    1 +
 extensions/bookmarks/dlg-bookmarks.c               |    1 +
 extensions/burn_disc/actions.c                     |    1 +
 extensions/burn_disc/callbacks.c                   |    1 +
 extensions/cairo_io/Makefile.am                    |    2 +-
 extensions/cairo_io/cairo-image-surface-svg.c      |    2 +-
 extensions/cairo_io/cairo-image-surface-xcf.c      |   10 ++--
 extensions/catalogs/actions.c                      |    1 +
 extensions/catalogs/callbacks.c                    |    1 +
 extensions/catalogs/callbacks.h                    |    4 +-
 extensions/catalogs/dlg-add-to-catalog.c           |    1 +
 extensions/change_date/actions.c                   |    1 +
 extensions/change_date/callbacks.c                 |    1 +
 extensions/change_date/dlg-change-date.c           |    1 +
 extensions/comments/actions.c                      |    1 +
 extensions/comments/callbacks.c                    |    1 +
 extensions/comments/dlg-comments-preferences.c     |    9 ++--
 extensions/contact_sheet/Makefile.am               |    2 +-
 extensions/contact_sheet/actions.c                 |    1 +
 extensions/contact_sheet/callbacks.c               |    1 +
 .../contact_sheet/gth-contact-sheet-theme-dialog.c |    2 +-
 extensions/convert_format/actions.c                |    1 +
 extensions/convert_format/callbacks.c              |    1 +
 extensions/desktop_background/actions.c            |    9 +---
 extensions/desktop_background/callbacks.c          |    1 +
 extensions/edit_metadata/actions.c                 |    1 +
 extensions/edit_metadata/callbacks.c               |    1 +
 extensions/edit_metadata/gth-edit-general-page.c   |    6 +-
 extensions/exiv2_tools/gth-edit-iptc-page.c        |    6 +-
 extensions/facebook/actions.c                      |    1 +
 extensions/facebook/callbacks.c                    |    1 +
 extensions/facebook/facebook-photo.c               |    2 +
 extensions/file_manager/actions.c                  |    1 +
 extensions/file_manager/callbacks.h                |    1 +
 extensions/file_tools/Makefile.am                  |    2 +-
 extensions/file_tools/callbacks.c                  |    1 +
 extensions/file_tools/gth-file-tool-grayscale.c    |    3 +
 extensions/file_tools/gth-image-rotator.c          |    2 +
 extensions/find_duplicates/actions.c               |    1 +
 extensions/find_duplicates/gth-find-duplicates.c   |    2 +-
 extensions/flicker/actions.c                       |    1 +
 extensions/flicker/callbacks.c                     |    1 +
 extensions/flicker_utils/flickr-service.c          |    4 +-
 extensions/flicker_utils/main.c                    |    1 +
 extensions/gstreamer_tools/actions.c               |    1 +
 extensions/image_print/actions.c                   |    1 +
 extensions/image_print/callbacks.c                 |    1 +
 extensions/image_rotation/actions.c                |    1 +
 extensions/image_rotation/callbacks.c              |    1 +
 extensions/image_viewer/actions.c                  |    1 +
 extensions/image_viewer/gth-image-histogram.c      |    6 +-
 extensions/image_viewer/gth-image-viewer-page.c    |    1 +
 .../image_viewer/gth-metadata-provider-image.c     |    2 +-
 extensions/importer/Makefile.am                    |    2 +-
 extensions/jpeg_utils/jmemorydest.c                |    5 +-
 extensions/jpeg_utils/jmemorysrc.c                 |    1 +
 extensions/jpeg_utils/main.c                       |    1 +
 extensions/list_tools/actions.c                    |    1 +
 extensions/list_tools/gth-script.c                 |    2 +-
 extensions/map_view/gth-map-view.c                 |    6 +-
 extensions/oauth/main.c                            |    1 +
 extensions/oauth/oauth-service.c                   |    2 +-
 extensions/photo_importer/actions.c                |    1 +
 extensions/photo_importer/callbacks.c              |    1 +
 extensions/photobucket/actions.c                   |    1 +
 extensions/photobucket/callbacks.c                 |    1 +
 extensions/picasaweb/actions.c                     |    1 +
 extensions/picasaweb/callbacks.c                   |    1 +
 extensions/picasaweb/dlg-import-from-picasaweb.c   |    2 +-
 extensions/raw_files/main.c                        |    2 +
 extensions/rename_series/callbacks.c               |    1 +
 extensions/resize_images/actions.c                 |    1 +
 extensions/resize_images/callbacks.c               |    1 +
 extensions/search/actions.c                        |    1 +
 extensions/search/gth-search.c                     |   40 +++++++-------
 extensions/selections/actions.c                    |   57 ++++++++++---------
 extensions/selections/actions.h                    |    2 +-
 extensions/selections/callbacks.c                  |    3 +-
 extensions/slideshow/actions.c                     |    1 +
 extensions/webalbums/actions.c                     |    1 +
 extensions/webalbums/albumtheme.y                  |    2 +-
 extensions/webalbums/callbacks.c                   |    1 +
 gthumb/Makefile.am                                 |    2 +-
 gthumb/cairo-scale.c                               |   14 +++---
 gthumb/dlg-preferences-extensions.c                |    1 +
 gthumb/dlg-sort-order.c                            |   33 ++++++------
 gthumb/gio-utils.c                                 |   20 ++++----
 gthumb/glib-utils.c                                |    4 +-
 gthumb/gth-auto-paned.c                            |    2 +
 gthumb/gth-browser-actions-callbacks.c             |    3 +-
 gthumb/gth-extensions.c                            |    2 +-
 gthumb/gth-extensions.h                            |    7 +++
 gthumb/gth-file-properties.c                       |    6 +-
 gthumb/gth-file-store.c                            |   12 +----
 gthumb/gth-filter.c                                |    2 +-
 gthumb/gth-grid-view.c                             |    2 +-
 gthumb/gth-image-loader.c                          |    1 +
 gthumb/gth-progress-dialog.c                       |    3 +
 gthumb/gth-test-chain.c                            |    2 +-
 gthumb/gth-test.c                                  |   23 ++-------
 gthumb/gth-test.h                                  |    1 -
 gthumb/gth-user-dir.c                              |    2 +
 gthumb/main-migrate-catalogs.c                     |    1 +
 gthumb/main.c                                      |    4 ++
 108 files changed, 233 insertions(+), 187 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 557c103..fb5a191 100644
--- a/configure.ac
+++ b/configure.ac
@@ -320,23 +320,7 @@ fi
 
 dnl ===========================================================================
 
-WARN_CFLAGS="-Wall -Wcast-align -Wtype-limits -Wclobbered -Wempty-body -Wignored-qualifiers"
-
-for option in $WARN_CFLAGS; do
-       SAVE_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $option"
-       AC_MSG_CHECKING([whether gcc understands $option])
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[has_option=yes],[has_option=no])
-       if test x$has_option = xyes; then
-               WARNINGS="$WARNINGS $option"
-       fi
-       AC_MSG_RESULT($has_option)
-       CFLAGS="$SAVE_CFLAGS"
-       unset has_option
-       unset SAVE_CFLAGS
-done
-unset option
-CFLAGS="$CFLAGS $WARNINGS"
+CFLAGS="$CFLAGS $WARN_CFLAGS $WARN_CXXFLAGS"
 
 dnl ===========================================================================
 
diff --git a/extensions/23hq/actions.c b/extensions/23hq/actions.c
index 2b44d96..3463f43 100644
--- a/extensions/23hq/actions.c
+++ b/extensions/23hq/actions.c
@@ -25,6 +25,7 @@
 #include <gthumb.h>
 #include <extensions/flicker_utils/dlg-export-to-flickr.h>
 #include <extensions/flicker_utils/flickr-types.h>
+#include "actions.h"
 
 
 static FlickrServer www_23hq_com = {
diff --git a/extensions/23hq/callbacks.c b/extensions/23hq/callbacks.c
index 8c318a3..5ce99d7 100644
--- a/extensions/23hq/callbacks.c
+++ b/extensions/23hq/callbacks.c
@@ -26,6 +26,7 @@
 #include <gthumb.h>
 #include <extensions/export_tools/export-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/bookmarks/actions.c b/extensions/bookmarks/actions.c
index 137eaa3..f7b93ea 100644
--- a/extensions/bookmarks/actions.c
+++ b/extensions/bookmarks/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <gthumb.h>
 #include "dlg-bookmarks.h"
+#include "actions.h"
 
 
 void
diff --git a/extensions/bookmarks/callbacks.c b/extensions/bookmarks/callbacks.c
index 7734097..857f561 100644
--- a/extensions/bookmarks/callbacks.c
+++ b/extensions/bookmarks/callbacks.c
@@ -25,6 +25,7 @@
 #include <glib-object.h>
 #include <gthumb.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 #define BROWSER_DATA_KEY "bookmarks-browser-data"
diff --git a/extensions/bookmarks/dlg-bookmarks.c b/extensions/bookmarks/dlg-bookmarks.c
index a628ccf..df56a18 100644
--- a/extensions/bookmarks/dlg-bookmarks.c
+++ b/extensions/bookmarks/dlg-bookmarks.c
@@ -22,6 +22,7 @@
 #include <config.h>
 #include <gtk/gtk.h>
 #include <gthumb.h>
+#include "dlg-bookmarks.h"
 
 
 typedef struct {
diff --git a/extensions/burn_disc/actions.c b/extensions/burn_disc/actions.c
index 18a54d3..16e0335 100644
--- a/extensions/burn_disc/actions.c
+++ b/extensions/burn_disc/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "gth-burn-task.h"
 
 
diff --git a/extensions/burn_disc/callbacks.c b/extensions/burn_disc/callbacks.c
index 0e1f5ca..a095ab1 100644
--- a/extensions/burn_disc/callbacks.c
+++ b/extensions/burn_disc/callbacks.c
@@ -26,6 +26,7 @@
 #include <gthumb.h>
 #include <extensions/export_tools/export-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/cairo_io/Makefile.am b/extensions/cairo_io/Makefile.am
index efcdfcf..9d1c730 100644
--- a/extensions/cairo_io/Makefile.am
+++ b/extensions/cairo_io/Makefile.am
@@ -21,7 +21,7 @@ enum-types.h: $(HEADER_FILES)
 
 enum-types.c: $(HEADER_FILES)
        $(AM_V_GEN)( $(GLIB_MKENUMS) \
-               --fhead "#include <glib-object.h>\n" \
+               --fhead "#include <glib-object.h>\n#include \"enum-types.h\"\n" \
                --fprod "\n/* enumerations from \"@filename \" */\n#include \"@filename \"" \
                --vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) 
{\n    static const G Type@Value values[] = {" \
                --vprod "      { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
diff --git a/extensions/cairo_io/cairo-image-surface-svg.c b/extensions/cairo_io/cairo-image-surface-svg.c
index 7cf0a7b..ee07770 100644
--- a/extensions/cairo_io/cairo-image-surface-svg.c
+++ b/extensions/cairo_io/cairo-image-surface-svg.c
@@ -42,9 +42,9 @@ typedef struct {
 
 typedef GthImageClass GthImageSvgClass;
 
-
 static gpointer gth_image_svg_parent_class;
 
+GType gth_image_svg_get_type (void);
 
 G_DEFINE_TYPE (GthImageSvg, gth_image_svg, GTH_TYPE_IMAGE)
 
diff --git a/extensions/cairo_io/cairo-image-surface-xcf.c b/extensions/cairo_io/cairo-image-surface-xcf.c
index 24392c8..946ba9a 100644
--- a/extensions/cairo_io/cairo-image-surface-xcf.c
+++ b/extensions/cairo_io/cairo-image-surface-xcf.c
@@ -383,6 +383,7 @@ _cairo_image_surface_paint_layer (cairo_surface_t *image,
 
        mask_row = layer->alpha_mask + (y * layer_width) + x;
 
+       rand_gen = NULL;
        if (layer->mode == GIMP_LAYER_MODE_DISSOLVE)
                rand_gen = g_rand_new_with_seed (DISSOLVE_SEED);
 
@@ -988,6 +989,11 @@ _cairo_image_surface_create_from_xcf (GInputStream  *istream,
 
        performance (DEBUG_INFO, "end init");
 
+       compression = GIMP_COMPRESSION_RLE;
+       layers = NULL;
+       layer_offsets = NULL;
+       colormap = NULL;
+
        data_stream = g_data_input_stream_new (istream);
        g_data_input_stream_set_byte_order (data_stream, G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN);
 
@@ -1028,10 +1034,6 @@ _cairo_image_surface_create_from_xcf (GInputStream  *istream,
 
        /* properties */
 
-       compression = GIMP_COMPRESSION_RLE;
-       layers = NULL;
-       colormap = NULL;
-
        read_properties = TRUE;
        n_properties = 0;
        while (read_properties) {
diff --git a/extensions/catalogs/actions.c b/extensions/catalogs/actions.c
index dd6eee7..3f24644 100644
--- a/extensions/catalogs/actions.c
+++ b/extensions/catalogs/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <gthumb.h>
 #include <gth-catalog.h>
+#include "actions.h"
 #include "dlg-add-to-catalog.h"
 #include "dlg-catalog-properties.h"
 #include "gth-file-source-catalogs.h"
diff --git a/extensions/catalogs/callbacks.c b/extensions/catalogs/callbacks.c
index a1a7058..993b51f 100644
--- a/extensions/catalogs/callbacks.c
+++ b/extensions/catalogs/callbacks.c
@@ -29,6 +29,7 @@
 #include "dlg-organize-files.h"
 #include "gth-file-source-catalogs.h"
 #include "actions.h"
+#include "callbacks.h"
 
 
 #define BROWSER_DATA_KEY "catalogs-browser-data"
diff --git a/extensions/catalogs/callbacks.h b/extensions/catalogs/callbacks.h
index 622e7db..220870d 100644
--- a/extensions/catalogs/callbacks.h
+++ b/extensions/catalogs/callbacks.h
@@ -30,11 +30,11 @@ void catalogs__gth_browser_construct_cb                   (GthBrowser    *browse
 void catalogs__gth_browser_update_sensitivity_cb          (GthBrowser    *browser);
 void catalogs__gth_browser_folder_tree_popup_before_cb    (GthBrowser    *browser,
                                                           GthFileSource *file_source,
-                                                          GFile         *folder);
+                                                          GthFileData   *folder);
 GFile *      catalogs__command_line_files_cb              (GList         *files);
 GthCatalog * catalogs__gth_catalog_load_from_data_cb      (const void    *buffer);
 void         catalogs__gth_browser_load_location_after_cb (GthBrowser    *browser,
-                                                          GFile         *location,
+                                                          GthFileData   *location,
                                                           const GError  *error);
 void         catalogs__gth_browser_update_extra_widget_cb (GthBrowser    *browser);
 void         catalogs__gth_browser_file_renamed_cb        (GthBrowser    *browser,
diff --git a/extensions/catalogs/dlg-add-to-catalog.c b/extensions/catalogs/dlg-add-to-catalog.c
index b1d067f..b2543eb 100644
--- a/extensions/catalogs/dlg-add-to-catalog.c
+++ b/extensions/catalogs/dlg-add-to-catalog.c
@@ -21,6 +21,7 @@
 
 #include <config.h>
 #include <gthumb.h>
+#include "dlg-add-to-catalog.h"
 #include "gth-catalog.h"
 #include "gth-file-source-catalogs.h"
 
diff --git a/extensions/change_date/actions.c b/extensions/change_date/actions.c
index 429c4a5..2126b07 100644
--- a/extensions/change_date/actions.c
+++ b/extensions/change_date/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-change-date.h"
 
 
diff --git a/extensions/change_date/callbacks.c b/extensions/change_date/callbacks.c
index 114a907..131ea08 100644
--- a/extensions/change_date/callbacks.c
+++ b/extensions/change_date/callbacks.c
@@ -26,6 +26,7 @@
 #include <gthumb.h>
 #include <extensions/list_tools/list-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/change_date/dlg-change-date.c b/extensions/change_date/dlg-change-date.c
index 8091c11..3bcd7fc 100644
--- a/extensions/change_date/dlg-change-date.c
+++ b/extensions/change_date/dlg-change-date.c
@@ -22,6 +22,7 @@
 #include <config.h>
 #include <gtk/gtk.h>
 #include <gthumb.h>
+#include "dlg-change-date.h"
 #include "gth-change-date-task.h"
 #include "preferences.h"
 
diff --git a/extensions/comments/actions.c b/extensions/comments/actions.c
index fafcecf..a3e3c80 100644
--- a/extensions/comments/actions.c
+++ b/extensions/comments/actions.c
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "gth-import-metadata-task.h"
 
 
diff --git a/extensions/comments/callbacks.c b/extensions/comments/callbacks.c
index 524d544..0088534 100644
--- a/extensions/comments/callbacks.c
+++ b/extensions/comments/callbacks.c
@@ -27,6 +27,7 @@
 #include <gthumb.h>
 #include <extensions/list_tools/list-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/comments/dlg-comments-preferences.c b/extensions/comments/dlg-comments-preferences.c
index c37a5ad..4099945 100644
--- a/extensions/comments/dlg-comments-preferences.c
+++ b/extensions/comments/dlg-comments-preferences.c
@@ -22,6 +22,7 @@
 #include <config.h>
 #include <gtk/gtk.h>
 #include <gthumb.h>
+#include "dlg-comments-preferences.h"
 #include "preferences.h"
 
 
@@ -33,7 +34,7 @@ typedef struct {
 
 
 static void
-destroy_cb (GtkWidget  *widget, 
+destroy_cb (GtkWidget  *widget,
            DialogData *data)
 {
        g_object_unref (data->builder);
@@ -56,7 +57,7 @@ void
 dlg_comments_preferences (GtkWindow *parent)
 {
        DialogData *data;
-       
+
        data = g_new0 (DialogData, 1);
        data->builder = _gtk_builder_new_from_file ("comments-preferences.ui", "comments");
        data->settings = g_settings_new (GTHUMB_COMMENTS_SCHEMA);
@@ -71,8 +72,8 @@ dlg_comments_preferences (GtkWindow *parent)
                                      g_settings_get_boolean (data->settings, PREF_COMMENTS_SYNCHRONIZE));
 
        /* Set the signals handlers. */
-       
-       g_signal_connect (G_OBJECT (data->dialog), 
+
+       g_signal_connect (G_OBJECT (data->dialog),
                          "destroy",
                          G_CALLBACK (destroy_cb),
                          data);
diff --git a/extensions/contact_sheet/Makefile.am b/extensions/contact_sheet/Makefile.am
index e45dd22..d48be2a 100644
--- a/extensions/contact_sheet/Makefile.am
+++ b/extensions/contact_sheet/Makefile.am
@@ -29,7 +29,7 @@ enum-types.h: $(HEADER_FILES)
 
 enum-types.c: $(HEADER_FILES)
        $(AM_V_GEN)( $(GLIB_MKENUMS) \
-               --fhead "#include <glib-object.h>\n" \
+               --fhead "#include <glib-object.h>\n#include \"enum-types.h\"\n" \
                --fprod "\n/* enumerations from \"@filename \" */\n#include \"@filename \"" \
                --vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) 
{\n    static const G Type@Value values[] = {" \
                --vprod "      { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
diff --git a/extensions/contact_sheet/actions.c b/extensions/contact_sheet/actions.c
index 927f3c5..6e8734f 100644
--- a/extensions/contact_sheet/actions.c
+++ b/extensions/contact_sheet/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-contact-sheet.h"
 #include "dlg-image-wall.h"
 
diff --git a/extensions/contact_sheet/callbacks.c b/extensions/contact_sheet/callbacks.c
index 1200956..24873d7 100644
--- a/extensions/contact_sheet/callbacks.c
+++ b/extensions/contact_sheet/callbacks.c
@@ -26,6 +26,7 @@
 #include <gthumb.h>
 #include <extensions/export_tools/export-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/contact_sheet/gth-contact-sheet-theme-dialog.c 
b/extensions/contact_sheet/gth-contact-sheet-theme-dialog.c
index df6fc9f..9fd86e4 100644
--- a/extensions/contact_sheet/gth-contact-sheet-theme-dialog.c
+++ b/extensions/contact_sheet/gth-contact-sheet-theme-dialog.c
@@ -303,7 +303,7 @@ gth_contact_sheet_theme_dialog_init (GthContactSheetThemeDialog *self)
 }
 
 
-GthContactSheetTheme *
+static GthContactSheetTheme *
 _gth_contact_sheet_theme_new_default (void)
 {
        GthContactSheetTheme *theme;
diff --git a/extensions/convert_format/actions.c b/extensions/convert_format/actions.c
index 346607b..1964156 100644
--- a/extensions/convert_format/actions.c
+++ b/extensions/convert_format/actions.c
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-convert-format.h"
 
 
diff --git a/extensions/convert_format/callbacks.c b/extensions/convert_format/callbacks.c
index 166132f..2d53032 100644
--- a/extensions/convert_format/callbacks.c
+++ b/extensions/convert_format/callbacks.c
@@ -26,6 +26,7 @@
 #include <gthumb.h>
 #include <extensions/list_tools/list-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/desktop_background/actions.c b/extensions/desktop_background/actions.c
index 51652b4..ede9700 100644
--- a/extensions/desktop_background/actions.c
+++ b/extensions/desktop_background/actions.c
@@ -24,6 +24,7 @@
 #include <glib/gi18n.h>
 #include <gthumb.h>
 #include <extensions/image_viewer/gth-image-viewer-page.h>
+#include "actions.h"
 
 
 #define DESKTOP_BACKGROUND_PROPERTIES_COMMAND "gnome-control-center background"
@@ -361,11 +362,3 @@ gth_browser_activate_set_desktop_background (GSimpleAction *action,
        _g_object_list_unref (file_list);
        _gtk_tree_path_list_free (items);
 }
-
-
-void
-gth_browser_activate_action_tool_desktop_background (GtkAction  *action,
-                                                    GthBrowser *browser)
-{
-       gth_browser_activate_set_desktop_background (NULL, NULL, browser);
-}
diff --git a/extensions/desktop_background/callbacks.c b/extensions/desktop_background/callbacks.c
index 0f78b1d..720300c 100644
--- a/extensions/desktop_background/callbacks.c
+++ b/extensions/desktop_background/callbacks.c
@@ -25,6 +25,7 @@
 #include <glib-object.h>
 #include <gthumb.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/edit_metadata/actions.c b/extensions/edit_metadata/actions.c
index 6c954bd..ff3e1e5 100644
--- a/extensions/edit_metadata/actions.c
+++ b/extensions/edit_metadata/actions.c
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-edit-metadata.h"
 #include "gth-delete-metadata-task.h"
 #include "gth-edit-comment-dialog.h"
diff --git a/extensions/edit_metadata/callbacks.c b/extensions/edit_metadata/callbacks.c
index c6e9ff3..45b9f01 100644
--- a/extensions/edit_metadata/callbacks.c
+++ b/extensions/edit_metadata/callbacks.c
@@ -27,6 +27,7 @@
 #include <gthumb.h>
 #include <extensions/list_tools/list-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 #include "gth-tag-task.h"
 
 
diff --git a/extensions/edit_metadata/gth-edit-general-page.c 
b/extensions/edit_metadata/gth-edit-general-page.c
index 1985ca5..1f2c59e 100644
--- a/extensions/edit_metadata/gth-edit-general-page.c
+++ b/extensions/edit_metadata/gth-edit-general-page.c
@@ -61,7 +61,7 @@ G_DEFINE_TYPE_WITH_CODE (GthEditGeneralPage,
                                                gth_edit_general_page_gth_edit_general_page_interface_init))
 
 
-void
+static void
 gth_edit_general_page_real_set_file_list (GthEditCommentPage *base,
                                          GList              *file_list)
 {
@@ -280,7 +280,7 @@ get_date_from_option (GthEditGeneralPage *self,
 }
 
 
-void
+static void
 gth_edit_general_page_real_update_info (GthEditCommentPage *base,
                                        GFileInfo          *info,
                                        gboolean            only_modified_fields)
@@ -475,7 +475,7 @@ gth_edit_general_page_real_update_info (GthEditCommentPage *base,
 }
 
 
-const char *
+static const char *
 gth_edit_general_page_real_get_name (GthEditCommentPage *self)
 {
        return _("General");
diff --git a/extensions/exiv2_tools/gth-edit-iptc-page.c b/extensions/exiv2_tools/gth-edit-iptc-page.c
index 9d1d7c4..066b784 100644
--- a/extensions/exiv2_tools/gth-edit-iptc-page.c
+++ b/extensions/exiv2_tools/gth-edit-iptc-page.c
@@ -63,7 +63,7 @@ set_entry_value (GthEditIptcPage *self,
 }
 
 
-void
+static void
 gth_edit_iptc_page_real_set_file_list (GthEditCommentPage *base,
                                        GList              *file_data_list)
 {
@@ -141,7 +141,7 @@ set_attribute_from_entry (GthEditIptcPage *self,
 }
 
 
-void
+static void
 gth_edit_iptc_page_real_update_info (GthEditCommentPage *base,
                                      GFileInfo          *info,
                                      gboolean            only_modified_fields)
@@ -192,7 +192,7 @@ gth_edit_iptc_page_real_update_info (GthEditCommentPage *base,
 }
 
 
-const char *
+static const char *
 gth_edit_iptc_page_real_get_name (GthEditCommentPage *self)
 {
        return _("Other");
diff --git a/extensions/facebook/actions.c b/extensions/facebook/actions.c
index 8cf8140..dfff6b4 100644
--- a/extensions/facebook/actions.c
+++ b/extensions/facebook/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-export-to-facebook.h"
 #include "dlg-import-from-facebook.h"
 
diff --git a/extensions/facebook/callbacks.c b/extensions/facebook/callbacks.c
index ef95377..6877e0e 100644
--- a/extensions/facebook/callbacks.c
+++ b/extensions/facebook/callbacks.c
@@ -27,6 +27,7 @@
 #include <extensions/export_tools/export-tools.h>
 #include <extensions/photo_importer/photo-importer.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/facebook/facebook-photo.c b/extensions/facebook/facebook-photo.c
index 4f75b7a..0279c24 100644
--- a/extensions/facebook/facebook-photo.c
+++ b/extensions/facebook/facebook-photo.c
@@ -111,6 +111,8 @@ facebook_image_list_free (GList *images)
 }
 
 
+GType facebook_image_list_get_type (void);
+
 G_DEFINE_BOXED_TYPE (GList, facebook_image_list, facebook_image_list_copy, facebook_image_list_free)
 
 
diff --git a/extensions/file_manager/actions.c b/extensions/file_manager/actions.c
index e2542e4..d24a3dc 100644
--- a/extensions/file_manager/actions.c
+++ b/extensions/file_manager/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "gth-copy-task.h"
 #include "gth-delete-task.h"
 #include "gth-duplicate-task.h"
diff --git a/extensions/file_manager/callbacks.h b/extensions/file_manager/callbacks.h
index 7c6dfbc..21a8cab 100644
--- a/extensions/file_manager/callbacks.h
+++ b/extensions/file_manager/callbacks.h
@@ -37,6 +37,7 @@ void      fm__gth_browser_folder_tree_drag_data_received_cb (GthBrowser    *brow
                                                             GthFileData   *destination,
                                                             GList         *file_list,
                                                             GdkDragAction  action);
+void      fm__gth_browser_folder_tree_selection_changed_cb  (GthBrowser    *browser);
 void      fm__gth_browser_selection_changed_cb              (GthBrowser    *browser);
 void      fm__gth_browser_realize_cb                        (GthBrowser    *browser);
 void      fm__gth_browser_unrealize_cb                      (GthBrowser    *browser);
diff --git a/extensions/file_tools/Makefile.am b/extensions/file_tools/Makefile.am
index 9138583..6626529 100644
--- a/extensions/file_tools/Makefile.am
+++ b/extensions/file_tools/Makefile.am
@@ -44,7 +44,7 @@ enum-types.h: $(HEADER_FILES)
 
 enum-types.c: $(HEADER_FILES)
        $(AM_V_GEN)( $(GLIB_MKENUMS) \
-               --fhead "#include <glib-object.h>\n" \
+               --fhead "#include <glib-object.h>\n#include \"enum-types.h\"\n" \
                --fprod "\n/* enumerations from \"@filename \" */\n#include \"@filename \"" \
                --vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) 
{\n    static const G Type@Value values[] = {" \
                --vprod "      { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
diff --git a/extensions/file_tools/callbacks.c b/extensions/file_tools/callbacks.c
index 68d11c4..54d0764 100644
--- a/extensions/file_tools/callbacks.c
+++ b/extensions/file_tools/callbacks.c
@@ -26,6 +26,7 @@
 #include <gdk/gdkkeysyms.h>
 #include <gthumb.h>
 #include <extensions/image_viewer/gth-image-viewer-page.h>
+#include "callbacks.h"
 #include "gth-file-tool-adjust-contrast.h"
 #include "gth-file-tool-crop.h"
 #include "gth-file-tool-flip.h"
diff --git a/extensions/file_tools/gth-file-tool-grayscale.c b/extensions/file_tools/gth-file-tool-grayscale.c
index 4af065a..6361d0b 100644
--- a/extensions/file_tools/gth-file-tool-grayscale.c
+++ b/extensions/file_tools/gth-file-tool-grayscale.c
@@ -125,6 +125,9 @@ grayscale_exec (GthAsyncTask *task,
                        case METHOD_AVARAGE:
                                value = (0.3333 * red + 0.3333 * green + 0.3333 * blue);
                                break;
+
+                       default:
+                               g_assert_not_reached ();
                        }
 
                        CAIRO_SET_RGBA (p_destination,
diff --git a/extensions/file_tools/gth-image-rotator.c b/extensions/file_tools/gth-image-rotator.c
index c4a7c7b..b596d3e 100644
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@ -328,6 +328,8 @@ paint_darker_background (GthImageRotator *self,
                allocation.width /= self->priv->preview_zoom;
                allocation.height /= self->priv->preview_zoom;
                break;
+       default:
+               g_assert_not_reached ();
        }
 
        /* left side */
diff --git a/extensions/find_duplicates/actions.c b/extensions/find_duplicates/actions.c
index d55c779..877c87a 100644
--- a/extensions/find_duplicates/actions.c
+++ b/extensions/find_duplicates/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-find-duplicates.h"
 
 
diff --git a/extensions/find_duplicates/gth-find-duplicates.c 
b/extensions/find_duplicates/gth-find-duplicates.c
index 8069b3c..4a6e073 100644
--- a/extensions/find_duplicates/gth-find-duplicates.c
+++ b/extensions/find_duplicates/gth-find-duplicates.c
@@ -809,7 +809,7 @@ start_dir_func (GFile      *directory,
 }
 
 
-gboolean
+static gboolean
 pulse_progressbar_cb (gpointer user_data)
 {
        GthFindDuplicates *self = user_data;
diff --git a/extensions/flicker/actions.c b/extensions/flicker/actions.c
index b659906..4b9124e 100644
--- a/extensions/flicker/actions.c
+++ b/extensions/flicker/actions.c
@@ -26,6 +26,7 @@
 #include <extensions/flicker_utils/dlg-export-to-flickr.h>
 #include <extensions/flicker_utils/dlg-import-from-flickr.h>
 #include <extensions/flicker_utils/flickr-types.h>
+#include "actions.h"
 
 
 static FlickrServer www_flickr_com = {
diff --git a/extensions/flicker/callbacks.c b/extensions/flicker/callbacks.c
index c2886fa..16f1791 100644
--- a/extensions/flicker/callbacks.c
+++ b/extensions/flicker/callbacks.c
@@ -27,6 +27,7 @@
 #include <extensions/export_tools/export-tools.h>
 #include <extensions/photo_importer/photo-importer.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/flicker_utils/flickr-service.c b/extensions/flicker_utils/flickr-service.c
index 4578293..fece01f 100644
--- a/extensions/flicker_utils/flickr-service.c
+++ b/extensions/flicker_utils/flickr-service.c
@@ -251,7 +251,7 @@ flickr_service_old_auth_get_frob_ready_cb (SoupSession *session,
 }
 
 
-void
+static void
 flickr_service_old_auth_get_frob (FlickrService       *self,
                                  GCancellable        *cancellable,
                                  GAsyncReadyCallback  callback,
@@ -420,7 +420,7 @@ old_auth_get_access_type_name (WebAuthorization access_type)
 }
 
 
-char *
+static char *
 flickr_service_old_auth_get_login_link (FlickrService    *self,
                                        WebAuthorization  access_type)
 {
diff --git a/extensions/flicker_utils/main.c b/extensions/flicker_utils/main.c
index 1d8f4a4..65fc44c 100644
--- a/extensions/flicker_utils/main.c
+++ b/extensions/flicker_utils/main.c
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <gtk/gtk.h>
+#include <gthumb.h>
 
 
 G_MODULE_EXPORT void
diff --git a/extensions/gstreamer_tools/actions.c b/extensions/gstreamer_tools/actions.c
index 327547a..68220aa 100644
--- a/extensions/gstreamer_tools/actions.c
+++ b/extensions/gstreamer_tools/actions.c
@@ -25,6 +25,7 @@
 #include <gst/gst.h>
 #include <gthumb.h>
 #include <extensions/gstreamer_utils/gstreamer-utils.h>
+#include "actions.h"
 #include "gth-media-viewer-page.h"
 #include "preferences.h"
 
diff --git a/extensions/image_print/actions.c b/extensions/image_print/actions.c
index 2803964..ed6ecfe 100644
--- a/extensions/image_print/actions.c
+++ b/extensions/image_print/actions.c
@@ -24,6 +24,7 @@
 #include <glib/gi18n.h>
 #include <gthumb.h>
 #include <extensions/image_viewer/gth-image-viewer-page.h>
+#include "actions.h"
 #include "gth-image-print-job.h"
 
 
diff --git a/extensions/image_print/callbacks.c b/extensions/image_print/callbacks.c
index 63d31e2..90a1913 100644
--- a/extensions/image_print/callbacks.c
+++ b/extensions/image_print/callbacks.c
@@ -26,6 +26,7 @@
 #include <gdk/gdkkeysyms.h>
 #include <gthumb.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/image_rotation/actions.c b/extensions/image_rotation/actions.c
index fb75e33..7fcafac 100644
--- a/extensions/image_rotation/actions.c
+++ b/extensions/image_rotation/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "gth-reset-orientation-task.h"
 #include "gth-transform-task.h"
 
diff --git a/extensions/image_rotation/callbacks.c b/extensions/image_rotation/callbacks.c
index 73970a5..334a2c3 100644
--- a/extensions/image_rotation/callbacks.c
+++ b/extensions/image_rotation/callbacks.c
@@ -28,6 +28,7 @@
 #include <extensions/image_viewer/image-viewer.h>
 #include <extensions/list_tools/list-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 #define BROWSER_DATA_KEY "image-rotation-browser-data"
diff --git a/extensions/image_viewer/actions.c b/extensions/image_viewer/actions.c
index d4e9a6a..1b80801 100644
--- a/extensions/image_viewer/actions.c
+++ b/extensions/image_viewer/actions.c
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "gth-image-viewer-page.h"
 
 
diff --git a/extensions/image_viewer/gth-image-histogram.c b/extensions/image_viewer/gth-image-histogram.c
index a4665e7..7798f80 100644
--- a/extensions/image_viewer/gth-image-histogram.c
+++ b/extensions/image_viewer/gth-image-histogram.c
@@ -49,7 +49,7 @@ struct _GthImageHistogramPrivate {
 };
 
 
-void
+static void
 gth_image_histogram_real_set_file (GthPropertyView *base,
                                   GthFileData     *file_data)
 {
@@ -78,14 +78,14 @@ gth_image_histogram_real_set_file (GthPropertyView *base,
 }
 
 
-const char *
+static const char *
 gth_image_histogram_real_get_name (GthMultipageChild *self)
 {
        return _("Histogram");
 }
 
 
-const char *
+static const char *
 gth_image_histogram_real_get_icon (GthMultipageChild *self)
 {
        return "histogram-symbolic";
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index 7adbab8..74248ea 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -1940,6 +1940,7 @@ struct _GthOriginalImageTaskClass {
        GthImageTaskClass __parent;
 };
 
+GType gth_original_image_task_get_type (void);
 
 G_DEFINE_TYPE (GthOriginalImageTask, gth_original_image_task, GTH_TYPE_IMAGE_TASK)
 
diff --git a/extensions/image_viewer/gth-metadata-provider-image.c 
b/extensions/image_viewer/gth-metadata-provider-image.c
index 438919a..1c077bc 100644
--- a/extensions/image_viewer/gth-metadata-provider-image.c
+++ b/extensions/image_viewer/gth-metadata-provider-image.c
@@ -62,7 +62,7 @@ gth_metadata_provider_image_read (GthMetadataProvider *self,
 {
        gboolean          format_recognized;
        GFileInputStream *stream;
-       char             *description;
+       char             *description = NULL;
        int               width;
        int               height;
        const char       *mime_type = NULL;
diff --git a/extensions/importer/Makefile.am b/extensions/importer/Makefile.am
index 828f56a..67aded0 100644
--- a/extensions/importer/Makefile.am
+++ b/extensions/importer/Makefile.am
@@ -25,7 +25,7 @@ gth-import-enum-types.h: $(HEADER_FILES)
 
 gth-import-enum-types.c: $(HEADER_FILES)
        $(AM_V_GEN)( $(GLIB_MKENUMS) \
-               --fhead "#include <glib-object.h>\n" \
+               --fhead "#include <glib-object.h>\n#include \"gth-import-enum-types.h\"\n" \
                --fprod "\n/* enumerations from \"@filename \" */\n#include \"@filename \"" \
                --vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) 
{\n    static const G Type@Value values[] = {" \
                --vprod "      { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
diff --git a/extensions/jpeg_utils/jmemorydest.c b/extensions/jpeg_utils/jmemorydest.c
index 0d522cb..6903b94 100644
--- a/extensions/jpeg_utils/jmemorydest.c
+++ b/extensions/jpeg_utils/jmemorydest.c
@@ -26,6 +26,7 @@
 #include <jpeglib.h>
 #include <glib.h>
 #include <gio/gio.h>
+#include "jmemorydest.h"
 
 
 #define TMP_BUF_SIZE  4096
@@ -37,7 +38,7 @@
 typedef struct {
        struct jpeg_destination_mgr pub;
 
-       void   **out_buffer;
+       guchar **out_buffer;
        gsize   *out_buffer_size;
        gsize    bytes_written;
        JOCTET  *tmp_buffer;
@@ -122,7 +123,7 @@ _jpeg_memory_dest (j_compress_ptr   cinfo,
        dest->pub.init_destination = init_destination;
        dest->pub.empty_output_buffer = empty_output_buffer;
        dest->pub.term_destination = term_destination;
-       dest->out_buffer = out_buffer;
+       dest->out_buffer = (guchar **) out_buffer;
        dest->out_buffer_size = out_buffer_size;
        dest->bytes_written = 0;
 }
diff --git a/extensions/jpeg_utils/jmemorysrc.c b/extensions/jpeg_utils/jmemorysrc.c
index 58205d5..3b01e00 100644
--- a/extensions/jpeg_utils/jmemorysrc.c
+++ b/extensions/jpeg_utils/jmemorysrc.c
@@ -26,6 +26,7 @@
 #include <jpeglib.h>
 #include <glib.h>
 #include <gio/gio.h>
+#include "jmemorysrc.h"
 
 
 #define JPEG_ERROR(cinfo,code)  \
diff --git a/extensions/jpeg_utils/main.c b/extensions/jpeg_utils/main.c
index c8eb195..4907813 100644
--- a/extensions/jpeg_utils/main.c
+++ b/extensions/jpeg_utils/main.c
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <gtk/gtk.h>
+#include <gthumb.h>
 
 
 G_MODULE_EXPORT void
diff --git a/extensions/list_tools/actions.c b/extensions/list_tools/actions.c
index ceff9dc..f321d49 100644
--- a/extensions/list_tools/actions.c
+++ b/extensions/list_tools/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-personalize-scripts.h"
 #include "gth-script.h"
 #include "gth-script-file.h"
diff --git a/extensions/list_tools/gth-script.c b/extensions/list_tools/gth-script.c
index a265284..1e8bb88 100644
--- a/extensions/list_tools/gth-script.c
+++ b/extensions/list_tools/gth-script.c
@@ -121,7 +121,7 @@ gth_script_real_load_from_element (DomDomizable *base,
 }
 
 
-GObject *
+static GObject *
 gth_script_real_duplicate (GthDuplicable *duplicable)
 {
        GthScript *script = GTH_SCRIPT (duplicable);
diff --git a/extensions/map_view/gth-map-view.c b/extensions/map_view/gth-map-view.c
index 99c827e..f492b6e 100644
--- a/extensions/map_view/gth-map-view.c
+++ b/extensions/map_view/gth-map-view.c
@@ -138,7 +138,7 @@ decimal_coordinates_to_string (double latitude,
 }
 
 
-void
+static void
 gth_map_view_real_set_file (GthPropertyView *base,
                            GthFileData     *file_data)
 {
@@ -199,14 +199,14 @@ gth_map_view_real_set_file (GthPropertyView *base,
 }
 
 
-const char *
+static const char *
 gth_map_view_real_get_name (GthMultipageChild *self)
 {
        return _("Map");
 }
 
 
-const char *
+static const char *
 gth_map_view_real_get_icon (GthMultipageChild *self)
 {
        return "map-symbolic";
diff --git a/extensions/oauth/main.c b/extensions/oauth/main.c
index 1d8f4a4..65fc44c 100644
--- a/extensions/oauth/main.c
+++ b/extensions/oauth/main.c
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <gtk/gtk.h>
+#include <gthumb.h>
 
 
 G_MODULE_EXPORT void
diff --git a/extensions/oauth/oauth-service.c b/extensions/oauth/oauth-service.c
index c6a57ba..ce07826 100644
--- a/extensions/oauth/oauth-service.c
+++ b/extensions/oauth/oauth-service.c
@@ -188,7 +188,7 @@ _oauth_service_get_request_token (OAuthService        *self,
 }
 
 
-gboolean
+static gboolean
 oauth_service_get_request_token_finish (OAuthService  *self,
                                        GAsyncResult  *result,
                                        GError       **error)
diff --git a/extensions/photo_importer/actions.c b/extensions/photo_importer/actions.c
index 56054bc..42788b8 100644
--- a/extensions/photo_importer/actions.c
+++ b/extensions/photo_importer/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-photo-importer.h"
 
 
diff --git a/extensions/photo_importer/callbacks.c b/extensions/photo_importer/callbacks.c
index 9bdc33c..f160a9c 100644
--- a/extensions/photo_importer/callbacks.c
+++ b/extensions/photo_importer/callbacks.c
@@ -25,6 +25,7 @@
 #include <glib-object.h>
 #include <gthumb.h>
 #include "actions.h"
+#include "callbacks.h"
 #include "dlg-photo-importer.h"
 #include "photo-importer.h"
 #include "preferences.h"
diff --git a/extensions/photobucket/actions.c b/extensions/photobucket/actions.c
index 983bfc9..f5b36f5 100644
--- a/extensions/photobucket/actions.c
+++ b/extensions/photobucket/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-export-to-photobucket.h"
 
 
diff --git a/extensions/photobucket/callbacks.c b/extensions/photobucket/callbacks.c
index 182214a..6aaac65 100644
--- a/extensions/photobucket/callbacks.c
+++ b/extensions/photobucket/callbacks.c
@@ -27,6 +27,7 @@
 #include <extensions/export_tools/export-tools.h>
 #include <extensions/photo_importer/photo-importer.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/picasaweb/actions.c b/extensions/picasaweb/actions.c
index 36900f8..f2ef73c 100644
--- a/extensions/picasaweb/actions.c
+++ b/extensions/picasaweb/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-export-to-picasaweb.h"
 #include "dlg-import-from-picasaweb.h"
 
diff --git a/extensions/picasaweb/callbacks.c b/extensions/picasaweb/callbacks.c
index 43374b3..9e184ba 100644
--- a/extensions/picasaweb/callbacks.c
+++ b/extensions/picasaweb/callbacks.c
@@ -27,6 +27,7 @@
 #include <extensions/export_tools/export-tools.h>
 #include <extensions/photo_importer/photo-importer.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/picasaweb/dlg-import-from-picasaweb.c 
b/extensions/picasaweb/dlg-import-from-picasaweb.c
index 6114fa8..47c29c8 100644
--- a/extensions/picasaweb/dlg-import-from-picasaweb.c
+++ b/extensions/picasaweb/dlg-import-from-picasaweb.c
@@ -331,7 +331,7 @@ album_combobox_changed_cb (GtkComboBox *widget,
 }
 
 
-GthImage *
+static GthImage *
 picasa_web_thumbnail_loader (GInputStream  *istream,
                             GthFileData   *file_data,
                             int            requested_size,
diff --git a/extensions/raw_files/main.c b/extensions/raw_files/main.c
index abb804c..00a4c77 100644
--- a/extensions/raw_files/main.c
+++ b/extensions/raw_files/main.c
@@ -144,6 +144,8 @@ _cairo_surface_create_from_ppm (int     width,
                        case 1:
                                pixel = CAIRO_RGBA_TO_UINT32 (buffer_p[0], buffer_p[0], buffer_p[0], 0xff);
                                break;
+                       default:
+                               g_assert_not_reached ();
                        }
 
                        memcpy (column, &pixel, sizeof (guint32));
diff --git a/extensions/rename_series/callbacks.c b/extensions/rename_series/callbacks.c
index d28e552..63da102 100644
--- a/extensions/rename_series/callbacks.c
+++ b/extensions/rename_series/callbacks.c
@@ -24,6 +24,7 @@
 #include <glib/gi18n.h>
 #include <glib-object.h>
 #include <gthumb.h>
+#include "callbacks.h"
 #include "dlg-rename-series.h"
 
 
diff --git a/extensions/resize_images/actions.c b/extensions/resize_images/actions.c
index 25d7e41..01d263d 100644
--- a/extensions/resize_images/actions.c
+++ b/extensions/resize_images/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-resize-images.h"
 
 
diff --git a/extensions/resize_images/callbacks.c b/extensions/resize_images/callbacks.c
index 402050f..3a52946 100644
--- a/extensions/resize_images/callbacks.c
+++ b/extensions/resize_images/callbacks.c
@@ -26,6 +26,7 @@
 #include <gthumb.h>
 #include <extensions/list_tools/list-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/extensions/search/actions.c b/extensions/search/actions.c
index 8317cd5..b7967f5 100644
--- a/extensions/search/actions.c
+++ b/extensions/search/actions.c
@@ -24,6 +24,7 @@
 #include <glib/gi18n.h>
 #include <gthumb.h>
 #include <extensions/catalogs/gth-catalog.h>
+#include "actions.h"
 #include "gth-search-editor-dialog.h"
 #include "gth-search-task.h"
 
diff --git a/extensions/search/gth-search.c b/extensions/search/gth-search.c
index 7c45756..7d1dd09 100644
--- a/extensions/search/gth-search.c
+++ b/extensions/search/gth-search.c
@@ -44,7 +44,7 @@ G_DEFINE_TYPE_WITH_CODE (GthSearch,
 struct _GthSearchPrivate {
        GFile        *folder;
        gboolean      recursive;
-       GthTestChain *test;     
+       GthTestChain *test;
 };
 
 
@@ -131,13 +131,13 @@ gth_search_real_create_element (DomDomizable *base,
 {
        GthSearch  *self;
        DomElement *element;
-       
+
        g_return_val_if_fail (DOM_IS_DOCUMENT (doc), NULL);
 
        self = GTH_SEARCH (base);
        element = gth_search_create_root (GTH_CATALOG (self), doc);
        gth_search_write_to_doc (GTH_CATALOG (self), doc, element);
-       
+
        return element;
 }
 
@@ -150,7 +150,7 @@ gth_search_real_load_from_element (DomDomizable *base,
 }
 
 
-GObject *
+static GObject *
 gth_search_real_duplicate (GthDuplicable *duplicable)
 {
        GthSearch *search = GTH_SEARCH (duplicable);
@@ -160,22 +160,22 @@ gth_search_real_duplicate (GthDuplicable *duplicable)
        GList     *scan;
 
        new_search = gth_search_new ();
-       
+
        gth_search_set_folder (new_search, gth_search_get_folder (search));
        gth_search_set_recursive (new_search, gth_search_is_recursive (search));
-       
+
        if (search->priv->test != NULL)
                new_search->priv->test = (GthTestChain*) gth_duplicable_duplicate (GTH_DUPLICABLE 
(search->priv->test));
 
        file_list = gth_catalog_get_file_list (GTH_CATALOG (search));
        for (scan = file_list; scan; scan = scan->next) {
-               GFile *file = scan->data;               
+               GFile *file = scan->data;
                new_file_list = g_list_prepend (new_file_list, g_file_dup (file));
        }
        gth_catalog_set_file_list (GTH_CATALOG (new_search), new_file_list);
-       
+
        _g_object_list_unref (new_file_list);
-       
+
        return (GObject *) new_search;
 }
 
@@ -205,10 +205,10 @@ gth_search_class_init (GthSearchClass *class)
 {
        GObjectClass    *object_class;
        GthCatalogClass *catalog_class;
-       
+
        object_class = G_OBJECT_CLASS (class);
        object_class->finalize = gth_search_finalize;
-       
+
        catalog_class = GTH_CATALOG_CLASS (class);
        catalog_class->create_root = gth_search_create_root;
        catalog_class->read_from_doc = gth_search_read_from_doc;
@@ -248,29 +248,29 @@ gth_search_new (void)
 
 
 GthSearch*
-gth_search_new_from_data (void    *buffer, 
+gth_search_new_from_data (void    *buffer,
                          gsize    count,
                          GError **error)
 {
        DomDocument *doc;
        DomElement  *root;
        GthSearch   *search;
-                       
+
        doc = dom_document_new ();
-       if (! dom_document_load (doc, (const char *) buffer, count, error)) 
+       if (! dom_document_load (doc, (const char *) buffer, count, error))
                return NULL;
-       
+
        root = DOM_ELEMENT (doc)->first_child;
        if (g_strcmp0 (root->tag_name, "search") != 0) {
                *error = g_error_new_literal (DOM_ERROR, DOM_ERROR_INVALID_FORMAT, _("Invalid file format"));
                return NULL;
        }
-       
+
        search = gth_search_new ();
        dom_domizable_load_from_element (DOM_DOMIZABLE (search), root);
-       
+
        g_object_unref (doc);
-       
+
        return search;
 }
 
@@ -283,7 +283,7 @@ gth_search_set_folder (GthSearch *search,
                g_object_unref (search->priv->folder);
                search->priv->folder = NULL;
        }
-       
+
        if (folder != NULL)
                search->priv->folder = g_object_ref (folder);
 }
@@ -321,7 +321,7 @@ gth_search_set_test (GthSearch    *search,
                g_object_unref (search->priv->test);
                search->priv->test = NULL;
        }
-       if (test != NULL) 
+       if (test != NULL)
                search->priv->test = g_object_ref (test);
 }
 
diff --git a/extensions/selections/actions.c b/extensions/selections/actions.c
index d3ff0ab..f01eb21 100644
--- a/extensions/selections/actions.c
+++ b/extensions/selections/actions.c
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "gth-selections-manager.h"
 
 
@@ -69,8 +70,8 @@ gth_browser_activate_go_to_selection_2 (GSimpleAction *action,
 
 void
 gth_browser_activate_go_to_selection_3 (GSimpleAction   *action,
-                                    GVariant            *parameter,
-                                    gpointer             user_data)
+                                       GVariant         *parameter,
+                                       gpointer          user_data)
 {
        gth_browser_activate_show_selection (GTH_BROWSER (user_data), 3);
 }
@@ -128,6 +129,33 @@ gth_browser_activate_add_to_selection_3 (GSimpleAction      *action,
 
 
 void
+gth_browser_activate_go_to_file_container (GSimpleAction *action,
+                                          GVariant      *parameter,
+                                          gpointer       user_data)
+{
+       GthBrowser *browser = user_data;
+       GList      *items;
+       GList      *file_list = NULL;
+
+       items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view 
(browser)));
+       file_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
+
+       if (file_list != NULL) {
+               GthFileData *first_file = file_list->data;
+               GFile       *parent;
+
+               parent = g_file_get_parent (first_file->file);
+               gth_browser_go_to (browser, parent, first_file->file);
+
+               g_object_unref (parent);
+       }
+
+       _g_object_list_unref (file_list);
+       _gtk_tree_path_list_free (items);
+}
+
+
+void
 gth_browser_activate_remove_from_selection (GthBrowser *browser,
                                            int         n_selection)
 {
@@ -150,28 +178,3 @@ gth_browser_activate_remove_from_selection (GthBrowser *browser,
        g_object_unref (folder);
        g_free (uri);
 }
-
-
-void
-gth_browser_activate_go_to_file_container_from_selection (GthBrowser *browser,
-                                                         int         n_selection)
-{
-       GList *items;
-       GList *file_list = NULL;
-
-       items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view 
(browser)));
-       file_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
-
-       if (file_list != NULL) {
-               GthFileData *first_file = file_list->data;
-               GFile       *parent;
-
-               parent = g_file_get_parent (first_file->file);
-               gth_browser_go_to (browser, parent, first_file->file);
-
-               g_object_unref (parent);
-       }
-
-       _g_object_list_unref (file_list);
-       _gtk_tree_path_list_free (items);
-}
diff --git a/extensions/selections/actions.h b/extensions/selections/actions.h
index 0270d88..7924783 100644
--- a/extensions/selections/actions.h
+++ b/extensions/selections/actions.h
@@ -37,6 +37,6 @@ DEF_ACTION_CALLBACK (gth_browser_activate_go_to_selection_3)
 DEF_ACTION_CALLBACK (gth_browser_activate_add_to_selection_1)
 DEF_ACTION_CALLBACK (gth_browser_activate_add_to_selection_2)
 DEF_ACTION_CALLBACK (gth_browser_activate_add_to_selection_3)
-DEF_ACTION_CALLBACK (gth_browser_activate_go_to_file_container_from_selection)
+DEF_ACTION_CALLBACK (gth_browser_activate_go_to_file_container)
 
 #endif /* ACTIONS_H */
diff --git a/extensions/selections/callbacks.c b/extensions/selections/callbacks.c
index 1a54fa2..0617499 100644
--- a/extensions/selections/callbacks.c
+++ b/extensions/selections/callbacks.c
@@ -25,6 +25,7 @@
 #include <glib-object.h>
 #include <gthumb.h>
 #include "actions.h"
+#include "callbacks.h"
 #include "gth-file-source-selections.h"
 #include "gth-selections-manager.h"
 
@@ -40,7 +41,7 @@ static const GActionEntry actions[] = {
        { "go-to-selection-1", gth_browser_activate_go_to_selection_1 },
        { "go-to-selection-2", gth_browser_activate_go_to_selection_2 },
        { "go-to-selection-3", gth_browser_activate_go_to_selection_3 },
-       { "go-to-file-container", gth_browser_activate_go_to_file_container_from_selection },
+       { "go-to-file-container", gth_browser_activate_go_to_file_container }
 };
 
 
diff --git a/extensions/slideshow/actions.c b/extensions/slideshow/actions.c
index d5e6d72..bd89921 100644
--- a/extensions/slideshow/actions.c
+++ b/extensions/slideshow/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "gth-slideshow.h"
 #include "gth-transition.h"
 #include "preferences.h"
diff --git a/extensions/webalbums/actions.c b/extensions/webalbums/actions.c
index 6e205a1..22caeab 100644
--- a/extensions/webalbums/actions.c
+++ b/extensions/webalbums/actions.c
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
+#include "actions.h"
 #include "dlg-web-exporter.h"
 
 
diff --git a/extensions/webalbums/albumtheme.y b/extensions/webalbums/albumtheme.y
index 446c9da..c340b06 100644
--- a/extensions/webalbums/albumtheme.y
+++ b/extensions/webalbums/albumtheme.y
@@ -25,7 +25,7 @@
 #include <gio/gio.h>
 #include "albumtheme-private.h"
 
-int   gth_albumtheme_yylex   ();
+int   gth_albumtheme_yylex   (void);
 void  gth_albumtheme_yyerror (const char *fmt, ...);
 int   gth_albumtheme_yywrap  (void);
 
diff --git a/extensions/webalbums/callbacks.c b/extensions/webalbums/callbacks.c
index eba55ef..daf3a3c 100644
--- a/extensions/webalbums/callbacks.c
+++ b/extensions/webalbums/callbacks.c
@@ -26,6 +26,7 @@
 #include <gthumb.h>
 #include <extensions/export_tools/export-tools.h>
 #include "actions.h"
+#include "callbacks.h"
 
 
 static const GActionEntry actions[] = {
diff --git a/gthumb/Makefile.am b/gthumb/Makefile.am
index 4618d0e..3665d5b 100644
--- a/gthumb/Makefile.am
+++ b/gthumb/Makefile.am
@@ -339,7 +339,7 @@ gth-enum-types.h: $(PUBLIC_HEADER_FILES)
 
 gth-enum-types.c: $(PUBLIC_HEADER_FILES)
        $(AM_V_GEN)( $(GLIB_MKENUMS) \
-               --fhead "#include <glib-object.h>\n" \
+               --fhead "#include <glib-object.h>\n#include <gth-enum-types.h>\n" \
                --fprod "\n/* enumerations from \"@filename \" */\n#include \"@filename \"" \
                --vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) 
{\n    static const G Type@Value values[] = {" \
                --vprod "      { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
diff --git a/gthumb/cairo-scale.c b/gthumb/cairo-scale.c
index de90637..2591de4 100644
--- a/gthumb/cairo-scale.c
+++ b/gthumb/cairo-scale.c
@@ -153,14 +153,14 @@ _cairo_image_surface_scale_nearest (cairo_surface_t *image,
  * */
 
 
-static ScaleReal inline
+inline static ScaleReal
 box (ScaleReal x)
 {
        return 1.0;
 }
 
 
-static ScaleReal inline
+inline static ScaleReal
 triangle (ScaleReal x)
 {
        return (x < 1.0) ? 1.0 - x : 0.0;
@@ -187,7 +187,7 @@ initialize_coefficients (ScaleReal B,
 }
 
 
-static ScaleReal inline
+inline static ScaleReal
 cubic (ScaleReal x)
 {
        if (x < 1.0)
@@ -198,7 +198,7 @@ cubic (ScaleReal x)
 }
 
 
-static ScaleReal inline
+inline static ScaleReal
 sinc_fast (ScaleReal x)
 {
        if (x > 4.0) {
@@ -238,7 +238,7 @@ sinc_fast (ScaleReal x)
 }
 
 
-static ScaleReal inline
+inline static ScaleReal
 mitchell_netravali (ScaleReal x)
 {
        ScaleReal xx;
@@ -309,14 +309,14 @@ resize_filter_create (GthAsyncTask *task)
 }
 
 
-static ScaleReal inline
+inline static ScaleReal
 resize_filter_get_support (resize_filter_t *resize_filter)
 {
        return resize_filter->support;
 }
 
 
-static ScaleReal inline
+inline static ScaleReal
 resize_filter_get_weight (resize_filter_t *resize_filter,
                          ScaleReal        distance)
 {
diff --git a/gthumb/dlg-preferences-extensions.c b/gthumb/dlg-preferences-extensions.c
index dfa6da5..8343c32 100644
--- a/gthumb/dlg-preferences-extensions.c
+++ b/gthumb/dlg-preferences-extensions.c
@@ -21,6 +21,7 @@
 
 #include <config.h>
 #include <gtk/gtk.h>
+#include "dlg-preferences-extensions.h"
 #include "glib-utils.h"
 #include "gth-browser.h"
 #include "gth-main.h"
diff --git a/gthumb/dlg-sort-order.c b/gthumb/dlg-sort-order.c
index 00d34e6..c97e6ea 100644
--- a/gthumb/dlg-sort-order.c
+++ b/gthumb/dlg-sort-order.c
@@ -21,6 +21,7 @@
 
 #include <config.h>
 #include <gtk/gtk.h>
+#include "dlg-sort-order.h"
 #include "gth-browser.h"
 #include "gth-main.h"
 #include "gtk-utils.h"
@@ -45,7 +46,7 @@ typedef struct {
 
 /* called when the main dialog is closed. */
 static void
-destroy_cb (GtkWidget  *widget, 
+destroy_cb (GtkWidget  *widget,
            DialogData *data)
 {
        gth_browser_set_dialog (data->browser, "sort-order", NULL);
@@ -61,13 +62,13 @@ apply_sort_order (GtkWidget  *widget,
        GtkTreeIter      iter;
        GtkTreeModel    *tree_model;
        GthFileDataSort *sort_type;
-       
+
        if (! gtk_combo_box_get_active_iter (GTK_COMBO_BOX (data->sort_by_combobox), &iter))
                return;
 
        tree_model = gtk_combo_box_get_model (GTK_COMBO_BOX (data->sort_by_combobox));
        gtk_tree_model_get (tree_model, &iter, SELECTION_COLUMN_DATA, &sort_type, -1);
-       
+
        gth_browser_set_sort_order (data->browser,
                                    sort_type,
                                    gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET 
("inverse_checkbutton"))));
@@ -86,7 +87,7 @@ dlg_sort_order (GthBrowser *browser)
        GthFileDataSort *current_sort_type;
        gboolean         sort_inverse;
        int              i, i_active;
-       
+
        if (gth_browser_get_dialog (browser, "sort-order") != NULL) {
                gtk_window_present (GTK_WINDOW (gth_browser_get_dialog (browser, "sort-order")));
                return;
@@ -94,7 +95,7 @@ dlg_sort_order (GthBrowser *browser)
 
        data = g_new0 (DialogData, 1);
        data->browser = browser;
-       data->builder = _gtk_builder_new_from_file ("sort-order.ui", NULL); 
+       data->builder = _gtk_builder_new_from_file ("sort-order.ui", NULL);
 
        /* Get the widgets. */
 
@@ -107,7 +108,7 @@ dlg_sort_order (GthBrowser *browser)
        selection_model = gtk_list_store_new (2, G_TYPE_POINTER, G_TYPE_STRING);
        data->sort_by_combobox = gtk_combo_box_new_with_model (GTK_TREE_MODEL (selection_model));
        g_object_unref (selection_model);
-       
+
        renderer = gtk_cell_renderer_text_new ();
        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (data->sort_by_combobox),
                                    renderer,
@@ -116,7 +117,7 @@ dlg_sort_order (GthBrowser *browser)
                                        renderer,
                                        "text", SELECTION_COLUMN_NAME,
                                        NULL);
-       
+
        file_data = gth_browser_get_location_data (data->browser);
        if (file_data != NULL) {
                current_sort_type = gth_main_get_sort_type (g_file_info_get_attribute_string 
(file_data->info, "sort::type"));
@@ -129,10 +130,10 @@ dlg_sort_order (GthBrowser *browser)
        for (i = 0, i_active = 0, scan = sort_types; scan; scan = scan->next, i++) {
                GthFileDataSort *sort_type = scan->data;
                GtkTreeIter      iter;
-               
+
                if (strcmp (sort_type->name, current_sort_type->name) == 0)
                        i_active = i;
-               
+
                gtk_list_store_append (selection_model, &iter);
                gtk_list_store_set (selection_model, &iter,
                                    SELECTION_COLUMN_DATA, sort_type,
@@ -151,27 +152,27 @@ dlg_sort_order (GthBrowser *browser)
        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("inverse_checkbutton")), sort_inverse);
 
        /* Set the signals handlers. */
-       
-       g_signal_connect (G_OBJECT (data->dialog), 
+
+       g_signal_connect (G_OBJECT (data->dialog),
                          "destroy",
                          G_CALLBACK (destroy_cb),
                          data);
-       g_signal_connect_swapped (GET_WIDGET ("close_button"), 
+       g_signal_connect_swapped (GET_WIDGET ("close_button"),
                                  "clicked",
                                  G_CALLBACK (gtk_widget_destroy),
                                  G_OBJECT (data->dialog));
-       g_signal_connect (GET_WIDGET ("inverse_checkbutton"), 
+       g_signal_connect (GET_WIDGET ("inverse_checkbutton"),
                          "toggled",
                          G_CALLBACK (apply_sort_order),
                          data);
-       g_signal_connect (data->sort_by_combobox, 
+       g_signal_connect (data->sort_by_combobox,
                          "changed",
                          G_CALLBACK (apply_sort_order),
                          data);
-                           
+
        /* run dialog. */
 
-       gtk_window_set_transient_for (GTK_WINDOW (data->dialog), 
+       gtk_window_set_transient_for (GTK_WINDOW (data->dialog),
                                      GTK_WINDOW (browser));
        gtk_window_set_modal (GTK_WINDOW (data->dialog), FALSE);
        gtk_widget_show (data->dialog);
diff --git a/gthumb/gio-utils.c b/gthumb/gio-utils.c
index f7ef655..bfd71e1 100644
--- a/gthumb/gio-utils.c
+++ b/gthumb/gio-utils.c
@@ -1056,7 +1056,7 @@ typedef struct {
 } DummyFileCopy;
 
 
-gboolean
+static gboolean
 _g_dummy_file_op_completed (gpointer data)
 {
        DummyFileCopy *dfd = data;
@@ -1941,7 +1941,7 @@ _g_input_stream_read_all (GInputStream  *istream,
                          GError       **error)
 {
        gboolean  retval = FALSE;
-       void     *local_buffer = NULL;
+       guchar   *local_buffer = NULL;
        char     *tmp_buffer;
        gsize     count;
        gssize    n;
@@ -2002,7 +2002,7 @@ typedef struct {
        gpointer             user_data;
        GInputStream        *stream;
        guchar               tmp_buffer[BUFFER_SIZE];
-       void                *buffer;
+       guchar              *buffer;
        gsize                count;
 } LoadData;
 
@@ -2028,14 +2028,14 @@ load_file__stream_read_cb (GObject      *source_object,
 
        count = g_input_stream_read_finish (load_data->stream, result, &error);
        if (count < 0) {
-               load_data->callback (&load_data->buffer, -1, error, load_data->user_data);
+               load_data->callback ((gpointer *) &load_data->buffer, -1, error, load_data->user_data);
                load_data_free (load_data);
                return;
        }
        else if (count == 0) {
                if (load_data->buffer != NULL)
                        ((char *)load_data->buffer)[load_data->count] = 0;
-               load_data->callback (&load_data->buffer, load_data->count, NULL, load_data->user_data);
+               load_data->callback ((gpointer *) &load_data->buffer, load_data->count, NULL, 
load_data->user_data);
                load_data_free (load_data);
                return;
        }
@@ -2064,7 +2064,7 @@ load_file__file_read_cb (GObject      *source_object,
 
        load_data->stream = (GInputStream *) g_file_read_finish (G_FILE (source_object), result, &error);
        if (load_data->stream == NULL) {
-               load_data->callback (&load_data->buffer, -1, error, load_data->user_data);
+               load_data->callback ((gpointer *) &load_data->buffer, -1, error, load_data->user_data);
                load_data_free (load_data);
                return;
        }
@@ -2107,7 +2107,7 @@ typedef struct {
        GCancellable        *cancellable;
        BufferReadyCallback  callback;
        gpointer             user_data;
-       void                *buffer;
+       guchar              *buffer;
        gsize                count;
        gsize                written;
        GError              *error;
@@ -2127,7 +2127,7 @@ write_file__notify (gpointer user_data)
 {
        WriteData *write_data = user_data;
 
-       write_data->callback (&write_data->buffer, write_data->count, write_data->error, 
write_data->user_data);
+       write_data->callback ((gpointer *) &write_data->buffer, write_data->count, write_data->error, 
write_data->user_data);
        write_data_free (write_data);
 }
 
@@ -2192,7 +2192,7 @@ write_file__replace_ready_cb (GObject      *source_object,
 
        stream = (GOutputStream*) g_file_replace_finish ((GFile*) source_object, result, &error);
        if (stream == NULL) {
-               write_data->callback (&write_data->buffer, write_data->count, error, write_data->user_data);
+               write_data->callback ((gpointer *) &write_data->buffer, write_data->count, error, 
write_data->user_data);
                write_data_free (write_data);
                return;
        }
@@ -2219,7 +2219,7 @@ write_file__create_ready_cb (GObject      *source_object,
 
        stream = (GOutputStream*) g_file_create_finish ((GFile*) source_object, result, &error);
        if (stream == NULL) {
-               write_data->callback (&write_data->buffer, write_data->count, error, write_data->user_data);
+               write_data->callback ((gpointer *) &write_data->buffer, write_data->count, error, 
write_data->user_data);
                write_data_free (write_data);
                return;
        }
diff --git a/gthumb/glib-utils.c b/gthumb/glib-utils.c
index aaff30b..c8e1079 100644
--- a/gthumb/glib-utils.c
+++ b/gthumb/glib-utils.c
@@ -2853,8 +2853,8 @@ _g_content_type_is_a (const char *type,
 
 
 static const char *
-get_mime_type_from_magic_numbers (void  *buffer,
-                                 gsize  buffer_size)
+get_mime_type_from_magic_numbers (guchar *buffer,
+                                 gsize   buffer_size)
 {
 #if ENABLE_MAGIC
 
diff --git a/gthumb/gth-auto-paned.c b/gthumb/gth-auto-paned.c
index 61ecd08..f14dc65 100644
--- a/gthumb/gth-auto-paned.c
+++ b/gthumb/gth-auto-paned.c
@@ -71,6 +71,8 @@ gth_auto_paned_size_allocate (GtkWidget     *widget,
                case GTK_ORIENTATION_VERTICAL:
                        position = allocation->height / 2;
                        break;
+               default:
+                       g_assert_not_reached ();
                }
                gtk_paned_set_position (GTK_PANED (self), position);
        }
diff --git a/gthumb/gth-browser-actions-callbacks.c b/gthumb/gth-browser-actions-callbacks.c
index bd71087..f2687f8 100644
--- a/gthumb/gth-browser-actions-callbacks.c
+++ b/gthumb/gth-browser-actions-callbacks.c
@@ -27,6 +27,7 @@
 #include "dlg-sort-order.h"
 #include "glib-utils.h"
 #include "gth-browser.h"
+#include "gth-browser-actions-callbacks.h"
 #include "gth-file-list.h"
 #include "gth-file-selection.h"
 #include "gth-folder-tree.h"
@@ -52,7 +53,7 @@ toggle_action_activated (GSimpleAction *action,
 }
 
 
-GtkWidget *
+static GtkWidget *
 _gth_application_get_current_window (GApplication *application)
 {
         GList *windows;
diff --git a/gthumb/gth-extensions.c b/gthumb/gth-extensions.c
index fcfb463..6be1fdc 100644
--- a/gthumb/gth-extensions.c
+++ b/gthumb/gth-extensions.c
@@ -299,7 +299,7 @@ gth_extension_module_real_is_configurable (GthExtension *base)
        GthExtensionModule *self;
        char               *function_name;
        gboolean            result = FALSE;
-       gboolean (*is_configurable_func) ();
+       gboolean (*is_configurable_func) (void);
 
        g_return_val_if_fail (GTH_IS_EXTENSION_MODULE (base), FALSE);
 
diff --git a/gthumb/gth-extensions.h b/gthumb/gth-extensions.h
index 3164cd4..0e341f2 100644
--- a/gthumb/gth-extensions.h
+++ b/gthumb/gth-extensions.h
@@ -177,6 +177,13 @@ GthExtensionDescription *  gth_extension_manager_get_description   (GthExtension
 GList *                    gth_extension_manager_order_extensions  (GthExtensionManager  *manager,
                                                                    char                **extensions);
 
+/* functions exported by modules */
+
+void           gthumb_extension_activate                (void);
+void           gthumb_extension_deactivate              (void);
+gboolean       gthumb_extension_is_configurable         (void);
+void           gthumb_extension_configure               (GtkWindow *parent);
+
 G_END_DECLS
 
 #endif
diff --git a/gthumb/gth-file-properties.c b/gthumb/gth-file-properties.c
index a57adf9..44d3fdf 100644
--- a/gthumb/gth-file-properties.c
+++ b/gthumb/gth-file-properties.c
@@ -100,7 +100,7 @@ get_comment (GthFileData *file_data)
 }
 
 
-void
+static void
 gth_file_properties_real_set_file (GthPropertyView *base,
                                   GthFileData     *file_data)
 {
@@ -208,14 +208,14 @@ gth_file_properties_real_set_file (GthPropertyView *base,
 }
 
 
-const char *
+static const char *
 gth_file_properties_real_get_name (GthMultipageChild *self)
 {
        return _("Properties");
 }
 
 
-const char *
+static const char *
 gth_file_properties_real_get_icon (GthMultipageChild *self)
 {
        return "document-properties-symbolic";
diff --git a/gthumb/gth-file-store.c b/gthumb/gth-file-store.c
index bc5c30b..0ff71cd 100644
--- a/gthumb/gth-file-store.c
+++ b/gthumb/gth-file-store.c
@@ -127,7 +127,7 @@ _gth_file_row_set_thumbnail (GthFileRow      *row,
 }
 
 
-GthFileRow *
+static GthFileRow *
 _gth_file_row_copy (GthFileRow *row)
 {
        GthFileRow *row2;
@@ -634,16 +634,6 @@ gth_file_store_new (void)
 }
 
 
-int
-gth_file_store_get_abs_pos (GthFileStore *file_store,
-                           int           pos)
-{
-       g_return_val_if_fail ((pos >= 0) && (pos < file_store->priv->num_rows), -1);
-
-       return file_store->priv->rows[pos]->abs_pos;
-}
-
-
 static void
 _gth_file_store_increment_stamp (GthFileStore *file_store)
 {
diff --git a/gthumb/gth-filter.c b/gthumb/gth-filter.c
index 6443ec9..5468b9e 100644
--- a/gthumb/gth-filter.c
+++ b/gthumb/gth-filter.c
@@ -402,7 +402,7 @@ gth_filter_real_create_control (GthTest *test)
 }
 
 
-GObject *
+static GObject *
 gth_filter_real_duplicate (GthDuplicable *duplicable)
 {
        GthFilter *filter = GTH_FILTER (duplicable);
diff --git a/gthumb/gth-grid-view.c b/gthumb/gth-grid-view.c
index 650a371..3dc4c44 100644
--- a/gthumb/gth-grid-view.c
+++ b/gthumb/gth-grid-view.c
@@ -2643,7 +2643,7 @@ gth_grid_view_set_drag_dest_pos (GthFileView    *file_view,
 }
 
 
-void
+static void
 gth_grid_view_get_drag_dest_pos (GthFileView *file_view,
                                 int         *pos)
 {
diff --git a/gthumb/gth-image-loader.c b/gthumb/gth-image-loader.c
index 8593d07..a73f62d 100644
--- a/gthumb/gth-image-loader.c
+++ b/gthumb/gth-image-loader.c
@@ -302,6 +302,7 @@ gth_image_new_from_stream (GInputStream  *istream,
        int                 original_height;
        GError             *error = NULL;
 
+       image = NULL;
        mime_type = _g_content_type_get_from_stream (istream, NULL, cancellable, &error);
        if (mime_type != NULL) {
                loader_func = gth_main_get_image_loader_func (mime_type, GTH_IMAGE_FORMAT_CAIRO_SURFACE);
diff --git a/gthumb/gth-progress-dialog.c b/gthumb/gth-progress-dialog.c
index b71c335..6e680db 100644
--- a/gthumb/gth-progress-dialog.c
+++ b/gthumb/gth-progress-dialog.c
@@ -60,6 +60,9 @@ struct _GthTaskProgressClass {
 };
 
 
+GType gth_task_progress_get_type (void);
+
+
 G_DEFINE_TYPE (GthTaskProgress, gth_task_progress, GTK_TYPE_BOX)
 
 
diff --git a/gthumb/gth-test-chain.c b/gthumb/gth-test-chain.c
index 7fe51aa..9ce6f54 100644
--- a/gthumb/gth-test-chain.c
+++ b/gthumb/gth-test-chain.c
@@ -215,7 +215,7 @@ gth_test_chain_dom_domizable_interface_init (DomDomizableInterface * iface)
 }
 
 
-GObject *
+static GObject *
 gth_test_chain_real_duplicate (GthDuplicable *duplicable)
 {
        GthTestChain *chain;
diff --git a/gthumb/gth-test.c b/gthumb/gth-test.c
index 1620c94..505fd13 100644
--- a/gthumb/gth-test.c
+++ b/gthumb/gth-test.c
@@ -89,7 +89,7 @@ gth_test_finalize (GObject *object)
 }
 
 
-const char *
+static const char *
 base_get_attributes (GthTest *self)
 {
        return self->priv->attributes;
@@ -111,13 +111,6 @@ base_update_from_control (GthTest   *self,
 }
 
 
-static void
-base_reset (GthTest *self)
-{
-       /* void */
-}
-
-
 static GthMatch
 base_match (GthTest     *self,
            GthFileData *fdata)
@@ -126,7 +119,7 @@ base_match (GthTest     *self,
 }
 
 
-void
+static void
 base_set_file_list (GthTest *self,
                    GList   *files)
 {
@@ -146,7 +139,7 @@ base_set_file_list (GthTest *self,
 }
 
 
-GthFileData *
+static GthFileData *
 base_get_next (GthTest *self)
 {
        GthFileData *file = NULL;
@@ -177,7 +170,7 @@ base_get_next (GthTest *self)
 }
 
 
-GObject *
+static GObject *
 gth_test_real_duplicate (GthDuplicable *duplicable)
 {
        GthTest *self = GTH_TEST (duplicable);
@@ -277,7 +270,6 @@ gth_test_class_init (GthTestClass *klass)
        klass->get_attributes = base_get_attributes;
        klass->create_control = base_create_control;
        klass->update_from_control = base_update_from_control;
-       klass->reset = base_reset;
        klass->match = base_match;
        klass->set_file_list = base_set_file_list;
        klass->get_next = base_get_next;
@@ -403,13 +395,6 @@ gth_test_changed (GthTest *self)
 }
 
 
-void
-gth_test_reset (GthTest *self)
-{
-       GTH_TEST_GET_CLASS (self)->reset (self);
-}
-
-
 GthMatch
 gth_test_match (GthTest     *self,
                GthFileData *fdata)
diff --git a/gthumb/gth-test.h b/gthumb/gth-test.h
index 5429569..bd69472 100644
--- a/gthumb/gth-test.h
+++ b/gthumb/gth-test.h
@@ -86,7 +86,6 @@ struct _GthTestClass {
        GtkWidget *   (*create_control)       (GthTest     *test);
        gboolean      (*update_from_control)  (GthTest     *test,
                                               GError     **error);
-       void          (*reset)                (GthTest     *test);
        GthMatch      (*match)                (GthTest     *test,
                                               GthFileData *fdata);
        void          (*set_file_list)        (GthTest     *test,
diff --git a/gthumb/gth-user-dir.c b/gthumb/gth-user-dir.c
index ecba38e..490ec8f 100644
--- a/gthumb/gth-user-dir.c
+++ b/gthumb/gth-user-dir.c
@@ -50,6 +50,8 @@ _gth_user_dir_mkdir_with_parents (GthDir  dir_type,
        case GTH_DIR_DATA:
                mode = GTH_DIR_DATA_MODE;
                break;
+       default:
+               g_assert_not_reached ();
        }
 
        result = g_mkdir_with_parents (pathname, mode);
diff --git a/gthumb/main-migrate-catalogs.c b/gthumb/main-migrate-catalogs.c
index fb0f28b..1c28fca 100644
--- a/gthumb/main-migrate-catalogs.c
+++ b/gthumb/main-migrate-catalogs.c
@@ -27,6 +27,7 @@
 #include "gth-time.h"
 #include "gth-preferences.h"
 #include "gth-user-dir.h"
+#include "main-migrate.h"
 
 
 #define MAX_LINE_LENGTH 4096
diff --git a/gthumb/main.c b/gthumb/main.c
index 9186934..93a6ba8 100644
--- a/gthumb/main.c
+++ b/gthumb/main.c
@@ -42,6 +42,7 @@
 #include "gth-main.h"
 #include "gth-preferences.h"
 #include "gtk-utils.h"
+#include "main.h"
 #include "main-migrate.h"
 
 
@@ -296,6 +297,9 @@ typedef GtkApplicationClass GthApplicationClass;
 static gpointer gth_application_parent_class;
 
 
+GType gth_application_get_type (void);
+
+
 G_DEFINE_TYPE (GthApplication, gth_application, GTK_TYPE_APPLICATION)
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]