Reorganize unused functions
authorColin Clark <colin.clark@cclark.uk>
Mon, 17 Jul 2023 09:45:03 +0000 (10:45 +0100)
committerColin Clark <colin.clark@cclark.uk>
Mon, 17 Jul 2023 09:45:03 +0000 (10:45 +0100)
Some unused functions remain within the code in case they become useful.
Pragmas are set so that the compiler does not produce warnings.
They may be easily found in the documentation generated by Doxygen.

33 files changed:
src/bar-exif.cc
src/bar-keywords.cc
src/bar.cc
src/cache.cc
src/collect.cc
src/color-man.cc
src/editors.cc
src/filecache.cc
src/filedata.cc
src/fullscreen.cc
src/image.cc
src/jpeg-parser.cc
src/layout-image.cc
src/layout.cc
src/main.cc
src/metadata.cc
src/pan-view/pan-view-filter.cc
src/pixbuf-renderer.cc
src/pixbuf-util.cc
src/rcfile.cc
src/similar.cc
src/ui-fileops.cc
src/ui-help.cc
src/ui-misc.cc
src/ui-pathsel.cc
src/ui-spinner.cc
src/ui-tree-edit.cc
src/ui-utildlg.cc
src/utilops.cc
src/view-dir.cc
src/view-file/view-file-icon.cc
src/view-file/view-file-list.cc
src/view-file/view-file.cc

index 433fa61..bf1d449 100644 (file)
@@ -766,15 +766,18 @@ GList * bar_pane_exif_list()
        return exif_list;
 }
 
-//void bar_pane_exif_close(GtkWidget *widget)
-//{
-       //PaneExifData *ped;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void bar_pane_exif_close_unused(GtkWidget *widget)
+{
+       PaneExifData *ped;
 
-       //ped = g_object_get_data(G_OBJECT(widget), "pane_data");
-       //if (!ped) return;
+       ped = static_cast<PaneExifData *>(g_object_get_data(G_OBJECT(widget), "pane_data"));
+       if (!ped) return;
 
-       //gtk_widget_destroy(ped->vbox);
-//}
+       gtk_widget_destroy(ped->vbox);
+}
+#pragma GCC diagnostic pop
 
 static void bar_pane_exif_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
@@ -787,14 +790,17 @@ static void bar_pane_exif_destroy(GtkWidget *UNUSED(widget), gpointer data)
        g_free(ped);
 }
 
