aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-col.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-05 11:52:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-07 12:18:52 +0800
commit28b84ecaf9111f2a59e1380089dad6a92ddc848d (patch)
treec925a0966e291917ce69a596c9613ac7cee33be8 /widgets/table/e-table-col.h
parent5f1c9ff19d80bb50cd00114b8fb633d8eba3365f (diff)
downloadgsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.gz
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.bz2
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.lz
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.xz
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.zst
gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.zip
Teach ETable to prefer themed icon names over pixbufs.
Diffstat (limited to 'widgets/table/e-table-col.h')
-rw-r--r--widgets/table/e-table-col.h125
1 files changed, 67 insertions, 58 deletions
diff --git a/widgets/table/e-table-col.h b/widgets/table/e-table-col.h
index 8e514675d5..0a3add445a 100644
--- a/widgets/table/e-table-col.h
+++ b/widgets/table/e-table-col.h
@@ -21,20 +21,32 @@
*
*/
-#ifndef _E_TABLE_COL_H_
-#define _E_TABLE_COL_H_
+#ifndef E_TABLE_COL_H
+#define E_TABLE_COL_H
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <table/e-cell.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define E_TYPE_TABLE_COL \
+ (e_table_col_get_type ())
+#define E_TABLE_COL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_TABLE_COL, ETableCol))
+#define E_TABLE_COL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_TABLE_COL, ETableColClass))
+#define E_IS_TABLE_COL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_TABLE_COL))
+#define E_IS_TABLE_COL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_TABLE_COL))
+#define E_TABLE_COL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_TABLE_COL, ETableColClass))
-#define E_TABLE_COL_TYPE (e_table_col_get_type ())
-#define E_TABLE_COL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TABLE_COL_TYPE, ETableCol))
-#define E_TABLE_COL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TABLE_COL_TYPE, ETableColClass))
-#define E_IS_TABLE_COL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TABLE_COL_TYPE))
-#define E_IS_TABLE_COL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_COL_TYPE))
-#define E_TABLE_COL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TABLE_COL_TYPE, ETableColClass))
+G_BEGIN_DECLS
typedef enum {
E_TABLE_COL_ARROW_NONE = 0,
@@ -42,60 +54,57 @@ typedef enum {
E_TABLE_COL_ARROW_DOWN
} ETableColArrow;
+typedef struct _ETableCol ETableCol;
+typedef struct _ETableColClass ETableColClass;
+
/*
* Information about a single column
*/
-typedef struct {
- GObject base;
- gchar *text;
- GdkPixbuf *pixbuf;
- gint min_width;
- gint width;
- double expansion;
- short x;
- GCompareFunc compare;
- ETableSearchFunc search;
- guint is_pixbuf:1;
- guint selected:1;
- guint resizable:1;
- guint disabled:1;
- guint sortable:1;
- guint groupable:1;
- gint col_idx;
- gint compare_col;
- gint priority;
-
- GtkJustification justification;
-
- ECell *ecell;
-} ETableCol;
-
-typedef struct {
+struct _ETableCol {
+ GObject parent;
+
+ gchar *text;
+ gchar *icon_name;
+ GdkPixbuf *pixbuf;
+ gint min_width;
+ gint width;
+ gdouble expansion;
+ gshort x;
+ GCompareFunc compare;
+ ETableSearchFunc search;
+
+ guint selected:1;
+ guint resizable:1;
+ guint disabled:1;
+ guint sortable:1;
+ guint groupable:1;
+
+ gint col_idx;
+ gint compare_col;
+ gint priority;
+
+ GtkJustification justification;
+
+ ECell *ecell;
+};
+
+struct _ETableColClass {
GObjectClass parent_class;
-} ETableColClass;
-
-GType e_table_col_get_type (void);
-ETableCol *e_table_col_new (gint col_idx,
- const gchar *text,
- double expansion,
- gint min_width,
- ECell *ecell,
- GCompareFunc compare,
- gboolean resizable,
- gboolean disabled,
- gint priority);
-ETableCol *e_table_col_new_with_pixbuf (gint col_idx,
- const gchar *text,
- GdkPixbuf *pixbuf,
- double expansion,
- gint min_width,
- ECell *ecell,
- GCompareFunc compare,
- gboolean resizable,
- gboolean disabled,
- gint priority);
+};
+
+GType e_table_col_get_type (void);
+ETableCol * e_table_col_new (gint col_idx,
+ const gchar *text,
+ const gchar *icon_name,
+ double expansion,
+ gint min_width,
+ ECell *ecell,
+ GCompareFunc compare,
+ gboolean resizable,
+ gboolean disabled,
+ gint priority);
G_END_DECLS
-#endif /* _E_TABLE_COL_H_ */
+#endif /* E_TABLE_COL_H */