+2008-11-04 [colin] 3.6.1cvs15
+
+ * src/procmime.c
+ w32: Fix getting content-type
+ * src/mimeview.c
+ * src/prefs_common.c
+ * src/prefs_common.h
+ * src/prefs_ext_prog.c
+ * src/textview.c
+ w32: better integration (use the
+ standard file associations instead
+ of our platform-unadapted open
+ dialog)
+ * src/mainwindow.c
+ * src/common/utils.c
+ * src/common/w32_reg.c
+ * src/common/w32lib.h
+ w32: better integration (allow
+ setting Claws as default MUA)
+
2008-11-01 [colin] 3.6.1cvs14
* src/codeconv.c
( cvs diff -u -r 1.25.2.27 -r 1.25.2.28 tools/Makefile.am; diff -u /dev/null tools/kdeservicemenu/claws-mail-attach-files.desktop.kde4template; cvs diff -u -r 1.2.2.8 -r 1.2.2.9 tools/kdeservicemenu/install.sh; ) > 3.6.1cvs12.patchset
( cvs diff -u -r 1.83.2.145 -r 1.83.2.146 src/mimeview.c; cvs diff -u -r 1.20.2.26 -r 1.20.2.27 src/mimeview.h; cvs diff -u -r 1.96.2.208 -r 1.96.2.209 src/textview.c; cvs diff -u -r 1.12.2.24 -r 1.12.2.25 src/textview.h; ) > 3.6.1cvs13.patchset
( cvs diff -u -r 1.65.2.62 -r 1.65.2.63 src/codeconv.c; ) > 3.6.1cvs14.patchset
+( cvs diff -u -r 1.274.2.285 -r 1.274.2.286 src/mainwindow.c; cvs diff -u -r 1.83.2.146 -r 1.83.2.147 src/mimeview.c; cvs diff -u -r 1.204.2.181 -r 1.204.2.182 src/prefs_common.c; cvs diff -u -r 1.103.2.116 -r 1.103.2.117 src/prefs_common.h; cvs diff -u -r 1.3.2.23 -r 1.3.2.24 src/prefs_ext_prog.c; cvs diff -u -r 1.49.2.118 -r 1.49.2.119 src/procmime.c; cvs diff -u -r 1.96.2.209 -r 1.96.2.210 src/textview.c; cvs diff -u -r 1.36.2.153 -r 1.36.2.154 src/common/utils.c; cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/common/w32_reg.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/common/w32lib.h; ) > 3.6.1cvs15.patchset
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=14
+EXTRA_VERSION=15
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
gint open_uri(const gchar *uri, const gchar *cmdline)
{
#ifndef MAEMO
+#ifndef G_OS_WIN32
gchar buf[BUFFSIZE];
gchar *p;
gchar encoded_uri[BUFFSIZE];
}
execute_command_line(buf, TRUE);
+#else
+ ShellExecute(NULL, "open", uri, NULL, NULL, SW_SHOW);
+#endif
#else
extern osso_context_t *get_osso_context(void);
osso_rpc_run_with_defaults(get_osso_context(), "osso_browser",
*/
#include <windows.h>
+#include "utils.h"
#include "w32lib.h"
-char *read_w32_registry_string( char *parent, char *section, char *key )
+static HKEY get_root_key_from_str(char *parent)
{
- HKEY hKey, rootKey;
- char *str;
- int ret;
-
- char buf[ MAX_PATH ];
- DWORD bufsiz = sizeof( buf );
-
+ HKEY rootKey = NULL;
if (!parent || !strlen(parent))
rootKey = HKEY_CURRENT_USER ;
else if (!strcmp(parent, "HKCR") || !strcmp(parent,"HKEY_CLASSES_ROOT"))
rootKey = HKEY_USERS ;
else if (!strcmp(parent, "HKCC") || !strcmp(parent,"HKEY_CURRENT_CONFIG"))
rootKey = HKEY_CURRENT_CONFIG ;
- else
+ return rootKey;
+
+}
+
+int write_w32_registry_string( char *parent, char *section, char *value, char *data )
+{
+ HKEY hKey, rootKey;
+ int ret;
+
+ rootKey = get_root_key_from_str(parent);
+ ret = RegCreateKeyEx(rootKey, section, 0, NULL,
+ REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
+ if (ret != ERROR_SUCCESS) {
+ debug_print("can't write key %s\\%s: %d\n", parent, section, ret);
+ return -1;
+ }
+ ret = RegSetValueEx(hKey, value, 0, REG_SZ, (LPVOID)data, strlen(data));
+ if (ret != ERROR_SUCCESS) {
+ RegCloseKey(hKey);
+ debug_print("can't write key %s\\%s: %d\n", parent, section, ret);
+ return -1;
+ }
+ RegCloseKey(hKey);
+ return 0;
+}
+
+int write_w32_registry_dword( char *parent, char *section, char *value, int data )
+{
+ HKEY hKey, rootKey;
+ int ret;
+
+ rootKey = get_root_key_from_str(parent);
+ ret = RegCreateKeyEx(rootKey, section, 0, NULL,
+ REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
+ if (ret != ERROR_SUCCESS) {
+ debug_print("can't write key %s\\%s: %d\n", parent, section, ret);
+ return -1;
+ }
+ ret = RegSetValueEx(hKey, value, 0, REG_DWORD, (LPBYTE)&data, sizeof(data));
+ if (ret != ERROR_SUCCESS) {
+ RegCloseKey(hKey);
+ debug_print("can't write key %s\\%s: %d\n", parent, section, ret);
+ return -1;
+ }
+ RegCloseKey(hKey);
+ return 0;
+}
+
+char *read_w32_registry_string( char *parent, char *section, char *key )
+{
+ HKEY hKey, rootKey;
+ char *str;
+ int ret;
+
+ char buf[ MAX_PATH ];
+ DWORD bufsiz = sizeof( buf );
+
+ rootKey = get_root_key_from_str(parent);
+
+ if (!rootKey)
return NULL;
str = NULL;
int w32_is_administrator (void);
/*** misc ***/
+int write_w32_registry_string( char *parent, char *section, char *value, char *data );
+int write_w32_registry_dword( char *parent, char *section, char *value, int data );
char *read_w32_registry_string( char *parent, char *section, char *key );
char *get_content_type_from_registry_with_ext( char *ext );
static void legend_open_cb (GtkAction *action,
gpointer data);
+#ifdef G_OS_WIN32
+static void set_default_client_cb (GtkAction *action,
+ gpointer data);
+#endif
+
static void scan_tree_func (Folder *folder,
FolderItem *item,
gpointer data);
{"Help/Manual", NULL, N_("_Manual"), NULL, NULL, G_CALLBACK(manual_open_cb) },
{"Help/FAQ", NULL, N_("_Online User-contributed FAQ"), NULL, NULL, G_CALLBACK(manual_faq_open_cb) },
{"Help/IconLegend", NULL, N_("Icon _Legend"), NULL, NULL, G_CALLBACK(legend_open_cb) },
+#ifdef G_OS_WIN32
+ {"Help/SetDefault", NULL, N_("Set as default client"), NULL, NULL, G_CALLBACK(set_default_client_cb) },
+#endif
{"Help/---", NULL, "---" },
{"Help/About", NULL, N_("_About"), NULL, NULL, G_CALLBACK(about_cb) },
};
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Help", "FAQ", "Help/FAQ", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Help", "IconLegend", "Help/IconLegend", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Help", "Separator1", "Help/---", GTK_UI_MANAGER_SEPARATOR)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Help", "SetDefault", "Help/SetDefault", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Help", "Separator2", "Help/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Help", "About", "Help/About", GTK_UI_MANAGER_MENUITEM)
legend_show();
}
+#ifdef G_OS_WIN32
+static void set_default_client_cb(GtkAction *action, gpointer data)
+{
+ char exename[MAX_PATH];
+ gchar *binary_icon = NULL;
+ gchar *binary_compose = NULL;
+ gchar *binary_run = NULL;
+ int r = 0;
+ if ( !GetModuleFileNameA (0, exename, sizeof (exename)) ) {
+ alertpanel_error(_("Can not register as default client: impossible to get executable path."));
+ return;
+ }
+ binary_icon = g_strconcat(exename, ",0", NULL);
+ binary_compose = g_strconcat(exename, " --compose %1", NULL);
+ binary_run = g_strconcat(exename, NULL);
+
+ r = write_w32_registry_string("HKCU", "Software\\Clients\\Mail",
+ "", "Claws Mail");
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Clients\\Mail\\Claws Mail",
+ "", "Claws Mail");
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Clients\\Mail\\Claws Mail",
+ "DLLPath", "");
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Clients\\Mail\\Claws Mail\\Protocols\\mailto",
+ "", "URL:MailTo-Protocol");
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Clients\\Mail\\Claws Mail\\Protocols\\mailto",
+ "URL Protocol", "");
+ if (!r)
+ r = write_w32_registry_dword ("HKCU", "Software\\Clients\\Mail\\Claws Mail\\Protocols\\mailto",
+ "EditFlags", 2);
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Clients\\Mail\\Claws Mail\\Protocols\\mailto\\DefaultIcon",
+ "", binary_icon);
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Clients\\Mail\\Claws Mail\\Protocols\\mailto\\shell\\open\\command",
+ "", binary_compose);
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Clients\\Mail\\Claws Mail\\shell\\open\\command",
+ "", binary_run);
+
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Classes\\mailto",
+ "", "URL:MailTo-Protocol");
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Classes\\mailto",
+ "URL Protocol", "");
+ if (!r)
+ r = write_w32_registry_dword ("HKCU", "Software\\Classes\\mailto",
+ "EditFlags", 2);
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Classes\\mailto\\DefaultIcon",
+ "", binary_icon);
+ if (!r)
+ r = write_w32_registry_string("HKCU", "Software\\Classes\\mailto\\shell\\open\\command",
+ "", binary_compose);
+
+ if (!r) {
+ alertpanel_notice(_("Claws Mail has been registered as default client."));
+ } else {
+ alertpanel_error(_("Can not register as default client: impossible to write to the registry."));
+ }
+ g_free(binary_icon);
+ g_free(binary_compose);
+ g_free(binary_run);
+}
+#endif
+
static void scan_tree_func(Folder *folder, FolderItem *item, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
static void mimeview_save_all (MimeView *mimeview);
static void mimeview_launch (MimeView *mimeview,
MimeInfo *partinfo);
+#ifndef G_OS_WIN32
static void mimeview_open_with (MimeView *mimeview);
static void mimeview_open_part_with (MimeView *mimeview,
MimeInfo *partinfo,
gboolean automatic);
+#endif
static void mimeview_select_next_part (MimeView *mimeview);
static void mimeview_select_prev_part (MimeView *mimeview);
static void mimeview_view_file (const gchar *filename,
mimeview_launch(mimeview, mimeview_get_part_to_use(mimeview));
}
+#ifndef G_OS_WIN32
static void mimeview_open_with_cb(GtkAction *action, gpointer data)
{
mimeview_open_with((MimeView *)data);
}
+#endif
static void mimeview_display_as_text_cb(GtkAction *action, gpointer data)
{
static GtkActionEntry mimeview_menu_actions[] = {
{ "MimeView", NULL, "MimeView" },
{ "MimeView/Open", NULL, N_("_Open (l)"), NULL, "Open MIME part", G_CALLBACK(mimeview_launch_cb) },
-#ifndef MAEMO
+#if (!defined MAEMO && !defined G_OS_WIN32)
{ "MimeView/OpenWith", NULL, N_("Open _with (o)..."), NULL, "Open MIME part with...", G_CALLBACK(mimeview_open_with_cb) },
#endif
{ "MimeView/DisplayAsText", NULL, N_("_Display as text (t)"), NULL, "Display as text", G_CALLBACK(mimeview_display_as_text_cb) },
MENUITEM_ADDUI_MANAGER(mimeview->ui_manager,
"/Menus/MimeView/", "Open", "MimeView/Open",
GTK_UI_MANAGER_MENUITEM);
-#ifndef MAEMO
+#if (!defined MAEMO && !defined G_OS_WIN32)
MENUITEM_ADDUI_MANAGER(mimeview->ui_manager,
"/Menus/MimeView/", "OpenWith", "MimeView/OpenWith",
GTK_UI_MANAGER_MENUITEM);
cm_menu_set_sensitive_full(mimeview->ui_manager, "Menus/MimeView/DisplayAsText", FALSE);
else
cm_menu_set_sensitive_full(mimeview->ui_manager, "Menus/MimeView/DisplayAsText", TRUE);
+#ifndef G_OS_WIN32
if (partinfo &&
partinfo->type == MIMETYPE_APPLICATION &&
!g_ascii_strcasecmp(partinfo->subtype, "octet-stream"))
cm_menu_set_sensitive_full(mimeview->ui_manager, "Menus/MimeView/Open", FALSE);
else
+#endif
cm_menu_set_sensitive_full(mimeview->ui_manager, "Menus/MimeView/Open", TRUE);
g_object_set_data(G_OBJECT(mimeview->popupmenu),
KEY_PRESS_EVENT_STOP();
mimeview_launch(mimeview, NULL);
return TRUE;
+#ifndef G_OS_WIN32
case GDK_o:
BREAK_ON_MODIFIER_KEY();
KEY_PRESS_EVENT_STOP();
mimeview_open_with(mimeview);
return TRUE;
+#endif
case GDK_c:
BREAK_ON_MODIFIER_KEY();
KEY_PRESS_EVENT_STOP();
g_free(filename);
}
+#ifndef G_OS_WIN32
static void mimeview_open_with(MimeView *mimeview)
{
MimeInfo *partinfo;
g_free(content_type);
g_free(filename);
}
+#endif
static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
const gchar *cmd, MimeView *mimeview)
{
+#ifndef G_OS_WIN32
gchar *p;
gchar buf[BUFFSIZE];
if (cmd == NULL)
mimeview_open_part_with(mimeview, partinfo, FALSE);
}
}
+#else
+ SHFILEINFO file_info;
+ if ((SHGetFileInfo(filename, 0, &file_info, sizeof(SHFILEINFO), SHGFI_EXETYPE)) != 0) {
+ AlertValue val = alertpanel_full(_("Execute untrusted binary?"),
+ _("This attachment is an executable file. Executing "
+ "untrusted binaries is dangerous and could probably "
+ "lead to compromission of your computer.\n\n"
+ "Do you want to run this file?"), GTK_STOCK_CANCEL,
+ _("Run binary"),
+ NULL, FALSE, NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ if (val == G_ALERTALTERNATE) {
+ debug_print("executing binary\n");
+ ShellExecute(NULL, "open", filename, NULL, NULL, SW_SHOW);
+ }
+ } else
+ ShellExecute(NULL, "open", filename, NULL, NULL, SW_SHOW);
+
+#endif
}
void mimeview_register_viewer_factory(MimeViewerFactory *factory)
BREAK_ON_MODIFIER_KEY();
mimeview_launch(mimeview, NULL);
return TRUE;
+#ifndef G_OS_WIN32
case GDK_o:
BREAK_ON_MODIFIER_KEY();
mimeview_open_with(mimeview);
return TRUE;
+#endif
case GDK_c:
BREAK_ON_MODIFIER_KEY();
mimeview_check_signature(mimeview);
mimeview_save_as(mimeview);
else if (!strcmp(cmd, "sc://display_as_text"))
mimeview_display_as_text(mimeview);
+#ifndef G_OS_WIN32
else if (!strcmp(cmd, "sc://open_with"))
mimeview_open_with(mimeview);
+#endif
else if (!strcmp(cmd, "sc://open"))
mimeview_launch(mimeview, NULL);
else if (!strcmp(cmd, "sc://select_attachment") && data != NULL) {
&prefs_common.pixmap_theme_path, P_STRING, NULL, NULL, NULL},
/* Other */
- {"uri_open_command", NULL,
- &prefs_common.uri_cmd, P_STRING, NULL, NULL, NULL},
- {"print_command", "notepad /p %s",
- &prefs_common.print_cmd, P_STRING, NULL, NULL, NULL},
{"ext_editor_command", "notepad %s",
&prefs_common.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
P_INT, NULL, NULL, NULL},
/* Other */
+#ifndef G_OS_WIN32
{"uri_open_command", DEFAULT_BROWSER_CMD,
&SPECIFIC_PREFS.uri_cmd, P_STRING, NULL, NULL, NULL},
{"print_command", "lpr %s",
&SPECIFIC_PREFS.print_cmd, P_STRING, NULL, NULL, NULL},
+#endif
{"ext_editor_command", DEFAULT_EDITOR_CMD,
&SPECIFIC_PREFS.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
{"cmds_use_system_default", "FALSE",
const gchar *prefs_common_get_uri_cmd(void)
{
+#ifdef G_OS_WIN32
+ return NULL;
+#else
gchar *tmp = NULL;
if (!prefs_common.cmds_use_system_default)
g_free(tmp);
return "xdg-open %s";
+#endif
}
const gchar *prefs_common_get_ext_editor_cmd(void)
gint apply_per_account_filtering_rules;
/* Other */
+#ifndef G_OS_WIN32
gchar *uri_cmd;
gchar *print_cmd;
+#endif
gchar *ext_editor_cmd;
gboolean cmds_use_system_default;
GtkWidget *window; /* do not modify */
GtkWidget *cmds_use_system_default_checkbtn;
-
+#ifndef G_OS_WIN32
GtkWidget *uri_label;
GtkWidget *uri_combo;
GtkWidget *uri_entry;
GtkWidget *printcmd_label;
GtkWidget *printcmd_entry;
-
+#endif
GtkWidget *exteditor_label;
GtkWidget *exteditor_combo;
GtkWidget *exteditor_entry;
GtkWidget *hint_label;
GtkWidget *table2;
GtkWidget *cmds_use_system_default_checkbtn;
+#ifndef G_OS_WIN32
GtkWidget *uri_label;
GtkWidget *uri_combo;
GtkWidget *uri_entry;
+ GtkWidget *printcmd_label;
+ GtkWidget *printcmd_entry;
+#endif
GtkWidget *exteditor_label;
GtkWidget *exteditor_combo;
GtkWidget *exteditor_entry;
GtkWidget *astextviewer_label;
GtkWidget *astextviewer_entry;
- GtkWidget *printcmd_label;
- GtkWidget *printcmd_entry;
CLAWS_TIP_DECL();
int i = 0;
gchar *tmp;
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 2);
+#ifndef G_OS_WIN32
uri_label = gtk_label_new (_("Web browser"));
gtk_widget_show(uri_label);
#ifdef MAEMO
uri_entry = gtk_bin_get_child(GTK_BIN((uri_combo)));
gtk_entry_set_text(GTK_ENTRY(uri_entry), prefs_common.uri_cmd ? prefs_common.uri_cmd : "");
-
+#endif
exteditor_label = gtk_label_new (_("Text editor"));
gtk_widget_show(exteditor_label);
gtk_entry_set_text(GTK_ENTRY(astextviewer_entry),
prefs_common.mime_textviewer ? prefs_common.mime_textviewer : "");
+#ifndef G_OS_WIN32
printcmd_label = gtk_label_new (_("Print command"));
#if !defined(USE_GNOMEPRINT) && !GTK_CHECK_VERSION(2,10,0)
gtk_widget_show(printcmd_label);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_entry_set_text(GTK_ENTRY(printcmd_entry), prefs_common.print_cmd ? prefs_common.print_cmd : "");
+#endif
+#ifndef G_OS_WIN32
SET_TOGGLE_SENSITIVITY_REVERSE (cmds_use_system_default_checkbtn, uri_label);
SET_TOGGLE_SENSITIVITY_REVERSE (cmds_use_system_default_checkbtn, uri_combo);
+#endif
#if 0 /* we should do that, but it detaches the editor and breaks
compose.c's external composition. */
SET_TOGGLE_SENSITIVITY_REVERSE (cmds_use_system_default_checkbtn, exteditor_label);
#endif
prefs_ext_prog->window = GTK_WIDGET(window);
+#ifndef G_OS_WIN32
prefs_ext_prog->uri_entry = uri_entry;
+ prefs_ext_prog->printcmd_entry = printcmd_entry;
+#endif
prefs_ext_prog->exteditor_entry = exteditor_entry;
prefs_ext_prog->astextviewer_entry = astextviewer_entry;
- prefs_ext_prog->printcmd_entry = printcmd_entry;
prefs_ext_prog->cmds_use_system_default_checkbtn = cmds_use_system_default_checkbtn;
prefs_ext_prog->page.widget = table;
}
{
ExtProgPage *ext_prog = (ExtProgPage *) _page;
+#ifndef G_OS_WIN32
prefs_common.uri_cmd = gtk_editable_get_chars
(GTK_EDITABLE(ext_prog->uri_entry), 0, -1);
prefs_common.print_cmd = gtk_editable_get_chars
(GTK_EDITABLE(ext_prog->printcmd_entry), 0, -1);
+#endif
prefs_common.ext_editor_cmd = gtk_editable_get_chars
(GTK_EDITABLE(ext_prog->exteditor_entry), 0, -1);
prefs_common.mime_textviewer = gtk_editable_get_chars
gchar *procmime_get_mime_type(const gchar *filename)
{
- static GHashTable *mime_type_table = NULL;
- MimeType *mime_type;
const gchar *p;
gchar *ext = NULL;
gchar *base;
+#ifndef G_OS_WIN32
+ static GHashTable *mime_type_table = NULL;
+ MimeType *mime_type;
if (!mime_type_table) {
mime_type_table = procmime_get_mime_type_table();
if (!mime_type_table) return NULL;
}
+#endif
base = g_path_get_basename(filename);
if ((p = strrchr(base, '.')) != NULL)
ext = g_utf8_strdown(p + 1, -1);
g_free(base);
+#ifndef G_OS_WIN32
mime_type = g_hash_table_lookup(mime_type_table, ext);
- g_free(ext);
+
if (mime_type) {
gchar *str;
-
str = g_strconcat(mime_type->type, "/", mime_type->sub_type,
NULL);
+ debug_print("got type %s for %s\n", str, ext);
+ g_free(ext);
return str;
- }
-
+ }
return NULL;
+#else
+ gchar *str = get_content_type_from_registry_with_ext(ext);
+
+ g_free(ext);
+ return str;
+#endif
}
static guint procmime_str_hash(gconstpointer gptr)
TEXTVIEW_INSERT(_(" (Shortcut key: 'l')\n"));
TEXTVIEW_INSERT(_(" (alternately double-click, or click the middle "));
TEXTVIEW_INSERT(_("mouse button)\n"));
+#ifndef G_OS_WIN32
TEXTVIEW_INSERT(_(" - Or use "));
TEXTVIEW_INSERT_LINK(_("'Open with...'"), "sc://open_with", NULL);
TEXTVIEW_INSERT(_(" (Shortcut key: 'o')"));
+#endif
#endif
TEXTVIEW_INSERT("\n");