filebrowser: Make the "Open terminal here" command work again
Add a gsettings key to set the terminal used for the command in the menu. By default this is set to 'x-terminal-emulator' but it can be easily overridden by packagers or changed by users who choose to.
This commit is contained in:
parent
6801233bd8
commit
245991c22c
|
@ -16,6 +16,11 @@
|
|||
<summary>File Browser Filter Pattern</summary>
|
||||
<description>The filter pattern to filter the file browser with. This filter works on top of the filter_mode.</description>
|
||||
</key>
|
||||
<key name="terminal-command" type="s">
|
||||
<default>'x-terminal-emulator'</default>
|
||||
<summary>Terminal Command</summary>
|
||||
<description>The terminal command when using the "Open terminal here" command.</description>
|
||||
</key>
|
||||
<child name="on-load" schema="org.x.editor.plugins.filebrowser.on-load"/>
|
||||
</schema>
|
||||
<schema id="org.x.editor.plugins.filebrowser.on-load" path="/org/x/editor/plugins/filebrowser/on-load/">
|
||||
|
|
|
@ -337,13 +337,6 @@ on_action_set_active_root (GtkAction *action,
|
|||
set_root_from_doc (plugin, xed_window_get_active_document (XED_WINDOW (plugin->priv->window)));
|
||||
}
|
||||
|
||||
static gchar *
|
||||
get_terminal (XedFileBrowserPlugin *plugin)
|
||||
{
|
||||
// TODO : Identify the DE, find the preferred terminal application (xterminal shouldn't be hardcoded here, it should be set as default in the DE prefs)
|
||||
return g_strdup ("xterminal");
|
||||
}
|
||||
|
||||
static void
|
||||
on_action_open_terminal (GtkAction *action,
|
||||
XedFileBrowserPlugin *plugin)
|
||||
|
@ -369,8 +362,7 @@ on_action_open_terminal (GtkAction *action,
|
|||
gchar *local;
|
||||
gchar *argv[2];
|
||||
|
||||
terminal = get_terminal (plugin);
|
||||
|
||||
terminal = g_settings_get_string (priv->settings, "terminal-command");
|
||||
local = g_file_get_path (file);
|
||||
|
||||
argv[0] = terminal;
|
||||
|
|
Loading…
Reference in New Issue