aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/simple_dialog.c
AgeCommit message (Collapse)AuthorFilesLines
2005-09-20enhance simple dialog: add the possibility to use no buttons at all and add ↵ulfl1-3/+22
a stop icon (similar to the splash_window, but with a slightly different layout and a way to choose the icon shown) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15886 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-20renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical ↵ulfl1-1/+1
named ui_util.h in / dir git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15465 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-08fix some MSVC const warningsulfl1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15263 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-16temporarily fix a GTK1.x related bugulfl1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14108 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-16prepare for "Don't show this message again" checkboxes in the simple_dialogulfl1-2/+29
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14100 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-18Set the svn:eol-style property on all text files to "native", so thatguy1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11400 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-13From Daniel Thompson: add additional message/alert box options toguy1-2/+16
display "Save", "Continue without Saving", and "Cancel", for the "do you want to save?" messages. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11372 f5534014-38df-0310-8fa8-9805f1628bb7
2004-06-29GTK2: convert character encoding from locale to UTF8ulfl1-2/+11
before displaying message git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11274 f5534014-38df-0310-8fa8-9805f1628bb7
2004-06-18merge: bugfixes and code cleanupulfl1-1/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11175 f5534014-38df-0310-8fa8-9805f1628bb7
2004-06-17add implementation of button mask ESD_BTNS_YES_NOulfl1-7/+14
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11170 f5534014-38df-0310-8fa8-9805f1628bb7
2004-06-04Make the definition of "simple_dialog()" match its declaration.guy1-3/+3
Make the "type" argument to "vsimple_dialog()" also be an ESD_TYPE_E. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11112 f5534014-38df-0310-8fa8-9805f1628bb7
2004-05-26more code cleanup from dialog things:ulfl1-13/+5
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!!! git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11003 f5534014-38df-0310-8fa8-9805f1628bb7
2004-05-17GTK2 only: catch window state event, and call display_queued_messages()ulfl1-16/+7
if window not iconified any longer. Queue up simple_dialog messages, if window *is* iconified git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10914 f5534014-38df-0310-8fa8-9805f1628bb7
2004-05-16don't show simple_dialogs, if main window iconified (minimized),ulfl1-1/+25
this would lead to an unresponsive program. Simply discard the messages, as we don't have a way to queue and show this message if the main window is becoming "visible" again. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10910 f5534014-38df-0310-8fa8-9805f1628bb7
2004-05-01The display filter engine can return an error message that is not safeobiot1-1/+20
when using GTK2 code for rendering the error. In order to correctly render the error message, it must be XML escaped. TODO: track down the remaining places where this XML escaping is required, and fix it there too (not sure if they exist though). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10764 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-16Add a "report_failure()" routine to allow dissectors to report arbitraryguy1-30/+86
errors to the user. Use that, rather than "g_warning()", in the Diameter dissector to report errors reading the dictionary. Make the format argument to "simple_dialog()" a "const" pointer. Fix up the read-error message in Tethereal to end with a newline. If a simple dialog is requested before the main window or the capture-control window is popped up, queue it up and pop the queued messages up once the main or capture-control window is displayed. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10616 f5534014-38df-0310-8fa8-9805f1628bb7
2004-03-13replaced vsnprintf by g_vsnprintfulfl1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10374 f5534014-38df-0310-8fa8-9805f1628bb7
2004-03-13replaced sprintf / snprintf by g_snprintf,ulfl1-5/+1
various other string related changes git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10373 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-23Put in a comment noting a problem with dialog boxes popped up before theguy1-1/+9
main window is popped up. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10193 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-12The HIG's and/or GUI toolkit documentation for:guy1-4/+3
Mac OS X GNOME Qt KDE Windows all indicate that {message,alert} boxes are modal, at least for the window to which they apply. (Presumably the idea is that not forcing the user to pay attention to the alert box, and allowing more than one alert box to be up for a given window, causes more problems than not letting the user do stuff to that window in order to figure out what the underlying problem is or figure out what to do to fix it - the message should be sufficient, in most if not all cases, to let you know what the problem is.) Make "simple_dialog()" unconditionally make the alert box modal, and get rid of ESD_TYPE_MODAL. XXX - we need to make it possible to make an alert box modal for a given window, rather than just the top-level window. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10051 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-11Get rid of the "Question" alert box type - rename it to "Confirmation",guy1-4/+3
as that seems to be the name used in the GNOME HIG, at least. Make it use the Warning icon (that's what the GNOME HIG says - and it's also what's used for the equivalent on Windows), and use it for the "Save current capture?" alert boxes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10030 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-11Give alert boxes an empty title on UN*X and a title of "Ethereal" onguy1-9/+39
Win32, to match the GNOME HIG on UN*X and the Win32 HIG on Windows (or, at least, to approximate the Win32 HIG on Windows). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10029 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-04Add some comments about the types of alert boxes you get with theguy1-4/+3
simple_dialog routines (which are really just message box/alert box routines). Add some macros for combinations of buttons (corresponding to combinations that some GUI toolkits, which only support some combinations, allow). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9977 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-03enhanced some dialog messages,ulfl1-1/+13
close capture file when user told so git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9965 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-31gtk_label_set_selectable() is only available from GTK version 2ulfl1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9923 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-31cleanup of new "question dialogs",ulfl1-23/+43
using GTK2 primary/secondary message text from GNOME HIG for simple_dialogs, added a "question dialog" for the coloring rules "Clear" button git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9921 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-31Pass ESD_BTN_OK rather than NULL as a second argument toguy1-2/+3
"simple_dialog()"; NULL might be #defined to be a pointer expression on some platforms, causing compiler warnings (and, on platforms where a null pointer doesn't have all its bits 0, possibly causing misbehavior, although I don't think there are any such platforms on which Ethereal runs). Don't allow 0 as button mask argument to "simple_dialog()". Squelch a compiler warning. Report fatal problems as errors, not warnings. Report file I/O errors with "file_open_error_message()". Report file write errors (including those reported by "close()", e.g. some errors writing to an NFS server) when saving raw packet data to a file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9915 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-31renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR toulfl1-2/+2
better reflect the real error text git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9913 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-31using GTK2 stock icons for dialogs instead of Ethereal specific onesulfl1-11/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9911 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-29added "Yes" and "No" buttons to the simple_dialog,ulfl1-30/+68
added a callback method, to be called if a button was pressed git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9907 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-21implemented dlg_button_row_new to get a standard function forulfl1-17/+14
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9771 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-10using button compatibility macrosulfl1-11/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9636 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-11Use gtk1/gtk2 compatibility macros to reduce #ifdefs.oabad1-12/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6610 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-03Merge gtk and gtk2 directories.oabad1-3/+16
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6552 f5534014-38df-0310-8fa8-9805f1628bb7
2002-09-05Include cleanups in gtk and gtk2:jmayer1-4/+1
Remove unneded includes Add include wrappers where missing git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6191 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-11/+11
winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-04From Graeme Hewson: varargs code cleanup in "simple_dialog.c".guy1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5617 f5534014-38df-0310-8fa8-9805f1628bb7
2002-03-05From Joerg Mayer: use _U_ to flag unused arguments.guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4878 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-12Go nuts with the 3D logo.gerald1-6/+6
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4390 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-09Add support for modal message boxes ("simple dialog").guy1-2/+5
Make the message boxes popped up for errors when selecting a font modal, so that the user has to say "yes, I know, I'll do better next time" before hitting "OK" again, so that you don't get a pile of message boxes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2485 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-23Bleah. What was I thinking? "dlg_window_new()" should take the titleguy1-7/+6
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2345 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-11Miscellaneous code cleaningdeniel1-6/+1
- add <stdarg.h> or <varargs.h> in snprintf.h and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes - remove the check of multiple inclusions in source (.c) code (there is a bit loss of _cpp_ performance, but I prefer the gain of code reading and maintenance; and nowadays, disk caches and VM are correctly optimized ;-). - protect all (well almost) header files against multiple inclusions - add header (i.e. GPL license) in some include files - reorganize a bit the way header files are included: First: #include <system_include_files> #include <external_package_include_files (e.g. gtk, glib etc.)> Then #include "ethereal_include_files" with the correct HAVE_XXX or NEED_XXX protections. - add some HAVE_XXX checks before including some system header files - add the same HAVE_XXX in wiretap as in ethereal Please forgive me, if I break something (I've only compiled and regression tested on Linux). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2254 f5534014-38df-0310-8fa8-9805f1628bb7
2000-07-20Use ESD_TYPE_CRIT for most errors (the model used by various GUIs seemsguy1-2/+2
to use "warning" dialog boxes only to warn the user "if you do that, bad things may happen" *and* to offer them the option either to drive on or quit, so perhaps ESD_TYPE_CRIT should be used for all errors). However, put "Ethereal: Error" rather than "Ethereal: Critical" in the title bar, in the hopes that it'll make it clearer that Something Bad Happened. If the user specifies that captures should be saved to a user-specified file rather than a temporary file, report errors trying to create that file with "file_open_error_message()". Make the "for_writing" argument to "file_open_error_message()" a "gboolean", as it's either TRUE (if the file is being opened for writing) or FALSE (if it's being opened for reading). Report EISDIR as "XXX is a directory (folder), not a file.". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2143 f5534014-38df-0310-8fa8-9805f1628bb7
2000-07-05Add a "dlg_window_new()" routine, which creates a GTK_WINDOW_DIALOGguy1-4/+4
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2112 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-03Make dialog boxes created with "simple_dialog()" use the new utilitiesguy1-1/+12
to make the Esc key cancel the dialog box (or accept it, if it has no "Cancel" button). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1905 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-03Take the "simple_dialog()" stuff out of "ui_util.h" and "gtk/ui_util.c",guy1-0/+169
and move it to "simple_dialog.h" and "gtk/simple_dialog.c". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1414 f5534014-38df-0310-8fa8-9805f1628bb7