2007-11-23 [wwp] 3.1.0cvs25
[claws.git] / src / prefs_common.c
index 8e59708a2af140ec4ff8893bb60bd30802c12969..a936c7699185bbd8c57a209555b1932ee75706fc 100644 (file)
@@ -738,7 +738,10 @@ static PrefParam param[] = {
         P_BOOL, NULL, NULL, NULL},
        {"select_on_entry", "3", &prefs_common.select_on_entry,
         P_ENUM, NULL, NULL, NULL},
+       {"show_tooltips", "TRUE", &prefs_common.show_tooltips,
+        P_BOOL, NULL, NULL, NULL},
 
+       /* do it SUMMARY_OPEN_ACTIONS-1 times */
        {"summary_select_prio1", "0", &prefs_common.summary_select_prio[0], P_ENUM,
         NULL, NULL, NULL},
        {"summary_select_prio2", "0", &prefs_common.summary_select_prio[1], P_ENUM,
@@ -751,6 +754,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"summary_select_prio6", "0", &prefs_common.summary_select_prio[5], P_ENUM,
         NULL, NULL, NULL},
+       {"summary_select_prio7", "0", &prefs_common.summary_select_prio[6], P_ENUM,
+        NULL, NULL, NULL},
 
        {"mark_as_read_on_new_window", "FALSE",
         &prefs_common.mark_as_read_on_new_window,
@@ -790,6 +795,8 @@ static PrefParam param[] = {
         &SPECIFIC_PREFS.print_cmd, P_STRING, NULL, NULL, NULL},
        {"ext_editor_command", DEFAULT_EDITOR_CMD,
         &SPECIFIC_PREFS.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
+       {"cmds_use_system_default", "FALSE",
+        &prefs_common.cmds_use_system_default, P_BOOL, NULL, NULL, NULL},
        {"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
         P_BOOL, NULL, NULL, NULL},
        {"confirm_on_exit", "FALSE", &prefs_common.confirm_on_exit, P_BOOL,
@@ -1434,3 +1441,37 @@ const gchar *prefs_common_translated_header_name(const gchar *header_name)
 
        return prefs_common.trans_hdr ? gettext(header_name) : header_name;
 }
+
+const gchar *prefs_common_get_uri_cmd(void)
+{
+       gchar *tmp = NULL;
+       
+       if (!prefs_common.cmds_use_system_default)
+               return prefs_common.uri_cmd;
+       
+       tmp = g_find_program_in_path("xdg-open");
+       if (!tmp) 
+               return prefs_common.uri_cmd;
+       
+       g_free(tmp);
+       return "xdg-open %s";
+}
+
+const gchar *prefs_common_get_ext_editor_cmd(void)
+{
+       return prefs_common.ext_editor_cmd;
+#if 0 /* we should do that, but it detaches the editor and breaks
+        compose.c's external composition. */
+       gchar *tmp = NULL;
+       
+       if (!prefs_common.cmds_use_system_default)
+               return prefs_common.ext_editor_cmd;
+       
+       tmp = g_find_program_in_path("xdg-open");
+       if (!tmp) 
+               return prefs_common.ext_editor_cmd;
+       
+       g_free(tmp);
+       return "xdg-open %s";
+#endif 
+}