Moved struct and enum declarations from prefswindow.c to .h.
authorAndrej Kacian <ticho@claws-mail.org>
Thu, 27 Aug 2015 09:56:13 +0000 (11:56 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 28 Aug 2015 09:38:05 +0000 (11:38 +0200)
src/gtk/prefswindow.c
src/gtk/prefswindow.h

index 0b407d3..dfcc41a 100644 (file)
 #include "prefs_common.h"
 #include "gtk/manage_window.h"
 
-enum { 
-       PREFS_PAGE_TITLE,               /* page title */
-       PREFS_PAGE_DATA,                /* PrefsTreeNode data */        
-       PREFS_PAGE_DATA_AUTO_FREE,      /* auto free for PREFS_PAGE_DATA */
-       PREFS_PAGE_WEIGHT,              /* weight */
-       PREFS_PAGE_INDEX,               /* index in original page list */
-       N_PREFS_PAGE_COLUMNS
-};
-
-typedef struct _PrefsWindow PrefsWindow;
-typedef struct _PrefsTreeNode PrefsTreeNode;
-
-struct _PrefsWindow
-{
-       GtkWidget *window;
-       GtkWidget *vbox;
-       GtkWidget *paned;
-       GtkWidget *scrolledwindow1;
-       GtkWidget *tree_view;
-       GtkWidget *table2;
-       GtkWidget *pagelabel;
-       GtkWidget *labelframe;
-       GtkWidget *vbox2;
-       GtkWidget *notebook;
-       GtkWidget *confirm_area;
-       GtkWidget *ok_btn;
-       GtkWidget *cancel_btn;
-       GtkWidget *apply_btn;
-       gint *save_width;
-       gint *save_height;
-       PrefsCloseCallbackFunc open_cb;
-       PrefsCloseCallbackFunc close_cb;
-
-       GtkWidget *empty_page;
-
-       gpointer         data;
-       GSList          *prefs_pages;
-       GDestroyNotify func;
-};
-
-struct _PrefsTreeNode
-{
-       PrefsPage *page;
-       gfloat     treeweight; /* GTK2: not used */
-};
-
 static void prefs_size_allocate_cb(GtkWidget *widget,
                                                         GtkAllocation *allocation, gpointer *user_data);
 static GtkTreeStore *prefswindow_create_data_store     (void);
index 5a0c9a9..d8530a8 100644 (file)
@@ -24,6 +24,7 @@
 #include <gtk/gtk.h>
 
 typedef struct _PrefsPage PrefsPage;
+typedef struct _PrefsWindow PrefsWindow;
 
 typedef void (*PrefsCreateWidgetFunc) (PrefsPage *, GtkWindow *window, gpointer);
 typedef void (*PrefsDestroyWidgetFunc) (PrefsPage *);
@@ -45,6 +46,51 @@ struct _PrefsPage
        PrefsCanClosePageFunc     can_close;
 };
 
+enum {
+       PREFS_PAGE_TITLE,               /* page title */
+       PREFS_PAGE_DATA,                /* PrefsTreeNode data */
+       PREFS_PAGE_DATA_AUTO_FREE,      /* auto free for PREFS_PAGE_DATA */
+       PREFS_PAGE_WEIGHT,              /* weight */
+       PREFS_PAGE_INDEX,               /* index in original page list */
+       N_PREFS_PAGE_COLUMNS
+};
+
+typedef struct _PrefsTreeNode PrefsTreeNode;
+
+struct _PrefsWindow
+{
+       GtkWidget *window;
+       GtkWidget *vbox;
+       GtkWidget *paned;
+       GtkWidget *scrolledwindow1;
+       GtkWidget *tree_view;
+       GtkWidget *table2;
+       GtkWidget *pagelabel;
+       GtkWidget *labelframe;
+       GtkWidget *vbox2;
+       GtkWidget *notebook;
+       GtkWidget *confirm_area;
+       GtkWidget *ok_btn;
+       GtkWidget *cancel_btn;
+       GtkWidget *apply_btn;
+       gint *save_width;
+       gint *save_height;
+       PrefsCloseCallbackFunc open_cb;
+       PrefsCloseCallbackFunc close_cb;
+
+       GtkWidget *empty_page;
+
+       gpointer         data;
+       GSList          *prefs_pages;
+       GDestroyNotify func;
+};
+
+struct _PrefsTreeNode
+{
+       PrefsPage *page;
+       gfloat     treeweight; /* GTK2: not used */
+};
+
 void prefswindow_open_full             (const gchar *title, 
                                         GSList *prefs_pages,
                                         gpointer data,