-//~ static void bar_pane_exif_size_request(GtkWidget *UNUSED(pane), GtkRequisition *requisition, gpointer data)
-//~ {
-       //~ PaneExifData *ped = static_cast<//~ *>(data);
-       //~ if (requisition->height < ped->min_height)
-               //~ {
-               //~ requisition->height = ped->min_height;
-               //~ }
-//~ }
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+static void bar_pane_exif_size_request_unused(GtkWidget *UNUSED(pane), GtkRequisition *requisition, gpointer data)
+{
+       PaneExifData *ped = static_cast<PaneExifData *>(data);
+       if (requisition->height < ped->min_height)
+               {
+               requisition->height = ped->min_height;
+               }
+}
+#pragma GCC diagnostic pop
 
 static void bar_pane_exif_size_allocate(GtkWidget *UNUSED(pane), GtkAllocation *alloc, gpointer data)
 {
index 719f4d6..d74b74e 100644 (file)
@@ -1421,16 +1421,19 @@ static gboolean bar_pane_keywords_menu_cb(GtkWidget *widget, GdkEventButton *bev
  *-------------------------------------------------------------------
  */
 
-//void bar_pane_keywords_close(GtkWidget *bar)
-//{
-       //PaneKeywordsData *pkd;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void bar_pane_keywords_close_unused(GtkWidget *bar)
+{
+       PaneKeywordsData *pkd;
 
-       //pkd = g_object_get_data(G_OBJECT(bar), "pane_data");
-       //if (!pkd) return;
+       pkd = static_cast<PaneKeywordsData *>(g_object_get_data(G_OBJECT(bar), "pane_data"));
+       if (!pkd) return;
 
-       //g_free(pkd->pane.id);
-       //gtk_widget_destroy(pkd->widget);
-//}
+       g_free(pkd->pane.id);
+       gtk_widget_destroy(pkd->widget);
+}
+#pragma GCC diagnostic pop
 
 static void bar_pane_keywords_destroy(GtkWidget *UNUSED(widget), gpointer data)
 {
index eeab790..2e59464 100644 (file)
@@ -687,15 +687,18 @@ static void bar_size_allocate(GtkWidget *UNUSED(widget), GtkAllocation *UNUSED(a
        bd->width = gtk_paned_get_position(GTK_PANED(bd->lw->utility_paned));
 }
 
-//gint bar_get_width(GtkWidget *bar)
-//{
-       //BarData *bd;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gint bar_get_width_unused(GtkWidget *bar)
+{
+       BarData *bd;
 
-       //bd = g_object_get_data(G_OBJECT(bar), "bar_data");
-       //if (!bd) return 0;
+       bd = static_cast<BarData *>(g_object_get_data(G_OBJECT(bar), "bar_data"));
+       if (!bd) return 0;
 
-       //return bd->width;
-//}
+       return bd->width;
+}
+#pragma GCC diagnostic pop
 
 void bar_close(GtkWidget *bar)
 {
index e922b44..1577dca 100644 (file)
@@ -483,13 +483,16 @@ void cache_sim_data_set_dimensions(CacheData *cd, gint w, gint h)
        cd->dimensions = TRUE;
 }
 
-//void cache_sim_data_set_date(CacheData *cd, time_t date)
-//{
-       //if (!cd) return;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void cache_sim_data_set_date_unused(CacheData *cd, time_t date)
+{
+       if (!cd) return;
 
-       //cd->date = date;
-       //cd->have_date = TRUE;
-//}
+       cd->date = date;
+       cd->have_date = TRUE;
+}
+#pragma GCC diagnostic pop
 
 void cache_sim_data_set_md5sum(CacheData *cd, guchar digest[16])
 {
index 9b5bd2f..44f4e27 100644 (file)
@@ -112,15 +112,18 @@ void collection_info_set_thumb(CollectInfo *ci, GdkPixbuf *pixbuf)
        ci->pixbuf = pixbuf;
 }
 
-//gboolean collection_info_load_thumb(CollectInfo *ci)
-//{
-       //if (!ci) return FALSE;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean collection_info_load_thumb_unused(CollectInfo *ci)
+{
+       if (!ci) return FALSE;
 
-       //collection_info_free_thumb(ci);
+       collection_info_free_thumb(ci);
 
-       //log_printf("collection_info_load_thumb not implemented!\n(because an instant thumb loader not implemented)");
-       //return FALSE;
-//}
+       log_printf("collection_info_load_thumb not implemented!\n(because an instant thumb loader not implemented)");
+       return FALSE;
+}
+#pragma GCC diagnostic pop
 
 void collection_list_free(GList *list)
 {
index 04113d6..dffe5c1 100644 (file)
@@ -291,13 +291,16 @@ static ColorManCache *color_man_cache_get(ColorManProfileType in_type, const gch
  *-------------------------------------------------------------------
  */
 
-//static void color_man_done(ColorMan *cm, ColorManReturnType type)
-//{
-       //if (cm->func_done)
-               //{
-               //cm->func_done(cm, type, cm->func_done_data);
-               //}
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+static void color_man_done_unused(ColorMan *cm, ColorManReturnType type)
+{
+       if (cm->func_done)
+               {
+               cm->func_done(cm, type, cm->func_done_data);
+               }
+}
+#pragma GCC diagnostic pop
 
 void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, gint w, gint h)
 {
@@ -335,44 +338,47 @@ void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, g
 
 }
 
-//static gboolean color_man_idle_cb(gpointer data)
-//{
-       //ColorMan *cm = static_cast<ColorMan *>(data);
-       //gint width, height;
-       //gint rh;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+static gboolean color_man_idle_cb_unused(gpointer data)
+{
+       ColorMan *cm = static_cast<ColorMan *>(data);
+       gint width, height;
+       gint rh;
 
-       //if (!cm->pixbuf) return FALSE;
+       if (!cm->pixbuf) return FALSE;
 
-       //if (cm->imd &&
-           //cm->pixbuf != image_get_pixbuf(cm->imd))
-               //{
-               //cm->idle_id = 0;
-               //color_man_done(cm, COLOR_RETURN_IMAGE_CHANGED);
-               //return FALSE;
-               //}
+       if (cm->imd &&
+           cm->pixbuf != image_get_pixbuf(cm->imd))
+               {
+               cm->idle_id = 0;
+               color_man_done_unused(cm, COLOR_RETURN_IMAGE_CHANGED);
+               return FALSE;
+               }
 
-       //width = gdk_pixbuf_get_width(cm->pixbuf);
-       //height = gdk_pixbuf_get_height(cm->pixbuf);
+       width = gdk_pixbuf_get_width(cm->pixbuf);
+       height = gdk_pixbuf_get_height(cm->pixbuf);
 
-       //if (cm->row > height)
-               //{
-               //if (!cm->incremental_sync && cm->imd)
-                       //{
-                       //image_area_changed(cm->imd, 0, 0, width, height);
-                       //}
+       if (cm->row > height)
+               {
+               if (!cm->incremental_sync && cm->imd)
+                       {
+                       image_area_changed(cm->imd, 0, 0, width, height);
+                       }
 
-               //cm->idle_id = 0;
-               //color_man_done(cm, COLOR_RETURN_SUCCESS);
-               //return FALSE;
-               //}
+               cm->idle_id = 0;
+               color_man_done_unused(cm, COLOR_RETURN_SUCCESS);
+               return FALSE;
+               }
 
-       //rh = COLOR_MAN_CHUNK_SIZE / width + 1;
-       //color_man_correct_region(cm, cm->pixbuf, 0, cm->row, width, rh);
-       //if (cm->incremental_sync && cm->imd) image_area_changed(cm->imd, 0, cm->row, width, rh);
-       //cm->row += rh;
+       rh = COLOR_MAN_CHUNK_SIZE / width + 1;
+       color_man_correct_region(cm, cm->pixbuf, 0, cm->row, width, rh);
+       if (cm->incremental_sync && cm->imd) image_area_changed(cm->imd, 0, cm->row, width, rh);
+       cm->row += rh;
 
-       //return TRUE;
-//}
+       return TRUE;
+}
+#pragma GCC diagnostic pop
 
 static ColorMan *color_man_new_real(ImageWindow *imd, GdkPixbuf *pixbuf,
                                    ColorManProfileType input_type, const gchar *input_file,
@@ -413,12 +419,15 @@ ColorMan *color_man_new(ImageWindow *imd, GdkPixbuf *pixbuf,
                                  screen_type, screen_file, screen_data, screen_data_len);
 }
 
-//void color_man_start_bg(ColorMan *cm, ColorManDoneFunc done_func, gpointer done_data)
-//{
-       //cm->func_done = done_func;
-       //cm->func_done_data = done_data;
-       //cm->idle_id = g_idle_add(color_man_idle_cb, cm);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void color_man_start_bg_unused(ColorMan *cm, ColorManDoneFunc done_func, gpointer done_data)
+{
+       cm->func_done = done_func;
+       cm->func_done_data = done_data;
+       cm->idle_id = g_idle_add(color_man_idle_cb_unused, cm);
+}
+#pragma GCC diagnostic pop
 
 ColorMan *color_man_new_embedded(ImageWindow *imd, GdkPixbuf *pixbuf,
                                 guchar *input_data, guint input_data_len,
index 78b9483..8cb6119 100644 (file)
@@ -1425,12 +1425,16 @@ const gchar *editor_get_error_str(EditorFlags flags)
        return _("Unknown error.");
 }
 
-//const gchar *editor_get_name(const gchar *key)
-//{
-       //EditorDescription *editor = g_hash_table_lookup(editors, key);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+const gchar *editor_get_name_unused(const gchar *key)
+{
+       EditorDescription *editor = static_cast<EditorDescription *>(g_hash_table_lookup(editors, key));
+
+       if (!editor) return NULL;
 
-       //if (!editor) return NULL;
+       return editor->name;
+}
+#pragma GCC diagnostic pop
 
-       //return editor->name;
-//}
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index a52db75..80ad209 100644 (file)
@@ -129,15 +129,18 @@ void file_cache_put(FileCacheData *fc, FileData *fd, gulong size)
        file_cache_set_size(fc, fc->max_size);
 }
 
-//gulong file_cache_get_max_size(FileCacheData *fc)
-//{
-       //return fc->max_size;
-//}
-
-//gulong file_cache_get_size(FileCacheData *fc)
-//{
-       //return fc->size;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gulong file_cache_get_max_size_unused(FileCacheData *fc)
+{
+       return fc->max_size;
+}
+
+gulong file_cache_get_size_unused(FileCacheData *fc)
+{
+       return fc->size;
+}
+#pragma GCC diagnostic pop
 
 void file_cache_set_max_size(FileCacheData *fc, gulong size)
 {
index 3a045ef..23a0cfd 100644 (file)
@@ -583,49 +583,52 @@ void read_rating_data(FileData *file)
                }
 }
 
-//void set_exif_time_data(GList *files)
-//{
-       //DEBUG_1("%s set_exif_time_data: ...", get_exec_time());
-
-       //while (files)
-               //{
-               //FileData *file = files->data;
-
-               //read_exif_time_data(file);
-               //files = files->next;
-               //}
-//}
-
-//void set_exif_time_digitized_data(GList *files)
-//{
-       //DEBUG_1("%s set_exif_time_digitized_data: ...", get_exec_time());
-
-       //while (files)
-               //{
-               //FileData *file = files->data;
-
-               //read_exif_time_digitized_data(file);
-               //files = files->next;
-               //}
-//}
-
-//void set_rating_data(GList *files)
-//{
-       //gchar *rating_str;
-       //DEBUG_1("%s set_rating_data: ...", get_exec_time());
-
-       //while (files)
-               //{
-               //FileData *file = files->data;
-               //rating_str = metadata_read_string(file, RATING_KEY, METADATA_PLAIN);
-               //if (rating_str )
-                       //{
-                       //file->rating = atoi(rating_str);
-                       //g_free(rating_str);
-                       //}
-               //files = files->next;
-               //}
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void set_exif_time_data_unused(GList *files)
+{
+       DEBUG_1("%s set_exif_time_data: ...", get_exec_time());
+
+       while (files)
+               {
+               FileData *file = static_cast<FileData *>(files->data);
+
+               read_exif_time_data(file);
+               files = files->next;
+               }
+}
+
+void set_exif_time_digitized_data_unused(GList *files)
+{
+       DEBUG_1("%s set_exif_time_digitized_data: ...", get_exec_time());
+
+       while (files)
+               {
+               FileData *file = static_cast<FileData *>(files->data);
+
+               read_exif_time_digitized_data(file);
+               files = files->next;
+               }
+}
+
+void set_rating_data_unused(GList *files)
+{
+       gchar *rating_str;
+       DEBUG_1("%s set_rating_data: ...", get_exec_time());
+
+       while (files)
+               {
+               FileData *file = static_cast<FileData *>(files->data);
+               rating_str = metadata_read_string(file, RATING_KEY, METADATA_PLAIN);
+               if (rating_str )
+                       {
+                       file->rating = atoi(rating_str);
+                       g_free(rating_str);
+                       }
+               files = files->next;
+               }
+}
+#pragma GCC diagnostic pop
 
 FileData *file_data_new_no_grouping(const gchar *path_utf8)
 {
@@ -1239,10 +1242,13 @@ GList *filelist_sort(GList *list, SortType method, gboolean ascend)
        return filelist_sort_full(list, method, ascend, reinterpret_cast<GCompareFunc>(filelist_sort_file_cb));
 }
 
-//GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gboolean ascend)
-//{
-       //return filelist_insert_sort_full(list, fd, method, ascend, (GCompareFunc) filelist_sort_file_cb);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+GList *filelist_insert_sort_unused(GList *list, FileData *fd, SortType method, gboolean ascend)
+{
+       return filelist_insert_sort_full(list, fd, method, ascend, (GCompareFunc) filelist_sort_file_cb);
+}
+#pragma GCC diagnostic pop
 
 /*
  *-----------------------------------------------------------------------------
@@ -1996,19 +2002,22 @@ void file_data_get_registered_mark_func(gint n, FileDataGetMarkFunc *get_mark_fu
        if (data) *data = file_data_mark_func_data[n];
 }
 
-//gint file_data_get_user_orientation(FileData *fd)
-//{
-       //return fd->user_orientation;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gint file_data_get_user_orientation_unused(FileData *fd)
+{
+       return fd->user_orientation;
+}
 
-//void file_data_set_user_orientation(FileData *fd, gint value)
-//{
-       //if (fd->user_orientation == value) return;
+void file_data_set_user_orientation_unused(FileData *fd, gint value)
+{
+       if (fd->user_orientation == value) return;
 
-       //fd->user_orientation = value;
-       //file_data_increment_version(fd);
-       //file_data_send_notification(fd, NOTIFY_ORIENTATION);
-//}
+       fd->user_orientation = value;
+       file_data_increment_version(fd);
+       file_data_send_notification(fd, NOTIFY_ORIENTATION);
+}
+#pragma GCC diagnostic pop
 
 
 /*
@@ -3226,23 +3235,25 @@ gboolean file_data_unregister_notify_func(FileDataNotifyFunc func, gpointer data
        return FALSE;
 }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean file_data_send_notification_idle_cb_unused(gpointer data)
+{
+       NotifyIdleData *nid = (NotifyIdleData *)data;
+       GList *work = notify_func_list;
 
-//gboolean file_data_send_notification_idle_cb(gpointer data)
-//{
-       //NotifyIdleData *nid = (NotifyIdleData *)data;
-       //GList *work = notify_func_list;
-
-       //while (work)
-               //{
-               //NotifyData *nd = (NotifyData *)work->data;
+       while (work)
+               {
+               NotifyData *nd = (NotifyData *)work->data;
 
-               //nd->func(nid->fd, nid->type, nd->data);
-               //work = work->next;
-               //}
-       //file_data_unref(nid->fd);
-       //g_free(nid);
-       //return FALSE;
-//}
+               nd->func(nid->fd, nid->type, nd->data);
+               work = work->next;
+               }
+       file_data_unref(nid->fd);
+       g_free(nid);
+       return FALSE;
+}
+#pragma GCC diagnostic pop
 
 void file_data_send_notification(FileData *fd, NotifyType type)
 {
index a521f44..fc8a216 100644 (file)
@@ -588,23 +588,26 @@ void fullscreen_prefs_get_geometry(gint screen, GtkWidget *widget, gint *x, gint
        fullscreen_prefs_list_free(list);
 }
 
-//gint fullscreen_prefs_find_screen_for_widget(GtkWidget *widget)
-//{
-       //GdkScreen *screen;
-       //gint monitor;
-       //gint n;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gint fullscreen_prefs_find_screen_for_widget_unused(GtkWidget *widget)
+{
+       GdkScreen *screen;
+       gint monitor;
+       gint n;
 
-       //if (!widget || !gtk_widget_get_window(widget)) return 0;
+       if (!widget || !gtk_widget_get_window(widget)) return 0;
 
-       //screen = gtk_widget_get_screen(widget);
-       //monitor = gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(widget));
+       screen = gtk_widget_get_screen(widget);
+       monitor = gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(widget));
 
-       //n = (gdk_screen_get_number(screen)+1) * 100 + monitor + 1;
+       n = (gdk_screen_get_number(screen)+1) * 100 + monitor + 1;
 
-       //DEBUG_1("Screen appears to be %d", n);
+       DEBUG_1("Screen appears to be %d", n);
 
-       //return n;
-//}
+       return n;
+}
+#pragma GCC diagnostic pop
 
 enum {
        FS_MENU_COLUMN_NAME = 0,
index 76faafe..853211d 100644 (file)
@@ -1315,13 +1315,16 @@ void image_set_scroll_func(ImageWindow *imd,
        imd->data_scroll = data;
 }
 
-//void image_set_scroll_notify_func(ImageWindow *imd,
-                                 //void (*func)(ImageWindow *imd, gint x, gint y, gint width, gint height, gpointer data),
-                                 //gpointer data)
-//{
-       //imd->func_scroll_notify = func;
-       //imd->data_scroll_notify = data;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void image_set_scroll_notify_func_unused(ImageWindow *imd,
+                                 void (*func)(ImageWindow *imd, gint x, gint y, gint width, gint height, gpointer data),
+                                 gpointer data)
+{
+       imd->func_scroll_notify = func;
+       imd->data_scroll_notify = data;
+}
+#pragma GCC diagnostic pop
 
 void image_set_focus_in_func(ImageWindow *imd,
                           void (*func)(ImageWindow *, gpointer),
@@ -1798,10 +1801,14 @@ gdouble image_zoom_get_default(ImageWindow *imd)
 }
 
 /* stereo */
-//gint image_stereo_get(ImageWindow *imd)
-//{
-       //return pixbuf_renderer_stereo_get((PixbufRenderer *)imd->pr);
-//}
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gint image_stereo_get_unused(ImageWindow *imd)
+{
+       return pixbuf_renderer_stereo_get((PixbufRenderer *)imd->pr);
+}
+#pragma GCC diagnostic pop
 
 void image_stereo_set(ImageWindow *imd, gint stereo_mode)
 {
@@ -1809,12 +1816,15 @@ void image_stereo_set(ImageWindow *imd, gint stereo_mode)
        pixbuf_renderer_stereo_set(reinterpret_cast<PixbufRenderer *>(imd->pr), stereo_mode);
 }
 
-//void image_stereo_swap(ImageWindow *imd)
-//{
-       //gint stereo_mode = pixbuf_renderer_stereo_get((PixbufRenderer *)imd->pr);
-       //stereo_mode ^= PR_STEREO_SWAP;
-       //pixbuf_renderer_stereo_set((PixbufRenderer *)imd->pr, stereo_mode);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void image_stereo_swap_unused(ImageWindow *imd)
+{
+       gint stereo_mode = pixbuf_renderer_stereo_get((PixbufRenderer *)imd->pr);
+       stereo_mode ^= PR_STEREO_SWAP;
+       pixbuf_renderer_stereo_set((PixbufRenderer *)imd->pr, stereo_mode);
+}
+#pragma GCC diagnostic pop
 
 StereoPixbufData image_stereo_pixbuf_get(ImageWindow *imd)
 {
index ee1e1b2..eb73ab5 100644 (file)
@@ -97,37 +97,40 @@ guint32 tiff_byte_get_int32(const guchar *f, TiffByteOrder bo)
                return GUINT32_FROM_BE(align_buf);
 }
 
-//void tiff_byte_put_int16(guchar *f, guint16 n, TiffByteOrder bo)
-//{
-       //guint16 align_buf;
-
-       //if (bo == TIFF_BYTE_ORDER_INTEL)
-               //{
-               //align_buf = GUINT16_TO_LE(n);
-               //}
-       //else
-               //{
-               //align_buf = GUINT16_TO_BE(n);
-               //}
-
-       //memcpy(f, &align_buf, sizeof(guint16));
-//}
-
-//void tiff_byte_put_int32(guchar *f, guint32 n, TiffByteOrder bo)
-//{
-       //guint32 align_buf;
-
-       //if (bo == TIFF_BYTE_ORDER_INTEL)
-               //{
-               //align_buf = GUINT32_TO_LE(n);
-               //}
-       //else
-               //{
-               //align_buf = GUINT32_TO_BE(n);
-               //}
-
-       //memcpy(f, &align_buf, sizeof(guint32));
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void tiff_byte_put_int16_unused(guchar *f, guint16 n, TiffByteOrder bo)
+{
+       guint16 align_buf;
+
+       if (bo == TIFF_BYTE_ORDER_INTEL)
+               {
+               align_buf = GUINT16_TO_LE(n);
+               }
+       else
+               {
+               align_buf = GUINT16_TO_BE(n);
+               }
+
+       memcpy(f, &align_buf, sizeof(guint16));
+}
+
+void tiff_byte_put_int32_unused(guchar *f, guint32 n, TiffByteOrder bo)
+{
+       guint32 align_buf;
+
+       if (bo == TIFF_BYTE_ORDER_INTEL)
+               {
+               align_buf = GUINT32_TO_LE(n);
+               }
+       else
+               {
+               align_buf = GUINT32_TO_BE(n);
+               }
+
+       memcpy(f, &align_buf, sizeof(guint32));
+}
+#pragma GCC diagnostic pop
 
 gint tiff_directory_offset(const guchar *data, const guint len,
                                guint *offset, TiffByteOrder *bo)
index 70c30f9..4519d63 100644 (file)
@@ -57,12 +57,14 @@ static void layout_image_animate_update_image(LayoutWindow *lw);
  * full screen overlay
  *----------------------------------------------------------------------------
  */
-
-//void layout_image_overlay_toggle(LayoutWindow *lw)
-//{
-       //if (!lw) return;
-       //image_osd_toggle(lw->image);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+static void layout_image_overlay_toggle_unused(LayoutWindow *lw)
+{
+       if (!lw) return;
+       image_osd_toggle(lw->image);
+}
+#pragma GCC diagnostic pop
 
 /*
  *----------------------------------------------------------------------------
@@ -1331,12 +1333,16 @@ void layout_image_set_overunderexposed(LayoutWindow *lw, gboolean overunderexpos
        image_set_overunderexposed(lw->image, overunderexposed);
 }
 
-//gboolean layout_image_get_overunderexposed(LayoutWindow *lw)
-//{
-       //if (!layout_valid(&lw)) return FALSE;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean layout_image_get_overunderexposed_unused(LayoutWindow *lw)
+{
+       if (!layout_valid(&lw)) return FALSE;
 
-       //return image_get_overunderexposed(lw->image);
-//}
+//     return image_get_overunderexposed(lw->image);
+       return FALSE;
+}
+#pragma GCC diagnostic pop
 
 void layout_image_set_ignore_alpha(LayoutWindow *lw, gboolean ignore_alpha)
 {
@@ -1390,12 +1396,15 @@ const gchar *layout_image_get_path(LayoutWindow *lw)
        return image_get_path(lw->image);
 }
 
-//const gchar *layout_image_get_name(LayoutWindow *lw)
-//{
-       //if (!layout_valid(&lw)) return NULL;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+const gchar *layout_image_get_name_unused(LayoutWindow *lw)
+{
+       if (!layout_valid(&lw)) return NULL;
 
-       //return image_get_name(lw->image);
-//}
+       return image_get_name(lw->image);
+}
+#pragma GCC diagnostic pop
 
 FileData *layout_image_get_fd(LayoutWindow *lw)
 {
index c4492b0..501c5c4 100644 (file)
@@ -1300,19 +1300,22 @@ void layout_marks_set(LayoutWindow *lw, gboolean enable)
        layout_list_sync_marks(lw);
 }
 
-//gboolean layout_thumb_get(LayoutWindow *lw)
-//{
-       //if (!layout_valid(&lw)) return FALSE;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean layout_thumb_get_unused(LayoutWindow *lw)
+{
+       if (!layout_valid(&lw)) return FALSE;
 
-       //return lw->options.show_thumbnails;
-//}
+       return lw->options.show_thumbnails;
+}
 
-//gboolean layout_marks_get(LayoutWindow *lw)
-//{
-       //if (!layout_valid(&lw)) return FALSE;
+gboolean layout_marks_get_unused(LayoutWindow *lw)
+{
+       if (!layout_valid(&lw)) return FALSE;
 
-       //return lw->options.show_marks;
-//}
+       return lw->options.show_marks;
+}
+#pragma GCC diagnostic pop
 
 void layout_sort_set(LayoutWindow *lw, SortType type, gboolean ascend)
 {
@@ -1413,15 +1416,18 @@ void layout_views_set_sort(LayoutWindow *lw, SortType method, gboolean ascend)
        layout_style_set(lw, -1, nullptr);
 }
 
-//gboolean layout_views_get(LayoutWindow *lw, DirViewType *dir_view_type, FileViewType *file_view_type)
-//{
-       //if (!layout_valid(&lw)) return FALSE;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean layout_views_get_unused(LayoutWindow *lw, DirViewType *dir_view_type, FileViewType *file_view_type)
+{
+       if (!layout_valid(&lw)) return FALSE;
 
-       //*dir_view_type = lw->options.dir_view_type;
-       //*file_view_type = lw->options.file_view_type;
+       *dir_view_type = lw->options.dir_view_type;
+       *file_view_type = lw->options.file_view_type;
 
-       //return TRUE;
-//}
+       return TRUE;
+}
+#pragma GCC diagnostic pop
 
 /*
  *-----------------------------------------------------------------------------
index 5a1ba4e..bd9e425 100644 (file)
@@ -1152,31 +1152,34 @@ void exit_program()
 /** @FIXME this probably needs some better ifdefs. Please report any compilation problems */
 /** @FIXME This section needs revising */
 
-//#if defined(SIGBUS) && defined(SA_SIGINFO)
-//static void sigbus_handler_cb(int UNUSED(signum), siginfo_t *info, void *UNUSED(context))
-//{
-       ///*
-        //* @FIXME Design and implement a POSIX-acceptable approach,
-        //* after first documenting the sitations where SIGBUS occurs.
-        //* See https://github.com/BestImageViewer/geeqie/issues/1052 for discussion
-        //*/
-
-       //DEBUG_1("SIGBUS %p NOT HANDLED", info->si_addr);
-       //exit(EXIT_FAILURE);
-//}
-//#endif
-
-//static void setup_sigbus_handler(void)
-//{
-//#if defined(SIGBUS) && defined(SA_SIGINFO)
-       //struct sigaction sigbus_action;
-       //sigfillset(&sigbus_action.sa_mask);
-       //sigbus_action.sa_sigaction = sigbus_handler_cb;
-       //sigbus_action.sa_flags = SA_SIGINFO;
-
-       //sigaction(SIGBUS, &sigbus_action, NULL);
-//#endif
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#if defined(SIGBUS) && defined(SA_SIGINFO)
+static void sigbus_handler_cb_unused(int UNUSED(signum), siginfo_t *info, void *UNUSED(context))
+{
+       /*
+        * @FIXME Design and implement a POSIX-acceptable approach,
+        * after first documenting the sitations where SIGBUS occurs.
+        * See https://github.com/BestImageViewer/geeqie/issues/1052 for discussion
+        */
+
+       DEBUG_1("SIGBUS %p NOT HANDLED", info->si_addr);
+       exit(EXIT_FAILURE);
+}
+#endif
+
+static void setup_sigbus_handler_unused(void)
+{
+#if defined(SIGBUS) && defined(SA_SIGINFO)
+       struct sigaction sigbus_action;
+       sigfillset(&sigbus_action.sa_mask);
+       sigbus_action.sa_sigaction = sigbus_handler_cb_unused;
+       sigbus_action.sa_flags = SA_SIGINFO;
+
+       sigaction(SIGBUS, &sigbus_action, NULL);
+#endif
+}
+#pragma GCC diagnostic pop
 
 #ifndef HAVE_DEVELOPER
 static void setup_sig_handler()
index dc7c24b..6e17659 100644 (file)
@@ -230,20 +230,23 @@ gboolean metadata_write_queue_remove(FileData *fd)
        return TRUE;
 }
 
-//gboolean metadata_write_queue_remove_list(GList *list)
-//{
-       //GList *work;
-       //gboolean ret = TRUE;
-
-       //work = list;
-       //while (work)
-               //{
-               //FileData *fd = static_cast<//FileData *>(work->data);
-               //work = work->next;
-               //ret = ret && metadata_write_queue_remove(fd);
-               //}
-       //return ret;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean metadata_write_queue_remove_list_unused(GList *list)
+{
+       GList *work;
+       gboolean ret = TRUE;
+
+       work = list;
+       while (work)
+               {
+               FileData *fd = static_cast<FileData *>(work->data);
+               work = work->next;
+               ret = ret && metadata_write_queue_remove(fd);
+               }
+       return ret;
+}
+#pragma GCC diagnostic pop
 
 void metadata_notify_cb(FileData *fd, NotifyType type, gpointer UNUSED(data))
 {
index 597c1f0..cd95fdd 100644 (file)
@@ -202,14 +202,17 @@ void pan_filter_activate_cb(const gchar *text, gpointer data)
        pan_layout_update(pw);
 }
 
-//void pan_filter_activate(PanWindow *pw)
-//{
-       //gchar *text;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void pan_filter_activate_unused(PanWindow *pw)
+{
+       gchar *text;
 
-       //text = g_strdup(gtk_entry_get_text(GTK_ENTRY(pw->filter_ui->filter_entry)));
-       //pan_filter_activate_cb(text, pw);
-       //g_free(text);
-//}
+       text = g_strdup(gtk_entry_get_text(GTK_ENTRY(pw->filter_ui->filter_entry)));
+       pan_filter_activate_cb(text, pw);
+       g_free(text);
+}
+#pragma GCC diagnostic pop
 
 void pan_filter_toggle_cb(GtkWidget *button, gpointer data)
 {
@@ -252,34 +255,37 @@ void pan_filter_toggle_cb(GtkWidget *button, gpointer data)
                }
 }
 
-//void pan_filter_toggle_visible(PanWindow *pw, gboolean enable)
-//{
-       //PanViewFilterUi *ui = pw->filter_ui;
-       //if (pw->fs) return;
-
-       //if (enable)
-               //{
-               //if (gtk_widget_get_visible(ui->filter_box))
-                       //{
-                       //gtk_widget_grab_focus(ui->filter_entry);
-                       //}
-               //else
-                       //{
-                       //gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ui->filter_button), TRUE);
-                       //}
-               //}
-       //else
-               //{
-               //if (gtk_widget_get_visible(ui->filter_entry))
-                       //{
-                       //if (gtk_widget_has_focus(ui->filter_entry))
-                               //{
-                               //gtk_widget_grab_focus(GTK_WIDGET(pw->imd->widget));
-                               //}
-                       //gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ui->filter_button), FALSE);
-                       //}
-               //}
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void pan_filter_toggle_visible_unused(PanWindow *pw, gboolean enable)
+{
+       PanViewFilterUi *ui = pw->filter_ui;
+       if (pw->fs) return;
+
+       if (enable)
+               {
+               if (gtk_widget_get_visible(ui->filter_box))
+                       {
+                       gtk_widget_grab_focus(ui->filter_entry);
+                       }
+               else
+                       {
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ui->filter_button), TRUE);
+                       }
+               }
+       else
+               {
+               if (gtk_widget_get_visible(ui->filter_entry))
+                       {
+                       if (gtk_widget_has_focus(ui->filter_entry))
+                               {
+                               gtk_widget_grab_focus(GTK_WIDGET(pw->imd->widget));
+                               }
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ui->filter_button), FALSE);
+                       }
+               }
+}
+#pragma GCC diagnostic pop
 
 void pan_filter_toggle_button_cb(GtkWidget *UNUSED(button), gpointer data)
 {
index 2994986..6a670e3 100644 (file)
@@ -728,12 +728,15 @@ void pixbuf_renderer_set_parent(PixbufRenderer *pr, GtkWindow *window)
        pr->parent_window = GTK_WIDGET(window);
 }
 
