Merge lp:~jeremy-munsch/synapse-project/goldendict-support into lp:synapse-project

Proposed by Jeremy Munsch
Status: Needs review
Proposed branch: lp:~jeremy-munsch/synapse-project/goldendict-support
Merge into: lp:synapse-project
Diff against target: 35 lines (+7/-3)
1 file modified
src/plugins/dictionary.vala (+7/-3)
To merge this branch: bzr merge lp:~jeremy-munsch/synapse-project/goldendict-support
Reviewer Review Type Date Requested Status
Rico Tzschichholz Pending
Review via email: mp+277287@code.launchpad.net

Description of the change

Add support for goldendict and use it as default if available as it is more complete feature and support lot of info sources.

It should be harmless whether to use gnome-dictionary of goldendict as if the use has goldendict he is likely wanting synapse to use it.

To post a comment you must log in.
616. By Jeremy Munsch

core: Handle UriMatches pointing to executable files

617. By Rico Tzschichholz

build: Drop optional dependency on gnome-common

618. By Rico Tzschichholz

build: Bump requirements glib-2.0 >= 2.40, valac >= 0.24.0

619. By Jeremy Munsch

Add support for "Additional applications actions"

Source and evaluate "Desktop Action" groups in desktop-files.

620. By Jeremy Munsch

dictionary: Add support for goldendict and use it in priority as it is more recent and complete feature

Revision history for this message
Jeremy Munsch (jeremy-munsch) wrote :

Just updated the branch and the commit message following recommendations

Unmerged revisions

620. By Jeremy Munsch

dictionary: Add support for goldendict and use it in priority as it is more recent and complete feature

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/plugins/dictionary.vala'
--- src/plugins/dictionary.vala 2015-09-29 18:25:24 +0000
+++ src/plugins/dictionary.vala 2015-11-14 23:13:38 +0000
@@ -45,8 +45,9 @@
45 {45 {
46 try46 try
47 {47 {
48 var search_command = dictionary_exec == "goldendict" ? "%s \"%s\"" : "%s --look-up=\"%s\"";
48 AppInfo ai = AppInfo.create_from_commandline (49 AppInfo ai = AppInfo.create_from_commandline (
49 "%s --look-up=\"%s\"".printf (dictionary_exec, match.title),50 search_command.printf (dictionary_exec, match.title),
50 dictionary_exec, 0);51 dictionary_exec, 0);
51 ai.launch (null, null);52 ai.launch (null, null);
52 }53 }
@@ -74,7 +75,8 @@
74 "accessories-dictionary",75 "accessories-dictionary",
75 register_plugin,76 register_plugin,
76 Environment.find_program_in_path ("gnome-dictionary") != null77 Environment.find_program_in_path ("gnome-dictionary") != null
77 || Environment.find_program_in_path ("mate-dictionary") != null,78 || Environment.find_program_in_path ("mate-dictionary") != null
79 || Environment.find_program_in_path ("goldendict") != null,
78 _("No compatible Dictionary installed")80 _("No compatible Dictionary installed")
79 );81 );
80 }82 }
@@ -90,7 +92,9 @@
90 construct92 construct
91 {93 {
92 unowned string dictionary_exec;94 unowned string dictionary_exec;
93 if (Environment.find_program_in_path ("gnome-dictionary") != null)95 if (Environment.find_program_in_path ("goldendict") != null)
96 dictionary_exec = "goldendict";
97 else if (Environment.find_program_in_path ("gnome-dictionary") != null)
94 dictionary_exec = "gnome-dictionary";98 dictionary_exec = "gnome-dictionary";
95 else if (Environment.find_program_in_path ("mate-dictionary") != null)99 else if (Environment.find_program_in_path ("mate-dictionary") != null)
96 dictionary_exec = "mate-dictionary";100 dictionary_exec = "mate-dictionary";