Commit Graph

86 Commits

Author SHA1 Message Date
Ulf Lamping 7d37fc9d23 more code cleanup from dialog things:
changed window_xy (dialog) function calling in a lot of gtk files
cleanup of file selection code
cleanup in dlg_utils/file_dlg/ui_util
Please report any problems!!!

svn path=/trunk/; revision=11003
2004-05-26 03:49:24 +00:00
Ulf Lamping b131c02ba6 dlg_destroy_cb() is static
svn path=/trunk/; revision=10989
2004-05-24 17:41:26 +00:00
Guy Harris 0a535b3a60 Even with GTK+ 2.x the arguments to "dlg_destroy_cb()" aren't used.
svn path=/trunk/; revision=10988
2004-05-24 17:32:12 +00:00
Guy Harris a396513ad8 "dlg_destroy_cb()" doesn't use its arguments when built with GTK+
1.2[.x], so add _U_ in that case.

svn path=/trunk/; revision=10980
2004-05-24 01:58:06 +00:00
Ulf Lamping 01c236864a next step to save the size and postition of the dialogs (using a hashtable)
move the get/set window size functionality from main to ui_util,
add some functions to handle windows/dialogs.

changed help and about dialog to suit the current window API

svn path=/trunk/; revision=10974
2004-05-23 17:37:36 +00:00
Ulf Lamping d6eeb0936d going to have a standard behaviour of the dialogs
(including remebering of the dialog size in recent file).
for a first step, I replaced all window_new() calls from dialogs
into dlg_window_new() ones, and removed all gtk_window_set_position
calls, this should be done in a more generalized way

