pspp-sheet-view: Rename GtkTreeSelectMode to PsppSheetSelectMode.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 3 Mar 2013 04:47:24 +0000 (20:47 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 3 Mar 2013 04:47:24 +0000 (20:47 -0800)
This avoids invading GTK+ reserved namespace.

src/ui/gui/pspp-sheet-private.h
src/ui/gui/pspp-sheet-selection.c
src/ui/gui/pspp-sheet-view.c

index 80e15ccf13d91f8c276e5f638111aec4de46ef3a..89e246dadc6917e66a887d5e38a8b3a3e3aa2dba 100644 (file)
@@ -1,5 +1,5 @@
  /* PSPPIRE - a graphical user interface for PSPP.
-    Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+    Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -55,10 +55,10 @@ typedef enum
 
 typedef enum
 {
-  GTK_TREE_SELECT_MODE_TOGGLE = 1 << 0,
-  GTK_TREE_SELECT_MODE_EXTEND = 1 << 1
+  PSPP_SHEET_SELECT_MODE_TOGGLE = 1 << 0,
+  PSPP_SHEET_SELECT_MODE_EXTEND = 1 << 1
 }
-GtkTreeSelectMode;
+PsppSheetSelectMode;
 
 enum
 {
@@ -362,7 +362,7 @@ struct _PsppSheetViewPrivate
 void         _pspp_sheet_selection_internal_select_node (PsppSheetSelection  *selection,
                                                       int                node,
                                                       GtkTreePath       *path,
-                                                       GtkTreeSelectMode  mode,
+                                                       PsppSheetSelectMode  mode,
                                                       gboolean           override_browse_mode);
 void         _pspp_sheet_selection_emit_changed         (PsppSheetSelection  *selection);
 void         _pspp_sheet_view_find_node                 (PsppSheetView       *tree_view,
index 9cd65028b49af59aa26347db702f62346573971d..13c69c0ed6ed59dbc05493cdf1b7c5299a0bbea4 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+   Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -547,7 +547,7 @@ pspp_sheet_selection_select_path (PsppSheetSelection *selection,
                                GtkTreePath      *path)
 {
   int node;
-  GtkTreeSelectMode mode = 0;
+  PsppSheetSelectMode mode = 0;
 
   g_return_if_fail (PSPP_IS_SHEET_SELECTION (selection));
   g_return_if_fail (selection->tree_view != NULL);
@@ -562,7 +562,7 @@ pspp_sheet_selection_select_path (PsppSheetSelection *selection,
 
   if (selection->type == PSPP_SHEET_SELECTION_MULTIPLE ||
       selection->type == PSPP_SHEET_SELECTION_RECTANGLE)
-    mode = GTK_TREE_SELECT_MODE_TOGGLE;
+    mode = PSPP_SHEET_SELECT_MODE_TOGGLE;
 
   _pspp_sheet_selection_internal_select_node (selection,
                                            node,
@@ -598,7 +598,7 @@ pspp_sheet_selection_unselect_path (PsppSheetSelection *selection,
   _pspp_sheet_selection_internal_select_node (selection,
                                            node,
                                            path,
-                                            GTK_TREE_SELECT_MODE_TOGGLE,
+                                            PSPP_SHEET_SELECT_MODE_TOGGLE,
                                            TRUE);
 }
 
@@ -1001,7 +1001,7 @@ void
 _pspp_sheet_selection_internal_select_node (PsppSheetSelection *selection,
                                          int               node,
                                          GtkTreePath      *path,
-                                          GtkTreeSelectMode mode,
+                                          PsppSheetSelectMode mode,
                                          gboolean          override_browse_mode)
 {
   gint dirty = FALSE;
@@ -1025,7 +1025,7 @@ _pspp_sheet_selection_internal_select_node (PsppSheetSelection *selection,
       else if (selection->type == PSPP_SHEET_SELECTION_SINGLE &&
               anchor_path && gtk_tree_path_compare (path, anchor_path) == 0)
        {
-         if ((mode & GTK_TREE_SELECT_MODE_TOGGLE) == GTK_TREE_SELECT_MODE_TOGGLE)
+         if ((mode & PSPP_SHEET_SELECT_MODE_TOGGLE) == PSPP_SHEET_SELECT_MODE_TOGGLE)
            {
              dirty = pspp_sheet_selection_real_unselect_all (selection);
            }
@@ -1070,7 +1070,7 @@ _pspp_sheet_selection_internal_select_node (PsppSheetSelection *selection,
   else if (selection->type == PSPP_SHEET_SELECTION_MULTIPLE ||
            selection->type == PSPP_SHEET_SELECTION_RECTANGLE)
     {
-      if ((mode & GTK_TREE_SELECT_MODE_EXTEND) == GTK_TREE_SELECT_MODE_EXTEND
+      if ((mode & PSPP_SHEET_SELECT_MODE_EXTEND) == PSPP_SHEET_SELECT_MODE_EXTEND
           && (anchor_path == NULL))
        {
          if (selection->tree_view->priv->anchor)
@@ -1080,13 +1080,13 @@ _pspp_sheet_selection_internal_select_node (PsppSheetSelection *selection,
            gtk_tree_row_reference_new_proxy (G_OBJECT (selection->tree_view), selection->tree_view->priv->model, path);
          dirty = pspp_sheet_selection_real_select_node (selection, node, TRUE);
        }
-      else if ((mode & (GTK_TREE_SELECT_MODE_EXTEND | GTK_TREE_SELECT_MODE_TOGGLE)) == (GTK_TREE_SELECT_MODE_EXTEND | GTK_TREE_SELECT_MODE_TOGGLE))
+      else if ((mode & (PSPP_SHEET_SELECT_MODE_EXTEND | PSPP_SHEET_SELECT_MODE_TOGGLE)) == (PSPP_SHEET_SELECT_MODE_EXTEND | PSPP_SHEET_SELECT_MODE_TOGGLE))
        {
          pspp_sheet_selection_select_range (selection,
                                           anchor_path,
                                           path);
        }
-      else if ((mode & GTK_TREE_SELECT_MODE_TOGGLE) == GTK_TREE_SELECT_MODE_TOGGLE)
+      else if ((mode & PSPP_SHEET_SELECT_MODE_TOGGLE) == PSPP_SHEET_SELECT_MODE_TOGGLE)
        {
           bool selected = pspp_sheet_view_node_is_selected (selection->tree_view, node);
          if (selection->tree_view->priv->anchor)
@@ -1100,7 +1100,7 @@ _pspp_sheet_selection_internal_select_node (PsppSheetSelection *selection,
          else
            dirty |= pspp_sheet_selection_real_select_node (selection, node, TRUE);
        }
-      else if ((mode & GTK_TREE_SELECT_MODE_EXTEND) == GTK_TREE_SELECT_MODE_EXTEND)
+      else if ((mode & PSPP_SHEET_SELECT_MODE_EXTEND) == PSPP_SHEET_SELECT_MODE_EXTEND)
        {
          dirty = pspp_sheet_selection_real_unselect_all (selection);
          dirty |= pspp_sheet_selection_real_modify_range (selection,
index 0b99df2b0289606b15cfa96d432a1cf1f6eb4597..0e389c9a7950fa7382b734278aaf93719315072d 100644 (file)
@@ -8407,7 +8407,7 @@ pspp_sheet_view_real_select_cursor_row (PsppSheetView *tree_view,
   int new_node = -1;
   int cursor_node = -1;
   GtkTreePath *cursor_path = NULL;
-  GtkTreeSelectMode mode = 0;
+  PsppSheetSelectMode mode = 0;
 
   if (!gtk_widget_has_focus (GTK_WIDGET (tree_view)))
     return FALSE;
@@ -8438,9 +8438,9 @@ pspp_sheet_view_real_select_cursor_row (PsppSheetView *tree_view,
     }
 
   if (tree_view->priv->ctrl_pressed)
-    mode |= GTK_TREE_SELECT_MODE_TOGGLE;
+    mode |= PSPP_SHEET_SELECT_MODE_TOGGLE;
   if (tree_view->priv->shift_pressed)
-    mode |= GTK_TREE_SELECT_MODE_EXTEND;
+    mode |= PSPP_SHEET_SELECT_MODE_EXTEND;
 
   _pspp_sheet_selection_internal_select_node (tree_view->priv->selection,
                                            cursor_node,
@@ -8498,7 +8498,7 @@ pspp_sheet_view_real_toggle_cursor_row (PsppSheetView *tree_view)
   _pspp_sheet_selection_internal_select_node (tree_view->priv->selection,
                                            cursor_node,
                                            cursor_path,
-                                            GTK_TREE_SELECT_MODE_TOGGLE,
+                                            PSPP_SHEET_SELECT_MODE_TOGGLE,
                                            FALSE);
 
   /* We bail out if the original (tree, node) don't exist anymore after
@@ -10027,12 +10027,12 @@ pspp_sheet_view_real_set_cursor (PsppSheetView     *tree_view,
 
       if (clear_and_select && !tree_view->priv->ctrl_pressed)
         {
-          GtkTreeSelectMode mode = 0;
+          PsppSheetSelectMode mode = 0;
 
           if (tree_view->priv->ctrl_pressed)
-            mode |= GTK_TREE_SELECT_MODE_TOGGLE;
+            mode |= PSPP_SHEET_SELECT_MODE_TOGGLE;
           if (tree_view->priv->shift_pressed)
-            mode |= GTK_TREE_SELECT_MODE_EXTEND;
+            mode |= PSPP_SHEET_SELECT_MODE_EXTEND;
 
           _pspp_sheet_selection_internal_select_node (tree_view->priv->selection,
                                                     node, path, mode,