[anjal] Have a test handler for the unread toggle. It doesn't work as of now.



commit c9f59c8c9ce94b1ff4462662568d1e1452f4bc11
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Fri Mar 20 08:41:26 2009 +0530

    Have a test handler for the unread toggle. It doesn't work as of now.
---
 src/mail-folder-view.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/mail-folder-view.c b/src/mail-folder-view.c
index 5a90f03..779ffda 100644
--- a/src/mail-folder-view.c
+++ b/src/mail-folder-view.c
@@ -732,11 +732,17 @@ mfv_message_activated (GtkTreeView       *tree_view,  GtkTreePath       *path, G
 static void
 mfv_tree_resize (GtkWidget *w, GtkAllocation *req, GtkTreeViewColumn *col)
 {
-	 printf("%d %d\n", req->width, gtk_tree_view_column_get_fixed_width(col));
+	/*  printf("%d %d\n", req->width, gtk_tree_view_column_get_fixed_width(col));*/
 	if (req->width != (gtk_tree_view_column_get_fixed_width(col)+24))
 		gtk_tree_view_column_set_fixed_width (col, req->width - 24);
 }
 
+static void
+mfv_unread_toggled (GtkCellRendererToggle *cell, gchar *path, gpointer user_data)
+{
+	 printf("%s toggled\n");
+}
+
 void
 mail_folder_view_construct (MailFolderView *shell)
 {
@@ -816,14 +822,17 @@ mail_folder_view_construct (MailFolderView *shell)
 	/* Pack From at the start  of the cell */
 	custom_cell_renderer_hbox_pack_start (hbox, cell, FALSE);
 
+
 	/* Pack a renderer for unread indication */
 	cell = gtk_cell_renderer_toggle_new ();
 	if (shell->priv->light)
 		g_object_set_data (cell, "data", GINT_TO_POINTER (COL_FLAGS));
 	else 
 		g_object_set_data (cell, "data", GINT_TO_POINTER (EMTS_COL_UNREAD));
-	/* Pack From at the start  of the cell */
+	/* Pack toggle  at the start  of the cell */
 	custom_cell_renderer_hbox_pack_start (hbox, cell, FALSE);
+	g_object_set (cell, "activatable", TRUE, NULL);
+	g_signal_connect (cell, "toggled", G_CALLBACK(mfv_unread_toggled), shell);
 	
 	/* Show a box for number of mails */
 	if (!shell->priv->light) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]