summaryrefslogtreecommitdiff
path: root/ui/simple_dialog.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-09-24 14:06:23 -0700
committerGerald Combs <gerald@wireshark.org>2014-09-25 22:02:43 +0000
commitea6fa049c9c43a6852c2a1e8b72598e13a27786b (patch)
tree317fec804ce7aaaf619f813bba9c0efda22020b6 /ui/simple_dialog.h
parent2ee45fe2daffe10b519dc54699480db1c0a4f5ed (diff)
downloadwireshark-ea6fa049c9c43a6852c2a1e8b72598e13a27786b.tar.gz
Update the simple dialog code.
Rename simple_dialog_qt.{cpp,h} to simple_dialog.{cpp,h}. Make it a subclass of QMessageBox. Queue messages at startup similar to GTK+. Move the GTK+-specific simple_dialog declarations to gtk/simple_dialog.h. Don't yell at the user so much. Replace exclamation points with periods. Change-Id: I1cc771106222d5e06f1f52d67ac29d6dc367cce4 Reviewed-on: https://code.wireshark.org/review/4288 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/simple_dialog.h')
-rw-r--r--ui/simple_dialog.h57
1 files changed, 3 insertions, 54 deletions
diff --git a/ui/simple_dialog.h b/ui/simple_dialog.h
index 1b71338f27..8a9604d518 100644
--- a/ui/simple_dialog.h
+++ b/ui/simple_dialog.h
@@ -21,8 +21,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __DIALOG_H__
-#define __DIALOG_H__
+#ifndef __SIMPLE_DIALOG_UI_H__
+#define __SIMPLE_DIALOG_UI_H__
#ifdef __cplusplus
extern "C" {
@@ -90,48 +90,6 @@ extern gpointer simple_dialog(ESD_TYPE_E type, gint btn_mask,
const gchar *msg_format, ...)
G_GNUC_PRINTF(3, 4);
-/** Create and show a simple dialog using a va_list.
- *
- * @param type type of dialog
- * @param btn_mask the buttons to display
- * @param msg_format printf like message format
- * @param ap parameters
- * @return the newly created dialog
- */
-extern gpointer vsimple_dialog(ESD_TYPE_E type, gint btn_mask,
- const gchar *msg_format, va_list ap);
-
-/** Callback function type for simple_dialog_set_cb() */
-typedef void (* simple_dialog_cb_t) (gpointer dialog, gint btn, gpointer data);
-
-/** Set the callback function for the dialog, called when a button was pressed.
- *
- * @param dialog the dialog from simple_dialog()
- * @param callback_fct the callback function to set
- * @param data data to be passed to the callback function
- */
-extern void simple_dialog_set_cb(gpointer dialog, simple_dialog_cb_t callback_fct, gpointer data);
-
-/** Close the dialog, useful for "no button" dialogs.
- *
- * @param dialog the dialog to close from simple_dialog()
- */
-extern void simple_dialog_close(gpointer dialog);
-
-/** Add a check button to the dialog (e.g. "Don't show this message again")
- *
- * @param dialog the dialog from simple_dialog()
- * @param text the text to display
- */
-extern void simple_dialog_check_set(gpointer dialog, const gchar *text);
-
-/** Get the check buttons state.
- *
- * @param dialog the dialog from simple_dialog()
- * @return current button state (TRUE is checked)
- */
-extern gboolean simple_dialog_check_get(gpointer dialog);
-
/** Surround the primary dialog message text by
* simple_dialog_primary_start() and simple_dialog_primary_end().
* To highlight the first sentence (will take effect on GTK2 only).
@@ -151,15 +109,6 @@ extern const char *simple_dialog_primary_end(void);
*/
extern char *simple_dialog_format_message(const char *msg);
-/**
- * Display all queued messages.
- * If a routine is called to display a dialog before there are any windows
- * open, information to use to display the dialog is queued up. This
- * routine should be called once there are windows open, so that the queued
- * up dialogs are displayed on top of those windows.
- */
-extern void display_queued_messages(void);
-
/*
* Alert box, with optional "don't show this message again" variable
* and checkbox, and optional secondary text.
@@ -182,7 +131,7 @@ extern void simple_error_message_box(const char *msg_format, ...);
}
#endif /* __cplusplus */
-#endif /* __DIALOG_H__ */
+#endif /* __SIMPLE_DIALOG_UI_H__ */
/*
* Editor modelines