[gnome-builder] command bar: better discovering of commands
- From: Sebastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] command bar: better discovering of commands
- Date: Wed, 29 Apr 2015 20:54:37 +0000 (UTC)
commit 8058e986988b333d4cb475d1437d505dcef1f918
Author: Sebastien Lafargue <slafargue gnome org>
Date: Mon Apr 27 09:58:17 2015 +0200
command bar: better discovering of commands
Actualy, we use two providers for discover the commands
but the GAction provider gives us too much commands
with duplicates, so we need to filter it better.
https://bugzilla.gnome.org/show_bug.cgi?id=748652
src/commands/gb-command-gaction-provider.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/commands/gb-command-gaction-provider.c b/src/commands/gb-command-gaction-provider.c
index 0d77ce4..90ebd63 100644
--- a/src/commands/gb-command-gaction-provider.c
+++ b/src/commands/gb-command-gaction-provider.c
@@ -21,6 +21,9 @@
#include <ide.h>
#include <string.h>
+#include "gb-editor-workspace.h"
+#include "gb-editor-view.h"
+
#include "gb-command-gaction-provider.h"
#include "gb-command-gaction.h"
#include "gb-view.h"
@@ -43,6 +46,7 @@ discover_groups (GbCommandGactionProvider *provider)
GbWorkbench *workbench;
GtkWidget *widget;
GList *list = NULL;
+ gint type;
g_return_val_if_fail (GB_IS_COMMAND_GACTION_PROVIDER (provider), NULL);
@@ -55,6 +59,11 @@ discover_groups (GbCommandGactionProvider *provider)
const gchar **prefixes;
guint i;
+ /* We exclude these types, they're already in the widgets hierarchy */
+ type = G_OBJECT_TYPE (widget);
+ if (type == GB_TYPE_EDITOR_WORKSPACE || type == GB_TYPE_EDITOR_VIEW)
+ continue;
+
prefixes = gtk_widget_list_action_prefixes (widget);
if (prefixes)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]