diff options
author | rbuj <[email protected]> | 2022-07-27 10:24:51 +0200 |
---|---|---|
committer | rbuj <[email protected]> | 2022-07-27 10:24:51 +0200 |
commit | bcff84f10f267627e2f8ad2ecc8048ba4b6f01ea (patch) | |
tree | 495d2cb82d2d7d7bd5bd7c42185d4719dc37a0ec | |
parent | cf26de9dbf0decf88f6fcbc62c84efaedd3d77d7 (diff) | |
download | libmatekbd-bcff84f10f267627e2f8ad2ecc8048ba4b6f01ea.tar.bz2 libmatekbd-bcff84f10f267627e2f8ad2ecc8048ba4b6f01ea.tar.xz |
matekbd-status: use G_N_ELEMENTS macrolibmatekbd-G_N_ELEMENTS
-rw-r--r-- | libmatekbd/matekbd-status.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libmatekbd/matekbd-status.c b/libmatekbd/matekbd-status.c index 68c15dc..b028c5f 100644 --- a/libmatekbd/matekbd-status.c +++ b/libmatekbd/matekbd-status.c @@ -63,8 +63,7 @@ static gchar *settings_signal_names[] = { struct _MatekbdStatusPrivate { gdouble angle; - gulong settings_signal_handlers[sizeof (settings_signal_names) / - sizeof (settings_signal_names[0])]; + gulong settings_signal_handlers[G_N_ELEMENTS (settings_signal_names)]; }; /* one instance for ALL widgets */ @@ -664,8 +663,7 @@ matekbd_status_init (MatekbdStatus * gki) g_signal_connect (gki, "activate", G_CALLBACK (matekbd_status_activate), NULL); - for (i = sizeof (settings_signal_names) / - sizeof (settings_signal_names[0]); --i >= 0;) + for (i = G_N_ELEMENTS (settings_signal_names); --i >= 0;) gki->priv->settings_signal_handlers[i] = g_signal_connect_after (gtk_settings_get_default (), settings_signal_names[i], @@ -683,8 +681,7 @@ matekbd_status_finalize (GObject * obj) "Starting the mate-kbd-status widget shutdown process for %p\n", gki); - for (i = sizeof (settings_signal_names) / - sizeof (settings_signal_names[0]); --i >= 0;) + for (i = G_N_ELEMENTS (settings_signal_names); --i >= 0;) g_signal_handler_disconnect (gtk_settings_get_default (), gki-> priv->settings_signal_handlers |