Sort headers using clang-tidy
[geeqie.git] / src / layout.cc
index 588ef14..bcf828f 100644 (file)
  * 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;
@@ -781,7 +795,8 @@ void layout_status_update_image(LayoutWindow *lw)
                        }
                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;
@@ -815,7 +830,7 @@ void layout_status_update_all(LayoutWindow *lw)
        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;
@@ -1616,7 +1631,8 @@ static gboolean layout_tools_delete_cb(GtkWidget *, GdkEventAny *, gpointer data
 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;
 
@@ -1807,7 +1823,9 @@ static void layout_grid_setup(LayoutWindow *lw)
        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;
@@ -1860,7 +1878,8 @@ static void layout_grid_setup(LayoutWindow *lw)
 
                return;
                }
-       else if (lw->tools)
+
+       if (lw->tools)
                {
                layout_tools_geometry_sync(lw);
                gq_gtk_widget_destroy(lw->tools);
@@ -1937,7 +1956,9 @@ void layout_style_set(LayoutWindow *lw, gint style, const gchar *order)
 
        if (style != -1)
                {
-               LayoutLocation d, f, i;
+               LayoutLocation d;
+               LayoutLocation f;
+               LayoutLocation i;
 
                layout_config_parse(style, order, &d,  &f, &i);
 
@@ -2223,8 +2244,10 @@ void layout_info_pixel_set(LayoutWindow *lw, gboolean show)
  *-----------------------------------------------------------------------------
  */
 
-#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
 {