svn path=/trunk/; revision=10964
2004-05-22 19:56:19 +00:00
Ulf Lamping 65792fe9ae gtk_window_present() new dialog windows, to be sure they get on top
svn path=/trunk/; revision=10935
2004-05-21 00:25:04 +00:00
Guy Harris 6e014216a9 Tag unused parameters with _U_ to squelch GCC compiler warnings (they're
GTK+ callbacks so we don't get to change the calling sequence).

svn path=/trunk/; revision=10934
2004-05-21 00:18:46 +00:00
Ulf Lamping 49f0a67385 call gtk_window_present() only on GTK2 and above
svn path=/trunk/; revision=10926
2004-05-20 12:47:28 +00:00
Ulf Lamping 0082592429 workaround for GTK2 bug: bring main window back to front,
when a dialog is closed

svn path=/trunk/; revision=10921
2004-05-19 22:17:08 +00:00
Guy Harris 9348381d23 It *appears* that if you don't explicitly request that a file chooser
dialog be centered on its parent, it still gets so centered; we remove
the call to do so from the GTK+ >= 2.4 file selection dialog creation
code.

svn path=/trunk/; revision=10514
2004-03-29 23:14:43 +00:00
Guy Harris e4544c4f87 In a "save" dialog, the "yes" button should be a "Save" button, not an
"Open" button.

svn path=/trunk/; revision=10513
2004-03-29 23:03:01 +00:00
Guy Harris f76d50c881 Add another wrapper routine, "file_selection_set_extra_widget()", to set
the "extra options" portion of a file selection dialog, and use it
rather than #if'ed code.

svn path=/trunk/; revision=10512
2004-03-29 22:55:13 +00:00
Guy Harris 29c644691b Make "file_selection_new()" take as its second argument an
Ethereal-defined indication of the action (open vs. save), regardless of
whether we're building for GTK+ >= 2.4 or not; we just ignore the
argument in pre-2.4 GTK+.

Use "file_selection_new()" rather than #if'ed code to use it or
"gtk_file_chooser_dialog_new()"  for GTK+ >= 2.4 and
"gtk_file_selection_new()" or it for pre-2.4 GTK+.

Add a "file_selection_set_current_folder()" routine that does the
appropriate thing depending on whether we're GTK+ >= 2.4 or not, and use
that rather than #if'ed code to use
"gtk_file_chooser_set_current_folder()" or
"gtk_file_selection_set_filename()".

svn path=/trunk/; revision=10511
2004-03-29 22:40:58 +00:00
Olivier Abad cd19c5baf8 Use the new GtkFileChooserDialog when built with gtk+ 2.4
svn path=/trunk/; revision=10502
2004-03-27 11:16:58 +00:00
Guy Harris 36ece5a17a Add a "window_new()" routine that creates a window of a given type, sets
the title, and arranges to set the icon for it.  Use that instead of
"gtk_window_new()" and separate calls to set the title and arrange to
set the icon.

Regularize #includes a bit.

Clean up white space.

svn path=/trunk/; revision=10054
2004-02-13 00:53:37 +00:00
Ulf Lamping d244cd82f5 cleanup of new "question dialogs",
using GTK2 primary/secondary message text from GNOME HIG for simple_dialogs,
added a "question dialog" for the coloring rules "Clear" button

svn path=/trunk/; revision=9921
2004-01-31 12:13:23 +00:00
Ulf Lamping e66b849e23 added GTK_STOCK_YES and GTK_STOCK_NO to the dlg_button_row
svn path=/trunk/; revision=9906
2004-01-29 22:37:45 +00:00
Ulf Lamping 34bddb3c1a adding a function to the help dialog, showing a specific topic (context help),
beautifying the placement of the help button in the button_row,
using the context help for the filter dialog

svn path=/trunk/; revision=9851
2004-01-25 21:27:16 +00:00
Guy Harris 89e496d1ab Fix a typo.
svn path=/trunk/; revision=9781
2004-01-22 20:33:21 +00:00
Ulf Lamping 8e2a930023 implemented dlg_button_row_new to get a standard function for
layouting the dialog buttons, and use it where appropriate.
This will help us with the GTK1/2 conflict on button layouts and
will also result in a more consistent look of the dialogs at all.

svn path=/trunk/; revision=9771
2004-01-21 21:19:34 +00:00
Ulf Lamping bba39ed952 save dialog with "Captured" and "Displayed" buttons in packet range
svn path=/trunk/; revision=9580
2004-01-07 00:10:52 +00:00
Guy Harris 6a91088ed0 Put in a comment about some issues with the way we do "Update list of
packets in real time" captures.

svn path=/trunk/; revision=9269
2003-12-13 03:36:17 +00:00
Gerald Combs 9ed6beff38 In "dlg_window_new()" check to see if "top_level" has been initialized,
as is the case for the spawned capture process.

svn path=/trunk/; revision=9245
2003-12-12 02:50:04 +00:00
Guy Harris d0d3f842bb Add a "file_selection_new()" routine that does all the positioning (GTK+
2.x) and transient-for setting that's done for other dialogs, and use it
for dialogs that come from the main window or from children of the main
window.

svn path=/trunk/; revision=8531
2003-09-24 08:43:34 +00:00
Guy Harris d532ea7b17 From Giles Scott:
in GTK+ 2.x, center dialogs on the parent;

	make the file selection dialogs transient for the main window,
	just as other dialogs are.

Update Gerald's e-mail address.

svn path=/trunk/; revision=8503
2003-09-20 04:59:43 +00:00
Olivier Abad b48fd02f40 Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6600
2002-11-10 11:00:29 +00:00
Olivier Abad 05ef1fc475 Merge gtk and gtk2 directories.
svn path=/trunk/; revision=6552
2002-11-03 17:38:45 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +00:00
Gerald Combs 7e092f2dd8 Go nuts with the 3D logo.
Add a routine to ui_util.c that sets a window's icon pixmap to a 16x16
version of the 3D logo.  Call the routine for each window that is created.
This has been tested with kwm and Sawfish (which expect a 16x16 icon), but
we may have to come up with a better solution for other window managers
(e.g. olwm and mwm).

Add a 3D exclamation point image.  Replace the exclamation point and
Ethereal logo images used in simple_dialog() with their 3D counterparts.

Remove the old icons from the source distribution.

svn path=/trunk/; revision=4390
2001-12-12 21:39:01 +00:00
Guy Harris 56697db466 Bleah. What was I thinking? "dlg_window_new()" should take the title
for the dialog window as an argument (as various dialog creators in GTK+
do), not oblige every caller of it to cut-and-paste a
"gtk_window_set_title()" call after it.

svn path=/trunk/; revision=2345
2000-08-23 06:56:31 +00:00
Guy Harris 105d0f4f70 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
2000-07-05 02:45:42 +00:00
Guy Harris cfc9ec9f21 Don't duplicate the "gtk_radio_button_new_with_label()" and
"gtk_check_button_new_with_label()" code, just call those routines and
then fix up the label, as suggested by Dermot Musgrove on the gtk
mailing list.

svn path=/trunk/; revision=2009
2000-05-26 07:32:56 +00:00
Guy Harris e160ffa08c Add functions to create buttons whose labels specify mnemonics, i.e.
that contain an "_" preceding a letter, indicating that the letter is to
be underlined in the label, and that if the key for that letter is
pressed (either with Alt or without it) in the dialog box to which the
button belongs, and the widget with the input focus doesn't do anything
with that button, the button is sent the "clicked" signal.

Attach mnemonics to the buttons in the "Display->Options" dialog box.

svn path=/trunk/; revision=1915
2000-05-08 04:23:46 +00:00
Guy Harris ebdbff44e8 Add some utilities to:
set the "activate" signal for a widget to call a routine to
	activate the "OK" button for a dialog box;

	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;

to make it easier to drive dialog boxes entirely from the keyboard.

Make the "Find Frame" and "Go To Frame" dialog boxes use those
utilities.

svn path=/trunk/; revision=1903
2000-05-02 08:04:31 +00:00