Commit Graph

41 Commits

Author SHA1 Message Date
Ulf Lamping 94ee3dd51a make filename2uri() "public"
svn path=/trunk/; revision=27412
2009-02-10 21:23:32 +00:00
Guy Harris 08b4f712c8 Note bug 2699, which reports a bug in xdg-open.
svn path=/trunk/; revision=25700
2008-07-10 18:36:19 +00:00
Jeff Morriss 83f9ecf96f Move privileges.c and unicode-utils.c from epan to wsutil (so things like
capinfos and dumpcap don't need to depend on libwireshark nor directly pull
in those modules).  Because capinfos and editcap were only being linked with
privileges.c if we had plugins, this allows those programs to be linked when
someone is compiling --without-plugins.

svn path=/trunk/; revision=25640
2008-06-30 17:16:29 +00:00
Guy Harris bbccb9cbfb Give more details on the stuff Beast does, and suggest a possible scheme
for getting things as right as possible.

gnome_url_show() is run by gnome-open, so just running gnome-open - or
xdg-open, which runs gnome-open on GNOME - will suffice.

svn path=/trunk/; revision=25533
2008-06-23 18:46:29 +00:00
Guy Harris 4745bbf0d5 Add stuff to a comment, and move stuff to that comment from elsewhere,
discussing the fun of launching on UNIX+X11.

svn path=/trunk/; revision=25519
2008-06-21 23:53:15 +00:00
Guy Harris 8f244766f3 If we have xdg-open, always run that to launch a Web browser, and ignore
the Web browser setting; that should honor the user's *real* preferred
Web browser setting (i.e., the one they've selected in their desktop
environment).

Don't bother defining HTML_VIEWER as "xdg-open" if we have xdg-open - we
don't need it.

svn path=/trunk/; revision=25514
2008-06-21 18:09:17 +00:00
Jeff Morriss 2f78f0145d filename2uri() doesn't modify its parameter (and in at least one place we hand it a const argument) so make the parameter const. Also move the function up in the file (before its first use).
svn path=/trunk/; revision=25113
2008-04-18 12:47:05 +00:00
Bill Meier 7e9b56cbeb On Windows: filemanager_open_directory: ensure a trailing '\' on path to ShellExecute;
svn path=/trunk/; revision=25105
2008-04-17 20:00:26 +00:00
Guy Harris 1bf91a279c In filemanager_open_directory(), if we're not on Windows or OS X and
don't have xdg-open, convert the pathname to a URI and hand it to the
browser.

svn path=/trunk/; revision=25104
2008-04-17 19:37:40 +00:00
Guy Harris 572efdc1c4 Use the "explore" verb when opening directories; that doesn't fix the case
where there's an openable file and a directory with the same pathname
except for the extension, but at least it prevents us from trying to open
the file.

svn path=/trunk/; revision=25103
2008-04-17 18:40:45 +00:00
Guy Harris 2172b8dfb1 Sigh. g_spawn_async() should take a "const gchar **" argument for argv,
as it shouldn't be modifying the strings, but it's "gchar **", so we
can't make argv an array of "const gchar *" - which means that you can't
put a "{g}char *" into it without a cast.

Clean up white space.

svn path=/trunk/; revision=25100
2008-04-17 16:53:41 +00:00
Guy Harris b2f4f0a228 If we have xdg-open, define HAVE_XDG_OPEN.
Add a routine "filemanager_open_directory()", which takes a pathname
(presumed to be UTF-8 in Windows and Mac OS X; this might need work for
other UN*Xes) and attempts to open a file manager window for it, using
ShellExecute on Windows, Launch Services on OS X, and, for now, running
xdg-open on other OSes if we have it (should we have a preference for
the file manaager, just as we have one for the Web browser?).

(For that matter, if we have xdg-open, do we need a preference for the
Web browser, or should we just have xdg-open open the Web browser?)

svn path=/trunk/; revision=25097
2008-04-17 16:14:22 +00:00
Graeme Lunt 39ab6c51c0 Allow the folders in the About Wireshark/Folders list to be double clicked on to open the appropriate folder in explorer.
The MIB/PIB paths have been split up to allow each one to be clicked on separately, but as a result this will lose the order if the whole list is reordered.

XXX: I have been unable to test this on MacOS or Linux. Stig? :-)
I suppose it should work, but we may need to make it WIN32 specific?


svn path=/trunk/; revision=24995
2008-04-13 17:48:47 +00:00
Ulf Lamping 644a474c95 sort #includes by directories
svn path=/trunk/; revision=24969
2008-04-13 03:32:24 +00:00
Guy Harris 6f0cea7ed2 PRIMARY_TEXT_START and PRIMARY_TEXT_END are gone; use
simple_dialog_primary_start() and simple_dialog_primary_end() instead.

svn path=/trunk/; revision=24925
2008-04-12 03:02:23 +00:00
Ulf Lamping d4ccf577a8 where it's not necessary, remove #include "compat_macros.h"
svn path=/trunk/; revision=24922
2008-04-12 01:02:59 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Stephen Fisher a398bebdaf Remove GTK1 code and change ugly version checking statements into
GTK_CHECK_VERSION().


svn path=/trunk/; revision=24826
2008-04-07 03:46:01 +00:00
Guy Harris 9f720bb78f Note in a comment the sad truth that CFURLCreateWithString() fails
either because of a bad URL string or a failure to allocate memory, and
that we can't easily determine which of those happened.