-//GtkWindow *pixbuf_renderer_get_parent(PixbufRenderer *pr)
-//{
-       //g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), NULL);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+GtkWindow *pixbuf_renderer_get_parent_unused(PixbufRenderer *pr)
+{
+       g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), NULL);
 
-       //return GTK_WINDOW(pr->parent_window);
-//}
+       return GTK_WINDOW(pr->parent_window);
+}
+#pragma GCC diagnostic pop
 
 
 /*
@@ -2545,11 +2548,14 @@ void pixbuf_renderer_set_orientation(PixbufRenderer *pr, gint orientation)
        pr_zoom_sync(pr, pr->zoom, PR_ZOOM_FORCE, 0, 0);
 }
 
-//gint pixbuf_renderer_get_orientation(PixbufRenderer *pr)
-//{
-       //if (!pr) return 1;
-       //return pr->orientation;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gint pixbuf_renderer_get_orientation_unused(PixbufRenderer *pr)
+{
+       if (!pr) return 1;
+       return pr->orientation;
+}
+#pragma GCC diagnostic pop
 
 void pixbuf_renderer_set_stereo_data(PixbufRenderer *pr, StereoPixbufData stereo_data)
 {
@@ -2985,26 +2991,29 @@ gboolean pixbuf_renderer_get_visible_rect(PixbufRenderer *pr, GdkRectangle *rect
        return TRUE;
 }
 
-//gboolean pixbuf_renderer_get_virtual_rect(PixbufRenderer *pr, GdkRectangle *rect)
-//{
-       //g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
-       //g_return_val_if_fail(rect != NULL, FALSE);
-
-       //if ((!pr->pixbuf && !pr->source_tiles_enabled))
-               //{
-               //rect->x = 0;
-               //rect->y = 0;
-               //rect->width = 0;
-               //rect->height = 0;
-               //return FALSE;
-               //}
-
-       //rect->x = pr->x_scroll;
-       //rect->y = pr->y_scroll;
-       //rect->width = pr->vis_width;
-       //rect->height = pr->vis_height;
-       //return TRUE;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean pixbuf_renderer_get_virtual_rect_unused(PixbufRenderer *pr, GdkRectangle *rect)
+{
+       g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
+       g_return_val_if_fail(rect != NULL, FALSE);
+
+       if ((!pr->pixbuf && !pr->source_tiles_enabled))
+               {
+               rect->x = 0;
+               rect->y = 0;
+               rect->width = 0;
+               rect->height = 0;
+               return FALSE;
+               }
+
+       rect->x = pr->x_scroll;
+       rect->y = pr->y_scroll;
+       rect->width = pr->vis_width;
+       rect->height = pr->vis_height;
+       return TRUE;
+}
+#pragma GCC diagnostic pop
 
 void pixbuf_renderer_set_size_early(PixbufRenderer *UNUSED(pr), guint UNUSED(width), guint UNUSED(height))
 {
index 2cc2dce..6e1ff43 100644 (file)
@@ -58,33 +58,36 @@ gboolean pixbuf_to_file_as_png(GdkPixbuf *pixbuf, const gchar *filename)
  *-----------------------------------------------------------------------------
  */
 
