[libadwaita/wip/exalm/demo: 12/17] demo: Add inspector to the primary menu
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/demo: 12/17] demo: Add inspector to the primary menu
- Date: Wed, 13 Oct 2021 16:56:58 +0000 (UTC)
commit b462ee3bb7c6f39bc97377c09b936a7259faab24
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Oct 13 15:56:43 2021 +0500
demo: Add inspector to the primary menu
Make it less empty.
demo/adw-demo-window.ui | 6 ++++++
demo/adwaita-demo.c | 9 +++++++++
2 files changed, 15 insertions(+)
---
diff --git a/demo/adw-demo-window.ui b/demo/adw-demo-window.ui
index 5303e4ae..95c29126 100644
--- a/demo/adw-demo-window.ui
+++ b/demo/adw-demo-window.ui
@@ -4,6 +4,12 @@
<requires lib="gtk" version="4.0"/>
<requires lib="libadwaita" version="1.0"/>
<menu id="primary_menu">
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_Inspector</attribute>
+ <attribute name="action">app.inspector</attribute>
+ </item>
+ </section>
<section>
<item>
<attribute name="label" translatable="yes">_Preferences</attribute>
diff --git a/demo/adwaita-demo.c b/demo/adwaita-demo.c
index bc8102ba..250e26c3 100644
--- a/demo/adwaita-demo.c
+++ b/demo/adwaita-demo.c
@@ -5,6 +5,14 @@
#include "adw-demo-preferences-window.h"
#include "adw-demo-window.h"
+static void
+show_inspector (GSimpleAction *action,
+ GVariant *state,
+ gpointer user_data)
+{
+ gtk_window_set_interactive_debugging (TRUE);
+}
+
static void
show_preferences (GSimpleAction *action,
GVariant *state,
@@ -83,6 +91,7 @@ main (int argc,
AdwApplication *app;
int status;
static GActionEntry app_entries[] = {
+ { "inspector", show_inspector, NULL, NULL, NULL },
{ "preferences", show_preferences, NULL, NULL, NULL },
{ "about", show_about, NULL, NULL, NULL },
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]