[anjal] Make scroll speedy. Added a hack to make it speedy. May be a gtk+ bug.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] Make scroll speedy. Added a hack to make it speedy. May be a gtk+ bug.
- Date: Sat, 21 Mar 2009 07:29:59 -0400 (EDT)
commit 2ca44d8fc8c9797bcfbee913d6baeda78c4fa480
Author: Srinivasa Ragavan <sragavan novell com>
Date: Sat Mar 21 17:01:59 2009 +0530
Make scroll speedy. Added a hack to make it speedy. May be a gtk+ bug.
Activate of junk/delete works.
---
src/custom-cell-renderer-vbox.c | 12 ++++++------
src/mail-folder-view.c | 7 +++++++
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/custom-cell-renderer-vbox.c b/src/custom-cell-renderer-vbox.c
index 5635c80..80d07fa 100644
--- a/src/custom-cell-renderer-vbox.c
+++ b/src/custom-cell-renderer-vbox.c
@@ -344,7 +344,6 @@ custom_cell_renderer_vbox_render (GtkCellRenderer *cell,
GList *tmp = cellprogress->children;
int i=0;
-
custom_cell_renderer_vbox_get_size (cell, widget, cell_area,
&x_offset, &y_offset,
&width, &height);
@@ -356,6 +355,11 @@ custom_cell_renderer_vbox_render (GtkCellRenderer *cell,
cell_area->x = store_x;
gtk_cell_renderer_get_size (child, widget, cell_area, &cx, &cy, &cw, &ch);
+// if (GTK_IS_CELL_RENDERER_PIXBUF(child) && (!(flags & GTK_CELL_RENDERER_SELECTED))) {
+// // printf("insensitive\n");
+// gtk_cell_renderer_render (child, window, widget, background_area, cell_area, expose_area, GTK_CELL_RENDERER_INSENSITIVE);
+// }
+// else
gtk_cell_renderer_render (child, window, widget, background_area, cell_area, expose_area, flags);
/* FIXME: Just trial & error hacks. Need to find why chiid's ypad is 0 */
cell_area->y += ch - (2*2)+ i; /* 2-cellpad*/
@@ -363,10 +367,6 @@ custom_cell_renderer_vbox_render (GtkCellRenderer *cell,
cell_area->y += 3*2; /* 2 - cell-pad */
tmp = tmp->next;
}
- if ( flags & GTK_CELL_RENDERER_SELECTED)
- g_object_set (cell, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
- else
- g_object_set (cell, "mode", GTK_CELL_RENDERER_MODE_INERT, NULL);
}
@@ -404,7 +404,7 @@ cc_vbox_activate (GtkCellRenderer *cell,
CellRenderActivateFunc func = g_object_get_data (child, "activate_func");
if (func) {
(*func)(cell, event, widget, path, background_area, cell_area, flags);
- break;
+ return TRUE;
}
}
diff --git a/src/mail-folder-view.c b/src/mail-folder-view.c
index 50ff71a..365edad 100644
--- a/src/mail-folder-view.c
+++ b/src/mail-folder-view.c
@@ -800,6 +800,12 @@ mail_folder_view_construct (MailFolderView *shell)
/* Create the single column */
column = gtk_tree_view_column_new ();
+
+ /* FIXME: A Horrible Gtk+ hack I do. If the cell is activatable, keyboard scroll is *very* slow.
+ Drawing the focus seems bad takes CPU there. Avoiding it. Specially when you do 5 down arrow and do
+ the first up-arrow. I takes ~2 secs to respond. I bypass it by this.*/
+ column->editable_widget = 0xdeadbeef;
+
gtk_tree_view_column_set_fixed_width (column, 750);
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_title (column, _("Messages"));
@@ -908,6 +914,7 @@ mail_folder_view_construct (MailFolderView *shell)
/* Another VBox for Delete/Junk */
vbox = custom_cell_renderer_vbox_new ();
+ g_object_set (vbox, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
gtk_tree_view_column_pack_end (column, vbox, FALSE);
gtk_tree_view_column_set_cell_data_func (column, vbox, draw_img, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]