public
Description: A Clutter-based Twitter client
Homepage: http://live.gnome.org/Tweet
Clone URL: git://github.com/ebassi/tweet.git
Search Repo:
List column hooking the status renderer to the view

A TidyListColumn class providing the cell renderers for both
the column data and the column header.
Emmanuele Bassi (author)
Thu Apr 17 21:38:48 -0700 2008
commit  2897026b09c8232e9f48458269a41d32fb2c4cd9
tree    f8a278f82379db6b8f4f856df336e48ecf088606
parent  c392255986da2c9f08d0511826017c1a5ffc2659
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
0
@@ -0,0 +1,48 @@
0
+#ifdef HAVE_CONFIG_H
0
+#include "config.h"
0
+#endif
0
+
0
+#include <stdlib.h>
0
+#include <string.h>
0
+
0
+#include <glib-object.h>
0
+
0
+#include <tidy/tidy-cell-renderer.h>
0
+#include <tidy/tidy-list-column.h>
0
+
0
+#include "tweet-status-column.h"
0
+#include "tweet-status-renderer.h"
0
+
0
+G_DEFINE_TYPE (TweetStatusColumn, tweet_status_column, TIDY_TYPE_LIST_COLUMN);
0
+
0
+static void
0
+tweet_status_column_class_init (TweetStatusColumnClass *klass)
0
+{
0
+
0
+}
0
+
0
+static void
0
+tweet_status_column_init (TweetStatusColumn *status_column)
0
+{
0
+ TidyListColumn *column = TIDY_LIST_COLUMN (status_column);
0
+
0
+ /* at least the avatar and some space for a text ellipsis */
0
+ tidy_list_column_set_min_width (column, 192);
0
+ tidy_list_column_set_max_width (column, 350);
0
+
0
+ /* we provide our own renderers */
0
+ tidy_list_column_set_cell_renderer (column, tweet_status_renderer_new ());
0
+ tidy_list_column_set_header_renderer (column, tweet_status_renderer_new ());
0
+}
0
+
0
+TidyListColumn *
0
+tweet_status_column_new (TidyListView *list_view,
0
+ guint model_index)
0
+{
0
+ g_return_val_if_fail (TIDY_IS_LIST_VIEW (list_view), NULL);
0
+
0
+ return g_object_new (TWEET_TYPE_STATUS_COLUMN,
0
+ "list-view", list_view,
0
+ "model-index", model_index,
0
+ NULL);
0
+}
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
0
@@ -0,0 +1,35 @@
0
+#ifndef __TWEET_STATUS_COLUMN_H__
0
+#define __TWEET_STATUS_COLUMN_H__
0
+
0
+#include <tidy/tidy-list-column.h>
0
+#include <tidy/tidy-list-view.h>
0
+
0
+G_BEGIN_DECLS
0
+
0
+#define TWEET_TYPE_STATUS_COLUMN (tweet_status_column_get_type ())
0
+#define TWEET_STATUS_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TWEET_TYPE_STATUS_COLUMN, TweetStatusColumn))
0
+#define TWEET_IS_STATUS_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TWEET_TYPE_STATUS_COLUMN))
0
+#define TWEET_STATUS_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TWEET_TYPE_STATUS_COLUMN, TweetStatusColumnClass))
0
+#define TWEET_IS_STATUS_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TWEET_TYPE_STATUS_COLUMN))
0
+#define TWEET_STATUS_COLUMN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TWEET_TYPE_STATUS_COLUMN, TweetStatusColumnClass))
0
+
0
+typedef struct _TweetStatusColumn TweetStatusColumn;
0
+typedef struct _TweetStatusColumnClass TweetStatusColumnClass;
0
+
0
+struct _TweetStatusColumn
0
+{
0
+ TidyListColumn parent_instance;
0
+};
0
+
0
+struct _TweetStatusColumnClass
0
+{
0
+ TidyListColumnClass parent_class;
0
+};
0
+
0
+GType tweet_status_column_get_type (void) G_GNUC_CONST;
0
+TidyListColumn *tweet_status_column_new (TidyListView *list_view,
0
+ guint model_index);
0
+
0
+G_END_DECLS
0
+
0
+#endif /* __TWEET_STATUS_COLUMN_H__ */

Comments

    No one has commented yet.