[empathy: 50/80] Use a define instead of hardcoding a magic number
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 50/80] Use a define instead of hardcoding a magic number
- Date: Fri, 10 Jun 2011 08:43:22 +0000 (UTC)
commit 4198f9e38072f8e36640af81db324e8787dc8e51
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Wed Apr 27 11:15:09 2011 +0100
Use a define instead of hardcoding a magic number
libempathy-gtk/empathy-log-window.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index b6531ff..87730c3 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -176,6 +176,8 @@ enum
/* Seconds between two messages to be considered one conversation */
#define MAX_GAP 30*60
+#define WHAT_TYPE_SEPARATOR -1
+
typedef enum
{
EVENT_CALL_INCOMING = 1 << 0,
@@ -2080,7 +2082,7 @@ what_row_is_separator (GtkTreeModel *model,
COL_WHAT_TYPE, &type,
-1);
- return (type == -1);
+ return (type == WHAT_TYPE_SEPARATOR);
}
static void
@@ -2150,7 +2152,7 @@ log_window_what_setup (EmpathyLogWindow *window)
guint i;
struct event events [] = {
{ TPL_EVENT_MASK_ANY, 0, NULL, _("Anything") },
- { -1, 0, NULL, "separator" },
+ { WHAT_TYPE_SEPARATOR, 0, NULL, "separator" },
{ TPL_EVENT_MASK_TEXT, 0, "stock_text_justify", _("Text chats") },
{ TPL_EVENT_MASK_CALL, EVENT_CALL_ALL, "call-start", _("Calls") }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]