-//gboolean pixbuf_to_file_as_jpg(GdkPixbuf *pixbuf, const gchar *filename, gint quality)
-//{
-       //GError *error = NULL;
-       //gchar *qbuf;
-       //gboolean ret;
-
-       //if (!pixbuf || !filename) return FALSE;
-
-       //if (quality == -1) quality = 75;
-       //if (quality < 1 || quality > 100)
-               //{
-               //log_printf("Jpeg not saved, invalid quality %d\n", quality);
-               //return FALSE;
-               //}
-
-       //qbuf = g_strdup_printf("%d", quality);
-       //ret = gdk_pixbuf_save(pixbuf, filename, "jpeg", &error, "quality", qbuf, NULL);
-       //g_free(qbuf);
-
-       //if (error)
-               //{
-               //log_printf("Error saving jpeg to %s\n%s\n", filename, error->message);
-               //g_error_free(error);
-               //}
-
-       //return ret;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean pixbuf_to_file_as_jpg_unused(GdkPixbuf *pixbuf, const gchar *filename, gint quality)
+{
+       GError *error = NULL;
+       gchar *qbuf;
+       gboolean ret;
+
+       if (!pixbuf || !filename) return FALSE;
+
+       if (quality == -1) quality = 75;
+       if (quality < 1 || quality > 100)
+               {
+               log_printf("Jpeg not saved, invalid quality %d\n", quality);
+               return FALSE;
+               }
+
+       qbuf = g_strdup_printf("%d", quality);
+       ret = gdk_pixbuf_save(pixbuf, filename, "jpeg", &error, "quality", qbuf, NULL);
+       g_free(qbuf);
+
+       if (error)
+               {
+               log_printf("Error saving jpeg to %s\n%s\n", filename, error->message);
+               g_error_free(error);
+               }
+
+       return ret;
+}
+#pragma GCC diagnostic pop
 
 /*
  *-----------------------------------------------------------------------------
@@ -696,20 +699,23 @@ void pixbuf_draw_rect_fill(GdkPixbuf *pb,
                }
 }
 
-//void pixbuf_draw_rect(GdkPixbuf *pb,
-                     //gint x, gint y, gint w, gint h,
-                     //gint r, gint g, gint b, gint a,
-                     //gint left, gint right, gint top, gint bottom)
-//{
-       //pixbuf_draw_rect_fill(pb, x + left, y, w - left - right, top,
-                             //r, g, b ,a);
-       //pixbuf_draw_rect_fill(pb, x + w - right, y, right, h,
-                             //r, g, b ,a);
-       //pixbuf_draw_rect_fill(pb, x + left, y + h - bottom, w - left - right, bottom,
-                             //r, g, b ,a);
-       //pixbuf_draw_rect_fill(pb, x, y, left, h,
-                             //r, g, b ,a);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void pixbuf_draw_rect_unused(GdkPixbuf *pb,
+                     gint x, gint y, gint w, gint h,
+                     gint r, gint g, gint b, gint a,
+                     gint left, gint right, gint top, gint bottom)
+{
+       pixbuf_draw_rect_fill(pb, x + left, y, w - left - right, top,
+                             r, g, b ,a);
+       pixbuf_draw_rect_fill(pb, x + w - right, y, right, h,
+                             r, g, b ,a);
+       pixbuf_draw_rect_fill(pb, x + left, y + h - bottom, w - left - right, bottom,
+                             r, g, b ,a);
+       pixbuf_draw_rect_fill(pb, x, y, left, h,
+                             r, g, b ,a);
+}
+#pragma GCC diagnostic pop
 
 void pixbuf_set_rect_fill(GdkPixbuf *pb,
                          gint x, gint y, gint w, gint h,
index 46f0dda..14fce38 100644 (file)
@@ -154,10 +154,13 @@ gboolean read_int_option(const gchar *option, const gchar *label, const gchar *v
        return TRUE;
 }
 
-//void write_ushort_option(GString *str, gint UNUSED(indent), const gchar *label, guint16 n)
-//{
-       //g_string_append_printf(str, "%s = \"%uh\" ", label, n);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void write_ushort_option_unused(GString *str, gint UNUSED(indent), const gchar *label, guint16 n)
+{
+       g_string_append_printf(str, "%s = \"%uh\" ", label, n);
+}
+#pragma GCC diagnostic pop
 
 gboolean read_ushort_option(const gchar *option, const gchar *label, const gchar *value, guint16 *n)
 {
index b00c2ed..f6cb826 100644 (file)
@@ -61,10 +61,13 @@ void image_sim_alternate_set(gboolean enable)
        alternate_enabled = enable;
 }
 
-//gboolean image_sim_alternate_enabled(void)
-//{
-       //return alternate_enabled;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean image_sim_alternate_enabled_unused(void)
+{
+       return alternate_enabled;
+}
+#pragma GCC diagnostic pop
 
 ImageSimilarityData *image_sim_new()
 {
index dbf7aa6..b20eee9 100644 (file)
@@ -431,24 +431,27 @@ gboolean unlink_file(const gchar *s)
        return ret;
 }
 
-//gboolean symlink_utf8(const gchar *source, const gchar *target)
-//{
-       //gchar *sl;
-       //gchar *tl;
-       //gboolean ret;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean symlink_utf8_unused(const gchar *source, const gchar *target)
+{
+       gchar *sl;
+       gchar *tl;
+       gboolean ret;
 
-       //if (!source || !target) return FALSE;
+       if (!source || !target) return FALSE;
 
-       //sl = path_from_utf8(source);
-       //tl = path_from_utf8(target);
+       sl = path_from_utf8(source);
+       tl = path_from_utf8(target);
 
-       //ret = (symlink(sl, tl) == 0);
+       ret = (symlink(sl, tl) == 0);
 
-       //g_free(sl);
-       //g_free(tl);
+       g_free(sl);
+       g_free(tl);
 
-       //return ret;
-//}
+       return ret;
+}
+#pragma GCC diagnostic pop
 
 gboolean mkdir_utf8(const gchar *s, gint mode)
 {
@@ -782,34 +785,37 @@ gchar *unique_filename(const gchar *path, const gchar *ext, const gchar *divider
        return unique;
 }
 
-//gchar *unique_filename_simple(const gchar *path)
-//{
-       //gchar *unique;
-       //const gchar *name;
-       //const gchar *ext;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gchar *unique_filename_simple_unused(const gchar *path)
+{
+       gchar *unique;
+       const gchar *name;
+       const gchar *ext;
 
-       //if (!path) return NULL;
+       if (!path) return NULL;
 
-       //name = filename_from_path(path);
-       //if (!name) return NULL;
+       name = filename_from_path(path);
+       if (!name) return NULL;
 
-       //ext = registered_extension_from_path(name);
+       ext = registered_extension_from_path(name);
 
-       //if (!ext)
-               //{
-               //unique = unique_filename(path, NULL, "_", TRUE);
-               //}
-       //else
-               //{
-               //gchar *base;
+       if (!ext)
+               {
+               unique = unique_filename(path, NULL, "_", TRUE);
+               }
+       else
+               {
+               gchar *base;
 
-               //base = remove_extension_from_path(path);
-               //unique = unique_filename(base, ext, "_", TRUE);
-               //g_free(base);
-               //}
+               base = remove_extension_from_path(path);
+               unique = unique_filename(base, ext, "_", TRUE);
+               g_free(base);
+               }
 
-       //return unique;
-//}
+       return unique;
+}
+#pragma GCC diagnostic pop
 
 const gchar *filename_from_path(const gchar *path)
 {
index 26b0aac..d6b98a9 100644 (file)
@@ -169,20 +169,23 @@ void help_window_set_key(GtkWidget *window, const gchar *key)
        if (key) help_window_scroll(text, key);
 }
 
-//void help_window_set_file(GtkWidget *window, const gchar *path, const gchar *key)
-//{
-       //GtkWidget *text;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void help_window_set_file_unused(GtkWidget *window, const gchar *path, const gchar *key)
+{
+       GtkWidget *text;
 
-       //if (!window || !path) return;
+       if (!window || !path) return;
 
-       //text = g_object_get_data(G_OBJECT(window), "text_widget");
-       //if (!text) return;
+       text = static_cast<GtkWidget *>(g_object_get_data(G_OBJECT(window), "text_widget"));
+       if (!text) return;
 
-       //gdk_window_raise(gtk_widget_get_window(window));
+       gdk_window_raise(gtk_widget_get_window(window));
 
-       //help_window_load_text(text, path);
-       //help_window_scroll(text, key);
-//}
+       help_window_load_text(text, path);
+       help_window_scroll(text, key);
+}
+#pragma GCC diagnostic pop
 
 GtkWidget *help_window_new(const gchar *title,
                           const gchar *subclass,
@@ -259,8 +262,12 @@ GtkWidget *help_window_new(const gchar *title,
        return window;
 }
 
-//GtkWidget *help_window_get_box(GtkWidget *window)
-//{
-       //return g_object_get_data(G_OBJECT(window), "text_vbox");
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+GtkWidget *help_window_get_box_unused(GtkWidget *window)
+{
+       return static_cast<GtkWidget *>(g_object_get_data(G_OBJECT(window), "text_vbox"));
+}
+#pragma GCC diagnostic pop
+
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index d527364..f388d58 100644 (file)
@@ -338,11 +338,14 @@ GtkWidget *pref_checkbox_new(GtkWidget *parent_box, const gchar *text, gboolean
        return real_pref_checkbox_new(parent_box, text, FALSE, active, func, data);
 }
 
-//GtkWidget *pref_checkbox_new_mnemonic(GtkWidget *parent_box, const gchar *text, gboolean active,
-                                     //GCallback func, gpointer data)
-//{
-       //return real_pref_checkbox_new(parent_box, text, TRUE, active, func, data);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+GtkWidget *pref_checkbox_new_mnemonic_unused(GtkWidget *parent_box, const gchar *text, gboolean active,
+                                     GCallback func, gpointer data)
+{
+       return real_pref_checkbox_new(parent_box, text, TRUE, active, func, data);
+}
+#pragma GCC diagnostic pop
 
 static void pref_checkbox_int_cb(GtkWidget *widget, gpointer data)
 {
@@ -378,20 +381,23 @@ void pref_checkbox_link_sensitivity(GtkWidget *button, GtkWidget *widget)
        pref_checkbox_link_sensitivity_cb(button, widget);
 }
 
-//static void pref_checkbox_link_sensitivity_swap_cb(GtkWidget *button, gpointer data)
-//{
-       //GtkWidget *widget = static_cast<GtkWidget *>(data);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+static void pref_checkbox_link_sensitivity_swap_cb_unused(GtkWidget *button, gpointer data)
+{
+       GtkWidget *widget = static_cast<GtkWidget *>(data);
 
-       //gtk_widget_set_sensitive(widget, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)));
-//}
+       gtk_widget_set_sensitive(widget, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)));
+}
 
-//void pref_checkbox_link_sensitivity_swap(GtkWidget *button, GtkWidget *widget)
-//{
-       //g_signal_connect(G_OBJECT(button), "toggled",
-                        //G_CALLBACK(pref_checkbox_link_sensitivity_swap_cb), widget);
+void pref_checkbox_link_sensitivity_swap_unused(GtkWidget *button, GtkWidget *widget)
+{
+       g_signal_connect(G_OBJECT(button), "toggled",
+                        G_CALLBACK(pref_checkbox_link_sensitivity_swap_cb_unused), widget);
 
-       //pref_checkbox_link_sensitivity_swap_cb(button, widget);
-//}
+       pref_checkbox_link_sensitivity_swap_cb_unused(button, widget);
+}
+#pragma GCC diagnostic pop
 
 static GtkWidget *real_pref_radiobutton_new(GtkWidget *parent_box, GtkWidget *sibling,
                                            const gchar *text, gboolean mnemonic_text, gboolean active,
@@ -434,39 +440,42 @@ GtkWidget *pref_radiobutton_new(GtkWidget *parent_box, GtkWidget *sibling,
        return real_pref_radiobutton_new(parent_box, sibling, text, FALSE, active, func, data);
 }
 
-//GtkWidget *pref_radiobutton_new_mnemonic(GtkWidget *parent_box, GtkWidget *sibling,
-                                        //const gchar *text, gboolean active,
-                                        //GCallback func, gpointer data)
-//{
-       //return real_pref_radiobutton_new(parent_box, sibling, text, TRUE, active, func, data);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+GtkWidget *pref_radiobutton_new_mnemonic_unused(GtkWidget *parent_box, GtkWidget *sibling,
+                                        const gchar *text, gboolean active,
+                                        GCallback func, gpointer data)
+{
+       return real_pref_radiobutton_new(parent_box, sibling, text, TRUE, active, func, data);
+}
 
 #define PREF_RADIO_VALUE_KEY "pref_radio_value"
 
-//static void pref_radiobutton_int_cb(GtkWidget *widget, gpointer data)
-//{
-       //gboolean *result = static_cast<gboolean *>(data);
+static void pref_radiobutton_int_cb_unused(GtkWidget *widget, gpointer data)
+{
+       gboolean *result = static_cast<gboolean *>(data);
 
-       //if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
-               //{
-               //*result = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), PREF_RADIO_VALUE_KEY));
-               //}
-//}
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
+               {
+               *result = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), PREF_RADIO_VALUE_KEY));
+               }
+}
 
-//GtkWidget *pref_radiobutton_new_int(GtkWidget *parent_box, GtkWidget *sibling,
-                                   //const gchar *text, gboolean active,
-                                   //gboolean *result, gboolean value,
-                                   //GCallback UNUSED(func), gpointer UNUSED(data))
-//{
-       //GtkWidget *button;
+GtkWidget *pref_radiobutton_new_int_unused(GtkWidget *parent_box, GtkWidget *sibling,
+                                   const gchar *text, gboolean active,
+                                   gboolean *result, gboolean value,
+                                   GCallback UNUSED(func), gpointer UNUSED(data))
+{
+       GtkWidget *button;
 
-       //button = pref_radiobutton_new(parent_box, sibling, text, active,
-                                     //G_CALLBACK(pref_radiobutton_int_cb), result);
-       //g_object_set_data(G_OBJECT(button), PREF_RADIO_VALUE_KEY, GINT_TO_POINTER(value));
-       //if (active) *result = value;
+       button = pref_radiobutton_new(parent_box, sibling, text, active,
+                                     G_CALLBACK(pref_radiobutton_int_cb_unused), result);
+       g_object_set_data(G_OBJECT(button), PREF_RADIO_VALUE_KEY, GINT_TO_POINTER(value));
+       if (active) *result = value;
 
-       //return button;
-//}
+       return button;
+}
+#pragma GCC diagnostic pop
 
 static GtkWidget *real_pref_spin_new(GtkWidget *parent_box, const gchar *text, const gchar *suffix,
                                     gboolean mnemonic_text,
@@ -524,14 +533,17 @@ GtkWidget *pref_spin_new(GtkWidget *parent_box, const gchar *text, const gchar *
                                  min, max, step, digits, value, func, data);
 }
 
-//GtkWidget *pref_spin_new_mnemonic(GtkWidget *parent_box, const gchar *text, const gchar *suffix,
-                                 //gdouble min, gdouble max, gdouble step, gint digits,
-                                 //gdouble value,
-                                 //GCallback func, gpointer data)
-//{
-       //return real_pref_spin_new(parent_box, text, suffix, TRUE,
-                                 //min, max, step, digits, value, func, data);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+GtkWidget *pref_spin_new_mnemonic_unused(GtkWidget *parent_box, const gchar *text, const gchar *suffix,
+                                 gdouble min, gdouble max, gdouble step, gint digits,
+                                 gdouble value,
+                                 GCallback func, gpointer data)
+{
+       return real_pref_spin_new(parent_box, text, suffix, TRUE,
+                                 min, max, step, digits, value, func, data);
+}
+#pragma GCC diagnostic pop
 
 static void pref_spin_int_cb(GtkWidget *widget, gpointer data)
 {
@@ -776,28 +788,31 @@ GtkWidget *pref_toolbar_button(GtkWidget *toolbar,
        return item;
 }
 
-//void pref_toolbar_button_set_icon(GtkWidget *button, GtkWidget *widget, const gchar *stock_id)
-//{
-       //if (widget)
-               //{
-               //gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(button), widget);
-               //}
-       //else if (stock_id)
-               //{
-               //gtk_tool_button_set_stock_id(GTK_TOOL_BUTTON(button), stock_id);
-               //}
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void pref_toolbar_button_set_icon_unused(GtkWidget *button, GtkWidget *widget, const gchar *stock_id)
+{
+       if (widget)
+               {
+               gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(button), widget);
+               }
+       else if (stock_id)
+               {
+               gtk_tool_button_set_stock_id(GTK_TOOL_BUTTON(button), stock_id);
+               }
+}
 
-//GtkWidget *pref_toolbar_spacer(GtkWidget *toolbar)
-//{
-       //GtkWidget *item;
+GtkWidget *pref_toolbar_spacer_unused(GtkWidget *toolbar)
+{
+       GtkWidget *item;
 
-       //item = GTK_WIDGET(gtk_separator_tool_item_new());
-       //gtk_container_add(GTK_CONTAINER(toolbar), item);
-       //gtk_widget_show(item);
+       item = GTK_WIDGET(gtk_separator_tool_item_new());
+       gtk_container_add(GTK_CONTAINER(toolbar), item);
+       gtk_widget_show(item);
 
-       //return item;
-//}
+       return item;
+}
+#pragma GCC diagnostic pop
 
 
 /*
@@ -1128,25 +1143,28 @@ void date_selection_time_set(GtkWidget *widget, time_t t)
        date_selection_set(widget, lt->tm_mday, lt->tm_mon + 1, lt->tm_year + 1900);
 }
 
-//time_t date_selection_time_get(GtkWidget *widget)
-//{
-       //struct tm lt;
-       //gint day = 0;
-       //gint month = 0;
-       //gint year = 0;
-
-       //date_selection_get(widget, &day, &month ,&year);
-
-       //lt.tm_sec = 0;
-       //lt.tm_min = 0;
-       //lt.tm_hour = 0;
-       //lt.tm_mday = day;
-       //lt.tm_mon = month - 1;
-       //lt.tm_year = year - 1900;
-       //lt.tm_isdst = 0;
-
-       //return mktime(&lt);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+time_t date_selection_time_get_unused(GtkWidget *widget)
+{
+       struct tm lt;
+       gint day = 0;
+       gint month = 0;
+       gint year = 0;
+
+       date_selection_get(widget, &day, &month ,&year);
+
+       lt.tm_sec = 0;
+       lt.tm_min = 0;
+       lt.tm_hour = 0;
+       lt.tm_mday = day;
+       lt.tm_mon = month - 1;
+       lt.tm_year = year - 1900;
+       lt.tm_isdst = 0;
+
+       return mktime(&lt);
+}
+#pragma GCC diagnostic pop
 
 /*
  *-----------------------------------------------------------------------------
@@ -1276,44 +1294,46 @@ gboolean pref_list_int_get(const gchar *group, const gchar *key, gint *result)
        return FALSE;
 }
 
-//void pref_list_double_set(const gchar *group, const gchar *key, gdouble value)
-//{
-       //gchar text[G_ASCII_DTOSTR_BUF_SIZE];
-
-       //g_ascii_dtostr(text, sizeof(text), value);
-       //pref_list_set(group, key, PREF_LIST_MARKER_DOUBLE, text);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void pref_list_double_set_unused(const gchar *group, const gchar *key, gdouble value)
+{
+       gchar text[G_ASCII_DTOSTR_BUF_SIZE];
 
-//gboolean pref_list_double_get(const gchar *group, const gchar *key, gdouble *result)
-//{
-       //const gchar *text;
+       g_ascii_dtostr(text, sizeof(text), value);
+       pref_list_set(group, key, PREF_LIST_MARKER_DOUBLE, text);
+}
 
-       //if (!group || !key)
-               //{
-               //*result = 0;
-               //return FALSE;
-               //}
+gboolean pref_list_double_get_unused(const gchar *group, const gchar *key, gdouble *result)
+{
+       const gchar *text;
 
-       //if (pref_list_get(group, key, PREF_LIST_MARKER_DOUBLE, &text) && text)
-               //{
-               //*result = g_ascii_strtod(text, NULL);
-               //return TRUE;
-               //}
+       if (!group || !key)
+               {
+               *result = 0;
+               return FALSE;
+               }
 
-       //*result = 0;
-       //return FALSE;
-//}
+       if (pref_list_get(group, key, PREF_LIST_MARKER_DOUBLE, &text) && text)
+               {
+               *result = g_ascii_strtod(text, NULL);
+               return TRUE;
+               }
 
-//void pref_list_string_set(const gchar *group, const gchar *key, const gchar *value)
-//{
-       //pref_list_set(group, key, PREF_LIST_MARKER_STRING, value);
-//}
+       *result = 0;
+       return FALSE;
+}
 
-//gboolean pref_list_string_get(const gchar *group, const gchar *key, const gchar **result)
-//{
-       //return pref_list_get(group, key, PREF_LIST_MARKER_STRING, result);
-//}
+void pref_list_string_set_unused(const gchar *group, const gchar *key, const gchar *value)
+{
+       pref_list_set(group, key, PREF_LIST_MARKER_STRING, value);
+}
 
+gboolean pref_list_string_get_unused(const gchar *group, const gchar *key, const gchar **result)
+{
+       return pref_list_get(group, key, PREF_LIST_MARKER_STRING, result);
+}
+#pragma GCC diagnostic pop
 
 void pref_color_button_set_cb(GtkWidget *widget, gpointer data)
 {
index 67312ce..967b8a5 100644 (file)
@@ -1211,34 +1211,37 @@ GtkWidget *path_selection_new_with_files(GtkWidget *entry, const gchar *path,
        return table;
 }
 
-//GtkWidget *path_selection_new(const gchar *path, GtkWidget *entry)
-//{
-       //return path_selection_new_with_files(entry, path, NULL, NULL);
-//}
-
-//void path_selection_sync_to_entry(GtkWidget *entry)
-//{
-       //Dest_Data *dd = g_object_get_data(G_OBJECT(entry), "destination_data");
-       //const gchar *path;
-
-       //if (!dd) return;
-
-       //path = gtk_entry_get_text(GTK_ENTRY(entry));
-
-       //if (isdir(path) && (!dd->path || strcmp(path, dd->path) != 0))
-               //{
-               //dest_populate(dd, path);
-               //}
-       //else
-               //{
-               //gchar *buf = remove_level_from_path(path);
-               //if (isdir(buf) && (!dd->path || strcmp(buf, dd->path) != 0))
-                       //{
-                       //dest_populate(dd, buf);
-                       //}
-               //g_free(buf);
-               //}
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+GtkWidget *path_selection_new_unused(const gchar *path, GtkWidget *entry)
+{
+       return path_selection_new_with_files(entry, path, NULL, NULL);
+}
+
+void path_selection_sync_to_entry_unused(GtkWidget *entry)
+{
+       Dest_Data *dd = static_cast<Dest_Data *>(g_object_get_data(G_OBJECT(entry), "destination_data"));
+       const gchar *path;
+
+       if (!dd) return;
+
+       path = gtk_entry_get_text(GTK_ENTRY(entry));
+
+       if (isdir(path) && (!dd->path || strcmp(path, dd->path) != 0))
+               {
+               dest_populate(dd, path);
+               }
+       else
+               {
+               gchar *buf = remove_level_from_path(path);
+               if (isdir(buf) && (!dd->path || strcmp(buf, dd->path) != 0))
+                       {
+                       dest_populate(dd, buf);
+                       }
+               g_free(buf);
+               }
+}
+#pragma GCC diagnostic pop
 
 void path_selection_add_select_func(GtkWidget *entry,
                                    void (*func)(const gchar *, gpointer), gpointer data)
index 40183d6..24431a7 100644 (file)
@@ -188,24 +188,27 @@ void spinner_set_interval(GtkWidget *spinner, gint interval)
        spinner_set_timeout(sp, interval);
 }
 
-//void spinner_step(GtkWidget *spinner, gboolean reset)
-//{
-       //SpinnerData *sp;
-
-       //sp = g_object_get_data(G_OBJECT(spinner), "spinner");
-       //if (sp->timer_id)
-               //{
-               //log_printf("spinner warning: attempt to step with timer set\n");
-               //return;
-               //}
-
-       //if (reset)
-               //{
-               //spinner_set_frame(sp, 0);
-               //}
-       //else
-               //{
-               //spinner_increment_frame(sp);
-               //}
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void spinner_step_unused(GtkWidget *spinner, gboolean reset)
+{
+       SpinnerData *sp;
+
+       sp = static_cast<SpinnerData *>(g_object_get_data(G_OBJECT(spinner), "spinner"));
+       if (sp->timer_id)
+               {
+               log_printf("spinner warning: attempt to step with timer set\n");
+               return;
+               }
+
+       if (reset)
+               {
+               spinner_set_frame(sp, 0);
+               }
+       else
+               {
+               spinner_increment_frame(sp);
+               }
+}
+#pragma GCC diagnostic pop
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 378c25e..6f44fc0 100644 (file)
@@ -461,15 +461,18 @@ gboolean tree_view_move_cursor_away(GtkTreeView *widget, GtkTreeIter *iter, gboo
        return move;
 }
 
-//gint tree_path_to_row(GtkTreePath *tpath)
-//{
-       //gint *indices;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gint tree_path_to_row_unused(GtkTreePath *tpath)
+{
+       gint *indices;
 
-       //indices = gtk_tree_path_get_indices(tpath);
-       //if (indices) return indices[0];
+       indices = gtk_tree_path_get_indices(tpath);
+       if (indices) return indices[0];
 
-       //return -1;
-//}
+       return -1;
+}
+#pragma GCC diagnostic pop
 
 
 /*
@@ -511,13 +514,16 @@ void shift_color(GdkColor *src, gshort val, gint direction)
 /* darkens or lightens a style's color for given state
  * esp. useful for alternating dark/light in (c)lists
  */
