[gnome-builder] libide/gui: give access to icon for shortcut info



commit 7204dbc2e157714db93d23488b243c73af573f08
Author: Christian Hergert <chergert redhat com>
Date:   Tue Oct 4 21:20:36 2022 -0700

    libide/gui: give access to icon for shortcut info

 src/libide/gui/ide-shortcut-info.h   | 2 ++
 src/libide/gui/ide-shortcut-window.c | 8 ++++++++
 2 files changed, 10 insertions(+)
---
diff --git a/src/libide/gui/ide-shortcut-info.h b/src/libide/gui/ide-shortcut-info.h
index fda0b3fca..8a725885a 100644
--- a/src/libide/gui/ide-shortcut-info.h
+++ b/src/libide/gui/ide-shortcut-info.h
@@ -34,6 +34,8 @@ void        ide_shortcut_info_foreach           (GListModel                *shor
                                                  const IdeShortcutInfoFunc  func,
                                                  gpointer                   func_data);
 IDE_AVAILABLE_IN_44
+const char *ide_shortcut_info_get_icon_name     (const IdeShortcutInfo     *self);
+IDE_AVAILABLE_IN_44
 const char *ide_shortcut_info_get_accelerator   (const IdeShortcutInfo     *self);
 IDE_AVAILABLE_IN_44
 const char *ide_shortcut_info_get_action_name   (const IdeShortcutInfo     *self);
diff --git a/src/libide/gui/ide-shortcut-window.c b/src/libide/gui/ide-shortcut-window.c
index d8849e77c..320618ad5 100644
--- a/src/libide/gui/ide-shortcut-window.c
+++ b/src/libide/gui/ide-shortcut-window.c
@@ -521,6 +521,7 @@ struct _IdeShortcutInfo
   const char *title;
   const char *subtitle;
   const char *accel;
+  const char *icon_name;
   const char *action_name;
   GVariant *action_target;
 };
@@ -609,6 +610,7 @@ ide_shortcut_info_foreach (GListModel                *shortcuts,
               info.accel = si->accel;
               info.action_name = si->action;
               info.action_target = si->target;
+              info.icon_name = si->icon_name;
 
               func (&info, func_data);
             }
@@ -670,3 +672,9 @@ ide_shortcut_info_get_accelerator (const IdeShortcutInfo *self)
 {
   return self->accel;
 }
+
+const char *
+ide_shortcut_info_get_icon_name (const IdeShortcutInfo *self)
+{
+  return self->icon_name;
+}


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