[devhelp] Always name N_SIGNALS the number of signals in a certain class
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] Always name N_SIGNALS the number of signals in a certain class
- Date: Fri, 5 May 2017 10:56:01 +0000 (UTC)
commit e6d459cbcba52e55ee7a9abfb9cabae13c80a941
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri May 5 11:58:42 2017 +0200
Always name N_SIGNALS the number of signals in a certain class
LAST_SIGNAL is not a great name, we can think that it has the same value
as the last signal in the enum. N_SIGNALS is clearer.
src/dh-assistant-view.c | 4 ++--
src/dh-book-manager.c | 4 ++--
src/dh-book-tree.c | 4 ++--
src/dh-book.c | 4 ++--
src/dh-sidebar.c | 4 ++--
src/dh-window.c | 4 ++--
6 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/dh-assistant-view.c b/src/dh-assistant-view.c
index cea3ada..4baaa8c 100644
--- a/src/dh-assistant-view.c
+++ b/src/dh-assistant-view.c
@@ -35,10 +35,10 @@ typedef struct {
enum {
SIGNAL_OPEN_URI,
- SIGNAL_LAST
+ N_SIGNALS
};
-static guint signals[SIGNAL_LAST] = { 0 };
+static guint signals[N_SIGNALS] = { 0 };
G_DEFINE_TYPE_WITH_PRIVATE (DhAssistantView, dh_assistant_view, WEBKIT_TYPE_WEB_VIEW);
diff --git a/src/dh-book-manager.c b/src/dh-book-manager.c
index 47a25f7..aac0597 100644
--- a/src/dh-book-manager.c
+++ b/src/dh-book-manager.c
@@ -58,7 +58,7 @@ enum {
BOOK_DISABLED,
LANGUAGE_ENABLED,
LANGUAGE_DISABLED,
- LAST_SIGNAL
+ N_SIGNALS
};
enum {
@@ -66,7 +66,7 @@ enum {
PROP_GROUP_BY_LANGUAGE
};
-static guint signals[LAST_SIGNAL] = { 0 };
+static guint signals[N_SIGNALS] = { 0 };
static DhBookManager *singleton = NULL;
diff --git a/src/dh-book-tree.c b/src/dh-book-tree.c
index 26c4f78..c705d4f 100644
--- a/src/dh-book-tree.c
+++ b/src/dh-book-tree.c
@@ -39,7 +39,7 @@ typedef struct {
enum {
LINK_SELECTED,
- LAST_SIGNAL
+ N_SIGNALS
};
enum {
@@ -53,7 +53,7 @@ enum {
G_DEFINE_TYPE_WITH_PRIVATE (DhBookTree, dh_book_tree, GTK_TYPE_TREE_VIEW);
-static guint signals[LAST_SIGNAL] = { 0 };
+static guint signals[N_SIGNALS] = { 0 };
static void
book_tree_selection_changed_cb (GtkTreeSelection *selection,
diff --git a/src/dh-book.c b/src/dh-book.c
index dc931d6..14e8cbd 100644
--- a/src/dh-book.c
+++ b/src/dh-book.c
@@ -38,7 +38,7 @@ enum {
BOOK_DISABLED,
BOOK_UPDATED,
BOOK_DELETED,
- BOOK_LAST_SIGNAL
+ N_SIGNALS
};
typedef enum {
@@ -77,7 +77,7 @@ typedef struct {
G_DEFINE_TYPE_WITH_PRIVATE (DhBook, dh_book, G_TYPE_OBJECT);
-static guint signals[BOOK_LAST_SIGNAL] = { 0 };
+static guint signals[N_SIGNALS] = { 0 };
static void
dh_book_dispose (GObject *object)
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index 81e08f3..42c1c25 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -46,10 +46,10 @@ typedef struct {
enum {
LINK_SELECTED,
- LAST_SIGNAL
+ N_SIGNALS
};
-static guint signals[LAST_SIGNAL] = { 0 };
+static guint signals[N_SIGNALS] = { 0 };
G_DEFINE_TYPE_WITH_PRIVATE (DhSidebar, dh_sidebar, GTK_TYPE_BOX)
diff --git a/src/dh-window.c b/src/dh-window.c
index 084b0fb..66f95fd 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -54,10 +54,10 @@ typedef struct {
enum {
OPEN_LINK,
- LAST_SIGNAL
+ N_SIGNALS
};
-static guint signals[LAST_SIGNAL] = { 0 };
+static guint signals[N_SIGNALS] = { 0 };
static guint tab_accel_keys[] = {
GDK_KEY_1, GDK_KEY_2, GDK_KEY_3, GDK_KEY_4, GDK_KEY_5,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]