[maemo-commits] [maemo-commits] r9378 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Sun Jan 28 18:31:09 EET 2007
- Previous message: [maemo-commits] r9377 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9379 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kris Date: 2007-01-28 18:31:05 +0200 (Sun, 28 Jan 2007) New Revision: 9378 Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtktreeview.c Log: 2007-01-28 Kristian Rietveld <kris at imendio.com> * gtk/gtktreeview.c: conditionalize with MAEMO_CHANGES. Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog =================================================================== --- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog 2007-01-28 14:52:17 UTC (rev 9377) +++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog 2007-01-28 16:31:05 UTC (rev 9378) @@ -1,5 +1,9 @@ 2007-01-28 Kristian Rietveld <kris at imendio.com> + * gtk/gtktreeview.c: conditionalize with MAEMO_CHANGES. + +2007-01-28 Kristian Rietveld <kris at imendio.com> + * gtk/gtktreemodelfilter.c: conditionalize with MAEMO_CHANGES. 2007-01-28 Kristian Rietveld <kris at imendio.com> Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtktreeview.c =================================================================== --- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtktreeview.c 2007-01-28 14:52:17 UTC (rev 9377) +++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtktreeview.c 2007-01-28 16:31:05 UTC (rev 9378) @@ -463,10 +463,10 @@ static void add_scroll_timeout (GtkTreeView *tree_view); static void remove_scroll_timeout (GtkTreeView *tree_view); -/* MAEMO START */ +#ifdef MAEMO_CHANGES static gboolean gtk_tree_view_tap_and_hold_query (GtkWidget *widget, GdkEvent *event); -/* MAEMO END */ +#endif /* MAEMO_CHANGES */ static guint tree_view_signals [LAST_SIGNAL] = { 0 }; @@ -531,9 +531,9 @@ widget_class->style_set = gtk_tree_view_style_set; widget_class->grab_notify = gtk_tree_view_grab_notify; widget_class->state_changed = gtk_tree_view_state_changed; - /* MAEMO START */ +#ifdef MAEMO_CHANGES widget_class->tap_and_hold_query = gtk_tree_view_tap_and_hold_query; - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ /* GtkContainer signals */ container_class->remove = gtk_tree_view_remove; @@ -699,9 +699,11 @@ g_param_spec_boolean ("show-expanders", P_("Show Expanders"), P_("View has expanders"), - /* MAEMO START */ +#ifndef MAEMO_CHANGES + TRUE, +#else /* MAEMO_CHANGES */ FALSE, - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ GTK_PARAM_READWRITE)); g_object_class_install_property (o_class, @@ -711,9 +713,11 @@ P_("Extra indentation for each level"), 0, G_MAXINT, - /* MAEMO START */ +#ifndef MAEMO_CHANGES + 0, +#else /* MAEMO_CHANGES */ 10, - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ GTK_PARAM_READWRITE)); g_object_class_install_property (o_class, @@ -745,9 +749,9 @@ #define _TREE_VIEW_EXPANDER_SIZE 12 #define _TREE_VIEW_VERTICAL_SEPARATOR 2 #define _TREE_VIEW_HORIZONTAL_SEPARATOR 2 - /* MAEMO START */ +#ifdef MAEMO_CHANGES #define _TREE_VIEW_SEPARATOR_HEIGHT 2 - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ gtk_widget_class_install_style_property (widget_class, g_param_spec_int ("expander-size", @@ -839,7 +843,7 @@ "\1\1", GTK_PARAM_READABLE)); - /* MAEMO START */ +#ifdef MAEMO_CHANGES /** * GtkTreeView::separator-height: * @@ -855,7 +859,7 @@ G_MAXINT, _TREE_VIEW_SEPARATOR_HEIGHT, GTK_PARAM_READABLE)); - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ /* Signals */ widget_class->set_scroll_adjustments_signal = @@ -1305,9 +1309,13 @@ gtk_widget_set_redraw_on_allocate (GTK_WIDGET (tree_view), FALSE); - tree_view->priv->flags = GTK_TREE_VIEW_DRAW_KEYFOCUS; - /* MAEMO CHANGE: remove | GTK_TREE_VIEW_SHOW_EXPANDERS */ - /* MAEMO CHANGE: remove | GTK_TREE_VIEW_HEADERS_VISIBLE; */ +#ifdef MAEMO_CHANGES + tree_view->priv->flags = GTK_TREE_VIEW_DRAW_KEYFOCUS; +#else /* !MAEMO_CHANGES */ + tree_view->priv->flags = GTK_TREE_VIEW_SHOW_EXPANDERS + | GTK_TREE_VIEW_DRAW_KEYFOCUS + | GTK_TREE_VIEW_HEADERS_VISIBLE; +#endif /* !MAEMO_CHANGES */ /* We need some padding */ tree_view->priv->dy = 0; @@ -1339,9 +1347,9 @@ tree_view->priv->hover_selection = FALSE; tree_view->priv->hover_expand = FALSE; - /* MAEMO START */ +#ifdef MAEMO_CHANGES tree_view->priv->level_indentation = 10; - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ tree_view->priv->rubber_banding_enable = FALSE; @@ -5529,9 +5537,9 @@ gboolean draw_vgrid_lines, draw_hgrid_lines; gint focus_pad; gint grid_line_width; - /* MAEMO START */ +#ifdef MAEMO_CHANGES gint separator_height; - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ /* double check the row needs validating */ if (! GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) && @@ -5551,9 +5559,9 @@ "horizontal-separator", &horizontal_separator, "vertical-separator", &vertical_separator, "grid-line-width", &grid_line_width, - /* MAEMO START */ +#ifdef MAEMO_CHANGES "separator-height", &separator_height, - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ NULL); draw_vgrid_lines = @@ -5600,9 +5608,11 @@ height = MAX (height, tree_view->priv->expander_size); } else - /* MAEMO START */ +#ifdef MAEMO_CHANGES height = separator_height + 2 * focus_pad; - /* MAEMO END */ +#else /* !MAEMO_CHANGES */ + height = 2 + 2 * focus_pad; +#endif /* !MAEMO_CHANGES */ if (gtk_tree_view_is_expander_column (tree_view, column)) { @@ -8183,7 +8193,7 @@ if (tree == NULL) goto done; - /* MAEMO START */ +#ifdef MAEMO_CHANGES /* Unselect the row if it just became insensitive */ if (!_gtk_tree_selection_row_is_selectable (tree_view->priv->selection, node, path) @@ -8202,7 +8212,7 @@ gtk_tree_path_free (cursor_path); } - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ if (tree_view->priv->fixed_height_mode && tree_view->priv->fixed_height >= 0) @@ -9554,7 +9564,9 @@ g_list_free (selected_rows); } else - /* MAEMO START */ +#ifndef MAEMO_CHANGES + cursor_path = gtk_tree_path_new_first (); +#else /* MAEMO_CHANGES */ { GtkRBTree *tree; GtkRBNode *node; @@ -9582,7 +9594,7 @@ /* FIXME: this fails for views without sensitive items ... */ } - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ gtk_tree_row_reference_free (tree_view->priv->cursor); tree_view->priv->cursor = NULL; @@ -9655,7 +9667,7 @@ &new_cursor_tree, &new_cursor_node); } - /* MAEMO START */ +#ifdef MAEMO_CHANGES if (new_cursor_node) cursor_path = _gtk_tree_view_find_path (tree_view, new_cursor_tree, new_cursor_node); @@ -9687,7 +9699,7 @@ if (cursor_path) gtk_tree_path_free (cursor_path); - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ /* * If the list has only one item and multi-selection is set then select @@ -9762,10 +9774,10 @@ gint y; gint window_y; gint vertical_separator; - /* MAEMO START */ +#ifdef MAEMO_CHANGES GtkRBTree *start_cursor_tree = NULL; GtkRBNode *start_cursor_node = NULL; - /* MAEMO END */ +#endif /* MAEMO_CHANGES */ if (! GTK_WIDGET_HAS_FOCUS (tree_view)) return; @@ -9799,7 +9811,9 @@ y -= _gtk_rbtree_find_offset (tree_view->priv->tree, y, &cursor_tree, &cursor_node); cursor_path = _gtk_tree_view_find_path (tree_view, cursor_tree, cursor_node); - /* MAEMO START */ +#ifndef MAEMO_CHANGES + g_return_if_fail (cursor_path != NULL); +#else /* MAEMO_CHANGES */ start_cursor_tree = cursor_tree; start_cursor_node = cursor_node; @@ -9862,9 +9876,8 @@ /* update y */ y = _gtk_rbtree_node_find_offset (cursor_tree, cursor_node); +#endif /* MAEMO_CHANGES */ - /* MAEMO END */ - gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, FALSE); if (!gtk_tree_path_compare (old_cursor_path, cursor_path)) @@ -15041,7 +15054,7 @@ } } -/* MAEMO START */ +#ifdef MAEMO_CHANGES static gboolean gtk_tree_view_tap_and_hold_query (GtkWidget *widget, GdkEvent *event) @@ -15074,8 +15087,7 @@ return !sensitive; } +#endif /* MAEMO_CHANGES */ -/* MAEMO END */ - #define __GTK_TREE_VIEW_C__ #include "gtkaliasdef.c"
- Previous message: [maemo-commits] r9377 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9379 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]