-//void style_shift_color(GtkStyle *style, GtkStateType type, gshort shift_value, gint direction)
-//{
-       //if (!style) return;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void style_shift_color_unused(GtkStyle *style, GtkStateType type, gshort shift_value, gint direction)
+{
+       if (!style) return;
 
-       //shift_color(&style->base[type], shift_value, direction);
-       //shift_color(&style->bg[type], shift_value, direction);
-//}
+       shift_color(&style->base[type], shift_value, direction);
+       shift_color(&style->bg[type], shift_value, direction);
+}
+#pragma GCC diagnostic pop
 
 /*
  *-------------------------------------------------------------------
index dbd9fde..f378614 100644 (file)
@@ -756,17 +756,20 @@ void file_dialog_add_path_widgets(FileDialog *fdlg, const gchar *default_path, c
                         G_CALLBACK(file_dialog_entry_cb), fdlg);
 }
 
-//void file_dialog_add_filter(FileDialog *fdlg, const gchar *filter, const gchar *filter_desc, gboolean set)
-//{
-       //if (!fdlg->entry) return;
-       //path_selection_add_filter(fdlg->entry, filter, filter_desc, set);
-//}
-
-//void file_dialog_clear_filter(FileDialog *fdlg)
-//{
-       //if (!fdlg->entry) return;
-       //path_selection_clear_filter(fdlg->entry);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void file_dialog_add_filter_unused(FileDialog *fdlg, const gchar *filter, const gchar *filter_desc, gboolean set)
+{
+       if (!fdlg->entry) return;
+       path_selection_add_filter(fdlg->entry, filter, filter_desc, set);
+}
+
+void file_dialog_clear_filter_unused(FileDialog *fdlg)
+{
+       if (!fdlg->entry) return;
+       path_selection_clear_filter(fdlg->entry);
+}
+#pragma GCC diagnostic pop
 
 void file_dialog_sync_history(FileDialog *fdlg, gboolean dir_only)
 {
index e972842..806afbd 100644 (file)
@@ -3072,10 +3072,13 @@ void file_util_start_editor_from_filelist(const gchar *key, GList *list, const g
        file_util_start_editor_full(key, nullptr, list, nullptr, working_directory, parent, UTILITY_PHASE_ENTERING);
 }
 
-//void file_util_start_filter_from_file(const gchar *key, FileData *fd, const gchar *dest_path, GtkWidget *parent)
-//{
-       //file_util_start_editor_full(key, fd, NULL, dest_path, NULL, parent, UTILITY_PHASE_ENTERING);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void file_util_start_filter_from_file_unused(const gchar *key, FileData *fd, const gchar *dest_path, GtkWidget *parent)
+{
+       file_util_start_editor_full(key, fd, NULL, dest_path, NULL, parent, UTILITY_PHASE_ENTERING);
+}
+#pragma GCC diagnostic pop
 
 void file_util_start_filter_from_filelist(const gchar *key, GList *list, const gchar *dest_path, GtkWidget *parent)
 {
index 1f0d3a4..62b786a 100644 (file)
@@ -229,10 +229,13 @@ void vd_set_select_func(ViewDir *vd,
        vd->select_data = data;
 }
 
-//void vd_set_layout(ViewDir *vd, LayoutWindow *layout)
-//{
-       //vd->layout = layout;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void vd_set_layout_unused(ViewDir *vd, LayoutWindow *layout)
+{
+       vd->layout = layout;
+}
+#pragma GCC diagnostic pop
 
 gboolean vd_set_fd(ViewDir *vd, FileData *dir_fd)
 {
@@ -260,18 +263,21 @@ void vd_refresh(ViewDir *vd)
        }
 }
 
-//const gchar *vd_row_get_path(ViewDir *vd, gint row)
-//{
-       //const gchar *ret = NULL;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+const gchar *vd_row_get_path_unused(ViewDir *vd, gint row)
+{
+       const gchar *ret = NULL;
 
-       //switch (vd->type)
-       //{
-       //case DIRVIEW_LIST: ret = vdlist_row_get_path(vd, row); break;
-       //case DIRVIEW_TREE: ret = vdtree_row_get_path(vd, row); break;
-       //}
+       switch (vd->type)
+       {
+       case DIRVIEW_LIST: ret = vdlist_row_get_path(vd, row); break;
+       case DIRVIEW_TREE: ret = vdtree_row_get_path(vd, row); break;
+       }
 
-       //return ret;
-//}
+       return ret;
+}
+#pragma GCC diagnostic pop
 
 /* the calling stack is this:
    vd_select_row -> select_func -> layout_set_fd -> vd_set_fd
@@ -1142,22 +1148,25 @@ void vd_dnd_init(ViewDir *vd)
  *----------------------------------------------------------------------------
  */
 
