[latexila] Build View: remove button "show critical errors"



commit c6c34035450f1f39523302ce5c4e8d0e7614d907
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Sun Feb 5 15:55:06 2012 +0100

    Build View: remove button "show critical errors"
    
    When there is a critical error, it's completely useless to hide it.
    
    It's still possible to hide warnings and/or bad boxes.

 data/org.gnome.latexila.gschema.xml |    4 ----
 src/build_view.vala                 |    4 ----
 src/main_window.vala                |   20 +++-----------------
 src/ui/ui.xml                       |    2 --
 4 files changed, 3 insertions(+), 27 deletions(-)
---
diff --git a/data/org.gnome.latexila.gschema.xml b/data/org.gnome.latexila.gschema.xml
index e961ecf..d49f229 100644
--- a/data/org.gnome.latexila.gschema.xml
+++ b/data/org.gnome.latexila.gschema.xml
@@ -116,10 +116,6 @@
       <summary>Side panel component</summary>
       <description>Side panel active component. 0: Symbols. 1: File browser.</description>
     </key>
-    <key name="show-build-errors" type="b">
-      <default>true</default>
-      <summary>Show build output errors</summary>
-    </key>
     <key name="show-build-warnings" type="b">
       <default>true</default>
       <summary>Show build output warnings</summary>
diff --git a/src/build_view.vala b/src/build_view.vala
index 2eb7d47..320f82e 100644
--- a/src/build_view.vala
+++ b/src/build_view.vala
@@ -68,7 +68,6 @@ public class BuildView : HBox
         N_COLUMNS
     }
 
-    public bool show_errors { get; set; }
     public bool show_warnings { get; set; }
     public bool show_badboxes { get; set; }
 
@@ -106,8 +105,6 @@ public class BuildView : HBox
 
             switch (msg_type)
             {
-                case BuildMsgType.ERROR:
-                    return show_errors;
                 case BuildMsgType.WARNING:
                     return show_warnings;
                 case BuildMsgType.BADBOX:
@@ -117,7 +114,6 @@ public class BuildView : HBox
             }
         });
 
-        this.notify["show-errors"].connect (() => _filtered_model.refilter ());
         this.notify["show-warnings"].connect (() => _filtered_model.refilter ());
         this.notify["show-badboxes"].connect (() => _filtered_model.refilter ());
 
diff --git a/src/main_window.vala b/src/main_window.vala
index 797b83c..0dce7ce 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -174,8 +174,6 @@ public class MainWindow : Window
             N_("Show or hide the side panel"), on_show_side_panel },
         { "ViewBottomPanel", null, N_("_Bottom panel"), null,
             N_("Show or hide the bottom panel"), on_show_bottom_panel },
-        { "BuildShowErrors", Stock.DIALOG_ERROR, N_("Show _Errors"), null,
-            N_("Show Errors"), on_build_show_errors },
         { "BuildShowWarnings", Stock.DIALOG_WARNING, N_("Show _Warnings"), null,
             N_("Show Warnings"), on_build_show_warnings },
         { "BuildShowBadBoxes", "badbox", N_("Show _Bad Boxes"), null,
@@ -652,21 +650,17 @@ public class MainWindow : Window
     private void show_or_hide_build_messages ()
     {
         GLib.Settings settings = new GLib.Settings ("org.gnome.latexila.preferences.ui");
-        bool show_errors = settings.get_boolean ("show-build-errors");
         bool show_warnings = settings.get_boolean ("show-build-warnings");
         bool show_badboxes = settings.get_boolean ("show-build-badboxes");
 
-        build_view.show_errors = show_errors;
         build_view.show_warnings = show_warnings;
         build_view.show_badboxes = show_badboxes;
 
-        ToggleAction action = (ToggleAction) action_group.get_action ("BuildShowErrors");
-        action.set_active (show_errors);
-
-        action = (ToggleAction) action_group.get_action ("BuildShowWarnings");
+        ToggleAction action =
+            action_group.get_action ("BuildShowWarnings") as ToggleAction;
         action.set_active (show_warnings);
 
-        action = (ToggleAction) action_group.get_action ("BuildShowBadBoxes");
+        action = action_group.get_action ("BuildShowBadBoxes") as ToggleAction;
         action.set_active (show_badboxes);
     }
 
@@ -1155,9 +1149,6 @@ public class MainWindow : Window
 
         settings_ui.set_int ("side-panel-component", side_panel.get_active_component ());
 
-        action = (ToggleAction) action_group.get_action ("BuildShowErrors");
-        settings_ui.set_boolean ("show-build-errors", action.active);
-
         action = (ToggleAction) action_group.get_action ("BuildShowWarnings");
         settings_ui.set_boolean ("show-build-warnings", action.active);
 
@@ -1777,11 +1768,6 @@ public class MainWindow : Window
             tab.document.readonly = true;
     }
 
-    public void on_build_show_errors (Gtk.Action action)
-    {
-        build_view.show_errors = ((ToggleAction) action).active;
-    }
-
     public void on_build_show_warnings (Gtk.Action action)
     {
         build_view.show_warnings = ((ToggleAction) action).active;
diff --git a/src/ui/ui.xml b/src/ui/ui.xml
index ab6298f..090b0be 100644
--- a/src/ui/ui.xml
+++ b/src/ui/ui.xml
@@ -79,7 +79,6 @@ along with LaTeXila.  If not, see <http://www.gnu.org/licenses/>.
       <menuitem action="BuildStopExecution" />
       <menuitem action="BuildViewLog" />
       <separator />
-      <menuitem action="BuildShowErrors" />
       <menuitem action="BuildShowWarnings" />
       <menuitem action="BuildShowBadBoxes" />
     </menu>
@@ -494,7 +493,6 @@ along with LaTeXila.  If not, see <http://www.gnu.org/licenses/>.
   <toolbar name="BuildToolbar">
     <toolitem action="BuildStopExecution" />
     <toolitem action="BuildViewLog" />
-    <toolitem action="BuildShowErrors" />
     <toolitem action="BuildShowWarnings" />
     <toolitem action="BuildShowBadBoxes" />
   </toolbar>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]