[gnome-builder] devhelp plugin: set actions on the workbench
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] devhelp plugin: set actions on the workbench
- Date: Fri, 11 Aug 2017 15:30:14 +0000 (UTC)
commit abd4a48f08cd1a447d5fa92be1f6adc7b87e36f1
Author: Sebastien Lafargue <slafargue gnome org>
Date: Fri Aug 11 17:28:44 2017 +0200
devhelp plugin: set actions on the workbench
plugins/devhelp/gbp-devhelp-editor-addin.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/devhelp/gbp-devhelp-editor-addin.c b/plugins/devhelp/gbp-devhelp-editor-addin.c
index 9e0e0fe..89a7414 100644
--- a/plugins/devhelp/gbp-devhelp-editor-addin.c
+++ b/plugins/devhelp/gbp-devhelp-editor-addin.c
@@ -56,17 +56,17 @@ gbp_devhelp_editor_addin_load (IdeEditorAddin *addin,
IdeEditorPerspective *editor)
{
GbpDevhelpEditorAddin *self = (GbpDevhelpEditorAddin *)addin;
- GtkWidget *win;
+ IdeWorkbench *workbench;
g_assert (GBP_IS_DEVHELP_EDITOR_ADDIN (self));
g_assert (IDE_IS_EDITOR_PERSPECTIVE (editor));
self->editor = editor;
- win = gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW);
+ workbench = ide_widget_get_workbench (GTK_WIDGET (editor));
- if (G_IS_ACTION_MAP (win))
- g_action_map_add_action_entries (G_ACTION_MAP (win), actions, G_N_ELEMENTS (actions), self);
+ if (workbench != NULL)
+ g_action_map_add_action_entries (G_ACTION_MAP (workbench), actions, G_N_ELEMENTS (actions), self);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]