-//void vd_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
-//{
-       //ViewDir *vd = static_cast<//ViewDir *>(data);
-       //GtkTreeModel *store;
-       //GtkTreeIter iter;
-       //GtkTreePath *tpath;
-       //gint cw, ch;
-
-       //if (!vd_find_row(vd, vd->click_fd, &iter)) return;
-       //store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view));
-       //tpath = gtk_tree_model_get_path(store, &iter);
-       //tree_view_get_cell_clamped(GTK_TREE_VIEW(vd->view), tpath, 0, TRUE, x, y, &cw, &ch);
-       //gtk_tree_path_free(tpath);
-       //*y += ch;
-       //popup_menu_position_clamp(menu, x, y, 0);
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void vd_menu_position_cb_unused(GtkMenu *menu, gint *x, gint *y, gboolean *UNUSED(push_in), gpointer data)
+{
+       ViewDir *vd = static_cast<ViewDir *>(data);
+       GtkTreeModel *store;
+       GtkTreeIter iter;
+       GtkTreePath *tpath;
+       gint cw, ch;
+
+       if (!vd_find_row(vd, vd->click_fd, &iter)) return;
+       store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view));
+       tpath = gtk_tree_model_get_path(store, &iter);
+       tree_view_get_cell_clamped(GTK_TREE_VIEW(vd->view), tpath, 0, TRUE, x, y, &cw, &ch);
+       gtk_tree_path_free(tpath);
+       *y += ch;
+       popup_menu_position_clamp(menu, x, y, 0);
+}
+#pragma GCC diagnostic pop
 
 void vd_activate_cb(GtkTreeView *tview, GtkTreePath *tpath, GtkTreeViewColumn *UNUSED(column), gpointer data)
 {
index dae4b9d..5c527ec 100644 (file)
@@ -804,14 +804,17 @@ static void vficon_select_region_util(ViewFile *vf, FileData *start, FileData *e
                }
 }
 
