[gnome-builder] terminal: better addin naming
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] terminal: better addin naming
- Date: Sat, 20 Jun 2015 09:39:04 +0000 (UTC)
commit 04783adc1a918cc25f4ad34582eba90d41090404
Author: Christian Hergert <christian hergert me>
Date: Tue Jun 9 16:58:20 2015 -0700
terminal: better addin naming
This matches better with the addin they are implementing.
plugins/terminal/Makefile.am | 4 +-
plugins/terminal/gb-terminal-plugin.c | 5 +-
...minal-addin.c => gb-terminal-workbench-addin.c} | 44 ++++++++++----------
...minal-addin.h => gb-terminal-workbench-addin.h} | 6 ++-
4 files changed, 30 insertions(+), 29 deletions(-)
---
diff --git a/plugins/terminal/Makefile.am b/plugins/terminal/Makefile.am
index 588c6b2..08406a4 100644
--- a/plugins/terminal/Makefile.am
+++ b/plugins/terminal/Makefile.am
@@ -8,11 +8,11 @@ noinst_LTLIBRARIES = libterminal.la
libterminal_la_SOURCES = \
gb-terminal.c \
gb-terminal.h \
- gb-terminal-addin.c \
- gb-terminal-addin.h \
gb-terminal-application-addin.c \
gb-terminal-application-addin.h \
gb-terminal-plugin.c \
+ gb-terminal-workbench-addin.c \
+ gb-terminal-workbench-addin.h \
$(NULL)
nodist_libterminal_la_SOURCES = \
diff --git a/plugins/terminal/gb-terminal-plugin.c b/plugins/terminal/gb-terminal-plugin.c
index e8ebce0..564a6b2 100644
--- a/plugins/terminal/gb-terminal-plugin.c
+++ b/plugins/terminal/gb-terminal-plugin.c
@@ -18,13 +18,12 @@
#include "gb-application-addin.h"
#include "gb-plugins.h"
-#include "gb-terminal-addin.h"
#include "gb-terminal-application-addin.h"
#include "gb-terminal-resources.h"
-#include "gb-workbench-addin.h"
+#include "gb-terminal-workbench-addin.h"
GB_DEFINE_EMBEDDED_PLUGIN (gb_terminal,
gb_terminal_get_resource (),
"resource:///org/gnome/builder/plugins/terminal/gb-terminal.plugin",
GB_DEFINE_PLUGIN_TYPE (GB_TYPE_APPLICATION_ADDIN,
GB_TYPE_TERMINAL_APPLICATION_ADDIN)
- GB_DEFINE_PLUGIN_TYPE (GB_TYPE_WORKBENCH_ADDIN, GB_TYPE_TERMINAL_ADDIN))
+ GB_DEFINE_PLUGIN_TYPE (GB_TYPE_WORKBENCH_ADDIN, GB_TYPE_TERMINAL_WORKBENCH_ADDIN))
diff --git a/plugins/terminal/gb-terminal-addin.c b/plugins/terminal/gb-terminal-workbench-addin.c
similarity index 76%
rename from plugins/terminal/gb-terminal-addin.c
rename to plugins/terminal/gb-terminal-workbench-addin.c
index 6f561c5..abf28da 100644
--- a/plugins/terminal/gb-terminal-addin.c
+++ b/plugins/terminal/gb-terminal-workbench-addin.c
@@ -19,11 +19,11 @@
#include <glib/gi18n.h>
#include "gb-terminal.h"
-#include "gb-terminal-addin.h"
+#include "gb-terminal-workbench-addin.h"
#include "gb-view-grid.h"
#include "gb-workspace.h"
-struct _GbTerminalAddin
+struct _GbTerminalWorkbenchAddin
{
GObject parent_instance;
@@ -33,7 +33,7 @@ struct _GbTerminalAddin
static void workbench_addin_iface_init (GbWorkbenchAddinInterface *iface);
-G_DEFINE_TYPE_WITH_CODE (GbTerminalAddin, gb_terminal_addin, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (GbTerminalWorkbenchAddin, gb_terminal_workbench_addin, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GB_TYPE_WORKBENCH_ADDIN,
workbench_addin_iface_init))
@@ -48,14 +48,14 @@ static GParamSpec *gParamSpecs [LAST_PROP];
static void
new_terminal_activate_cb (GSimpleAction *action,
GVariant *param,
- GbTerminalAddin *self)
+ GbTerminalWorkbenchAddin *self)
{
GtkWidget *terminal;
GtkWidget *grid;
GtkWidget *stack;
g_assert (G_IS_SIMPLE_ACTION (action));
- g_assert (GB_IS_TERMINAL_ADDIN (self));
+ g_assert (GB_IS_TERMINAL_WORKBENCH_ADDIN (self));
grid = gb_workbench_get_view_grid (self->workbench);
terminal = g_object_new (GB_TYPE_TERMINAL,
@@ -67,14 +67,14 @@ new_terminal_activate_cb (GSimpleAction *action,
}
static void
-gb_terminal_addin_load (GbWorkbenchAddin *addin)
+gb_terminal_workbench_addin_load (GbWorkbenchAddin *addin)
{
- GbTerminalAddin *self = (GbTerminalAddin *)addin;
+ GbTerminalWorkbenchAddin *self = (GbTerminalWorkbenchAddin *)addin;
GbWorkspace *workspace;
GtkWidget *bottom_pane;
g_autoptr(GSimpleAction) action = NULL;
- g_assert (GB_IS_TERMINAL_ADDIN (self));
+ g_assert (GB_IS_TERMINAL_WORKBENCH_ADDIN (self));
g_assert (GB_IS_WORKBENCH (self->workbench));
action = g_simple_action_new ("new-terminal", NULL);
@@ -103,11 +103,11 @@ gb_terminal_addin_load (GbWorkbenchAddin *addin)
}
static void
-gb_terminal_addin_unload (GbWorkbenchAddin *addin)
+gb_terminal_workbench_addin_unload (GbWorkbenchAddin *addin)
{
- GbTerminalAddin *self = (GbTerminalAddin *)addin;
+ GbTerminalWorkbenchAddin *self = (GbTerminalWorkbenchAddin *)addin;
- g_assert (GB_IS_TERMINAL_ADDIN (self));
+ g_assert (GB_IS_TERMINAL_WORKBENCH_ADDIN (self));
g_action_map_remove_action (G_ACTION_MAP (self->workbench), "new-terminal");
@@ -121,22 +121,22 @@ gb_terminal_addin_unload (GbWorkbenchAddin *addin)
}
static void
-gb_terminal_addin_finalize (GObject *object)
+gb_terminal_workbench_addin_finalize (GObject *object)
{
- GbTerminalAddin *self = (GbTerminalAddin *)object;
+ GbTerminalWorkbenchAddin *self = (GbTerminalWorkbenchAddin *)object;
ide_clear_weak_pointer (&self->workbench);
- G_OBJECT_CLASS (gb_terminal_addin_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gb_terminal_workbench_addin_parent_class)->finalize (object);
}
static void
-gb_terminal_addin_set_property (GObject *object,
+gb_terminal_workbench_addin_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- GbTerminalAddin *self = GB_TERMINAL_ADDIN (object);
+ GbTerminalWorkbenchAddin *self = GB_TERMINAL_WORKBENCH_ADDIN (object);
switch (prop_id)
{
@@ -150,12 +150,12 @@ gb_terminal_addin_set_property (GObject *object,
}
static void
-gb_terminal_addin_class_init (GbTerminalAddinClass *klass)
+gb_terminal_workbench_addin_class_init (GbTerminalWorkbenchAddinClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = gb_terminal_addin_finalize;
- object_class->set_property = gb_terminal_addin_set_property;
+ object_class->finalize = gb_terminal_workbench_addin_finalize;
+ object_class->set_property = gb_terminal_workbench_addin_set_property;
gParamSpecs [PROP_WORKBENCH] =
g_param_spec_object ("workbench",
@@ -168,13 +168,13 @@ gb_terminal_addin_class_init (GbTerminalAddinClass *klass)
}
static void
-gb_terminal_addin_init (GbTerminalAddin *self)
+gb_terminal_workbench_addin_init (GbTerminalWorkbenchAddin *self)
{
}
static void
workbench_addin_iface_init (GbWorkbenchAddinInterface *iface)
{
- iface->load = gb_terminal_addin_load;
- iface->unload = gb_terminal_addin_unload;
+ iface->load = gb_terminal_workbench_addin_load;
+ iface->unload = gb_terminal_workbench_addin_unload;
}
diff --git a/plugins/terminal/gb-terminal-addin.h b/plugins/terminal/gb-terminal-workbench-addin.h
similarity index 78%
rename from plugins/terminal/gb-terminal-addin.h
rename to plugins/terminal/gb-terminal-workbench-addin.h
index 2c26317..c23b4f4 100644
--- a/plugins/terminal/gb-terminal-addin.h
+++ b/plugins/terminal/gb-terminal-workbench-addin.h
@@ -23,9 +23,11 @@
G_BEGIN_DECLS
-#define GB_TYPE_TERMINAL_ADDIN (gb_terminal_addin_get_type())
+#define GB_TYPE_TERMINAL_WORKBENCH_ADDIN (gb_terminal_workbench_addin_get_type())
-G_DECLARE_FINAL_TYPE (GbTerminalAddin, gb_terminal_addin, GB, TERMINAL_ADDIN, GObject)
+G_DECLARE_FINAL_TYPE (GbTerminalWorkbenchAddin, gb_terminal_workbench_addin,
+ GB, TERMINAL_WORKBENCH_ADDIN,
+ GObject)
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]