More gboolean and tidy up.
authorLaurent Monin <geeqie@norz.org>
Sat, 14 Mar 2009 11:26:43 +0000 (11:26 +0000)
committerLaurent Monin <geeqie@norz.org>
Sat, 14 Mar 2009 11:26:43 +0000 (11:26 +0000)
14 files changed:
src/fullscreen.c
src/fullscreen.h
src/histogram.c
src/histogram.h
src/history_list.c
src/history_list.h
src/image.c
src/image.h
src/layout.c
src/layout_image.c
src/layout_image.h
src/pixbuf-renderer.c
src/pixbuf-renderer.h
src/typedefs.h

index 7ebf560..772a0b8 100644 (file)
@@ -70,7 +70,7 @@ static void clear_mouse_cursor(GtkWidget *widget, gint state)
                }
 }
 
-static gint fullscreen_hide_mouse_cb(gpointer data)
+static gboolean fullscreen_hide_mouse_cb(gpointer data)
 {
        FullScreenData *fs = data;
 
@@ -98,7 +98,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 gint fullscreen_mouse_moved(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean fullscreen_mouse_moved(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
 {
        FullScreenData *fs = data;
 
@@ -121,11 +121,11 @@ static void fullscreen_busy_mouse_disable(FullScreenData *fs)
                }
 }
 
-static void fullscreen_mouse_set_busy(FullScreenData *fs, gint busy)
+static void fullscreen_mouse_set_busy(FullScreenData *fs, gboolean busy)
 {
        fullscreen_busy_mouse_disable(fs);
 
-       if ((fs->cursor_state & FULLSCREEN_CURSOR_BUSY) == (busy)) return;
+       if (!!(fs->cursor_state & FULLSCREEN_CURSOR_BUSY) == (busy)) return;
 
        if (busy)
                {
@@ -168,7 +168,7 @@ static void fullscreen_image_update_cb(ImageWindow *imd, gpointer data)
                }
 }
 
-static void fullscreen_image_complete_cb(ImageWindow *imd, gint preload, gpointer data)
+static void fullscreen_image_complete_cb(ImageWindow *imd, gboolean preload, gpointer data)
 {
        FullScreenData *fs = data;
 
@@ -205,7 +205,7 @@ static gboolean fullscreen_saver_block_cb(gpointer data)
        return TRUE;
 }
 
-static gint fullscreen_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean fullscreen_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
 {
        FullScreenData *fs = data;
 
@@ -218,7 +218,7 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd,
 {
        FullScreenData *fs;
        GdkScreen *screen;
-       gint same;
+       gboolean same;
        gint x, y;
        gint w, h;
        GdkGeometry geometry;
@@ -467,7 +467,7 @@ ScreenData *fullscreen_prefs_list_find(GList *list, gint screen)
  * same_region: the returned region will overlap the current location of widget.
  */
 void fullscreen_prefs_get_geometry(gint screen, GtkWidget *widget, gint *x, gint *y, gint *width, gint *height,
-                                  GdkScreen **dest_screen, gint *same_region)
+                                  GdkScreen **dest_screen, gboolean *same_region)
 {
        GList *list;
        ScreenData *sd;
@@ -610,7 +610,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, gint *above_value)
+GtkWidget *fullscreen_prefs_selection_new(const gchar *text, gint *screen_value, gboolean *above_value)
 {
        GtkWidget *vbox;
        GtkWidget *hbox;
index 934ba23..8c958a0 100644 (file)
@@ -48,11 +48,11 @@ void fullscreen_prefs_list_free(GList *list);
 ScreenData *fullscreen_prefs_list_find(GList *list, gint screen);
 
 void fullscreen_prefs_get_geometry(gint screen, GtkWidget *widget, gint *x, gint *y, gint *width, gint *height,
-                                  GdkScreen **dest_screen, gint *same_region);
+                                  GdkScreen **dest_screen, gboolean *same_region);
 
 gint fullscreen_prefs_find_screen_for_widget(GtkWidget *widget);
 
-GtkWidget *fullscreen_prefs_selection_new(const gchar *text, gint *screen_value, gint *above_value);
+GtkWidget *fullscreen_prefs_selection_new(const gchar *text, gint *screen_value, gboolean *above_value);
 
 
 #endif
index bac2474..9278288 100644 (file)
@@ -213,7 +213,7 @@ static void histogram_hgrid(Histogram *histogram, GdkPixbuf *pixbuf, gint x, gin
                }
 }
 
-gint histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf *pixbuf, gint x, gint y, gint width, gint height)
+gboolean histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf *pixbuf, gint x, gint y, gint width, gint height)
 {
        /* FIXME: use the coordinates correctly */
        gint i;
@@ -222,7 +222,7 @@ gint histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf *pix
        gint combine = (HISTMAP_SIZE - 1) / width + 1;
        gint ypos = y + height;
        
-       if (!histogram || !histmap) return 0;
+       if (!histogram || !histmap) return FALSE;
        
        /* Draw the grid */
        histogram_vgrid(histogram, pixbuf, x, y, width, height);
index 5d9da01..cb3ada8 100644 (file)
@@ -32,7 +32,7 @@ gint histogram_toggle_channel(Histogram *histogram);
 gint histogram_toggle_mode(Histogram *histogram);
 const gchar *histogram_label(Histogram *histogram);
 const HistMap *histmap_get(FileData *fd);
-gint histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf *pixbuf, gint x, gint y, gint width, gint height);
+gboolean histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf *pixbuf, gint x, gint y, gint width, gint height);
 
 void histogram_notify_cb(FileData *fd, NotifyType type, gpointer data);
 
