qulogic/libgnt

Merged in default (pull request #72)

2019-05-14, Gary Kramlich
0f288286b25b
Merged in default (pull request #72)

Hide some more stuff

Approved-by: Gary Kramlich
  • +21 -7
    gnttree.c
  • +2 -19
    gnttree.h
  • +0 -6
    gntwidget.h
  • --- a/gnttree.c Mon May 13 18:03:29 2019 -0400
    +++ b/gnttree.c Tue May 14 05:29:28 2019 +0000
    @@ -40,6 +40,22 @@
    #define RIGHT_ALIGNED(priv, index) \
    (priv->columns[index].flags & GNT_TREE_COLUMN_RIGHT_ALIGNED)
    +typedef enum
    +{
    + GNT_TREE_COLUMN_INVISIBLE = 1 << 0,
    + GNT_TREE_COLUMN_FIXED_SIZE = 1 << 1,
    + GNT_TREE_COLUMN_BINARY_DATA = 1 << 2,
    + GNT_TREE_COLUMN_RIGHT_ALIGNED = 1 << 3,
    +} GntTreeColumnFlag;
    +
    +typedef struct _GntTreeColInfo
    +{
    + int width;
    + char *title;
    + int width_ratio;
    + GntTreeColumnFlag flags;
    +} GntTreeColInfo;
    +
    enum
    {
    PROP_0,
    @@ -67,10 +83,6 @@
    GList *list; /* List of GntTreeRow s */
    GHashTable *hash; /* We need this for quickly referencing the rows */
    - GntTreeHashFunc hash_func;
    - GntTreeHashEqualityFunc hash_eq_func;
    - GDestroyNotify key_destroy;
    - GDestroyNotify value_destroy;
    int ncol; /* No. of columns */
    GntTreeColInfo *columns; /* Would a GList be better? */
    @@ -114,12 +126,12 @@
    GntTree *tree;
    };
    -struct _GntTreeCol
    +typedef struct _GntTreeCol
    {
    char *text;
    gboolean isbinary;
    int span; /* How many columns does it span? */
    -};
    +} GntTreeCol;
    static void tree_selection_changed(GntTree *, GntTreeRow *, GntTreeRow *);
    static void _gnt_tree_init_internals(GntTree *tree, int col);
    @@ -2100,7 +2112,9 @@
    gnt_widget_set_size(GNT_WIDGET(tree), twidth, -1);
    }
    -void gnt_tree_set_hash_fns(GntTree *tree, gpointer hash, gpointer eq, gpointer kd)
    +void
    +gnt_tree_set_hash_fns(GntTree *tree, GntTreeHashFunc hash,
    + GntTreeHashEqualityFunc eq, GDestroyNotify kd)
    {
    GntTreePrivate *priv = NULL;
    --- a/gnttree.h Mon May 13 18:03:29 2019 -0400
    +++ b/gnttree.h Tue May 14 05:29:28 2019 +0000
    @@ -43,24 +43,6 @@
    typedef gboolean (*GntTreeHashEqualityFunc)(gconstpointer a, gconstpointer b);
    typedef struct _GntTreeRow GntTreeRow;
    -typedef struct _GntTreeCol GntTreeCol;
    -typedef struct _GntTreeColInfo GntTreeColInfo;
    -
    -typedef enum {
    - GNT_TREE_COLUMN_INVISIBLE = 1 << 0,
    - GNT_TREE_COLUMN_FIXED_SIZE = 1 << 1,
    - GNT_TREE_COLUMN_BINARY_DATA = 1 << 2,
    - GNT_TREE_COLUMN_RIGHT_ALIGNED = 1 << 3,
    -} GntTreeColumnFlag;
    -
    -struct _GntTreeColInfo
    -{
    - int width;
    - char *title;
    - int width_ratio;
    - GntTreeColumnFlag flags;
    -};
    -
    G_BEGIN_DECLS
    /**
    @@ -554,7 +536,8 @@
    *
    * Set the hash functions to use to hash, compare and free the keys.
    */
    -void gnt_tree_set_hash_fns(GntTree *tree, gpointer hash, gpointer eq, gpointer kd);
    +void gnt_tree_set_hash_fns(GntTree *tree, GntTreeHashFunc hash,
    + GntTreeHashEqualityFunc eq, GDestroyNotify kd);
    /**
    * gnt_tree_set_column_visible:
    --- a/gntwidget.h Mon May 13 18:03:29 2019 -0400
    +++ b/gntwidget.h Tue May 14 05:29:28 2019 +0000
    @@ -45,12 +45,6 @@
    GNT_MOUSE_SCROLL_DOWN
    } GntMouseEvent;
    -/* XXX: I'll have to ask grim what he's using this for in guifications. */
    -typedef enum
    -{
    - GNT_PARAM_SERIALIZABLE = 1 << G_PARAM_USER_SHIFT
    -} GntParamFlags;
    -
    G_BEGIN_DECLS
    #define GNT_TYPE_WIDGET gnt_widget_get_type()