Commit Graph

61 Commits

Author SHA1 Message Date
Bill Meier 56206e0002 Fix some simple cases of GTK2 deprecated API usage by using a renamed or equivalent API
gtk_container_border_width()          ==> gtk_container_set_border_width()
  gtk_container_children()              ==> gtk_container_get_children()
  gtk_entry_new_with_max_length()       ==> gtk_entry_new(); gtk_entry_set_max_length()
  gtk_menu_append()                     ==> gtk_menu_shell_append()
  gtk_menu_prepend()                    ==> gtk_menu_shell_prepend()
  gtk_notebook_set_page()               ==> gtk_notebook_set_current_page()
  gtk_paned_gutter_size()               ==> gtk_paned_set_gutter_size()
  gtk_radio_button_group()              ==> gtk_radio_button_get_group()
  gtk_signal_connect()                  ==> g_signal_connect()
  gtk_signal_disconnect()               ==> g_signal_handler_disconnect()
  gtk_signal_emit_by_name()             ==> g_signal_emit_by_name()
  gtk_signal_handler_block_by_data()    ==> g_signal_handlers_block_matched()
  gtk_signal_handler_block_by_func()    ==> g_signal_handlers_block_by_func()
  gtk_signal_handler_unblock_by_data()  ==> g_signal-handlers_unblock_matched()
  gtk_signal_handler_unblock_by_func()  ==> g_signal-handlers_unblock_by_func()
  gtk_spin_button_get_value_as_float()  ==> gtk_spin_button_get_value()
  gtk_toggle_button_set_state()         ==> gtk_toggle_button_set_active()

svn path=/trunk/; revision=25634
2008-06-29 15:51:43 +00:00
Ulf Lamping 644a474c95 sort #includes by directories
svn path=/trunk/; revision=24969
2008-04-13 03:32:24 +00:00
Ulf Lamping b4f3c5fd40 compat_macros.h is gone now!!!
all GTK1 compatibility code was removed, so this file can simply be dropped

svn path=/trunk/; revision=24923
2008-04-12 01:41:53 +00:00
Ulf Lamping 55c2be83db move stock icon code from toolbar.c into specific stock_icons file(s)
svn path=/trunk/; revision=24921
2008-04-12 00:49:20 +00:00
Ulf Lamping 8e58ec7085 last round to replace SIGNAL_CONNECT with g_signal_connect
svn path=/trunk/; revision=24918
2008-04-11 23:16:06 +00:00
Bill Meier 42acebd42c OBECT_..._DATA --> g_object_..._data
svn path=/trunk/; revision=24893
2008-04-11 16:04:54 +00:00
Ulf Lamping 49ad47d477 remove GTK1 code
svn path=/trunk/; revision=24824
2008-04-07 01:05:55 +00:00
Ronnie Sahlberg 5aaff9b252 if we compile for gtk1 'text' is no longer referenced in the simple_dialog_check_set() function and a warning arises
mark the text argument as _U_ to suppress the warning


svn path=/trunk/; revision=21549
2007-04-24 05:46:13 +00:00
Stephen Fisher bdf7c9bfb1 Wrap long lines in simple dialogs so that the dialog and its message
won't ever extend off the screen.


svn path=/trunk/; revision=20953
2007-03-01 02:18:18 +00:00
Anders Broman ccf3253f35 From Floren Drouin:
This patch add a test on the GTK version to avoid a warning with the "gtk-label-select-on-focus" configuration parameter, introduced in GTK-2.9.0.

svn path=/trunk/; revision=20936
2007-02-27 06:38:49 +00:00
Gerald Combs 1e6ce19f79 Recent versions of GTK+ have added a "gtk-label-select-on-focus"
property, which selects the entire contents of a label when it comes
into focus.  This property annoyingly defaults to TRUE, which meant that
the labels in simple dialogs and the about box would unexpectedly show
up selected.

Work around this by setting the focus on the "OK" button in the about
dialog and the first button specified in simple dialogs.

svn path=/trunk/; revision=20507
2007-01-20 02:05:49 +00:00
Gerald Combs 2fcb67b496 From Giorgio Tino: Add a "Don't show this message again" option to an
AirPcap warning dialog.  Fix a callback bug in simple_dialog.c.

svn path=/trunk/; revision=19747
2006-10-31 01:44:11 +00:00
Anders Broman 05448fcc3d Ethereal->Wireshark
svn path=/trunk/; revision=18232
2006-05-28 17:19:08 +00:00
Guy Harris 92552c2d76 Get rid of a bunch of "Ethereal"s and "ethereal"s in comments, GUI
strings, and function names.