index cd38483..fc305a2 100644 (file)
@@ -62,7 +62,7 @@ static gchar *quoted_from_text(const gchar *text)
        return NULL;
 }
 
-gint history_list_load(const gchar *path)
+gboolean history_list_load(const gchar *path)
 {
        FILE *f;
        gchar *key = NULL;
@@ -117,7 +117,7 @@ gint history_list_load(const gchar *path)
        return TRUE;
 }
 
-gint history_list_save(const gchar *path)
+gboolean history_list_save(const gchar *path)
 {
        SecureSaveInfo *ssi;
        GList *list;
index 52b7bc8..f5d869b 100644 (file)
@@ -14,8 +14,8 @@
 
 /* history lists */
 
-gint history_list_load(const gchar *path);
-gint history_list_save(const gchar *path);
+gboolean history_list_load(const gchar *path);
+gboolean history_list_save(const gchar *path);
 
 void history_list_free_key(const gchar *key);
 
index ca7d93a..5bdcfe9 100644 (file)
@@ -101,7 +101,7 @@ static void image_zoom_cb(PixbufRenderer *pr, gdouble zoom, gpointer data)
        image_update_util(imd);
 }
 
-static void image_complete_util(ImageWindow *imd, gint preload)
+static void image_complete_util(ImageWindow *imd, gboolean preload)
 {
        if (imd->il && image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) return;
 
@@ -189,7 +189,7 @@ static void image_update_title(ImageWindow *imd)
  *-------------------------------------------------------------------
  */
 
-static gint image_post_process_color(ImageWindow *imd, gint start_row, gint run_in_bg)
+static gboolean image_post_process_color(ImageWindow *imd, gint start_row, gboolean run_in_bg)
 {
        ColorMan *cm;
        ColorManProfileType input_type;
@@ -629,7 +629,7 @@ static void image_load_set_signals(ImageWindow *imd, gboolean override_old_signa
 
 /* this read ahead is located here merely for the callbacks, above */
 
-static gint image_read_ahead_check(ImageWindow *imd)
+static gboolean image_read_ahead_check(ImageWindow *imd)
 {
        if (!imd->read_ahead_fd) return FALSE;
        if (imd->il) return FALSE;
@@ -676,7 +676,7 @@ static gint image_read_ahead_check(ImageWindow *imd)
        return FALSE;
 }
 
-static gint image_load_begin(ImageWindow *imd, FileData *fd)
+static gboolean image_load_begin(ImageWindow *imd, FileData *fd)
 {
        DEBUG_1("%s image begin", get_exec_time());
 
@@ -762,7 +762,7 @@ static void image_reset(ImageWindow *imd)
  *-------------------------------------------------------------------
  */
 
-static void image_change_complete(ImageWindow *imd, gdouble zoom, gint new)
+static void image_change_complete(ImageWindow *imd, gdouble zoom)
 {
        image_reset(imd);
        imd->unknown = TRUE;
@@ -814,7 +814,7 @@ static void image_change_real(ImageWindow *imd, FileData *fd,
        imd->image_fd = file_data_ref(fd);
 
 
-       image_change_complete(imd, zoom, TRUE);
+       image_change_complete(imd, zoom);
 
        image_update_title(imd);
        image_state_set(imd, IMAGE_STATE_IMAGE);
@@ -829,7 +829,7 @@ static void image_change_real(ImageWindow *imd, FileData *fd,
  *-------------------------------------------------------------------
  */
 
-static void image_focus_paint(ImageWindow *imd, gint has_focus, GdkRectangle *area)
+static void image_focus_paint(ImageWindow *imd, gboolean has_focus, GdkRectangle *area)
 {
        GtkWidget *widget;
 
@@ -852,7 +852,7 @@ static void image_focus_paint(ImageWindow *imd, gint has_focus, GdkRectangle *ar
                }
 }
 
-static gint image_focus_expose(GtkWidget *widget, GdkEventExpose *event, gpointer data)
+static gboolean image_focus_expose(GtkWidget *widget, GdkEventExpose *event, gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -860,7 +860,7 @@ static gint image_focus_expose(GtkWidget *widget, GdkEventExpose *event, gpointe
        return TRUE;
 }
 
-static gint image_focus_in_cb(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+static gboolean image_focus_in_cb(GtkWidget *widget, GdkEventFocus *event, gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -870,7 +870,7 @@ static gint image_focus_in_cb(GtkWidget *widget, GdkEventFocus *event, gpointer
        return TRUE;
 }
 
-static gint image_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+static gboolean image_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -880,7 +880,7 @@ static gint image_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, gpointer
        return TRUE;
 }
 
-static gint image_scroll_cb(GtkWidget *widget, GdkEventScroll *event, gpointer data)
+static gboolean image_scroll_cb(GtkWidget *widget, GdkEventScroll *event, gpointer data)
 {
        ImageWindow *imd = data;
 
@@ -901,7 +901,7 @@ static gint image_scroll_cb(GtkWidget *widget, GdkEventScroll *event, gpointer d
  */
 
 void image_attach_window(ImageWindow *imd, GtkWidget *window,
-                        const gchar *title, const gchar *title_right, gint show_zoom)
+                        const gchar *title, const gchar *title_right, gboolean show_zoom)
 {
        imd->top_window = window;
        g_free(imd->title);
@@ -926,7 +926,7 @@ void image_set_update_func(ImageWindow *imd,
 }
 
 void image_set_complete_func(ImageWindow *imd,
-                            void (*func)(ImageWindow *imd, gint preload, gpointer data),
+                            void (*func)(ImageWindow *imd, gboolean preload, gpointer data),
                             gpointer data)
 {
        imd->func_complete = func;
@@ -1018,7 +1018,7 @@ void image_change_fd(ImageWindow *imd, FileData *fd, gdouble zoom)
        image_change_real(imd, fd, NULL, NULL, zoom);
 }
 
-gint image_get_image_size(ImageWindow *imd, gint *width, gint *height)
+gboolean image_get_image_size(ImageWindow *imd, gint *width, gint *height)
 {
        return pixbuf_renderer_get_image_size(PIXBUF_RENDERER(imd->pr), width, height);
 }
@@ -1028,7 +1028,7 @@ GdkPixbuf *image_get_pixbuf(ImageWindow *imd)
        return pixbuf_renderer_get_pixbuf((PixbufRenderer *)imd->pr);
 }
 
-void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom, gint lazy)
+void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom, gboolean lazy)
 {
 
 
@@ -1209,7 +1209,7 @@ void image_reload(ImageWindow *imd)
 {
        if (pixbuf_renderer_get_tiles((PixbufRenderer *)imd->pr)) return;
 
-       image_change_complete(imd, image_zoom_get(imd), FALSE);
+       image_change_complete(imd, image_zoom_get(imd));
 }
 
 void image_scroll(ImageWindow *imd, gint x, gint y)
@@ -1396,7 +1396,7 @@ void image_auto_refresh_enable(ImageWindow *imd, gboolean enable)
        imd->auto_refresh = enable;
 }
 
-void image_top_window_set_sync(ImageWindow *imd, gint allow_sync)
+void image_top_window_set_sync(ImageWindow *imd, gboolean allow_sync)
 {
        imd->top_window_sync = allow_sync;
 
@@ -1410,7 +1410,7 @@ void image_background_set_color(ImageWindow *imd, GdkColor *color)
 
 void image_color_profile_set(ImageWindow *imd,
                             gint input_type, gint screen_type,
-                            gint use_image)
+                            gboolean use_image)
 {
        if (!imd) return;
 
@@ -1425,9 +1425,9 @@ void image_color_profile_set(ImageWindow *imd,
        imd->color_profile_use_image = use_image;
 }
 
-gint image_color_profile_get(ImageWindow *imd,
-                            gint *input_type, gint *screen_type,
-                            gint *use_image)
+gboolean image_color_profile_get(ImageWindow *imd,
+                                gint *input_type, gint *screen_type,
+                                gboolean *use_image)
 {
        if (!imd) return FALSE;
 
@@ -1438,7 +1438,7 @@ gint image_color_profile_get(ImageWindow *imd,
        return TRUE;
 }
 
-void image_color_profile_set_use(ImageWindow *imd, gint enable)
+void image_color_profile_set_use(ImageWindow *imd, gboolean enable)
 {
        if (!imd) return;
 
@@ -1447,7 +1447,7 @@ void image_color_profile_set_use(ImageWindow *imd, gint enable)
        imd->color_profile_enable = enable;
 }
 
-gint image_color_profile_get_use(ImageWindow *imd)
+gboolean image_color_profile_get_use(ImageWindow *imd)
 {
        if (!imd) return FALSE;
 
@@ -1456,12 +1456,12 @@ gint image_color_profile_get_use(ImageWindow *imd)
 
 gint image_color_profile_get_from_image(ImageWindow *imd)
 {
-       if (!imd) return FALSE;
+       if (!imd) return COLOR_PROFILE_NONE;
 
        return imd->color_profile_from_image;
 }
 
-void image_set_delay_flip(ImageWindow *imd, gint delay)
+void image_set_delay_flip(ImageWindow *imd, gboolean delay)
 {
        if (!imd ||
            imd->delay_flip == delay) return;
@@ -1482,7 +1482,7 @@ void image_set_delay_flip(ImageWindow *imd, gint delay)
                }
 }
 
-void image_to_root_window(ImageWindow *imd, gint scaled)
+void image_to_root_window(ImageWindow *imd, gboolean scaled)
 {
        GdkScreen *screen;
        GdkWindow *rootwindow;
@@ -1705,7 +1705,7 @@ void image_set_frame(ImageWindow *imd, gboolean frame)
        imd->has_frame = frame;
 }
 
-ImageWindow *image_new(gint frame)
+ImageWindow *image_new(gboolean frame)
 {
        ImageWindow *imd;
 
index 61fa795..5c7f3fa 100644 (file)
 
 
 void image_set_frame(ImageWindow *imd, gboolean frame);
-ImageWindow *image_new(gint frame);
+ImageWindow *image_new(gboolean frame);
 
 /* additional setup */
 void image_attach_window(ImageWindow *imd, GtkWidget *window,
-                        const gchar *title, const gchar *title_right, gint show_zoom);
+                        const gchar *title, const gchar *title_right, gboolean show_zoom);
 void image_set_update_func(ImageWindow *imd,
                           void (*func)(ImageWindow *imd, gpointer data),
                           gpointer data);
@@ -56,12 +56,12 @@ void image_set_fd(ImageWindow *imd, FileData *fd);
 
 /* load a new image */
 void image_change_fd(ImageWindow *imd, FileData *fd, gdouble zoom);
-void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom, gint lazy);
+void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom, gboolean lazy);
 void image_change_from_collection(ImageWindow *imd, CollectionData *cd, CollectInfo *info, gdouble zoom);
 CollectionData *image_get_collection(ImageWindow *imd, CollectInfo **info);
 void image_change_from_image(ImageWindow *imd, ImageWindow *source);
 
-gint image_get_image_size(ImageWindow *imd, gint *width, gint *height);
+gboolean image_get_image_size(ImageWindow *imd, gint *width, gint *height);
 GdkPixbuf *image_get_pixbuf(ImageWindow *imd);
 
 /* manipulation */
@@ -92,7 +92,7 @@ void image_prebuffer_set(ImageWindow *imd, FileData *fd);
 void image_auto_refresh_enable(ImageWindow *imd, gboolean enable);
 
 /* allow top window to be resized ? */
-void image_top_window_set_sync(ImageWindow *imd, gint allow_sync);
+void image_top_window_set_sync(ImageWindow *imd, gboolean allow_sync);
 
 /* background of image */
 void image_background_set_color(ImageWindow *imd, GdkColor *color);
@@ -100,19 +100,19 @@ void image_background_set_color(ImageWindow *imd, GdkColor *color);
 /* color profiles */
 void image_color_profile_set(ImageWindow *imd,
                             gint input_type, gint screen_type,
-                            gint use_embedded);
-gint image_color_profile_get(ImageWindow *imd,
+                            gboolean use_image);
+gboolean image_color_profile_get(ImageWindow *imd,
                             gint *input_type, gint *screen_type,
-                            gint *use_image);
-void image_color_profile_set_use(ImageWindow *imd, gint enable);
-gint image_color_profile_get_use(ImageWindow *imd);
+                            gboolean *use_image);
+void image_color_profile_set_use(ImageWindow *imd, gboolean enable);
+gboolean image_color_profile_get_use(ImageWindow *imd);
 gint image_color_profile_get_from_image(ImageWindow *imd);
 
 /* set delayed page flipping */
 void image_set_delay_flip(ImageWindow *imd, gint delay);
 
 /* wallpaper util */
-void image_to_root_window(ImageWindow *imd, gint scaled);
+void image_to_root_window(ImageWindow *imd, gboolean scaled);
 
 
 
index e383375..a2fe8d8 100644 (file)
@@ -348,7 +348,8 @@ static void layout_color_menu_enable_cb(GtkWidget *widget, gpointer data)
 static void layout_color_menu_use_image_cb(GtkWidget *widget, gpointer data)
 {
        LayoutWindow *lw = data;
-       gint input, screen, use_image;
+       gint input, screen;
+       gboolean use_image;
 
        if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return;
        layout_image_color_profile_set(lw, input, screen, !use_image);
@@ -361,7 +362,8 @@ static void layout_color_menu_input_cb(GtkWidget *widget, gpointer data)
 {
        LayoutWindow *lw = data;
        gint type;
-       gint input, screen, use_image;
+       gint input, screen;
+       gboolean use_image;
 
        if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return;
 
@@ -379,7 +381,8 @@ static void layout_color_menu_screen_cb(GtkWidget *widget, gpointer data)
 {
        LayoutWindow *lw = data;
        gint type;
-       gint input, screen, use_image;
+       gint input, screen;
+       gboolean use_image;
 
        if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return;
 
@@ -418,8 +421,8 @@ static void layout_color_button_press_cb(GtkWidget *widget, gpointer data)
        gboolean active;
        gint input = 0;
        gint screen = 0;
-       gint use_image = 0;
-       gboolean from_image = FALSE;
+       gboolean use_image = FALSE;
+       gboolean from_image;
        gint image_profile;
        gint i;
        
index 7dedd44..23f53be 100644 (file)
@@ -14,6 +14,7 @@
 #include "layout_image.h"
 
 #include "collect.h"
+#include "color-man.h"
 #include "dnd.h"
 #include "editors.h"
 #include "filedata.h"
@@ -1062,23 +1063,23 @@ void layout_image_refresh(LayoutWindow *lw)
 
 void layout_image_color_profile_set(LayoutWindow *lw,
                                    gint input_type, gint screen_type,
-                                   gint use_image)
+                                   gboolean use_image)
 {
        if (!layout_valid(&lw)) return;
 
        image_color_profile_set(lw->image, input_type, screen_type, use_image);
 }
 
-gint layout_image_color_profile_get(LayoutWindow *lw,
-                                   gint *input_type, gint *screen_type,
-                                   gint *use_image)
+gboolean layout_image_color_profile_get(LayoutWindow *lw,
+                                       gint *input_type, gint *screen_type,
+                                       gboolean *use_image)
 {
        if (!layout_valid(&lw)) return FALSE;
 
        return image_color_profile_get(lw->image, input_type, screen_type, use_image);
 }
 
-void layout_image_color_profile_set_use(LayoutWindow *lw, gint enable)
+void layout_image_color_profile_set_use(LayoutWindow *lw, gboolean enable)
 {
        if (!layout_valid(&lw)) return;
 
@@ -1093,7 +1094,7 @@ void layout_image_color_profile_set_use(LayoutWindow *lw, gint enable)
                }
 }
 
-gint layout_image_color_profile_get_use(LayoutWindow *lw)
+gboolean layout_image_color_profile_get_use(LayoutWindow *lw)
 {
        if (!layout_valid(&lw)) return FALSE;
 
@@ -1102,7 +1103,7 @@ gint layout_image_color_profile_get_use(LayoutWindow *lw)
 
 gint layout_image_color_profile_get_from_image(LayoutWindow *lw)
 {
-       if (!layout_valid(&lw)) return FALSE;
+       if (!layout_valid(&lw)) return COLOR_PROFILE_NONE;
 
        return image_color_profile_get_from_image(lw->image);
 }
index afa9a10..240ffae 100644 (file)
@@ -30,12 +30,12 @@ void layout_image_refresh(LayoutWindow *lw);
 
 void layout_image_color_profile_set(LayoutWindow *lw,
                                    gint input_type, gint screen_type,
-                                   gint use_image);
-gint layout_image_color_profile_get(LayoutWindow *lw,
+                                   gboolean use_image);
+gboolean layout_image_color_profile_get(LayoutWindow *lw,
                                    gint *input_type, gint *screen_type,
-                                   gint *use_image);
+                                   gboolean *use_image);
 void layout_image_color_profile_set_use(LayoutWindow *lw, gint enable);
-gint layout_image_color_profile_get_use(LayoutWindow *lw);
+gboolean layout_image_color_profile_get_use(LayoutWindow *lw);
 gint layout_image_color_profile_get_from_image(LayoutWindow *lw);
 
 
index 668c045..6948c77 100644 (file)
@@ -4212,7 +4212,7 @@ gint pixbuf_renderer_get_mouse_position(PixbufRenderer *pr, gint *x_pixel_return
        return TRUE;
 }
 
-gint pixbuf_renderer_get_image_size(PixbufRenderer *pr, gint *width, gint *height)
+gboolean pixbuf_renderer_get_image_size(PixbufRenderer *pr, gint *width, gint *height)
 {
        g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
        g_return_val_if_fail(width != NULL && height != NULL, FALSE);
index 6fc84ee..a1d58ab 100644 (file)
@@ -235,7 +235,7 @@ void pixbuf_renderer_zoom_set_limits(PixbufRenderer *pr, gdouble min, gdouble ma
 
 /* sizes */
 
-gint pixbuf_renderer_get_image_size(PixbufRenderer *pr, gint *width, gint *height);
+gboolean pixbuf_renderer_get_image_size(PixbufRenderer *pr, gint *width, gint *height);
 gint pixbuf_renderer_get_scaled_size(PixbufRenderer *pr, gint *width, gint *height);
 
 /* region of image in pixel coordinates */
index 9e6af43..8f38470 100644 (file)
@@ -357,21 +357,21 @@ struct _ImageWindow
 
        FileData *image_fd;
 
-       gint unknown;           /* failed to load image */
+       gboolean unknown;               /* failed to load image */
 
        ImageLoader *il;        /* FIXME - image loader should probably go to FileData, but it must first support
                                   sending callbacks to multiple ImageWindows in parallel */
 
-       gint has_frame;
+       gint has_frame;  /* not boolean, see image_new() */
 
        /* top level (not necessarily parent) window */
-       gint top_window_sync;   /* resize top_window when image dimensions change */
+       gboolean top_window_sync;       /* resize top_window when image dimensions change */
        GtkWidget *top_window;  /* window that gets title, and window to resize when 'fitting' */
        gchar *title;           /* window title to display left of file name */
        gchar *title_right;     /* window title to display right of file name */
-       gint title_show_zoom;   /* option to include zoom in window title */
+       gboolean title_show_zoom;       /* option to include zoom in window title */
 
-       gint completed;
+       gboolean completed;
        ImageState state;       /* mask of IMAGE_STATE_* flags about current image */
 
        void (*func_update)(ImageWindow *imd, gpointer data);
@@ -404,10 +404,10 @@ struct _ImageWindow
        CollectInfo *collection_info;
 
        /* color profiles */
-       gint color_profile_enable;
+       gboolean color_profile_enable;
        gint color_profile_input;
        gint color_profile_screen;
-       gint color_profile_use_image;
+       gboolean color_profile_use_image;
        gint color_profile_from_image;
        gpointer cm;
 
@@ -418,13 +418,13 @@ struct _ImageWindow
 
        gint prev_color_row;
 
-       gint auto_refresh;
+       gboolean auto_refresh;
 
-       gint delay_flip;
+       gboolean delay_flip;
        gint orientation;
-       gint desaturate;
+       gboolean desaturate;
 
-       gint overlay_show_zoom; /* set to true if overlay is showing zoom ratio */
+       gboolean overlay_show_zoom; /* set to true if overlay is showing zoom ratio */
 };
 
 #define FILEDATA_MARKS_SIZE 6