diff options
author | Jonathan Kang <jonathan121537@gmail.com> | 2017-07-12 17:35:50 +0800 |
---|---|---|
committer | Jonathan Kang <jonathan121537@gmail.com> | 2017-07-31 11:38:32 +0100 |
commit | 5a73d390d6bc86fe6cf9fea2a05cafa211157582 (patch) | |
tree | 763dc77358a51e9200997064496b0c44a35ef04d /data | |
parent | f7a320c64b40be9a9bbce95f995eb3e984d3bf7b (diff) | |
download | gnome-logs-5a73d390d6bc86fe6cf9fea2a05cafa211157582.tar.gz |
Allow users to ignore insufficient permission warning
Currently, if an user don't have sufficient permission to view logs,
a GtkInfoBar will show up to warn the user about it. And it shows up
every time the user opens Logs until the user has sufficient
permission. This can be quite annoying.
Fix this by adding an "ignore" button to GtkInfoBar to give users the
option to ignore the warning.
Diffstat (limited to 'data')
-rw-r--r-- | data/gl-window.ui | 10 | ||||
-rw-r--r-- | data/org.gnome.Logs.gschema.xml | 5 |
2 files changed, 14 insertions, 1 deletions
diff --git a/data/gl-window.ui b/data/gl-window.ui index ac55eaa..7c5c919 100644 --- a/data/gl-window.ui +++ b/data/gl-window.ui @@ -22,7 +22,7 @@ <child> <object class="GtkButtonBox" id="action_area"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="orientation">horizontal</property> <property name="layout_style">center</property> <child> <object class="GtkButton" id="help_button"> @@ -32,6 +32,14 @@ <signal name="clicked" handler="on_help_button_clicked" object="GlWindow"/> </object> </child> + <child> + <object class="GtkButton" id="ignore_button"> + <property name="visible">True</property> + <property name="halign">center</property> + <property name="label" translatable="yes">Ignore</property> + <signal name="clicked" handler="on_ignore_button_clicked" object="GlWindow"/> + </object> + </child> </object> <packing> <property name="expand">False</property> diff --git a/data/org.gnome.Logs.gschema.xml b/data/org.gnome.Logs.gschema.xml index 8a18cb8..477aaef 100644 --- a/data/org.gnome.Logs.gschema.xml +++ b/data/org.gnome.Logs.gschema.xml @@ -1,6 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <schemalist gettext-domain="gnome-logs"> <schema id="org.gnome.Logs" path="/org/gnome/logs/"> + <key name="ignore-warning" type="b"> + <summary>Ignore warning</summary> + <description>Whether to ignore the warning that says you don't have sufficient permission to view logs. If ignored, the warning won't show up again.</description> + <default>false</default> + </key> <key name="sort-order" enum="org.gnome.Logs.GlSortOrder"> <summary>How to sort list rows in the event view list</summary> <description>Sort list rows in ascending or descending order for the selected type</description> |