diff options
author | rbuj <[email protected]> | 2019-06-19 18:58:45 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-08-20 16:10:38 +0200 |
commit | 0cc88d6a62fc8eff0b93fc6c287fc1b054ced094 (patch) | |
tree | 8135d02d0b3a87fdfc0fab4956b771b1af091773 /capplets/time-admin/src/time-share.c | |
parent | 7a90b47c2f2daaa13834a5a58fc159b813852d8d (diff) | |
download | mate-control-center-0cc88d6a62fc8eff0b93fc6c287fc1b054ced094.tar.bz2 mate-control-center-0cc88d6a62fc8eff0b93fc6c287fc1b054ced094.tar.xz |
time-admin: Add time-admin.ui
Diffstat (limited to 'capplets/time-admin/src/time-share.c')
-rw-r--r-- | capplets/time-admin/src/time-share.c | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/capplets/time-admin/src/time-share.c b/capplets/time-admin/src/time-share.c index 379134e3..b5038779 100644 --- a/capplets/time-admin/src/time-share.c +++ b/capplets/time-admin/src/time-share.c @@ -22,18 +22,20 @@ #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) + * 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) { GtkWidget *dialog = NULL; int nRet; @@ -42,49 +44,49 @@ int MessageReport(const char *Title,const char *Msg,int nType) { case ERROR: { - dialog = gtk_message_dialog_new(GTK_WINDOW(WindowLogin), - GTK_DIALOG_DESTROY_WITH_PARENT, + dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - "%s",Title); + "%s", Title); break; } case WARING: { - dialog = gtk_message_dialog_new(GTK_WINDOW(WindowLogin), - GTK_DIALOG_DESTROY_WITH_PARENT, + dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, - "%s",Title); + "%s", Title); break; } case INFOR: { - dialog = gtk_message_dialog_new(GTK_WINDOW(WindowLogin), - GTK_DIALOG_DESTROY_WITH_PARENT, + dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, - "%s",Title); + "%s", Title); break; } case QUESTION: { - dialog = gtk_message_dialog_new(GTK_WINDOW(WindowLogin), - GTK_DIALOG_DESTROY_WITH_PARENT, + dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - "%s",Title); + "%s", Title); gtk_dialog_add_button (GTK_DIALOG (dialog),("_Return"), GTK_RESPONSE_ACCEPT); break; } case QUESTIONNORMAL: { - dialog = gtk_message_dialog_new(GTK_WINDOW(WindowLogin), - GTK_DIALOG_DESTROY_WITH_PARENT, + dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - "%s",Title); + "%s", Title); break; } default : @@ -102,13 +104,10 @@ int MessageReport(const char *Title,const char *Msg,int nType) void QuitApp(TimeAdmin *ta) { if(ta->UpdateTimeId > 0) - { g_source_remove (ta->UpdateTimeId); - } + if(ta->ApplyId > 0) - { g_source_remove(ta->ApplyId); - } gtk_main_quit(); } |