else
{
ee->value_widget = gtk_label_new(nullptr);
-// gtk_label_set_width_chars(GTK_LABEL(ee->value_widget), 20);
gtk_label_set_ellipsize(GTK_LABEL(ee->value_widget), PANGO_ELLIPSIZE_END);
-// gtk_widget_set_size_request(ee->value_widget, 100, -1);
gtk_label_set_xalign(GTK_LABEL(ee->value_widget), 0.0);
gtk_label_set_yalign(GTK_LABEL(ee->value_widget), 0.5);
}
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(pkd->keyword_treeview), FALSE);
-// gtk_tree_view_set_search_column(GTK_TREE_VIEW(pkd->keyword_treeview), FILTER_KEYWORD_COLUMN_);
-
column = gtk_tree_view_column_new();
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_GROW_ONLY);
GtkWidget *widget = gtk_label_new(title);
pref_label_bold(widget, TRUE, FALSE);
- //gtk_label_set_ellipsize(GTK_LABEL(widget), PANGO_ELLIPSIZE_END);
- /** @FIXME do not work */
+ /** @FIXME do not work
+ * gtk_label_set_ellipsize(GTK_LABEL(widget), PANGO_ELLIPSIZE_END);
+ */
return widget;
}
cairo_t *cr = cairo_create(img);
gdk_cairo_set_source_pixbuf(cr, pb, 0, 0);
cairo_paint(cr);
- /** @FIXME this is a hack to get the background color */
- //~ pattern = cairo_pattern_create_for_surface(img);
+ /** @FIXME this is a hack to get the background color
+ * pattern = cairo_pattern_create_for_surface(img);
+ */
pattern = cairo_pattern_create_rgb (1.0, 0.0, 0.0);
mask = gdk_cairo_region_create_from_surface(img);
gdk_window_shape_combine_region(ct->marker_window, mask, 0, 0);
buf = g_strdup_printf(_("Output of %s"), text);
generic_dialog_add_message(vd->gd, nullptr, buf, nullptr, FALSE);
g_free(buf);
- //~ vd->button_stop = generic_dialog_add_button(vd->gd, GTK_STOCK_STOP, NULL,
- //~ editor_verbose_window_stop, FALSE);
+
vd->button_stop = generic_dialog_add_button(vd->gd, "process-stop", nullptr,
editor_verbose_window_stop, FALSE);
gtk_widget_set_sensitive(vd->button_stop, FALSE);
try
{
image_ = Exiv2::ImageFactory::open(pathl_);
-// g_assert (image.get() != 0);
image_->readMetadata();
#if EXIV2_TEST_VERSION(0,16,0)
return utf8_validate_or_convert((reinterpret_cast<Exiv2::Metadatum *>(item))->tagLabel().c_str());
}
catch (std::exception& e) {
-// debug_exception(e);
return nullptr;
}
}
return FALSE;
}
-/* See comment in image_loader_area_prepared_cb
+/** See comment in image_loader_area_prepared_cb
* Geeqie uses area_prepared signal to fill pixbuf with background color.
- * We can't do it here as pixbuf already contains the data */
-// lft->area_prepared_cb(loader, lft->data);
-
+ * We can't do it here as pixbuf already contains the data
+ * lft->area_prepared_cb(loader, lft->data);
+ */
lft->area_updated_cb(loader, 0, 0, gdk_pixbuf_get_width(lft->pixbuf), gdk_pixbuf_get_height(lft->pixbuf), lft->data);
return TRUE;
struct error_handler_data jerr;
lj->stereo = FALSE;
-// DEBUG_1("TG: JPG requested size w=%d:h=%d", lj->requested_width > 0, lj->requested_height);
MPOData *mpo = jpeg_get_mpo_data(buf, count);
if (mpo && mpo->num_images > 1)
lj->requested_width = lj->stereo ? cinfo.image_width * 2: cinfo.image_width;
lj->requested_height = cinfo.image_height;
-// DEBUG_1("TG: JPG requested size v2 w=%d:h=%d", lj->requested_width > 0, lj->requested_height);
lj->size_cb(loader, lj->requested_width, lj->requested_height, lj->data);
cinfo.scale_num = 1;
{
GObjectClass *gobject_class = G_OBJECT_CLASS (loader_class);
-// gobject_class->set_property = image_loader_set_property;
-// gobject_class->get_property = image_loader_get_property;
-
gobject_class->finalize = image_loader_finalize;
image_change_pixbuf(imd, imd->image_fd->pixbuf, image_zoom_get(imd), FALSE);
}
-// file_cache_dump(image_get_cache());
return success;
}
image_loader_free(imd->il);
imd->il = nullptr;
-// image_post_process(imd, TRUE);
-
image_read_ahead_start(imd);
}
file_data_unref(imd->read_ahead_fd);
imd->read_ahead_fd = nullptr;
-// image_post_process(imd, FALSE);
return TRUE;
}
if (fd)
{
-// layout_list_sync_path(lw, path);
layout_set_fd(lw, fd);
}
layout_status_update_image(lw);
layout_util_sync_views(lw);
layout_util_sync_thumb(lw);
layout_menu_recent_update(lw);
-// layout_menu_edit_update(lw);
}
/**
g_signal_connect(G_OBJECT(lw->bar), "destroy",
G_CALLBACK(layout_bar_destroyed), lw);
-
-// gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->bar, FALSE, FALSE, 0);
gtk_paned_pack2(GTK_PANED(lw->utility_paned), lw->bar, FALSE, TRUE);
bar_set_fd(lw->bar, layout_image_get_fd(lw));
void layout_util_status_update_write(LayoutWindow *lw);
void layout_util_status_update_write_all();
-//void layout_edit_update_all(void);
-
void layout_recent_update_all();
void layout_recent_add_path(const gchar *path);
layout_geometry_get_dividers(lw, &lw->options.main_window.hdivider_pos, &lw->options.main_window.vdivider_pos);
-// layout_sort_get(NULL, &options->file_sort.method, &options->file_sort.ascending);
-
layout_geometry_get_tools(lw, &lw->options.float_window.x, &lw->options.float_window.y,
&lw->options.float_window.w, &lw->options.float_window.h, &lw->options.float_window.vdivider_pos);
lw->sort_ascend = TRUE;
layout_set_unique_id(lw);
-// lw->options.tools_float = popped;
-// lw->options.tools_hidden = hidden;
-// lw->bar_sort_enabled = options->panels.sort.enabled;
-// lw->bar_enabled = options->panels.info.enabled;
/* default layout */
gtk_widget_show(combo);
ui->filter_label = gtk_label_new("");/** @todo (xsdg): Figure out whether it's useful to keep this label around. */
- //gtk_box_pack_start(GTK_BOX(hbox), ui->filter_label, FALSE, FALSE, 0);
- //gtk_widget_show(ui->filter_label);
ui->filter_kw_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
gtk_box_pack_start(GTK_BOX(hbox), ui->filter_kw_hbox, TRUE, TRUE, 0);
{
if (ui_ptr == nullptr || *ui_ptr == nullptr) return;
- // Note that g_clear_pointer handles already-NULL pointers.
- //g_clear_pointer(&(*ui_ptr)->filter_kw_table, g_hash_table_destroy);
-
g_free(*ui_ptr);
*ui_ptr = nullptr;
}
pr->complete = g_value_get_boolean(value);
break;
case PROP_CACHE_SIZE_DISPLAY:
-// pr->tile_cache_max = g_value_get_uint(value);
break;
case PROP_CACHE_SIZE_TILES:
pr->source_tiles_cache_size = g_value_get_uint(value);
g_value_set_boolean(value, pr->complete);
break;
case PROP_CACHE_SIZE_DISPLAY:
-// g_value_set_uint(value, pr->tile_cache_max);
break;
case PROP_CACHE_SIZE_TILES:
g_value_set_uint(value, pr->source_tiles_cache_size);
if (!st) return FALSE;
-// x1 = ROUND_DOWN(pr->x_scroll, pr->tile_width);
-// y1 = ROUND_DOWN(pr->y_scroll, pr->tile_height);
-// x2 = ROUND_UP(pr->x_scroll + pr->vis_width, pr->tile_width);
-// y2 = ROUND_UP(pr->y_scroll + pr->vis_height, pr->tile_height);
x1 = pr->x_scroll;
y1 = pr->y_scroll;
x2 = pr->x_scroll + pr->vis_width;
/* The other values are out of range */
break;
}
-// log_printf("tile coord y:%f, ih:%d, th:%f ry:%f\n", tile_y, image_h, tile_h, *res_x);
}
void pr_tile_region_map_orientation(gint orientation,
/* The other values are out of range */
break;
}
-// log_printf("inside y:%d, th:%d, ah:%d ry:%d\n", area_y, tile_h, area_h, *res_x);
}
void pr_coords_map_orientation_reverse(gint orientation,
pr->image_height = height;
pr_zoom_clamp(pr, zoom, PR_ZOOM_FORCE, NULL);
-
- //w = width;
- //h = height;
-
- //pr->width = width;
- //pr->height = height;
#endif
}
struct RendererFuncs
{
-// void (*redraw)(void *renderer, gint x, gint y, gint w, gint h,
- // gint clamp, ImageRenderType render, gboolean new_data, gboolean only_existing);
void (*area_changed)(void *renderer, gint src_x, gint src_y, gint src_w, gint src_h); /**< pixbuf area changed */
void (*invalidate_region)(void *renderer, gint x, gint y, gint w, gint h);
void (*scroll)(void *renderer, gint x_off, gint y_off); /**< scroll */
*/
gboolean pixbuf_renderer_get_visible_rect(PixbufRenderer *pr, GdkRectangle *rect);
-/**
- * @headerfile pixbuf_renderer_get_virtual_rect
- * actual size of the PixbufRenderer window minus borders,
- * x and y are the scroll offset and include zoom factor.
- */
-//gboolean pixbuf_renderer_get_virtual_rect(PixbufRenderer *pr, GdkRectangle *rect);
-
/**
* @headerfile pixbuf_renderer_set_color
* background color
static void options_parse_layout_end(GQParserData *UNUSED(parser_data), GMarkupParseContext *UNUSED(context), const gchar *UNUSED(element_name), gpointer data, GError **UNUSED(error))
{
auto lw = static_cast<LayoutWindow *>(data);
- //~ LayoutWindow *lw = (LayoutWindow *)data;
- //~ LayoutWindow *lw = data;
layout_util_sync(lw);
}
list = filelist_recursive_full(dir_fd, lw_id->sort_method, lw_id->sort_ascend);
file_data_unref(dir_fd);
if (!list) return;
-//printf("length: %d\n", g_list_length(list));
+
layout_image_slideshow_stop(lw_id);
layout_image_slideshow_start_from_list(lw_id, list);
}
static gint pixmap_calc_size(cairo_surface_t *UNUSED(surface))
{
-// gint w, h, d;
-
-// d = gdk_drawable_get_depth(pixmap);
-// gdk_drawable_get_size(pixmap, &w, &h);
return options->image.tile_size * options->image.tile_size * 4 / 8;
}
gboolean new_data, gboolean fast)
{
PixbufRenderer *pr = rt->pr;
- //~ GtkWidget *box;
- //~ GdkWindow *window;
cairo_t *cr;
/* clamp to visible */
rt_tile_render(rt, it, x, y, w, h, new_data, fast);
- //~ box = GTK_WIDGET(pr);
- //~ window = gtk_widget_get_window(box);
-
cr = cairo_create(rt->surface);
cairo_set_source_surface(cr, it->surface, pr->x_offset + (it->x - rt->x_scroll) + rt->stereo_off_x, pr->y_offset + (it->y - rt->y_scroll) + rt->stereo_off_y);
cairo_rectangle (cr, pr->x_offset + (it->x - rt->x_scroll) + x + rt->stereo_off_x, pr->y_offset + (it->y - rt->y_scroll) + y + rt->stereo_off_y, w, h);
g_error_free(error);
/* A second warning dialog is not necessary */
- // success = FALSE;
}
}
GtkWidget *tools;
GtkWidget *tools_pane;
-// gint tools_float;
-// gint tools_hidden;
GtkWidget *menu_tool_bar; /**< Combined menu and toolbar box */
GtkWidget *menu_bar; /**< referenced by lw, exist during whole lw lifetime */
/* toolbar */
GtkWidget *toolbar[TOOLBAR_COUNT]; /**< referenced by lw, exist during whole lw lifetime */
-// gint toolbar_hidden;
-
-// GtkWidget *thumb_button;
-// gint thumbs_enabled;
-// gint marks_enabled;
GtkWidget *back_button;
ViewDir *vd;
GtkWidget *dir_view;
-// DirViewType dir_view_type;
-
/* file view */
LayoutLocation file_location;
ViewFile *vf;
-// FileViewType file_view_type;
GtkWidget *file_view;
FullScreenData *full_screen;
- /* dividers */
-
-// gint div_h;
-// gint div_v;
-// gint div_float;
-
/* misc */
GtkWidget *utility_box; /**< referenced by lw, exist during whole lw lifetime */
GtkWidget *bar;
gboolean bar_sort_enabled; /**< Set during start-up, and checked when the editors have loaded */
-// gint bar_enabled;
-
-// gint bar_width;
GtkWidget *exif_window;
GtkWidget *sar_window; /**< Search and Run window */
*/
gboolean tree_view_move_cursor_away(GtkTreeView *widget, GtkTreeIter *iter, gboolean only_selected);
-/**
- * @headerfile tree_path_to_row
- * utility to return row position of given GtkTreePath
- */
-//gint tree_path_to_row(GtkTreePath *tpath);
-
-
/**
* @headerfile shift_color
* shifts a GdkColor values lighter or darker \n
*/
void shift_color(GdkColor *src, gshort val, gint direction);
-/**
- * @headerfile style_shift_color
- * Shifts a style's color for given state
- * Useful for alternating dark/light rows in lists. \n
- *
- * shift_value is 1 to 100, representing the percent of the shift.
- */
-//void style_shift_color(GtkStyle *style, GtkStateType type, gshort shift_value, gint direction);
-
/**
* @def STYLE_SHIFT_STANDARD
* The standard shift percent for alternating list row colors
gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_SINGLE);
gtk_tree_selection_set_select_function(selection, file_util_preview_cb, ud, nullptr);
-
-// column = file_util_rename_multiple_add_column(rd, _("Preview"), RENAME_COLUMN_PREVIEW);
-// gtk_tree_view_column_set_visible(column, FALSE);
-
gtk_tree_view_set_reorderable(GTK_TREE_VIEW(ud->listview), TRUE);
store = gtk_tree_view_get_model(GTK_TREE_VIEW(ud->listview));
generic_dialog_add_image(ud->gd, box, nullptr, nullptr, FALSE, nullptr, nullptr, FALSE);
}
-// gtk_container_add(GTK_CONTAINER(scrolled), view);
gtk_widget_show(ud->gd->dialog);
0.0, 1000000.0, 1.0, 0, options->cp_mv_rn.formatted_start,
G_CALLBACK(file_util_rename_preview_adj_cb), ud);
-// gtk_combo_box_set_active(GTK_COMBO_BOX(ud->combo_type), 0); /* callback will take care of the rest */
-
file_util_dialog_list_select(ud->listview, 0);
}
return;
}
-// ud->flist = filelist_recursive(fd);
-
file_util_dialog_run(ud);
}