aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/dlg_utils.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-07-05 02:45:42 +0000
committerGuy Harris <guy@alum.mit.edu>2000-07-05 02:45:42 +0000
commit105d0f4f708e77833c7dada65eb333bcb9d11dfd (patch)
tree0fd8c60f0f3e26a1d5df719c68da5f5576aa0402 /gtk/dlg_utils.h
parent1e59b9dc86881820eecfe183f335b36ebd8692b4 (diff)
Add a "dlg_window_new()" routine, which creates a GTK_WINDOW_DIALOG
window and makes it transient for the top-level window; the transient-for at least provides a hint to X window managers to minimize the dialog if the main window is minimized; keep the dialog on top of the main window in the Z order for windows; perhaps (if there are any window managers that actually *do* this) even put it atop the main window in the X-Y plane (KWM doesn't and I seem to remember that the Exceed X server for Windows doesn't). It's generally considered the Right Thing To Do for dialog boxes. Use that routine to create dialog boxes, rather than doing it directly in the code for that dialog box. svn path=/trunk/; revision=2112
Diffstat (limited to 'gtk/dlg_utils.h')
-rw-r--r--gtk/dlg_utils.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk/dlg_utils.h b/gtk/dlg_utils.h
index ef3a786b18..e73fdbc603 100644
--- a/gtk/dlg_utils.h
+++ b/gtk/dlg_utils.h
@@ -1,7 +1,7 @@
/* dlg_utils.h
* Declarations of utilities to use when constructing dialogs
*
- * $Id: dlg_utils.h,v 1.2 2000/05/08 04:23:46 guy Exp $
+ * $Id: dlg_utils.h,v 1.3 2000/07/05 02:45:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -22,7 +22,17 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
+/* Create a dialog box window that belongs to Ethereal's main window. */
+GtkWidget *dlg_window_new(void);
+
+/* Set the "activate" signal for a widget to call a routine to
+ activate the "OK" button for a dialog box. */
void dlg_set_activate(GtkWidget *widget, GtkWidget *ok_button);
+
+/* Set the "key_press_event" signal for a top-level dialog window to
+ call a routine to activate the "Cancel" button for a dialog box if
+ the key being pressed is the <Esc> key. */
void dlg_set_cancel(GtkWidget *widget, GtkWidget *cancel_button);
GtkWidget *dlg_radio_button_new_with_label_with_mnemonic(GSList *group,