-//gboolean vficon_index_is_selected(ViewFile *vf, gint row)
-//{
-       //FileData *fd = g_list_nth_data(vf->list, row);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean vficon_index_is_selected_unused(ViewFile *vf, gint row)
+{
+       FileData *fd = static_cast<FileData *>(g_list_nth_data(vf->list, row));
 
-       //if (!fd) return FALSE;
+       if (!fd) return FALSE;
 
-       //return (fd->selected & SELECTION_SELECTED);
-//}
+       return (fd->selected & SELECTION_SELECTED);
+}
+#pragma GCC diagnostic pop
 
 guint vficon_selection_count(ViewFile *vf, gint64 *bytes)
 {
index 618b57b..fe355e3 100644 (file)
@@ -1422,13 +1422,16 @@ static gboolean vflist_row_is_selected(ViewFile *vf, FileData *fd)
        return found;
 }
 
-//gboolean vflist_index_is_selected(ViewFile *vf, gint row)
-//{
-       //FileData *fd;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean vflist_index_is_selected_unused(ViewFile *vf, gint row)
+{
+       FileData *fd;
 
-       //fd = vf_index_get_data(vf, row);
-       //return vflist_row_is_selected(vf, fd);
-//}
+       fd = vf_index_get_data(vf, row);
+       return vflist_row_is_selected(vf, fd);
+}
+#pragma GCC diagnostic pop
 
 guint vflist_selection_count(ViewFile *vf, gint64 *bytes)
 {
index 06b5184..c4be369 100644 (file)
@@ -1597,19 +1597,21 @@ void vf_marks_set(ViewFile *vf, gboolean enable)
 
        vf_refresh_idle(vf);
 }
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+void vf_star_rating_set_unused(ViewFile *vf, gboolean enable)
+{
+       if (options->show_star_rating == enable) return;
+       options->show_star_rating = enable;
 
-//void vf_star_rating_set(ViewFile *vf, gboolean enable)
-//{
-       //if (options->show_star_rating == enable) return;
-       //options->show_star_rating = enable;
-
-       //switch (vf->type)
-               //{
-               //case FILEVIEW_LIST: vflist_star_rating_set(vf, enable); break;
-               //case FILEVIEW_ICON: vficon_star_rating_set(vf, enable); break;
-               //}
-       //vf_refresh_idle(vf);
-//}
+       switch (vf->type)
+               {
+               case FILEVIEW_LIST: vflist_star_rating_set(vf, enable); break;
+               case FILEVIEW_ICON: vficon_star_rating_set(vf, enable); break;
+               }
+       vf_refresh_idle(vf);
+}
+#pragma GCC diagnostic pop
 
 guint vf_marks_get_filter(ViewFile *vf)
 {