libgnt/libgnt

Rename some things.

2019-04-24, Elliott Sales de Andrade
5285a7146aa7
Parents 49842f6491e1
Children 7c0f7e4902af
Rename some things.
  • +8 -7
    gntbox.c
  • +7 -6
    gntbox.h
  • +3 -2
    gntwindow.c
  • +6 -5
    gntwindow.h
  • +7 -5
    wms/irssi.c
  • --- a/gntbox.c Thu Apr 25 03:42:09 2019 -0400
    +++ b/gntbox.c Wed Apr 24 21:02:26 2019 -0400
    @@ -34,7 +34,7 @@
    {
    PROP_0,
    PROP_VERTICAL,
    - PROP_HOMO /* ... */
    + PROP_HOMOGENEOUS
    };
    enum
    @@ -541,7 +541,7 @@
    case PROP_VERTICAL:
    box->vertical = g_value_get_boolean(value);
    break;
    - case PROP_HOMO:
    + case PROP_HOMOGENEOUS:
    box->homogeneous = g_value_get_boolean(value);
    break;
    default:
    @@ -559,7 +559,7 @@
    case PROP_VERTICAL:
    g_value_set_boolean(value, box->vertical);
    break;
    - case PROP_HOMO:
    + case PROP_HOMOGENEOUS:
    g_value_set_boolean(value, box->homogeneous);
    break;
    default:
    @@ -598,7 +598,7 @@
    )
    );
    g_object_class_install_property(obj_class,
    - PROP_HOMO,
    + PROP_HOMOGENEOUS,
    g_param_spec_boolean("homogeneous", "Homogeneous",
    "Whether the child widgets in the box should have the same size.",
    TRUE,
    @@ -636,10 +636,11 @@
    /******************************************************************************
    * GntBox API
    *****************************************************************************/
    -GntWidget *gnt_box_new(gboolean homo, gboolean vert)
    +GntWidget *
    +gnt_box_new(gboolean homogeneous, gboolean vert)
    {
    - GntWidget *widget = g_object_new(GNT_TYPE_BOX, "homogeneous", homo,
    - "vertical", vert, NULL);
    + GntWidget *widget = g_object_new(GNT_TYPE_BOX, "homogeneous",
    + homogeneous, "vertical", vert, NULL);
    GntBox *box = GNT_BOX(widget);
    box->alignment = vert ? GNT_ALIGN_LEFT : GNT_ALIGN_MID;
    --- a/gntbox.h Thu Apr 25 03:42:09 2019 -0400
    +++ b/gntbox.h Wed Apr 24 21:02:26 2019 -0400
    @@ -105,20 +105,21 @@
    */
    GType gnt_box_get_type(void);
    -#define gnt_vbox_new(homo) gnt_box_new(homo, TRUE)
    -#define gnt_hbox_new(homo) gnt_box_new(homo, FALSE)
    +#define gnt_vbox_new(homogeneous) gnt_box_new(homogeneous, TRUE)
    +#define gnt_hbox_new(homogeneous) gnt_box_new(homogeneous, FALSE)
    /**
    * gnt_box_new:
    - * @homo: If %TRUE, all the widgets in it will have the same width (or height)
    - * @vert: Whether the widgets in it should be stacked vertically (if %TRUE)
    - * or horizontally (if %FALSE).
    + * @homogeneous: If %TRUE, all the widgets in it will have the same width (or
    + * height)
    + * @vert: Whether the widgets in it should be stacked vertically (if %TRUE) or
    + * horizontally (if %FALSE).
    *
    * Create a new GntBox.
    *
    * Returns: The new GntBox.
    */
    -GntWidget * gnt_box_new(gboolean homo, gboolean vert);
    +GntWidget *gnt_box_new(gboolean homogeneous, gboolean vert);
    /**
    * gnt_box_get_children:
    --- a/gntwindow.c Thu Apr 25 03:42:09 2019 -0400
    +++ b/gntwindow.c Wed Apr 24 21:02:26 2019 -0400
    @@ -138,12 +138,13 @@
    return widget;
    }
    -GntWidget *gnt_window_box_new(gboolean homo, gboolean vert)
    +GntWidget *
    +gnt_window_box_new(gboolean homogeneous, gboolean vert)
    {
    GntWidget *wid = gnt_window_new();
    GntBox *box = GNT_BOX(wid);
    - box->homogeneous = homo;
    + box->homogeneous = homogeneous;
    box->vertical = vert;
    box->alignment = vert ? GNT_ALIGN_LEFT : GNT_ALIGN_MID;
    --- a/gntwindow.h Thu Apr 25 03:42:09 2019 -0400
    +++ b/gntwindow.h Wed Apr 24 21:02:26 2019 -0400
    @@ -63,8 +63,8 @@
    */
    G_DECLARE_DERIVABLE_TYPE(GntWindow, gnt_window, GNT, WINDOW, GntBox)
    -#define gnt_vwindow_new(homo) gnt_window_box_new(homo, TRUE)
    -#define gnt_hwindow_new(homo) gnt_window_box_new(homo, FALSE)
    +#define gnt_vwindow_new(homogeneous) gnt_window_box_new(homogeneous, TRUE)
    +#define gnt_hwindow_new(homogeneous) gnt_window_box_new(homogeneous, FALSE)
    /**
    * gnt_window_new:
    @@ -77,14 +77,15 @@
    /**
    * gnt_window_box_new:
    - * @homo: %TRUE if the widgets inside the window should have the same dimensions.
    - * @vert: %TRUE if the widgets inside the window should be stacked vertically.
    + * @homogeneous: %TRUE if the widgets inside the window should have the same
    + * dimensions.
    + * @vert: %TRUE if the widgets inside the window should be stacked vertically.
    *
    * Create a new window.
    *
    * Returns: The newly created window.
    */
    -GntWidget * gnt_window_box_new(gboolean homo, gboolean vert);
    +GntWidget *gnt_window_box_new(gboolean homogeneous, gboolean vert);
    /**
    * gnt_window_set_menu:
    --- a/wms/irssi.c Thu Apr 25 03:42:09 2019 -0400
    +++ b/wms/irssi.c Wed Apr 24 21:02:26 2019 -0400
    @@ -129,7 +129,7 @@
    }
    static gboolean
    -is_budddylist(GntWidget *win)
    +is_buddylist(GntWidget *win)
    {
    const char *name = gnt_widget_get_name(win);
    if (name && strcmp(name, "buddylist") == 0)
    @@ -195,8 +195,9 @@
    irssi_window_resized(GntWM *wm, GntNode *node)
    {
    GntIrssiWM *irssi = NULL;
    - if (!is_budddylist(node->me))
    + if (!is_buddylist(node->me)) {
    return;
    + }
    irssi = GNT_IRSSI_WM(wm);
    gnt_widget_get_size(node->me, &irssi->buddylistwidth, NULL);
    @@ -206,7 +207,7 @@
    static gboolean
    irssi_close_window(GntWM *wm, GntWidget *win)
    {
    - if (is_budddylist(win)) {
    + if (is_buddylist(win)) {
    GntIrssiWM *irssi = GNT_IRSSI_WM(wm);
    irssi->buddylistwidth = 0;
    }
    @@ -271,7 +272,8 @@
    int x, y, w, h;
    GntWidget *win;
    - if (gnt_ws_is_empty(wm->cws) || is_budddylist(win = gnt_ws_get_top_widget(wm->cws))) {
    + if (gnt_ws_is_empty(wm->cws) ||
    + is_buddylist(win = gnt_ws_get_top_widget(wm->cws))) {
    return FALSE;
    }
    @@ -308,7 +310,7 @@
    if (!GNT_IS_WINDOW(widget))
    return;
    - if (is_budddylist(widget)) {
    + if (is_buddylist(widget)) {
    return;
    }