feat: the About dialog on AdwAboutDialog, showing the app icon
AdwAboutDialog puts the application icon in its own header, which is what the app now has one for, and adw_about_window_new() is deprecated in favour of it. It is an AdwDialog and not a GtkWindow, so it clears on ::closed and closes with adw_dialog_close() -- the same trap the shortcut overview documents, and both dialogs now share one handler keyed by the pointer to clear. Two gains while mapping the fields: system_information becomes debug_info, which renders as a Troubleshooting page with a copy button, and the string behind it becomes a std::string rather than a char[1024] that truncated a long settings path in silence. The probe now reads the icon name back out of the open dialog, so it is asserted to carry the icon rather than merely to open.
This commit is contained in:
1 parent
6deb53c458
commit
33eee0c8d0
3 files changed
+60
-37
No files matched your search
+6
-2
@@ -7568,6 +7568,9 @@ gboolean help_probe(gpointer user) {
|
||||
show_help(GTK_WINDOW(a->window));
|
||||
show_about(GTK_WINDOW(a->window), session);
|
||||
show_shortcuts(GTK_WINDOW(a->window));
|
||||
// Read while it is open: the icon is the point of the dialog carrying one, and
|
||||
// `close_help_windows()` is right below.
|
||||
const std::string about_icon = about_icon_name();
|
||||
close_help_windows();
|
||||
|
||||
int accel_count = 0;
|
||||
@@ -7576,10 +7579,11 @@ gboolean help_probe(gpointer user) {
|
||||
(void)plot_gestures(&gesture_count);
|
||||
std::fprintf(stderr,
|
||||
"[help] pages=%d parsed=%d shortest='%s' %zu B; shortcuts: app=%d plot=%d; "
|
||||
"about version=%s commit=%s built=%s settings=%s; closed ok\n",
|
||||
"about version=%s commit=%s built=%s settings=%s icon=%s; closed ok\n",
|
||||
report.pages, report.parsed, report.shortest_title.c_str(),
|
||||
report.shortest_bytes, accel_count, gesture_count, build_info::kVersion,
|
||||
build_info::kCommit, build_info::kTimestamp, config_dir().c_str());
|
||||
build_info::kCommit, build_info::kTimestamp, config_dir().c_str(),
|
||||
about_icon.c_str());
|
||||
std::fflush(stderr);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user