Skip to content

Commit

Permalink
Update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
claucece committed Oct 5, 2018
1 parent 0b14d5f commit 67a44be
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
3 changes: 1 addition & 2 deletions dialogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ void otrng_dialog_socialist_millionaires_q(

/* Update the status of an ongoing socialist millionaires protocol. */
void otrng_dialog_update_smp(const otrng_plugin_conversation *context,
otrng_smp_event_t smp_event,
double progress_level) {
otrng_smp_event smp_event, double progress_level) {
ui_ops->update_smp(context, smp_event, progress_level);
}

Expand Down
5 changes: 2 additions & 3 deletions dialogs.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ typedef struct {
const char *question, gboolean responder);

void (*update_smp)(const otrng_plugin_conversation *context,
otrng_smp_event_t smp_event, double progress_level);
otrng_smp_event smp_event, double progress_level);

void (*connected)(const otrng_plugin_conversation *conv);

Expand Down Expand Up @@ -160,8 +160,7 @@ void otrng_dialog_socialist_millionaires_q(

/* Update the status of an ongoing socialist millionaires protocol. */
void otrng_dialog_update_smp(const otrng_plugin_conversation *context,
otrng_smp_event_t smp_event,
double progress_level);
otrng_smp_event smp_event, double progress_level);

/* Call this when a context transitions to ENCRYPTED. */
void otrng_dialog_conversation_connected(otrng_plugin_conversation *conv);
Expand Down
3 changes: 1 addition & 2 deletions gtk-dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -1530,8 +1530,7 @@ otrng_gtk_dialog_socialist_millionaires(const otrng_plugin_conversation *conv,
* 1.0 (complete). Any other value represents an intermediate state. */
static void
otrng_gtk_dialog_update_smp(const otrng_plugin_conversation *context,
otrng_smp_event_t smp_event,
double progress_level) {
otrng_smp_event smp_event, double progress_level) {
PurpleConversation *conv =
otrng_plugin_conversation_to_purple_conv(context, 0);
GtkProgressBar *bar;
Expand Down
14 changes: 6 additions & 8 deletions plugin-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ static void smp_ask_for_answer_v4(const unsigned char *question, size_t q_len,
otrng_plugin_conversation_free(conv);
}

static void smp_update_v4(const otrng_smp_event_t event,
static void smp_update_v4(const otrng_smp_event event,
const uint8_t progress_percent,
const otrng_s *cconv) {
if (!cconv) {
Expand Down Expand Up @@ -1907,9 +1907,9 @@ static void smp_update_v4(const otrng_smp_event_t event,
}

static void display_error_message(const otrng_error_event event,
string_p *to_display,
const struct otrng_s *cconv) {
if (!cconv) { //TODO: prob not needed
string_p *to_display,
const struct otrng_s *cconv) {
if (!cconv) { // TODO: prob not needed
return;
}

Expand All @@ -1928,12 +1928,10 @@ static void display_error_message(const otrng_error_event event,
otrng_xstrndup(not_in_private_error, strlen(not_in_private_error));
break;
case OTRNG_ERROR_ENCRYPTION_ERROR_EVENT:
*to_display =
otrng_xstrndup(encryption_error, strlen(encryption_error));
*to_display = otrng_xstrndup(encryption_error, strlen(encryption_error));
break;
case OTRNG_ERROR_MALFORMED_EVENT:
*to_display =
otrng_xstrndup(malformed_error, strlen(malformed_error));
*to_display = otrng_xstrndup(malformed_error, strlen(malformed_error));
break;
case OTRNG_ERROR_NONE:
break;
Expand Down

0 comments on commit 67a44be

Please sign in to comment.