* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "main.h"
#include "layout.h"
-#include "bar.h"
+#include <config.h>
+
#include "bar-sort.h"
+#include "bar.h"
+#include "compat.h"
+#include "debug.h"
#include "filedata.h"
#include "histogram.h"
#include "history-list.h"
-#include "image.h"
#include "image-overlay.h"
+#include "image.h"
+#include "intl.h"
#include "layout-config.h"
#include "layout-image.h"
#include "layout-util.h"
#include "logwindow.h"
+#include "main-defines.h"
+#include "main.h"
#include "menu.h"
#include "metadata.h"
#include "misc.h"
#include <gdk/gdkx.h>
#endif
-#define MAINWINDOW_DEF_WIDTH 700
-#define MAINWINDOW_DEF_HEIGHT 500
+enum {
+ MAINWINDOW_DEF_WIDTH = 700,
+ MAINWINDOW_DEF_HEIGHT = 500
+};
#define MAIN_WINDOW_DIV_HPOS (MAINWINDOW_DEF_WIDTH / 2)
#define MAIN_WINDOW_DIV_VPOS (MAINWINDOW_DEF_HEIGHT / 2)
-#define TOOLWINDOW_DEF_WIDTH 260
-#define TOOLWINDOW_DEF_HEIGHT 450
+enum {
+ TOOLWINDOW_DEF_WIDTH = 260,
+ TOOLWINDOW_DEF_HEIGHT = 450
+};
-#define PROGRESS_WIDTH 150
-#define ZOOM_LABEL_WIDTH 120
+enum {
+ PROGRESS_WIDTH = 150,
+ ZOOM_LABEL_WIDTH = 120
+};
-#define PANE_DIVIDER_SIZE 10
+enum {
+ PANE_DIVIDER_SIZE = 10
+};
GList *layout_window_list = nullptr;
}
else
{
- gint width, height;
+ gint width;
+ gint height;
fd = image_get_fd(lw->image);
page_total = fd->page_total;
page_num = fd->page_num + 1;
layout_util_status_update_write(lw);
}
-static GtkWidget *layout_status_label(gchar *text, GtkWidget *box, gboolean start, gint size, gboolean expand)
+static GtkWidget *layout_status_label(const gchar *text, GtkWidget *box, gboolean start, gint size, gboolean expand)
{
GtkWidget *label;
GtkWidget *frame;
static void layout_tools_setup(LayoutWindow *lw, GtkWidget *tools, GtkWidget *files)
{
GtkWidget *vbox;
- GtkWidget *w1, *w2;
+ GtkWidget *w1;
+ GtkWidget *w2;
gboolean vertical;
gboolean new_window = FALSE;
gint priority_location;
GtkWidget *h;
GtkWidget *v;
- GtkWidget *w1, *w2, *w3;
+ GtkWidget *w1;
+ GtkWidget *w2;
+ GtkWidget *w3;
GtkWidget *image_sb; /* image together with sidebars in utility box */
GtkWidget *tools;
return;
}
- else if (lw->tools)
+
+ if (lw->tools)
{
layout_tools_geometry_sync(lw);
gq_gtk_widget_destroy(lw->tools);
if (style != -1)
{
- LayoutLocation d, f, i;
+ LayoutLocation d;
+ LayoutLocation f;
+ LayoutLocation i;
layout_config_parse(style, order, &d, &f, &i);
*-----------------------------------------------------------------------------
*/
-#define CONFIG_WINDOW_DEF_WIDTH 600
-#define CONFIG_WINDOW_DEF_HEIGHT 400
+enum {
+ CONFIG_WINDOW_DEF_WIDTH = 600,
+ CONFIG_WINDOW_DEF_HEIGHT = 400
+};
struct LayoutConfig
{