[latexila] Build Tools: remove the document view program setting
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Build Tools: remove the document view program setting
- Date: Mon, 9 Jul 2012 00:51:32 +0000 (UTC)
commit eef01f2546c3eaca37ad1f72204b0b12ad70d759
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Mon Jul 9 02:45:01 2012 +0200
Build Tools: remove the document view program setting
gtk_show_uri() will be used instead.
xdg-open is still used temporarily.
data/org.gnome.latexila.gschema.xml | 5 ----
src/build_tool_dialog.vala | 4 +--
src/build_tool_runner.vala | 14 ++++-------
src/preferences_dialog.vala | 6 +----
src/ui/preferences_dialog.ui | 44 -----------------------------------
5 files changed, 7 insertions(+), 66 deletions(-)
---
diff --git a/data/org.gnome.latexila.gschema.xml b/data/org.gnome.latexila.gschema.xml
index 5203423..183d7cf 100644
--- a/data/org.gnome.latexila.gschema.xml
+++ b/data/org.gnome.latexila.gschema.xml
@@ -133,11 +133,6 @@
<summary>Interactive completion min chars</summary>
<description>Minimum number of characters after '\' for interactive completion</description>
</key>
- <key name="document-view-program" type="s">
- <default>'xdg-open'</default>
- <summary>Document view program</summary>
- <description>Program for viewing documents (PDF, DVI, PS)</description>
- </key>
<key name="latexmk-always-show-all" type="b">
<default>false</default>
<summary>Latexmk always show all</summary>
diff --git a/src/build_tool_dialog.vala b/src/build_tool_dialog.vala
index 8e1041f..2fee494 100644
--- a/src/build_tool_dialog.vala
+++ b/src/build_tool_dialog.vala
@@ -617,9 +617,7 @@ private class BuildToolDialog : Dialog
_("The active document filename without its extension"));
Label placeholder_view = new Label ("$view");
- placeholder_view.set_tooltip_text (
- _("The program for viewing documents.") + "\n" +
- _("Its value can be changed in the preferences dialog."));
+ placeholder_view.set_tooltip_text (_("The program for viewing documents"));
Grid placeholders_grid = new Grid ();
placeholders_grid.set_orientation (Orientation.HORIZONTAL);
diff --git a/src/build_tool_runner.vala b/src/build_tool_runner.vala
index 62ee54d..3ebf39f 100644
--- a/src/build_tool_runner.vala
+++ b/src/build_tool_runner.vala
@@ -1,7 +1,7 @@
/*
* This file is part of LaTeXila.
*
- * Copyright  2010-2011 SÃbastien Wilmet
+ * Copyright  2010-2012 SÃbastien Wilmet
*
* LaTeXila is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -29,7 +29,6 @@ public class BuildToolRunner : GLib.Object
private string output = "";
private BuildView view;
- private string document_view_program;
private bool latexmk_show_all;
private Gtk.Action action_stop_exec;
@@ -59,7 +58,6 @@ public class BuildToolRunner : GLib.Object
GLib.Settings settings =
new GLib.Settings ("org.gnome.latexila.preferences.latex");
- document_view_program = settings.get_string ("document-view-program");
latexmk_show_all = settings.get_boolean ("latexmk-always-show-all");
// verify if file extension is allowed for the build tool
@@ -416,18 +414,16 @@ public class BuildToolRunner : GLib.Object
{
if (command[i].contains ("$view"))
{
- command[i] = command[i].replace ("$view", document_view_program);
- continue;
+ // TODO use gtk_show_uri() instead of xdg-open
+ command[i] = command[i].replace ("$view", "xdg-open");
}
- if (command[i].contains ("$filename"))
+ else if (command[i].contains ("$filename"))
{
command[i] = command[i].replace ("$filename", base_filename);
- continue;
}
- if (command[i].contains ("$shortname"))
+ else if (command[i].contains ("$shortname"))
{
command[i] = command[i].replace ("$shortname", base_shortname);
- continue;
}
}
diff --git a/src/preferences_dialog.vala b/src/preferences_dialog.vala
index 56018e8..e096e98 100644
--- a/src/preferences_dialog.vala
+++ b/src/preferences_dialog.vala
@@ -291,10 +291,6 @@ public class PreferencesDialog : Dialog
set_plural (interactive_comp_label, settings, "interactive-completion-num",
(n) => ngettext ("character", "characters", n));
- var document_view_program = builder.get_object ("document_view_program");
- settings.bind ("document-view-program", document_view_program, "text",
- SettingsBindFlags.DEFAULT);
-
var latexmk_checkbutton = builder.get_object ("latexmk_checkbutton");
settings.bind ("latexmk-always-show-all", latexmk_checkbutton, "active",
SettingsBindFlags.DEFAULT);
@@ -302,7 +298,7 @@ public class PreferencesDialog : Dialog
Grid grid_latex_tab = builder.get_object ("grid_latex_tab") as Grid;
Grid build_tools_preferences = new BuildToolsPreferences ();
build_tools_preferences.set_margin_left (12);
- grid_latex_tab.attach (build_tools_preferences, 0, 4, 1, 1);
+ grid_latex_tab.attach (build_tools_preferences, 0, 3, 1, 1);
}
private void init_other_tab (Builder builder)
diff --git a/src/ui/preferences_dialog.ui b/src/ui/preferences_dialog.ui
index a0cc895..5378a08 100644
--- a/src/ui/preferences_dialog.ui
+++ b/src/ui/preferences_dialog.ui
@@ -543,50 +543,6 @@
<property name="height">1</property>
</packing>
</child>
- <child>
- <object class="GtkGrid" id="grid10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">12</property>
- <property name="column_spacing">5</property>
- <child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Program for viewing documents:</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="document_view_program">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="invisible_char">â</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="position">2</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]