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:
parent
69a8fdec95
commit
6c5d983f13
@ -9023,14 +9023,14 @@ gboolean
|
|||||||
cmd_stamp(ProfWin* window, const char* const command, gchar** args)
|
cmd_stamp(ProfWin* window, const char* const command, gchar** args)
|
||||||
{
|
{
|
||||||
if (g_strv_length(args) == 0) {
|
if (g_strv_length(args) == 0) {
|
||||||
char* def = prefs_get_string(PREF_OUTGOING_STR);
|
char* def = prefs_get_string(PREF_OUTGOING_STAMP);
|
||||||
if (def) {
|
if (def) {
|
||||||
cons_show("The outgoing stamp is: %s", def);
|
cons_show("The outgoing stamp is: %s", def);
|
||||||
free(def);
|
free(def);
|
||||||
} else {
|
} else {
|
||||||
cons_show("No outgoing stamp.");
|
cons_show("No outgoing stamp.");
|
||||||
}
|
}
|
||||||
def = prefs_get_string(PREF_INCOMING_STR);
|
def = prefs_get_string(PREF_INCOMING_STAMP);
|
||||||
if (def) {
|
if (def) {
|
||||||
cons_show("The incoming stamp is: %s", def);
|
cons_show("The incoming stamp is: %s", def);
|
||||||
free(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_strv_length(args) == 2) {
|
||||||
if (g_strcmp0(args[0], "outgoing") == 0) {
|
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]);
|
cons_show("Outgoing stamp set to: %s", args[1]);
|
||||||
} else if (g_strcmp0(args[0], "incoming") == 0) {
|
} 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]);
|
cons_show("Incoming stamp set to: %s", args[1]);
|
||||||
} else if (g_strcmp0(args[0], "unset") == 0) {
|
} else if (g_strcmp0(args[0], "unset") == 0) {
|
||||||
if (g_strcmp0(args[1], "incoming") == 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");
|
cons_show("Incoming stamp unset");
|
||||||
} else if (g_strcmp0(args[1], "outgoing") == 0) {
|
} 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");
|
cons_show("Outgoing stamp unset");
|
||||||
} else {
|
} else {
|
||||||
cons_bad_cmd_usage(command);
|
cons_bad_cmd_usage(command);
|
||||||
|
@ -1817,8 +1817,8 @@ _get_group(preference_t pref)
|
|||||||
case PREF_TITLEBAR_MUC_TITLE_NAME:
|
case PREF_TITLEBAR_MUC_TITLE_NAME:
|
||||||
case PREF_SLASH_GUARD:
|
case PREF_SLASH_GUARD:
|
||||||
case PREF_COMPOSE_EDITOR:
|
case PREF_COMPOSE_EDITOR:
|
||||||
case PREF_OUTGOING_STR:
|
case PREF_OUTGOING_STAMP:
|
||||||
case PREF_INCOMING_STR:
|
case PREF_INCOMING_STAMP:
|
||||||
return PREF_GROUP_UI;
|
return PREF_GROUP_UI;
|
||||||
case PREF_STATES:
|
case PREF_STATES:
|
||||||
case PREF_OUTTYPE:
|
case PREF_OUTTYPE:
|
||||||
@ -2146,9 +2146,9 @@ _get_key(preference_t pref)
|
|||||||
return "compose.editor";
|
return "compose.editor";
|
||||||
case PREF_SILENCE_NON_ROSTER:
|
case PREF_SILENCE_NON_ROSTER:
|
||||||
return "silence.incoming.nonroster";
|
return "silence.incoming.nonroster";
|
||||||
case PREF_OUTGOING_STR:
|
case PREF_OUTGOING_STAMP:
|
||||||
return "stamp.outgoing";
|
return "stamp.outgoing";
|
||||||
case PREF_INCOMING_STR:
|
case PREF_INCOMING_STAMP:
|
||||||
return "stamp.incoming";
|
return "stamp.incoming";
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -2287,9 +2287,9 @@ _get_default_string(preference_t pref)
|
|||||||
gchar* editor = getenv("EDITOR");
|
gchar* editor = getenv("EDITOR");
|
||||||
return editor ? editor : "vim";
|
return editor ? editor : "vim";
|
||||||
}
|
}
|
||||||
case PREF_OUTGOING_STR:
|
case PREF_OUTGOING_STAMP:
|
||||||
return "me:";
|
return "me:";
|
||||||
case PREF_INCOMING_STR:
|
case PREF_INCOMING_STAMP:
|
||||||
return NULL;
|
return NULL;
|
||||||
case PREF_URL_SAVE_CMD:
|
case PREF_URL_SAVE_CMD:
|
||||||
return NULL; // Default to built-in method.
|
return NULL; // Default to built-in method.
|
||||||
|
@ -176,8 +176,8 @@ typedef enum {
|
|||||||
PREF_URL_SAVE_CMD,
|
PREF_URL_SAVE_CMD,
|
||||||
PREF_COMPOSE_EDITOR,
|
PREF_COMPOSE_EDITOR,
|
||||||
PREF_SILENCE_NON_ROSTER,
|
PREF_SILENCE_NON_ROSTER,
|
||||||
PREF_OUTGOING_STR,
|
PREF_OUTGOING_STAMP,
|
||||||
PREF_INCOMING_STR,
|
PREF_INCOMING_STAMP,
|
||||||
} preference_t;
|
} preference_t;
|
||||||
|
|
||||||
typedef struct prof_alias_t
|
typedef struct prof_alias_t
|
||||||
|
@ -1248,7 +1248,7 @@ win_print_outgoing(ProfWin* window, const char* show_char, const char* const id,
|
|||||||
if (replace_id) {
|
if (replace_id) {
|
||||||
_win_correct(window, message, id, replace_id, myjid);
|
_win_correct(window, message, id, replace_id, myjid);
|
||||||
} else {
|
} 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);
|
_win_printf(window, show_char, 0, timestamp, 0, THEME_TEXT_ME, outgoing_str, myjid, id, "%s", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ roster_get_msg_display_name(const char* const barejid, const char* const resourc
|
|||||||
{
|
{
|
||||||
assert(roster != NULL);
|
assert(roster != NULL);
|
||||||
|
|
||||||
char* incoming_str = prefs_get_string(PREF_INCOMING_STR);
|
char* incoming_str = prefs_get_string(PREF_INCOMING_STAMP);
|
||||||
|
|
||||||
if (incoming_str) {
|
if (incoming_str) {
|
||||||
return incoming_str;
|
return incoming_str;
|
||||||
|
Loading…
Reference in New Issue
Block a user