* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "main.h"
#include "image.h"
+#include <config.h>
+
#include "collect-table.h"
#include "color-man.h"
+#include "compat.h"
+#include "debug.h"
#include "exif.h"
-#include "metadata.h"
+#include "filecache.h"
#include "history-list.h"
#include "image-load.h"
-#include "layout.h"
+#include "intl.h"
#include "layout-image.h"
+#include "layout.h"
+#include "metadata.h"
#include "pixbuf-renderer.h"
#include "pixbuf-util.h"
#include "ui-fileops.h"
#include "ui-misc.h"
-#include "filecache.h"
#include <cmath>
{
auto imd = static_cast<ImageWindow *>(data);
LayoutWindow *lw;
- gint x_pixel, y_pixel;
+ gint x_pixel;
+ gint y_pixel;
if(options->draw_rectangle)
{
layout_valid(&lw);
}
- defined_mouse_buttons(NULL, event, lw);
+ defined_mouse_buttons(nullptr, event, lw);
}
static void image_drag_cb(PixbufRenderer *pr, GdkEventMotion *event, gpointer data)
{
auto imd = static_cast<ImageWindow *>(data);
- gint width, height;
+ gint width;
+ gint height;
gint rect_width;
gint rect_height;
GdkPixbuf *rect_pixbuf;
- gint x_pixel, y_pixel;
- gint image_x_pixel, image_y_pixel;
+ gint x_pixel;
+ gint y_pixel;
+ gint image_x_pixel;
+ gint image_y_pixel;
if (options->draw_rectangle)
{
imd->read_ahead_fd = nullptr;
return TRUE;
}
- else if (imd->read_ahead_fd->pixbuf)
+ if (imd->read_ahead_fd->pixbuf)
{
image_change_pixbuf(imd, imd->read_ahead_fd->pixbuf, image_zoom_get(imd), FALSE);
}
return TRUE;
}
- else
- {
- imd->func_scroll(imd, event, imd->data_scroll);
- return TRUE;
- }
+
+ imd->func_scroll(imd, event, imd->data_scroll);
+ return TRUE;
}
return FALSE;
{
PixbufRenderer *pr;
gdouble zoom;
- gint width, height;
+ gint width;
+ gint height;
pr = reinterpret_cast<PixbufRenderer *>(imd->pr);
DEBUG_NAME(imd->frame);
g_object_ref(imd->pr);
if (imd->has_frame != -1) gtk_container_remove(GTK_CONTAINER(imd->widget), imd->pr);
- gtk_container_add(GTK_CONTAINER(imd->frame), imd->pr);
+ gq_gtk_container_add(GTK_WIDGET(imd->frame), imd->pr);
g_object_unref(imd->pr);
gtk_widget_set_can_focus(imd->frame, TRUE);
if (imd->frame)
{
gtk_container_remove(GTK_CONTAINER(imd->frame), imd->pr);
- gtk_widget_destroy(imd->frame);
+ g_object_unref(imd->frame);
imd->frame = nullptr;
}
gq_gtk_box_pack_start(GTK_BOX(imd->widget), imd->pr, TRUE, TRUE, 0);