svn path=/trunk/; revision=18205
2006-05-22 07:29:40 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping 81e9a70a96 enhance simple dialog: add the possibility to use no buttons at all and add a stop icon (similar to the splash_window, but with a slightly different layout and a way to choose the icon shown)
svn path=/trunk/; revision=15886
2005-09-20 01:53:38 +00:00
Ulf Lamping eafbbbcabb renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical named ui_util.h in / dir
svn path=/trunk/; revision=15465
2005-08-20 12:09:48 +00:00
Ulf Lamping f3407856f4 fix some MSVC const warnings
svn path=/trunk/; revision=15263
2005-08-08 17:22:55 +00:00
Ulf Lamping fdb2184315 temporarily fix a GTK1.x related bug
svn path=/trunk/; revision=14108
2005-04-16 22:19:59 +00:00
Ulf Lamping 7debbfdfac prepare for "Don't show this message again" checkboxes in the simple_dialog
svn path=/trunk/; revision=14100
2005-04-16 19:18:05 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
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.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris fd262f1b97 From Daniel Thompson: add additional message/alert box options to
display "Save", "Continue without Saving", and "Cancel", for the "do you
want to save?" messages.

svn path=/trunk/; revision=11372
2004-07-13 07:15:45 +00:00
Ulf Lamping 14ef5684fa GTK2: convert character encoding from locale to UTF8
before displaying message

svn path=/trunk/; revision=11274
2004-06-29 22:21:04 +00:00
Ulf Lamping fa46f7a6db merge: bugfixes and code cleanup
svn path=/trunk/; revision=11175
2004-06-18 07:41:21 +00:00
Ulf Lamping a93978dc30 add implementation of button mask ESD_BTNS_YES_NO
svn path=/trunk/; revision=11170
2004-06-17 21:34:12 +00:00
Guy Harris 9e6a540f10 Make the definition of "simple_dialog()" match its declaration.
Make the "type" argument to "vsimple_dialog()" also be an ESD_TYPE_E.

svn path=/trunk/; revision=11112
2004-06-04 21:12:01 +00:00
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 9ade33284d GTK2 only: catch window state event, and call display_queued_messages()
if window not iconified any longer.
Queue up simple_dialog messages, if window *is* iconified

svn path=/trunk/; revision=10914
2004-05-17 21:15:28 +00:00
Ulf Lamping 82ca4cc6b5 don't show simple_dialogs, if main window iconified (minimized),
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.

svn path=/trunk/; revision=10910
2004-05-16 18:42:55 +00:00
Olivier Biot ec6f31bced The display filter engine can return an error message that is not safe
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).

svn path=/trunk/; revision=10764
2004-05-01 22:55:22 +00:00
Guy Harris d209115ba3 Add a "report_failure()" routine to allow dissectors to report arbitrary
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.

svn path=/trunk/; revision=10616
2004-04-16 23:17:13 +00:00
Ulf Lamping 54d49536cf replaced vsnprintf by g_vsnprintf
svn path=/trunk/; revision=10374
2004-03-13 15:30:08 +00:00
Ulf Lamping 7b62a629e8 replaced sprintf / snprintf by g_snprintf,
various other string related changes

svn path=/trunk/; revision=10373
2004-03-13 15:15:26 +00:00
Guy Harris d42181e7a1 Put in a comment noting a problem with dialog boxes popped up before the
main window is popped up.

svn path=/trunk/; revision=10193
2004-02-23 00:05:50 +00:00
Guy Harris 90cf9a6b7b The HIG's and/or GUI toolkit documentation for:
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.

svn path=/trunk/; revision=10051
2004-02-12 22:24:28 +00:00
Guy Harris 2e4e229739 Get rid of the "Question" alert box type - rename it to "Confirmation",
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.

svn path=/trunk/; revision=10030
2004-02-11 03:55:48 +00:00
Guy Harris 34349cedcc Give alert boxes an empty title on UN*X and a title of "Ethereal" on
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).

svn path=/trunk/; revision=10029
2004-02-11 03:40:17 +00:00
Guy Harris 372e6b2da0 Add some comments about the types of alert boxes you get with the
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).

svn path=/trunk/; revision=9977
2004-02-04 01:10:37 +00:00
Ulf Lamping 1d2c791ab6 enhanced some dialog messages,
close capture file when user told so

svn path=/trunk/; revision=9965
2004-02-03 17:59:01 +00:00
Ulf Lamping acd562ac91 gtk_label_set_selectable() is only available from GTK version 2
svn path=/trunk/; revision=9923
2004-01-31 12:49:54 +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
Guy Harris 1980fa5dbf Pass ESD_BTN_OK rather than NULL as a second argument to
"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.

svn path=/trunk/; revision=9915
2004-01-31 03:22:42 +00:00
Ulf Lamping 25edd1c53e renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR to
better reflect the real error text

svn path=/trunk/; revision=9913
2004-01-31 02:25:46 +00:00
Ulf Lamping 70fa1b55ff using GTK2 stock icons for dialogs instead of Ethereal specific ones
svn path=/trunk/; revision=9911
2004-01-31 01:28:11 +00:00
Ulf Lamping 419837e531 added "Yes" and "No" buttons to the simple_dialog,
added a callback method, to be called if a button was pressed

svn path=/trunk/; revision=9907
2004-01-29 23:07:17 +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 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Olivier Abad 29011060de Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6610
2002-11-11 15:39:06 +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 e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00