[gnome-builder] command-bar: start porting to new libide changes
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] command-bar: start porting to new libide changes
- Date: Mon, 21 Dec 2015 07:47:11 +0000 (UTC)
commit 0c00e32e053611925e203eedf731b66298a74970
Author: Christian Hergert <chergert redhat com>
Date: Mon Nov 16 01:13:40 2015 -0800
command-bar: start porting to new libide changes
libide/ide.h | 5 ++-
plugins/command-bar/Makefile.am | 10 ------
plugins/command-bar/gb-command-bar.c | 6 ---
plugins/command-bar/gb-command-gaction-provider.c | 3 +-
plugins/command-bar/gb-command-gaction-provider.h | 2 +-
plugins/command-bar/gb-command-manager.c | 2 +-
plugins/command-bar/gb-command-provider.c | 35 ++++++++++-----------
plugins/command-bar/gb-command-provider.h | 9 ++---
plugins/command-bar/gb-command-vim-provider.c | 5 +--
plugins/command-bar/gb-vim.c | 11 +++---
10 files changed, 35 insertions(+), 53 deletions(-)
---
diff --git a/libide/ide.h b/libide/ide.h
index e441a3f..55402f5 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -57,8 +57,11 @@ G_BEGIN_DECLS
#include "ide-highlight-engine.h"
#include "ide-highlighter.h"
#include "ide-indenter.h"
-#include "ide-layout.h"
+#include "ide-layout-grid.h"
#include "ide-layout-pane.h"
+#include "ide-layout-stack.h"
+#include "ide-layout-view.h"
+#include "ide-layout.h"
#include "ide-log.h"
#include "ide-macros.h"
#include "ide-object.h"
diff --git a/plugins/command-bar/Makefile.am b/plugins/command-bar/Makefile.am
index 1b3850e..0cd730d 100644
--- a/plugins/command-bar/Makefile.am
+++ b/plugins/command-bar/Makefile.am
@@ -36,16 +36,6 @@ libcommand_bar_la_SOURCES = \
libcommand_bar_la_CFLAGS = \
-I$(top_srcdir)/libide \
- -I$(top_srcdir)/src/app \
- -I$(top_srcdir)/src/workspace \
- -I$(top_srcdir)/src/workbench \
- -I$(top_srcdir)/src/views \
- -I$(top_srcdir)/src/documents \
- -I$(top_srcdir)/src/editor \
- -I$(top_srcdir)/src/util \
- -I$(top_srcdir)/src \
- -I$(top_srcdir)/contrib/gd \
- -I$(top_srcdir)/contrib/nautilus \
$(BUILDER_CFLAGS) \
$(DEBUG_CFLAGS) \
$(OPTIMIZE_CFLAGS) \
diff --git a/plugins/command-bar/gb-command-bar.c b/plugins/command-bar/gb-command-bar.c
index e9823d6..78e6130 100644
--- a/plugins/command-bar/gb-command-bar.c
+++ b/plugins/command-bar/gb-command-bar.c
@@ -20,18 +20,12 @@
#include <ide.h>
#include <libpeas/peas.h>
-#include "gb-application.h"
#include "gb-command.h"
#include "gb-command-bar-resources.h"
#include "gb-command-bar.h"
#include "gb-command-gaction-provider.h"
#include "gb-command-manager.h"
#include "gb-command-vim-provider.h"
-#include "gb-glib.h"
-#include "gb-slider.h"
-#include "gb-string.h"
-#include "gb-view-stack.h"
-#include "gb-widget.h"
#include "ide-workbench.h"
#include "ide-workbench-addin.h"
diff --git a/plugins/command-bar/gb-command-gaction-provider.c
b/plugins/command-bar/gb-command-gaction-provider.c
index b9c26cb..af0da7e 100644
--- a/plugins/command-bar/gb-command-gaction-provider.c
+++ b/plugins/command-bar/gb-command-gaction-provider.c
@@ -26,7 +26,6 @@
#include "gb-command-gaction-provider.h"
#include "gb-command-gaction.h"
-#include "gb-view.h"
struct _GbCommandGactionProvider
{
@@ -120,7 +119,7 @@ show_prefix_actions (GObject *object)
}
GbCommandProvider *
-gb_command_gaction_provider_new (GbWorkbench *workbench)
+gb_command_gaction_provider_new (IdeWorkbench *workbench)
{
return g_object_new (GB_TYPE_COMMAND_GACTION_PROVIDER,
"workbench", workbench,
diff --git a/plugins/command-bar/gb-command-gaction-provider.h
b/plugins/command-bar/gb-command-gaction-provider.h
index aeb4e50..9da1518 100644
--- a/plugins/command-bar/gb-command-gaction-provider.h
+++ b/plugins/command-bar/gb-command-gaction-provider.h
@@ -28,7 +28,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GbCommandGactionProvider, gb_command_gaction_provider,
GB, COMMAND_GACTION_PROVIDER, GbCommandProvider)
-GbCommandProvider *gb_command_gaction_provider_new (GbWorkbench *workbench);
+GbCommandProvider *gb_command_gaction_provider_new (IdeWorkbench *workbench);
G_END_DECLS
diff --git a/plugins/command-bar/gb-command-manager.c b/plugins/command-bar/gb-command-manager.c
index 896ae7a..fa54259 100644
--- a/plugins/command-bar/gb-command-manager.c
+++ b/plugins/command-bar/gb-command-manager.c
@@ -18,10 +18,10 @@
#define G_LOG_DOMAIN "command-manager"
+#include <ide.h>
#include <string.h>
#include "gb-command-manager.h"
-#include "gb-workbench.h"
struct _GbCommandManager
{
diff --git a/plugins/command-bar/gb-command-provider.c b/plugins/command-bar/gb-command-provider.c
index b449cd9..7f8b2f6 100644
--- a/plugins/command-bar/gb-command-provider.c
+++ b/plugins/command-bar/gb-command-provider.c
@@ -19,13 +19,12 @@
#include <glib/gi18n.h>
#include "gb-command-provider.h"
-#include "gb-workbench.h"
typedef struct
{
- GbWorkbench *workbench;
- GbView *active_view;
- gint priority;
+ IdeWorkbench *workbench;
+ IdeLayoutView *active_view;
+ gint priority;
} GbCommandProviderPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (GbCommandProvider, gb_command_provider, G_TYPE_OBJECT)
@@ -48,7 +47,7 @@ static GParamSpec *properties [LAST_PROP];
static guint signals [LAST_SIGNAL];
GbCommandProvider *
-gb_command_provider_new (GbWorkbench *workbench)
+gb_command_provider_new (IdeWorkbench *workbench)
{
return g_object_new (GB_TYPE_COMMAND_PROVIDER,
"workbench", workbench,
@@ -61,9 +60,9 @@ gb_command_provider_new (GbWorkbench *workbench)
* Returns the "active-tab" property. The active-tab is the last tab that
* was focused in the workbench.
*
- * Returns: (transfer none): A #GbView or %NULL.
+ * Returns: (transfer none): A #IdeLayoutView or %NULL.
*/
-GbView *
+IdeLayoutView *
gb_command_provider_get_active_view (GbCommandProvider *provider)
{
GbCommandProviderPrivate *priv = gb_command_provider_get_instance_private (provider);
@@ -75,12 +74,12 @@ gb_command_provider_get_active_view (GbCommandProvider *provider)
static void
gb_command_provider_set_active_view (GbCommandProvider *provider,
- GbView *tab)
+ IdeLayoutView *tab)
{
GbCommandProviderPrivate *priv = gb_command_provider_get_instance_private (provider);
g_return_if_fail (GB_IS_COMMAND_PROVIDER (provider));
- g_return_if_fail (!tab || GB_IS_VIEW (tab));
+ g_return_if_fail (!tab || IDE_IS_LAYOUT_VIEW (tab));
if (priv->active_view)
{
@@ -103,7 +102,7 @@ gb_command_provider_set_active_view (GbCommandProvider *provider,
static void
on_workbench_set_focus (GbCommandProvider *provider,
GtkWidget *widget,
- GbWorkbench *workbench)
+ IdeWorkbench *workbench)
{
g_return_if_fail (GB_IS_COMMAND_PROVIDER (provider));
g_return_if_fail (GB_IS_WORKBENCH (workbench));
@@ -111,18 +110,18 @@ on_workbench_set_focus (GbCommandProvider *provider,
/* walk the hierarchy to find a tab */
if (widget)
- while (!GB_IS_VIEW (widget))
+ while (!IDE_IS_LAYOUT_VIEW (widget))
if (!(widget = gtk_widget_get_parent (widget)))
break;
- if (GB_IS_VIEW (widget))
+ if (IDE_IS_LAYOUT_VIEW (widget))
gb_command_provider_set_active_view (provider,
- GB_VIEW (widget));
+ IDE_LAYOUT_VIEW (widget));
}
static void
gb_command_provider_connect (GbCommandProvider *provider,
- GbWorkbench *workbench)
+ IdeWorkbench *workbench)
{
g_return_if_fail (GB_IS_COMMAND_PROVIDER (provider));
g_return_if_fail (GB_IS_WORKBENCH (workbench));
@@ -136,7 +135,7 @@ gb_command_provider_connect (GbCommandProvider *provider,
static void
gb_command_provider_disconnect (GbCommandProvider *provider,
- GbWorkbench *workbench)
+ IdeWorkbench *workbench)
{
g_return_if_fail (GB_IS_COMMAND_PROVIDER (provider));
g_return_if_fail (GB_IS_WORKBENCH (workbench));
@@ -146,7 +145,7 @@ gb_command_provider_disconnect (GbCommandProvider *provider,
provider);
}
-GbWorkbench *
+IdeWorkbench *
gb_command_provider_get_workbench (GbCommandProvider *provider)
{
GbCommandProviderPrivate *priv = gb_command_provider_get_instance_private (provider);
@@ -158,7 +157,7 @@ gb_command_provider_get_workbench (GbCommandProvider *provider)
static void
gb_command_provider_set_workbench (GbCommandProvider *provider,
- GbWorkbench *workbench)
+ IdeWorkbench *workbench)
{
GbCommandProviderPrivate *priv = gb_command_provider_get_instance_private (provider);
@@ -317,7 +316,7 @@ gb_command_provider_class_init (GbCommandProviderClass *klass)
properties [PROP_ACTIVE_VIEW] =
g_param_spec_object ("active-tab",
"Active View",
- "The last focused GbView widget.",
+ "The last focused IdeLayoutView widget.",
GB_TYPE_VIEW,
(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
diff --git a/plugins/command-bar/gb-command-provider.h b/plugins/command-bar/gb-command-provider.h
index f1ee95b..809621a 100644
--- a/plugins/command-bar/gb-command-provider.h
+++ b/plugins/command-bar/gb-command-provider.h
@@ -20,10 +20,9 @@
#define GB_COMMAND_PROVIDER_H
#include <gio/gio.h>
+#include <ide.h>
#include "gb-command.h"
-#include "gb-view.h"
-#include "gb-workbench-types.h"
G_BEGIN_DECLS
@@ -42,9 +41,9 @@ struct _GbCommandProviderClass
const gchar *command_text);
};
-GbCommandProvider *gb_command_provider_new (GbWorkbench *workbench);
-GbWorkbench *gb_command_provider_get_workbench (GbCommandProvider *provider);
-GbView *gb_command_provider_get_active_view (GbCommandProvider *provider);
+GbCommandProvider *gb_command_provider_new (IdeWorkbench *workbench);
+IdeWorkbench *gb_command_provider_get_workbench (GbCommandProvider *provider);
+IdeLayoutView *gb_command_provider_get_active_view (GbCommandProvider *provider);
gint gb_command_provider_get_priority (GbCommandProvider *provider);
void gb_command_provider_set_priority (GbCommandProvider *provider,
gint priority);
diff --git a/plugins/command-bar/gb-command-vim-provider.c b/plugins/command-bar/gb-command-vim-provider.c
index e12484a..a59b7aa 100644
--- a/plugins/command-bar/gb-command-vim-provider.c
+++ b/plugins/command-bar/gb-command-vim-provider.c
@@ -27,7 +27,6 @@
#include "gb-editor-view.h"
#include "gb-editor-view-private.h"
#include "gb-vim.h"
-#include "gb-workbench.h"
struct _GbCommandVimProvider
{
@@ -39,8 +38,8 @@ G_DEFINE_TYPE (GbCommandVimProvider, gb_command_vim_provider, GB_TYPE_COMMAND_PR
GtkWidget *
get_source_view (GbCommandProvider *provider)
{
- GbWorkbench *workbench;
- GbView *active_view;
+ IdeWorkbench *workbench;
+ IdeLayoutView *active_view;
IdeSourceView *source_view;
g_assert (GB_IS_COMMAND_VIM_PROVIDER (provider));
diff --git a/plugins/command-bar/gb-vim.c b/plugins/command-bar/gb-vim.c
index 28741d2..300e15e 100644
--- a/plugins/command-bar/gb-vim.c
+++ b/plugins/command-bar/gb-vim.c
@@ -25,7 +25,6 @@
#include "gb-string.h"
#include "gb-vim.h"
#include "gb-widget.h"
-#include "gb-workbench.h"
G_DEFINE_QUARK (gb-vim-error-quark, gb_vim_error)
@@ -400,7 +399,7 @@ gb_vim_command_edit (GtkSourceView *source_view,
const gchar *options,
GError **error)
{
- GbWorkbench *workbench;
+ IdeWorkbench *workbench;
IdeContext *context;
IdeVcs *vcs;
GFile *workdir;
@@ -413,7 +412,7 @@ gb_vim_command_edit (GtkSourceView *source_view,
}
if (!(workbench = gb_widget_get_workbench (GTK_WIDGET (source_view))) ||
- !(context = gb_workbench_get_context (workbench)) ||
+ !(context = ide_workbench_get_context (workbench)) ||
!(vcs = ide_context_get_vcs (context)) ||
!(workdir = ide_vcs_get_working_directory (vcs)))
{
@@ -429,7 +428,7 @@ gb_vim_command_edit (GtkSourceView *source_view,
else
file = g_file_get_child (workdir, options);
- gb_workbench_open (workbench, file);
+ ide_workbench_open (workbench, file);
g_clear_object (&file);
@@ -1076,7 +1075,7 @@ gb_vim_complete_edit_files (GtkSourceView *source_view,
GPtrArray *ar,
const gchar *prefix)
{
- GbWorkbench *workbench;
+ IdeWorkbench *workbench;
IdeContext *context;
IdeVcs *vcs;
GFile *workdir;
@@ -1090,7 +1089,7 @@ gb_vim_complete_edit_files (GtkSourceView *source_view,
g_assert (prefix);
if (!(workbench = gb_widget_get_workbench (GTK_WIDGET (source_view))) ||
- !(context = gb_workbench_get_context (workbench)) ||
+ !(context = ide_workbench_get_context (workbench)) ||
!(vcs = ide_context_get_vcs (context)) ||
!(workdir = ide_vcs_get_working_directory (vcs)))
IDE_EXIT;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]