general: Remove help-related code

Our help documents are unfinished, and we shouldn't ship
unfinished documentation in our initial release.

We can revert this commit when we're ready to write the
documents properly.

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/156>
This commit is contained in:
Christopher Davis 2023-04-02 11:28:43 -04:00 • committed by Marge Bot
parent 9281a32ca9
commit 2965799374
5 changed files with 0 additions and 50 deletions

View file

@ -42,10 +42,6 @@
</item> </item>
</section> </section>
<section> <section>
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action">app.help</attribute>
</item>
<item> <item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute> <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute> <attribute name="action">win.show-help-overlay</attribute>

View file

@ -1,19 +0,0 @@
<page xmlns="http://projectmallard.org/1.0/"
type="guide" style="task"
xmlns:its="http://www.w3.org/2005/11/its"
id="index">
<info>
<desc>Help for Loupe.</desc>
<title type='link' role="trail"><media its:translate="no" type="image" src="figures/org.gnome.eog-symbolic.svg"/></title>
<title type='link'>Loupe</title>
<title type='text'>Loupe</title>
<credit type="author copyright">
<name>Christopher Davis</name>
<email>christopherdavis@gnome.org</email>
<years>2020</years>
</credit>
</info>
<title>Loupe</title>
</page>

View file

@ -1,8 +0,0 @@
sources = [
'index.page'
]
gnome.yelp(
meson.project_name(),
sources: sources,
)

View file

@ -52,7 +52,6 @@ conf.set('localedir', iv_localedir)
conf.set('pkgdatadir', iv_pkgdatadir) conf.set('pkgdatadir', iv_pkgdatadir)
subdir('data') subdir('data')
subdir('help')
subdir('src') subdir('src')
subdir('po') subdir('po')

View file

@ -22,8 +22,6 @@ use crate::i18n::*;
use adw::prelude::*; use adw::prelude::*;
use adw::subclass::prelude::*; use adw::subclass::prelude::*;
use glib::clone;
use gtk_macros::spawn;
use crate::config; use crate::config;
use crate::window::LpWindow; use crate::window::LpWindow;
@ -117,9 +115,6 @@ impl LpApplication {
gio::ActionEntryBuilder::new("about") gio::ActionEntryBuilder::new("about")
.activate(|app: &Self, _, _| app.show_about()) .activate(|app: &Self, _, _| app.show_about())
.build(), .build(),
gio::ActionEntryBuilder::new("help")
.activate(|app: &Self, _, _| app.show_help())
.build(),
gio::ActionEntryBuilder::new("quit") gio::ActionEntryBuilder::new("quit")
.activate(|app: &Self, _, _| app.quit()) .activate(|app: &Self, _, _| app.quit())
.build(), .build(),
@ -133,7 +128,6 @@ impl LpApplication {
self.add_action_entries(actions); self.add_action_entries(actions);
self.set_accels_for_action("app.help", &["F1"]);
self.set_accels_for_action("app.quit", &["<Ctrl>Q"]); self.set_accels_for_action("app.quit", &["<Ctrl>Q"]);
self.set_accels_for_action("app.new-window", &["<Ctrl>N"]); self.set_accels_for_action("app.new-window", &["<Ctrl>N"]);
@ -213,16 +207,4 @@ impl LpApplication {
about.present(); about.present();
} }
pub fn show_help(&self) {
spawn!(clone!(@weak self as app => async move {
let context = app
.active_window()
.map(|w| gtk::prelude::WidgetExt::display(&w).app_launch_context());
if let Err(e) = gio::AppInfo::launch_default_for_uri_future("help:loupe", context.as_ref()).await {
log::error!("Failed to launch help: {}", e.message());
}
}));
}
} }