diff -urp gnobog-0.4.3/src/gnobog_bookmarks.c gnobog-0.4.3-shellexec/src/gnobog_bookmarks.c --- gnobog-0.4.3/src/gnobog_bookmarks.c 2001-04-30 00:08:58.000000000 +0800 +++ gnobog-0.4.3-shellexec/src/gnobog_bookmarks.c 2003-03-03 14:03:26.000000000 +0800 @@ -82,6 +82,9 @@ static void gnobog_url_browse_in_net static void gnobog_url_browse_in_mozilla (gchar* location, gboolean open_new_window); static void gnobog_url_browse_in_galeon (gchar* location, gboolean open_new_window); static void gnobog_url_browse_in_gnome_handler (gchar* location, gboolean open_new_window); +#ifdef __CYGWIN__ +static void gnobog_url_browse_in_gnome_handler (gchar* location, gboolean open_new_window); +#endif static void gnobog_url_browse_in_nautilus (gchar* location, gboolean open_new_window); static void gnobog_url_browse_in_konqueror (gchar* location, gboolean open_new_window); static void gnobog_url_browse_in_opera (gchar* location, gboolean open_new_window); @@ -1296,6 +1299,20 @@ gnobog_url_browse_in_gnome_handler (gcha gnome_url_show (location); } +#ifdef __CYGWIN__ +#include +#include +/* Do not call directly, use gnobog_bookmarks_node_view_in_browser () */ +static void +gnobog_url_browse_in_windows_handler (gchar* location, + gboolean open_new_window) +{ + /* Use Windows default URL handler */ + ShellExecute(NULL, "open", location, + NULL, NULL, SW_SHOWDEFAULT); +} +#endif + /* Do not call directly, use gnobog_bookmarks_node_view_in_browser () */ static void gnobog_url_browse_in_nautilus (gchar* location, @@ -1442,6 +1459,12 @@ gnobog_bookmarks_node_view_in_browser (G g_message ("Launch URL in Gnome URL Handler : %s", location); gnobog_url_browse_in_gnome_handler (location, open_new_window); break; +#ifdef __CYGWIN__ + case WINDOWS_HANDLER_BROWSER: + g_message ("Launch URL in Windows URL Handler : %s", location); + gnobog_url_browse_in_windows_handler (location, open_new_window); + break; +#endif case NAUTILUS_BROWSER: g_message ("Launch URL in Nautilus : %s", location); gnobog_url_browse_in_nautilus (location, open_new_window); diff -urp gnobog-0.4.3/src/gnobog_bookmarks.h gnobog-0.4.3-shellexec/src/gnobog_bookmarks.h --- gnobog-0.4.3/src/gnobog_bookmarks.h 2000-11-03 05:36:18.000000000 +0800 +++ gnobog-0.4.3-shellexec/src/gnobog_bookmarks.h 2003-03-03 14:04:30.000000000 +0800 @@ -67,6 +67,9 @@ typedef enum { MOZILLA_BROWSER, GALEON_BROWSER, GNOME_HANDLER_BROWSER, +#ifdef __CYGWIN__ + WINDOWS_HANDLER_BROWSER, +#endif NAUTILUS_BROWSER, KONQUEROR_BROWSER, OPERA_BROWSER, diff -urp gnobog-0.4.3/src/gnobog_popup_menu.c gnobog-0.4.3-shellexec/src/gnobog_popup_menu.c --- gnobog-0.4.3/src/gnobog_popup_menu.c 2001-05-03 22:07:12.000000000 +0800 +++ gnobog-0.4.3-shellexec/src/gnobog_popup_menu.c 2003-03-03 14:05:18.000000000 +0800 @@ -65,6 +65,9 @@ static void gnobog_popup_cb_browse_in_mo static void gnobog_popup_cb_browse_in_galeon_existing (GtkWidget* widget, gpointer data); static void gnobog_popup_cb_browse_in_galeon_new (GtkWidget* widget, gpointer data); static void gnobog_popup_cb_browse_in_gnome_handler (GtkWidget* widget, gpointer data); +#ifdef __CYGWIN__ +static void gnobog_popup_cb_browse_in_windows_handler (GtkWidget* widget, gpointer data); +#endif static void gnobog_popup_cb_browse_in_nautilus_existing (GtkWidget* widget, gpointer data); static void gnobog_popup_cb_browse_in_nautilus_new (GtkWidget* widget, gpointer data); static void gnobog_popup_cb_browse_in_konqueror_new (GtkWidget* widget, gpointer data); @@ -83,6 +86,15 @@ static void gnobog_popup_cb_browse_in_lf /* SubMenus */ static GnomeUIInfo browse_submenu [] = { + GNOMEUIINFO_ITEM_NONE (N_("in Gnome URL Handler"), + N_("Browse in Gnome URL Handler"), + gnobog_popup_cb_browse_in_gnome_handler), +#ifdef __CYGWIN__ + GNOMEUIINFO_ITEM_NONE (N_("in Windows Default Browser"), + N_("Browse in Windows URL Handler"), + gnobog_popup_cb_browse_in_windows_handler), + GNOMEUIINFO_SEPARATOR, +#endif GNOMEUIINFO_ITEM_NONE (N_("in Netscape"), /* Menu Label */ N_("Browse in Netscape existing window"), /* Tooltips */ gnobog_popup_cb_browse_in_netscape_existing), /* Callback */ @@ -1109,6 +1121,32 @@ gnobog_popup_cb_browse_in_gnome_handler } } +#ifdef __CYGWIN__ +static void +gnobog_popup_cb_browse_in_windows_handler (GtkWidget* widget, + gpointer data) +{ + /* ShellExecute */ + GnobogArborescence* arborescence; + GnobogBookmarksNode bookmarks_node; + GnobogBookmarks* bookmarks; + GList* list; + + arborescence = GNOBOG_ARBORESCENCE (gnobog_app_get_active_view ()); + + bookmarks = arborescence->bookmarks_watched; + + list = gnobog_arborescence_get_sorted_bookmarks_node_selection (arborescence); + if (list != NULL) { + bookmarks_node = list->data; + gnobog_bookmarks_node_view_in_browser (arborescence->bookmarks_watched, + bookmarks_node, + WINDOWS_HANDLER_BROWSER, + FALSE); + } +} +#endif + static void gnobog_popup_cb_browse_in_nautilus_existing (GtkWidget* widget, gpointer data)