summaryrefslogtreecommitdiff
path: root/capplets/time-admin/src/time-share.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-08-16 15:01:22 +0200
committerVictor Kareh <[email protected]>2019-08-21 11:08:11 -0400
commitb670c37a3dd9083418eca389f3452a15f70e0f22 (patch)
treef6e35fcc6cb957e0f4fcbf78657df8f966b3f06b /capplets/time-admin/src/time-share.c
parent797375812a94286b74397818e20e0c94791ab4d7 (diff)
downloadmate-control-center-b670c37a3dd9083418eca389f3452a15f70e0f22.tar.bz2
mate-control-center-b670c37a3dd9083418eca389f3452a15f70e0f22.tar.xz
time-admin: Remove unreachable code
Diffstat (limited to 'capplets/time-admin/src/time-share.c')
-rw-r--r--capplets/time-admin/src/time-share.c83
1 files changed, 12 insertions, 71 deletions
diff --git a/capplets/time-admin/src/time-share.c b/capplets/time-admin/src/time-share.c
index b5038779..e4069415 100644
--- a/capplets/time-admin/src/time-share.c
+++ b/capplets/time-admin/src/time-share.c
@@ -21,82 +21,23 @@
#include "time-share.h"
#include <glib/gi18n.h>
-/******************************************************************************
- * Function: MessageReport
- *
- * Explain: Prompt information dialog
- *
- * Input: @Title Message title
- * @Msg Message content
- * @nType Message type
- * Output:
- *
- * Author: zhuyaliang 25/05/2018
- ******************************************************************************/
-int MessageReport(const char *Title,
- const char *Msg,
- int nType)
+int ErrorMessage (const char *Title,
+ const char *Msg)
{
- GtkWidget *dialog = NULL;
int nRet;
+ GtkWidget *dialog;
- switch(nType)
- {
- case ERROR:
- {
- dialog = gtk_message_dialog_new(NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- "%s", Title);
- break;
- }
- case WARING:
- {
- dialog = gtk_message_dialog_new(NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- "%s", Title);
- break;
- }
- case INFOR:
- {
- dialog = gtk_message_dialog_new(NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_INFO,
- GTK_BUTTONS_OK,
- "%s", Title);
- break;
- }
- case QUESTION:
- {
- dialog = gtk_message_dialog_new(NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- "%s", Title);
- gtk_dialog_add_button (GTK_DIALOG (dialog),("_Return"),
- GTK_RESPONSE_ACCEPT);
- break;
- }
- case QUESTIONNORMAL:
- {
- dialog = gtk_message_dialog_new(NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- "%s", Title);
- break;
- }
- default :
- break;
+ dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ "%s", Title);
- }
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", Msg);
- nRet = gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
+
+ nRet = gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
return nRet;
}