#include "pan-view.h"
+#include <config.h>
+
#include "bar-exif.h"
+#include "compat.h"
+#include "debug.h"
#include "dnd.h"
#include "editors.h"
#include "exif.h"
#include "fullscreen.h"
#include "image.h"
#include "img-view.h"
+#include "intl.h"
#include "layout-util.h"
+#include "main-defines.h"
+#include "main.h"
#include "menu.h"
#include "metadata.h"
+#include "misc.h"
#include "pan-calendar.h"
#include "pan-folder.h"
#include "pan-grid.h"
+#include "pan-item.h"
#include "pan-timeline.h"
#include "pan-util.h"
#include "pan-view-filter.h"
#include "pan-view-search.h"
+#include "pixbuf-renderer.h"
#include "pixbuf-util.h"
#include "thumb.h"
#include "ui-fileops.h"
#include <cmath>
-#define PAN_WINDOW_DEFAULT_WIDTH 720
-#define PAN_WINDOW_DEFAULT_HEIGHT 500
+enum {
+ PAN_WINDOW_DEFAULT_WIDTH = 720,
+ PAN_WINDOW_DEFAULT_HEIGHT = 500
+};
-#define PAN_TILE_SIZE 512
+enum {
+ PAN_TILE_SIZE = 512
+};
#define ZOOM_INCREMENT 1.0
-#define ZOOM_LABEL_WIDTH 64
+enum {
+ ZOOM_LABEL_WIDTH = 64
+};
#define PAN_PREF_GROUP "pan_view_options"
for (i = (x / PAN_GRID_SIZE) * PAN_GRID_SIZE; i < x + width; i += PAN_GRID_SIZE)
{
- gint rx, ry, rw, rh;
+ gint rx;
+ gint ry;
+ gint rw;
+ gint rh;
if (util_clip_region(x, y, width, height,
i, y, 1, height,
}
for (i = (y / PAN_GRID_SIZE) * PAN_GRID_SIZE; i < y + height; i += PAN_GRID_SIZE)
{
- gint rx, ry, rw, rh;
+ gint rx;
+ gint ry;
+ gint rw;
+ gint rh;
if (util_clip_region(x, y, width, height,
x, i, width, 1,
return TRUE;
}
-static void pan_window_dispose_tile_cb(PixbufRenderer *UNUSED(pr), gint x, gint y,
- gint width, gint height, GdkPixbuf *UNUSED(pixbuf), gpointer data)
+static void pan_window_dispose_tile_cb(PixbufRenderer *, gint x, gint y,
+ gint width, gint height, GdkPixbuf *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
GList *list;
message = g_strdup_printf(_("The pan view does not support the folder \"%s\"."), path);
warning_dialog(_("Folder not supported"), message,
- GTK_STOCK_DIALOG_INFO, parent);
+ GQ_ICON_DIALOG_INFO, parent);
g_free(message);
}
auto pcb = static_cast<PanCacheData *>(b);
return filelist_sort_compare_filedata(pca->fd, pcb->fd);
}
-GList *pan_cache_sort(GList *list, SortType method, gboolean ascend)
+GList *pan_cache_sort(GList *list, SortType method, gboolean ascend, gboolean case_sensitive)
{
- return filelist_sort_full(list, method, ascend, reinterpret_cast<GCompareFunc>(pan_cache_sort_file_cb));
+ return filelist_sort_full(list, method, ascend, case_sensitive, reinterpret_cast<GCompareFunc>(pan_cache_sort_file_cb));
}
static void pan_cache_free(PanWindow *pw)
{
- GList *work;
-
- work = pw->cache_list;
- while (work)
+ g_list_free_full(pw->cache_list, [](gpointer data)
{
- PanCacheData *pc;
-
- pc = static_cast<PanCacheData *>(work->data);
- work = work->next;
-
+ auto pc = static_cast<PanCacheData *>(data);
cache_sim_data_free(pc->cd);
file_data_unref(pc->fd);
g_free(pc);
- }
-
- g_list_free(pw->cache_list);
+ });
pw->cache_list = nullptr;
filelist_free(pw->cache_todo);
pan_cache_free(pw);
- list = pan_list_tree(dir_fd, SORT_NAME, TRUE, pw->ignore_symlinks);
+ list = pan_list_tree(dir_fd, SORT_NAME, TRUE, TRUE, pw->ignore_symlinks);
pw->cache_todo = g_list_reverse(list);
pw->cache_total = g_list_length(pw->cache_todo);
}
-static void pan_cache_step_done_cb(CacheLoader *cl, gint UNUSED(error), gpointer data)
+static void pan_cache_step_done_cb(CacheLoader *cl, gint, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
static void pan_grid_clear(PanWindow *pw)
{
- GList *work;
-
- work = pw->list_grid;
- while (work)
+ g_list_free_full(pw->list_grid, [](gpointer data)
{
- PanGrid *pg;
-
- pg = static_cast<PanGrid *>(work->data);
- work = work->next;
-
+ auto pg = static_cast<PanGrid *>(data);
g_list_free(pg->list);
g_free(pg);
- }
-
- g_list_free(pw->list_grid);
+ });
pw->list_grid = nullptr;
pw->list = g_list_concat(pw->list, pw->list_static);
static void pan_grid_build(PanWindow *pw, gint width, gint height, gint grid_size)
{
GList *work;
- gint col, row;
- gint cw, ch;
+ gint col;
+ gint row;
+ gint cw;
+ gint ch;
gint l;
- gint i, j;
+ gint i;
+ gint j;
pan_grid_clear(pw);
while (grid)
{
PanGrid *pg;
- gint rx, ry, rw, rh;
+ gint rx;
+ gint ry;
+ gint rw;
+ gint rh;
pg = static_cast<PanGrid *>(grid->data);
grid = grid->next;
static void pan_window_items_free(PanWindow *pw)
{
- GList *work;
-
pan_grid_clear(pw);
- work = pw->list;
- while (work)
- {
- auto pi = static_cast<PanItem *>(work->data);
- work = work->next;
-
- pan_item_free(pi);
- }
-
- g_list_free(pw->list);
+ g_list_free_full(pw->list, reinterpret_cast<GDestroyNotify>(pan_item_free));
pw->list = nullptr;
g_list_free(pw->queue);
while (work)
{
PanItem *pi;
- gint rx, ry, rw, rh;
+ gint rx;
+ gint ry;
+ gint rw;
+ gint rh;
pi = static_cast<PanItem *>(work->data);
work = work->next;
g_free(text);
}
- string_list_free(exif_list);
+ g_list_free_full(exif_list, g_free);
}
PanItem *pbox;
PanItem *p;
gchar *buf;
- gint x1, y1, x2, y2, x3, y3;
- gint x, y, w, h;
+ gint x1;
+ gint y1;
+ gint x2;
+ gint y2;
+ gint x3;
+ gint y3;
+ gint x;
+ gint y;
+ gint w;
+ gint h;
if (pw->click_pi == pi) return;
if (pi && !pi->fd) pi = nullptr;
if (pw->info_image_size > PAN_IMAGE_SIZE_THUMB_NONE)
{
- gint iw, ih;
+ gint iw;
+ gint ih;
if (image_load_dimensions(pi->fd, &iw, &ih))
{
gint scale = 25;
auto pw = static_cast<PanWindow *>(data);
PanItem *pi = nullptr;
GtkWidget *menu;
- gint rx, ry;
+ gint rx;
+ gint ry;
rx = ry = 0;
if (pr->scale)
}
}
-static void scroll_cb(PixbufRenderer *pr, GdkEventScroll *event, gpointer UNUSED(data))
+static void scroll_cb(PixbufRenderer *pr, GdkEventScroll *event, gpointer)
{
- gint w, h;
+ gint w;
+ gint h;
w = pr->vis_width;
h = pr->vis_height;
G_CALLBACK(scroll_cb), pw);
}
-static void pan_fullscreen_stop_func(FullScreenData *UNUSED(fs), gpointer data)
+static void pan_fullscreen_stop_func(FullScreenData *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
}
}
-static void pan_window_image_zoom_cb(PixbufRenderer *UNUSED(pr), gdouble UNUSED(zoom), gpointer data)
+static void pan_window_image_zoom_cb(PixbufRenderer *, gdouble, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
gchar *text;
auto pw = static_cast<PanWindow *>(data);
GtkAdjustment *adj;
GdkRectangle rect;
- gint width, height;
+ gint width;
+ gint height;
if (pr->scale == 0.0) return;
gtk_adjustment_set_value(adj, static_cast<gdouble>(rect.x));
pref_signal_block_data(pw->scrollbar_h, pw);
- gtk_adjustment_changed(adj);
- gtk_adjustment_value_changed(adj);
pref_signal_unblock_data(pw->scrollbar_h, pw);
adj = gtk_range_get_adjustment(GTK_RANGE(pw->scrollbar_v));
gtk_adjustment_set_value(adj, static_cast<gdouble>(rect.y));
pref_signal_block_data(pw->scrollbar_v, pw);
- gtk_adjustment_changed(adj);
- gtk_adjustment_value_changed(adj);
pref_signal_unblock_data(pw->scrollbar_v, pw);
}
{
warning_dialog(_("Folder not found"),
_("The entered path is not a folder"),
- GTK_STOCK_DIALOG_WARNING, pw->path_entry);
+ GQ_ICON_DIALOG_WARNING, pw->path_entry);
}
else
{
pan_fullscreen_toggle(pw, TRUE);
pan_search_ui_destroy(&pw->search_ui);
pan_filter_ui_destroy(&pw->filter_ui);
- gtk_widget_destroy(pw->window);
+ gq_gtk_widget_destroy(pw->window);
pan_window_items_free(pw);
pan_cache_free(pw);
g_free(pw);
}
-static gboolean pan_window_delete_cb(GtkWidget *UNUSED(w), GdkEventAny *UNUSED(event), gpointer data)
+static gboolean pan_window_delete_cb(GtkWidget *, GdkEventAny *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
pw->idle_id = 0;
- pw->window = window_new(GTK_WINDOW_TOPLEVEL, "panview", nullptr, nullptr, _("Pan View"));
+ pw->window = window_new("panview", nullptr, nullptr, _("Pan View"));
DEBUG_NAME(pw->window);
geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
pref_label_new(box, _("Location:"));
combo = tab_completion_new_with_history(&pw->path_entry, dir_fd->path, "pan_view_path", -1,
pan_window_entry_activate_cb, pw);
- gtk_box_pack_start(GTK_BOX(box), combo, TRUE, TRUE, 0);
+ gq_gtk_box_pack_start(GTK_BOX(box), combo, TRUE, TRUE, 0);
gtk_widget_show(combo);
combo = gtk_combo_box_text_new();
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), pw->layout);
g_signal_connect(G_OBJECT(combo), "changed",
G_CALLBACK(pan_window_layout_change_cb), pw);
- gtk_box_pack_start(GTK_BOX(box), combo, FALSE, FALSE, 0);
+ gq_gtk_box_pack_start(GTK_BOX(box), combo, FALSE, FALSE, 0);
gtk_widget_show(combo);
combo = gtk_combo_box_text_new();
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), pw->size);
g_signal_connect(G_OBJECT(combo), "changed",
G_CALLBACK(pan_window_layout_size_cb), pw);
- gtk_box_pack_start(GTK_BOX(box), combo, FALSE, FALSE, 0);
+ gq_gtk_box_pack_start(GTK_BOX(box), combo, FALSE, FALSE, 0);
gtk_widget_show(combo);
table = pref_table_new(vbox, 2, 2, FALSE, TRUE);
- gtk_table_set_row_spacings(GTK_TABLE(table), 2);
- gtk_table_set_col_spacings(GTK_TABLE(table), 2);
-
- /** @FIXME pan view does not work correctly when renderer-clutter()
- * is used.
- */
- gint temp = options->image.use_clutter_renderer;
- options->image.use_clutter_renderer = FALSE;
- pw->imd = image_new(TRUE);
- options->image.use_clutter_renderer = temp;
+ gtk_grid_set_row_spacing(GTK_GRID(table), 2);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 2);
+ pw->imd = image_new(TRUE);
pw->imd_normal = pw->imd;
g_signal_connect(G_OBJECT(pw->imd->pr), "zoom",
g_signal_connect(G_OBJECT(pw->imd->pr), "scroll_notify",
G_CALLBACK(pan_window_image_scroll_notify_cb), pw);
- gtk_table_attach(GTK_TABLE(table), pw->imd->widget, 0, 1, 0, 1,
- static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), 0, 0);
+ gq_gtk_grid_attach(GTK_GRID(table), pw->imd->widget, 0, 1, 0, 1, static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), 0, 0);
gtk_widget_show(GTK_WIDGET(pw->imd->widget));
pan_window_dnd_init(pw);
pan_image_set_buttons(pw, pw->imd);
- pw->scrollbar_h = gtk_hscrollbar_new(nullptr);
+ pw->scrollbar_h = gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, nullptr);
g_signal_connect(G_OBJECT(pw->scrollbar_h), "value_changed",
G_CALLBACK(pan_window_scrollbar_h_value_cb), pw);
- gtk_table_attach(GTK_TABLE(table), pw->scrollbar_h, 0, 1, 1, 2,
- static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
+ gq_gtk_grid_attach(GTK_GRID(table), pw->scrollbar_h, 0, 1, 1, 2, static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
gtk_widget_show(pw->scrollbar_h);
- pw->scrollbar_v = gtk_vscrollbar_new(nullptr);
+ pw->scrollbar_v = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, nullptr);
g_signal_connect(G_OBJECT(pw->scrollbar_v), "value_changed",
G_CALLBACK(pan_window_scrollbar_v_value_cb), pw);
- gtk_table_attach(GTK_TABLE(table), pw->scrollbar_v, 1, 2, 0, 1,
- static_cast<GtkAttachOptions>(0), static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), 0, 0);
+ gq_gtk_grid_attach(GTK_GRID(table), pw->scrollbar_v, 1, 2, 0, 1, static_cast<GtkAttachOptions>(0), static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), 0, 0);
gtk_widget_show(pw->scrollbar_v);
/* find bar */
pw->search_ui = pan_search_ui_new(pw);
- gtk_box_pack_start(GTK_BOX(vbox), pw->search_ui->search_box, FALSE, FALSE, 2);
+ gq_gtk_box_pack_start(GTK_BOX(vbox), pw->search_ui->search_box, FALSE, FALSE, 2);
/* filter bar */
pw->filter_ui = pan_filter_ui_new(pw);
- gtk_box_pack_start(GTK_BOX(vbox), pw->filter_ui->filter_box, FALSE, FALSE, 2);
+ gq_gtk_box_pack_start(GTK_BOX(vbox), pw->filter_ui->filter_box, FALSE, FALSE, 2);
/* status bar */
frame = gtk_frame_new(nullptr);
DEBUG_NAME(frame);
- gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
+ gq_gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
gtk_widget_set_size_request(frame, ZOOM_LABEL_WIDTH, -1);
- gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0);
+ gq_gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0);
gtk_widget_show(frame);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
frame = gtk_frame_new(nullptr);
DEBUG_NAME(frame);
- gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
+ gq_gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
gtk_widget_set_size_request(frame, ZOOM_LABEL_WIDTH, -1);
- gtk_box_pack_end(GTK_BOX(box), frame, FALSE, FALSE, 0);
+ gq_gtk_box_pack_end(GTK_BOX(box), frame, FALSE, FALSE, 0);
gtk_widget_show(frame);
pw->label_zoom = gtk_label_new("");
gtk_widget_show(pw->label_zoom);
// Add the "Find" button to the status bar area.
- gtk_box_pack_end(GTK_BOX(box), pw->search_ui->search_button, FALSE, FALSE, 0);
+ gq_gtk_box_pack_end(GTK_BOX(box), pw->search_ui->search_button, FALSE, FALSE, 0);
gtk_widget_show(pw->search_ui->search_button);
// Add the "Filter" button to the status bar area.
- gtk_box_pack_end(GTK_BOX(box), pw->filter_ui->filter_button, FALSE, FALSE, 0);
+ gq_gtk_box_pack_end(GTK_BOX(box), pw->filter_ui->filter_button, FALSE, FALSE, 0);
gtk_widget_show(pw->filter_ui->filter_button);
g_signal_connect(G_OBJECT(pw->window), "delete_event",
file_data_unref(dir_fd);
}
-static void pan_warning_hide_cb(GtkWidget *button, gpointer UNUSED(data))
+static void pan_warning_hide_cb(GtkWidget *button, gpointer)
{
gboolean hide_dlg;
GenericDialog *gd;
GtkWidget *box;
GtkWidget *group;
- GtkWidget *button;
+ GtkWidget *checkbox;
GtkWidget *ct_button;
gboolean hide_dlg;
gd = generic_dialog_new(_("Pan View Performance"), "pan_view_warning", nullptr, FALSE,
nullptr, nullptr);
gd->data = file_data_ref(dir_fd);
- generic_dialog_add_button(gd, GTK_STOCK_OK, nullptr,
+ generic_dialog_add_button(gd, GQ_ICON_OK, "OK",
pan_warning_ok_cb, TRUE);
- box = generic_dialog_add_message(gd, GTK_STOCK_DIALOG_INFO,
+ box = generic_dialog_add_message(gd, GQ_ICON_DIALOG_INFO,
_("Pan view performance may be poor."),
_("To improve the performance of thumbnails in\npan view the following options can be enabled.\n\nNote that both options must be enabled to\nnotice a change in performance."), TRUE);
ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"),
options->thumbnails.enable_caching, &options->thumbnails.enable_caching);
- button = pref_checkbox_new_int(group, _("Use shared thumbnail cache"),
+ checkbox = pref_checkbox_new_int(group, _("Use shared thumbnail cache"),
options->thumbnails.spec_standard, &options->thumbnails.spec_standard);
- pref_checkbox_link_sensitivity(ct_button, button);
+ pref_checkbox_link_sensitivity(ct_button, checkbox);
pref_line(box, 0);
#define INFO_IMAGE_SIZE_KEY "image_size_data"
-static void pan_new_window_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_new_window_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;
}
}
-static void pan_go_to_original_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_go_to_original_cb(GtkWidget *, gpointer data)
{
LayoutWindow *lw = nullptr;
auto pw = static_cast<PanWindow *>(data);
}
}
-static void pan_zoom_in_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_zoom_in_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
image_zoom_adjust(pw->imd, ZOOM_INCREMENT);
}
-static void pan_zoom_out_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_zoom_out_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
image_zoom_adjust(pw->imd, -ZOOM_INCREMENT);
}
-static void pan_zoom_1_1_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_zoom_1_1_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
image_zoom_set(pw->imd, 1.0);
}
-static void pan_copy_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_copy_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;
if (fd) file_util_copy(fd, nullptr, nullptr, pw->imd->widget);
}
-static void pan_move_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_move_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;
if (fd) file_util_move(fd, nullptr, nullptr, pw->imd->widget);
}
-static void pan_rename_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_rename_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;
if (fd) file_util_rename(fd, nullptr, pw->imd->widget);
}
-static void pan_delete_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_delete_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;
}
}
-static void pan_move_to_trash_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_move_to_trash_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;
}
}
-static void pan_copy_path_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_copy_path_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;
if (fd) file_util_copy_path_to_clipboard(fd, TRUE);
}
-static void pan_copy_path_unquoted_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_copy_path_unquoted_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;
/** @FIXME sync info now */
}
-static void pan_fullscreen_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_fullscreen_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
pan_fullscreen_toggle(pw, FALSE);
}
-static void pan_close_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_close_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
pan_window_close(pw);
}
-static void pan_popup_menu_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_popup_menu_destroy_cb(GtkWidget *, gpointer data)
{
auto editmenu_fd_list = static_cast<GList *>(data);
filelist_free(editmenu_fd_list);
}
-static void pan_play_cb(GtkWidget *UNUSED(widget), gpointer data)
+static void pan_play_cb(GtkWidget *, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
GtkWidget *menu;
GtkWidget *submenu;
GtkWidget *item;
- gboolean active, video;
+ gboolean active;
+ gboolean video;
GList *editmenu_fd_list;
GtkAccelGroup *accel_group;
g_object_set_data(G_OBJECT(menu), "window_keys", pan_view_window_keys);
g_object_set_data(G_OBJECT(menu), "accel_group", accel_group);
- menu_item_add_stock_sensitive(menu, _("_Play"), GTK_STOCK_MEDIA_PLAY, video,
+ menu_item_add_icon_sensitive(menu, _("_Play"), GQ_ICON_PLAY, video,
G_CALLBACK(pan_play_cb), pw);
menu_item_add_divider(menu);
- menu_item_add_stock(menu, _("Zoom _in"), GTK_STOCK_ZOOM_IN,
+ menu_item_add_icon(menu, _("Zoom _in"), GQ_ICON_ZOOM_IN,
G_CALLBACK(pan_zoom_in_cb), pw);
- menu_item_add_stock(menu, _("Zoom _out"), GTK_STOCK_ZOOM_OUT,
+ menu_item_add_icon(menu, _("Zoom _out"), GQ_ICON_ZOOM_OUT,
G_CALLBACK(pan_zoom_out_cb), pw);
- menu_item_add_stock(menu, _("Zoom _1:1"), GTK_STOCK_ZOOM_100,
+ menu_item_add_icon(menu, _("Zoom _1:1"), GQ_ICON_ZOOM_100,
G_CALLBACK(pan_zoom_1_1_cb), pw);
menu_item_add_divider(menu);
submenu_add_edit(menu, &item, G_CALLBACK(pan_edit_cb), pw, editmenu_fd_list);
gtk_widget_set_sensitive(item, active);
- menu_item_add_stock_sensitive(menu, _("View in _new window"), GTK_STOCK_NEW, active,
+ menu_item_add_icon_sensitive(menu, _("View in _new window"), GQ_ICON_NEW, active,
G_CALLBACK(pan_new_window_cb), pw);
- menu_item_add_stock(menu, _("Go to original"), GTK_STOCK_FIND,
+ menu_item_add_icon(menu, _("Go to original"), GQ_ICON_FIND,
G_CALLBACK(pan_go_to_original_cb), pw);
menu_item_add_divider(menu);
- menu_item_add_stock_sensitive(menu, _("_Copy..."), GTK_STOCK_COPY, active,
+ menu_item_add_icon_sensitive(menu, _("_Copy..."), GQ_ICON_COPY, active,
G_CALLBACK(pan_copy_cb), pw);
menu_item_add_sensitive(menu, _("_Move..."), active,
G_CALLBACK(pan_move_cb), pw);
G_CALLBACK(pan_copy_path_unquoted_cb), pw);
menu_item_add_divider(menu);
- menu_item_add_stock_sensitive(menu,
+ menu_item_add_icon_sensitive(menu,
options->file_ops.confirm_move_to_trash ? _("Move to Trash...") :
- _("Move to Trash"), PIXBUF_INLINE_ICON_TRASH, active,
+ _("Move to Trash"), GQ_ICON_DELETE, active,
G_CALLBACK(pan_move_to_trash_cb), pw);
- menu_item_add_stock_sensitive(menu,
+ menu_item_add_icon_sensitive(menu,
options->file_ops.confirm_delete ? _("_Delete...") :
- _("_Delete"), GTK_STOCK_DELETE, active,
+ _("_Delete"), GQ_ICON_DELETE_SHRED, active,
G_CALLBACK(pan_delete_cb), pw);
menu_item_add_divider(menu);
if (pw->fs)
{
- menu_item_add(menu, _("Exit _full screen"), G_CALLBACK(pan_fullscreen_cb), pw);
+ menu_item_add_icon(menu, _("Exit _full screen"), GQ_ICON_LEAVE_FULLSCREEN, G_CALLBACK(pan_fullscreen_cb), pw);
}
else
{
- menu_item_add(menu, _("_Full screen"), G_CALLBACK(pan_fullscreen_cb), pw);
+ menu_item_add_icon(menu, _("_Full screen"), GQ_ICON_FULLSCREEN, G_CALLBACK(pan_fullscreen_cb), pw);
}
menu_item_add_divider(menu);
- menu_item_add_stock(menu, _("C_lose window"), GTK_STOCK_CLOSE, G_CALLBACK(pan_close_cb), pw);
+ menu_item_add_icon(menu, _("C_lose window"), GQ_ICON_CLOSE, G_CALLBACK(pan_close_cb), pw);
return menu;
}
*-----------------------------------------------------------------------------
*/
-static void pan_window_get_dnd_data(GtkWidget *UNUSED(widget), GdkDragContext *context,
- gint UNUSED(x), gint UNUSED(y),
+static void pan_window_get_dnd_data(GtkWidget *, GdkDragContext *context,
+ gint, gint,
GtkSelectionData *selection_data, guint info,
- guint UNUSED(time), gpointer data)
+ guint, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
}
}
-static void pan_window_set_dnd_data(GtkWidget *UNUSED(widget), GdkDragContext *UNUSED(context),
- GtkSelectionData *selection_data, guint UNUSED(info),
- guint UNUSED(time), gpointer data)
+static void pan_window_set_dnd_data(GtkWidget *, GdkDragContext *,
+ GtkSelectionData *selection_data, guint,
+ guint, gpointer data)
{
auto pw = static_cast<PanWindow *>(data);
FileData *fd;