svn path=/trunk/; revision=23740
2007-12-04 04:33:44 +00:00
Guy Harris 835bcbd5e5 If CoreFoundation create calls fail, fail, don't drive on.
svn path=/trunk/; revision=23716
2007-12-03 21:41:06 +00:00
Stephen Fisher 0ebc01dc03 From Sebastien Tandel:
Create two new files (ws_strsplit.[ch]) that use GTK2 code to override
the buggy g_strsplit() function when compiling for GTK1.  Include this
work-around function (ws_strsplit) in libwireshark.def.  Add notes on usage
to README.developer.  Include epan/ws_strsplit.h in all files that use
g_strsplit().


svn path=/trunk/; revision=20804
2007-02-13 20:57:22 +00:00
Guy Harris 3a21415651 Include the top-level header for CoreFoundation, to see whether it'll
fix a build failure I've seen on L**p*rd.

svn path=/trunk/; revision=19685
2006-10-25 18:25:17 +00:00
Gerald Combs 9e23f31e5f Add support for reading from stdin under Windows. Based on a patch sent
in last year by Gianluca Varenni.

Add partial support for reading from named pipes (currently disabled).

Move utf_8to16() and utf_16to8() to a separate module (unicode-utils.[ch])
so that we don't have to cut and paste code in dumpcap.c.

Fix up whitespace.

svn path=/trunk/; revision=19291
2006-09-22 21:14:54 +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
Gerald Combs 9406c5db24 Use Unicode for all native Win32 calls. Unicode Windows applications
use UTF-16 internally and GTK+ 2.x uses UTF-8, which means we have to
do a lots of conversions.

Add utf_8to16() and utf_16to8 convenience functions to strutil.c.

svn path=/trunk/; revision=17534
2006-03-08 20:55:32 +00:00
Ulf Lamping 66ce7f3623 add some more online help functionality and help buttons at various dialog boxes, if a help page *is* available. However, the new help system needs a lot more work before completed.
svn path=/trunk/; revision=13152
2005-01-20 23:17:23 +00:00
Guy Harris f1deabed56 Make the tone of the error messages a bit less formal, by using
contractions.  (Safari does, at least when you're trying to open a file
to which you don't have read access.)

svn path=/trunk/; revision=12852
2004-12-29 01:08:20 +00:00
Ulf Lamping 124544cc39 show a simple_dialog, if we use glib 1.x and trying to open a webbrowser (not implemented). This will prevent another compiler warning.
svn path=/trunk/; revision=12821
2004-12-23 13:34:02 +00:00
Guy Harris d23ca96d16 Add an RCS ID.
svn path=/trunk/; revision=12154
2004-09-30 19:49:48 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris 0f91ada161 Note that, when we add the ability to build a GNOMEified Ethereal as
well as a GTK+-only Ethereal, we could use "gnome_url_show()" in
GNOMEified Ethereal.

svn path=/trunk/; revision=11546
2004-07-27 22:39:43 +00:00
Guy Harris a54ce518c8 With GLib 1.2[.x], undefine MUST_LAUNCH_BROWSER_OURSELVES, so that we
say that we don't need a preference for the command to launch a browser
(that preference won't make any difference).

svn path=/trunk/; revision=11330
2004-07-07 06:09:50 +00:00
Ulf Lamping 074c978ab5 from Gisle Vanem: if WIN32_LEAN_AND_MEAN is defined,
include shellapi.h too

svn path=/trunk/; revision=11315
2004-07-05 05:40:51 +00:00
Jörg Mayer 227ba2f04b Trivial warning fixes: () -> (void) and comma at end of enum
svn path=/trunk/; revision=11296
2004-07-01 09:35:33 +00:00
Ulf Lamping 891608f72e add a preference setting for the web browser command
svn path=/trunk/; revision=11269
2004-06-29 17:10:53 +00:00
Ulf Lamping 84ea1ec5f6 As current implementation won't compile with GLib 1.x,
as a temporary solution, simply do nothing in this case.
Has to be improved later

svn path=/trunk/; revision=11228
2004-06-24 17:45:30 +00:00
Guy Harris aacb8bc9b6 Add "gtk/webbrowser.h" to declare functions from "gtk/webbrowser.c".
Rename "browser_open_program_file()" to "browser_open_data_file()", and
make it open files relative to the application's data directory, as
that's where data files such as HTMLized man pages would be put.  (That
happens to be the program directory on Windows, but it's a different
directory on UN*X - and you aren't guaranteed to be able to find the
program directory on UN*X by looking at argv[0] in any case.)  Move it
to "gtk/webbrowser.c".

Fix "filename2url()" to put "file://", not just "file:", in front of
pathnames on UN*X.

svn path=/trunk/; revision=11216
2004-06-23 01:38:39 +00:00
Ulf Lamping eab0af6659 add functionality, to show html files from the local installation
svn path=/trunk/; revision=11213
2004-06-22 16:28:27 +00:00
Guy Harris 26664e5665 Style tweaks, and finish an unfinished comment.
svn path=/trunk/; revision=11209
2004-06-22 01:00:02 +00:00
Guy Harris 9bb3e4cf9e On Mac OS X, use Launch Services to start a Web browser with a given URL.
svn path=/trunk/; revision=11208
2004-06-22 00:40:03 +00:00
Ulf Lamping 2a6da1361c Add experimental feature of opening a webbrowser, to show some of the
webpages from http://www.ethereal.com. This functionality is copied from
the Gimp.
Win32 will use ShellExecute to use the system registered webbrowser.
On unix builds, currently the mozilla browser is hardcoded, we still need a
preference setting for this (I will add this later).

svn path=/trunk/; revision=11206
2004-06-21 17:27:35 +00:00