1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Rename stamp preference variable

PREF_INCOMING_STR -> PREF_INCOMING_STAMP
PREF_OUTGOING_STR -> PREF_OUTGOING_STAMP
This commit is contained in:
Michael Vetter 2022-04-28 19:29:27 +02:00
parent 69a8fdec95
commit 6c5d983f13
5 changed files with 16 additions and 16 deletions

View File

@ -9023,14 +9023,14 @@ gboolean
cmd_stamp(ProfWin* window, const char* const command, gchar** args)
{
if (g_strv_length(args) == 0) {
char* def = prefs_get_string(PREF_OUTGOING_STR);
char* def = prefs_get_string(PREF_OUTGOING_STAMP);
if (def) {
cons_show("The outgoing stamp is: %s", def);
free(def);
} else {
cons_show("No outgoing stamp.");
}
def = prefs_get_string(PREF_INCOMING_STR);
def = prefs_get_string(PREF_INCOMING_STAMP);
if (def) {
cons_show("The incoming stamp is: %s", def);
free(def);
@ -9047,17 +9047,17 @@ cmd_stamp(ProfWin* window, const char* const command, gchar** args)
if (g_strv_length(args) == 2) {
if (g_strcmp0(args[0], "outgoing") == 0) {
prefs_set_string(PREF_OUTGOING_STR, args[1]);
prefs_set_string(PREF_OUTGOING_STAMP, args[1]);
cons_show("Outgoing stamp set to: %s", args[1]);
} else if (g_strcmp0(args[0], "incoming") == 0) {
prefs_set_string(PREF_INCOMING_STR, args[1]);
prefs_set_string(PREF_INCOMING_STAMP, args[1]);
cons_show("Incoming stamp set to: %s", args[1]);
} else if (g_strcmp0(args[0], "unset") == 0) {
if (g_strcmp0(args[1], "incoming") == 0) {
prefs_set_string(PREF_INCOMING_STR, NULL);
prefs_set_string(PREF_INCOMING_STAMP, NULL);
cons_show("Incoming stamp unset");
} else if (g_strcmp0(args[1], "outgoing") == 0) {
prefs_set_string(PREF_OUTGOING_STR, NULL);
prefs_set_string(PREF_OUTGOING_STAMP, NULL);
cons_show("Outgoing stamp unset");
} else {
cons_bad_cmd_usage(command);

View File

@ -1817,8 +1817,8 @@ _get_group(preference_t pref)
case PREF_TITLEBAR_MUC_TITLE_NAME:
case PREF_SLASH_GUARD:
case PREF_COMPOSE_EDITOR:
case PREF_OUTGOING_STR:
case PREF_INCOMING_STR:
case PREF_OUTGOING_STAMP:
case PREF_INCOMING_STAMP:
return PREF_GROUP_UI;
case PREF_STATES:
case PREF_OUTTYPE:
@ -2146,9 +2146,9 @@ _get_key(preference_t pref)
return "compose.editor";
case PREF_SILENCE_NON_ROSTER:
return "silence.incoming.nonroster";
case PREF_OUTGOING_STR:
case PREF_OUTGOING_STAMP:
return "stamp.outgoing";
case PREF_INCOMING_STR:
case PREF_INCOMING_STAMP:
return "stamp.incoming";
default:
return NULL;
@ -2287,9 +2287,9 @@ _get_default_string(preference_t pref)
gchar* editor = getenv("EDITOR");
return editor ? editor : "vim";
}
case PREF_OUTGOING_STR:
case PREF_OUTGOING_STAMP:
return "me:";
case PREF_INCOMING_STR:
case PREF_INCOMING_STAMP:
return NULL;
case PREF_URL_SAVE_CMD:
return NULL; // Default to built-in method.

View File

@ -176,8 +176,8 @@ typedef enum {
PREF_URL_SAVE_CMD,
PREF_COMPOSE_EDITOR,
PREF_SILENCE_NON_ROSTER,
PREF_OUTGOING_STR,
PREF_INCOMING_STR,
PREF_OUTGOING_STAMP,
PREF_INCOMING_STAMP,
} preference_t;
typedef struct prof_alias_t

View File

@ -1248,7 +1248,7 @@ win_print_outgoing(ProfWin* window, const char* show_char, const char* const id,
if (replace_id) {
_win_correct(window, message, id, replace_id, myjid);
} else {
char* outgoing_str = prefs_get_string(PREF_OUTGOING_STR);
char* outgoing_str = prefs_get_string(PREF_OUTGOING_STAMP);
_win_printf(window, show_char, 0, timestamp, 0, THEME_TEXT_ME, outgoing_str, myjid, id, "%s", message);
}

View File

@ -199,7 +199,7 @@ roster_get_msg_display_name(const char* const barejid, const char* const resourc
{
assert(roster != NULL);
char* incoming_str = prefs_get_string(PREF_INCOMING_STR);
char* incoming_str = prefs_get_string(PREF_INCOMING_STAMP);
if (incoming_str) {
return incoming_str;