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.
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)
{
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)
{
*-------------------------------------------------------------------
*/
-//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)
{
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)
{
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])
{
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)
{
*-------------------------------------------------------------------
*/
-//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)
{
}
-//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,
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,
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: */
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)
{
}
}
-//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)
{
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
/*
*-----------------------------------------------------------------------------
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
/*
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)
{
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,
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),
}
/* 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)
{
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)
{
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)
* 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
/*
*----------------------------------------------------------------------------
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)
{
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)
{
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)
{
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
/*
*-----------------------------------------------------------------------------
/** @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()
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))
{
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)
{
}
}
-//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)
{
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
/*
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)
{
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))
{
*-----------------------------------------------------------------------------
*/
-//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
/*
*-----------------------------------------------------------------------------
}
}
-//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,
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)
{
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()
{
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)
{
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)
{
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,
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: */
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)
{
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,
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,
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)
{
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
/*
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(<);
-//}
+#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(<);
+}
+#pragma GCC diagnostic pop
/*
*-----------------------------------------------------------------------------
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)
{
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)
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: */
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
/*
/* 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
/*
*-------------------------------------------------------------------
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)
{
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)
{
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)
{
}
}
-//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
*----------------------------------------------------------------------------
*/
-//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)
{
}
}
-//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)
{
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)
{
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)
{