mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 10:46:21 +00:00
Rename stamp preference variable
PREF_INCOMING_STR -> PREF_INCOMING_STAMP PREF_OUTGOING_STR -> PREF_OUTGOING_STAMP
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user