summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2017-11-10 22:02:36 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2017-11-10 22:02:36 +0100
commit02c677f467b398f8b91b1e90544502ff98a6e0da (patch)
tree157ff95ae00d469dafca1393c89814c8e1367cde /src/core
parent4d6822b1c43d876856a5df07ce69fb4e67c3591a (diff)
downloadirssi-02c677f467b398f8b91b1e90544502ff98a6e0da.zip
use enum
Diffstat (limited to 'src/core')
-rw-r--r--src/core/settings.c6
-rw-r--r--src/core/settings.h7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/core/settings.c b/src/core/settings.c
index 48d6640e..3ebb9e4a 100644
--- a/src/core/settings.c
+++ b/src/core/settings.c
@@ -39,7 +39,7 @@ static GString *last_errors;
static GSList *last_invalid_modules;
static int fe_initialized;
static int config_changed; /* FIXME: remove after .98 (unless needed again) */
-static int user_settings_changed;
+static unsigned int user_settings_changed;
static GHashTable *settings;
static int timeout_tag;
@@ -467,7 +467,7 @@ SETTINGS_REC *settings_get_record(const char *key)
static void sig_init_userinfo_changed(gpointer changedp)
{
- user_settings_changed = GPOINTER_TO_INT(changedp);
+ user_settings_changed |= GPOINTER_TO_UINT(changedp);
}
static void sig_init_finished(void)
@@ -486,7 +486,7 @@ static void sig_init_finished(void)
signal_emit("setup changed", 0);
}
- signal_emit("settings userinfo changed", 1, GINT_TO_POINTER(user_settings_changed));
+ signal_emit("settings userinfo changed", 1, GUINT_TO_POINTER(user_settings_changed));
}
static void settings_clean_invalid_module(const char *module)
diff --git a/src/core/settings.h b/src/core/settings.h
index d174f250..b67a9e44 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -30,6 +30,13 @@ typedef struct {
char **choices;
} SETTINGS_REC;
+enum {
+ USER_SETTINGS_REAL_NAME = 0x1,
+ USER_SETTINGS_USER_NAME = 0x2,
+ USER_SETTINGS_NICK = 0x4,
+ USER_SETTINGS_HOSTNAME = 0x8,
+};
+
/* macros for handling the default Irssi configuration */
#define iconfig_get_str(a, b, c) config_get_str(mainconfig, a, b, c)
#define iconfig_get_int(a, b, c) config_get_int(mainconfig, a, b, c)