[gnome-builder/wip/tintou/sysroot: 24/28] sysroot: rename IdeSysroot* to GbpSysroot
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/tintou/sysroot: 24/28] sysroot: rename IdeSysroot* to GbpSysroot
- Date: Thu, 15 Mar 2018 14:48:27 +0000 (UTC)
commit bffd9dd7f48a81c3ce1ba234f6f8e5dd5663c482
Author: Corentin Noël <corentin noel collabora co uk>
Date: Thu Feb 22 14:08:48 2018 +0000
sysroot: rename IdeSysroot* to GbpSysroot
The GNOME Builder Plugins namespace is here for plugins
...ide-sysroot-manager.c => gbp-sysroot-manager.c} | 78 +++++++-------
...ide-sysroot-manager.h => gbp-sysroot-manager.h} | 36 +++----
...ces-addin.c => gbp-sysroot-preferences-addin.c} | 58 +++++------
...ces-addin.h => gbp-sysroot-preferences-addin.h} | 6 +-
...erences-row.c => gbp-sysroot-preferences-row.c} | 116 ++++++++++-----------
...erences-row.h => gbp-sysroot-preferences-row.h} | 8 +-
...ences-row.ui => gbp-sysroot-preferences-row.ui} | 2 +-
...e-provider.c => gbp-sysroot-runtime-provider.c} | 66 ++++++------
...e-provider.h => gbp-sysroot-runtime-provider.h} | 6 +-
...ide-sysroot-runtime.c => gbp-sysroot-runtime.c} | 62 +++++------
...ide-sysroot-runtime.h => gbp-sysroot-runtime.h} | 12 +--
...auncher.c => gbp-sysroot-subprocess-launcher.c} | 36 +++----
...auncher.h => gbp-sysroot-subprocess-launcher.h} | 8 +-
src/plugins/sysroot/meson.build | 26 ++---
src/plugins/sysroot/sysroot-plugin.c | 10 +-
src/plugins/sysroot/sysroot.gresource.xml | 2 +-
src/plugins/sysroot/sysroot.plugin | 2 +-
17 files changed, 267 insertions(+), 267 deletions(-)
---
diff --git a/src/plugins/sysroot/ide-sysroot-manager.c b/src/plugins/sysroot/gbp-sysroot-manager.c
similarity index 74%
rename from src/plugins/sysroot/ide-sysroot-manager.c
rename to src/plugins/sysroot/gbp-sysroot-manager.c
index 92647340f..f7cf02ef0 100644
--- a/src/plugins/sysroot/ide-sysroot-manager.c
+++ b/src/plugins/sysroot/gbp-sysroot-manager.c
@@ -1,4 +1,4 @@
-/* ide-sysroot-manager.c
+/* gbp-sysroot-manager.c
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -17,15 +17,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ide-sysroot-manager.h"
+#include "gbp-sysroot-manager.h"
-struct _IdeSysrootManager
+struct _GbpSysrootManager
{
GObject parent_instance;
GKeyFile *key_file;
};
-G_DEFINE_TYPE (IdeSysrootManager, ide_sysroot_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GbpSysrootManager, gbp_sysroot_manager, G_TYPE_OBJECT)
enum {
TARGET_MODIFIED,
@@ -52,12 +52,12 @@ sysroot_manager_get_path (void)
}
static void
-sysroot_manager_save (IdeSysrootManager *self)
+sysroot_manager_save (GbpSysrootManager *self)
{
g_autofree gchar *conf_file = NULL;
g_autoptr(GError) error = NULL;
- g_assert (IDE_IS_SYSROOT_MANAGER (self));
+ g_assert (GBP_IS_SYSROOT_MANAGER (self));
g_assert (self->key_file != NULL);
conf_file = sysroot_manager_get_path ();
@@ -66,22 +66,22 @@ sysroot_manager_save (IdeSysrootManager *self)
g_critical ("Error loading the sysroot configuration: %s", error->message);
}
-IdeSysrootManager *
-ide_sysroot_manager_get_default (void)
+GbpSysrootManager *
+gbp_sysroot_manager_get_default (void)
{
- static IdeSysrootManager *instance;
+ static GbpSysrootManager *instance;
if (instance == NULL)
{
- instance = g_object_new (IDE_TYPE_SYSROOT_MANAGER, NULL);
+ instance = g_object_new (GBP_TYPE_SYSROOT_MANAGER, NULL);
}
return instance;
}
gchar *
-ide_sysroot_manager_create_target (IdeSysrootManager *self)
+gbp_sysroot_manager_create_target (GbpSysrootManager *self)
{
- g_return_val_if_fail (IDE_IS_SYSROOT_MANAGER (self), NULL);
+ g_return_val_if_fail (GBP_IS_SYSROOT_MANAGER (self), NULL);
g_return_val_if_fail (self->key_file != NULL, NULL);
for (guint i = 0; i < UINT_MAX; i++)
@@ -96,7 +96,7 @@ ide_sysroot_manager_create_target (IdeSysrootManager *self)
g_key_file_set_string (self->key_file, result, "Name", result);
g_key_file_set_string (self->key_file, result, "Path", "/");
sysroot_manager_save (self);
- g_signal_emit (self, signals[TARGET_MODIFIED], 0, result, IDE_SYSROOT_MANAGER_TARGET_CREATED);
+ g_signal_emit (self, signals[TARGET_MODIFIED], 0, result, GBP_SYSROOT_MANAGER_TARGET_CREATED);
return g_string_free (g_steal_pointer (&sysroot_name), FALSE);
}
}
@@ -105,12 +105,12 @@ ide_sysroot_manager_create_target (IdeSysrootManager *self)
}
void
-ide_sysroot_manager_remove_target (IdeSysrootManager *self,
+gbp_sysroot_manager_remove_target (GbpSysrootManager *self,
const gchar *target)
{
g_autoptr(GError) error = NULL;
- g_return_if_fail (IDE_IS_SYSROOT_MANAGER (self));
+ g_return_if_fail (GBP_IS_SYSROOT_MANAGER (self));
g_return_if_fail (self->key_file != NULL);
g_return_if_fail (target != NULL);
@@ -118,30 +118,30 @@ ide_sysroot_manager_remove_target (IdeSysrootManager *self,
if (error)
g_critical ("Error removing target \"%s\": %s", target, error->message);
- g_signal_emit (self, signals[TARGET_MODIFIED], 0, target, IDE_SYSROOT_MANAGER_TARGET_REMOVED);
+ g_signal_emit (self, signals[TARGET_MODIFIED], 0, target, GBP_SYSROOT_MANAGER_TARGET_REMOVED);
sysroot_manager_save (self);
}
void
-ide_sysroot_manager_set_target_name (IdeSysrootManager *self,
+gbp_sysroot_manager_set_target_name (GbpSysrootManager *self,
const gchar *target,
const gchar *name)
{
- g_return_if_fail (IDE_IS_SYSROOT_MANAGER (self));
+ g_return_if_fail (GBP_IS_SYSROOT_MANAGER (self));
g_return_if_fail (self->key_file != NULL);
g_return_if_fail (target != NULL);
g_key_file_set_string (self->key_file, target, "Name", name);
- g_signal_emit (self, signals[TARGET_MODIFIED], 0, target, IDE_SYSROOT_MANAGER_TARGET_CHANGED);
+ g_signal_emit (self, signals[TARGET_MODIFIED], 0, target, GBP_SYSROOT_MANAGER_TARGET_CHANGED);
g_signal_emit (self, signals[TARGET_NAME_CHANGED], 0, target, name);
sysroot_manager_save (self);
}
gchar *
-ide_sysroot_manager_get_target_name (IdeSysrootManager *self,
+gbp_sysroot_manager_get_target_name (GbpSysrootManager *self,
const gchar *target)
{
- g_return_val_if_fail (IDE_IS_SYSROOT_MANAGER (self), NULL);
+ g_return_val_if_fail (GBP_IS_SYSROOT_MANAGER (self), NULL);
g_return_val_if_fail (self->key_file != NULL, NULL);
g_return_val_if_fail (target != NULL, NULL);
@@ -149,24 +149,24 @@ ide_sysroot_manager_get_target_name (IdeSysrootManager *self,
}
void
-ide_sysroot_manager_set_target_path (IdeSysrootManager *self,
+gbp_sysroot_manager_set_target_path (GbpSysrootManager *self,
const gchar *target,
const gchar *path)
{
- g_return_if_fail (IDE_IS_SYSROOT_MANAGER (self));
+ g_return_if_fail (GBP_IS_SYSROOT_MANAGER (self));
g_return_if_fail (self->key_file != NULL);
g_return_if_fail (target != NULL);
g_key_file_set_string (self->key_file, target, "Path", path);
- g_signal_emit (self, signals[TARGET_MODIFIED], 0, target, IDE_SYSROOT_MANAGER_TARGET_CHANGED);
+ g_signal_emit (self, signals[TARGET_MODIFIED], 0, target, GBP_SYSROOT_MANAGER_TARGET_CHANGED);
sysroot_manager_save (self);
}
gchar *
-ide_sysroot_manager_get_target_path (IdeSysrootManager *self,
+gbp_sysroot_manager_get_target_path (GbpSysrootManager *self,
const gchar *target)
{
- g_return_val_if_fail (IDE_IS_SYSROOT_MANAGER (self), NULL);
+ g_return_val_if_fail (GBP_IS_SYSROOT_MANAGER (self), NULL);
g_return_val_if_fail (self->key_file != NULL, NULL);
g_return_val_if_fail (target != NULL, NULL);
@@ -174,24 +174,24 @@ ide_sysroot_manager_get_target_path (IdeSysrootManager *self,
}
void
-ide_sysroot_manager_set_target_pkg_config_path (IdeSysrootManager *self,
+gbp_sysroot_manager_set_target_pkg_config_path (GbpSysrootManager *self,
const gchar *target,
const gchar *path)
{
- g_return_if_fail (IDE_IS_SYSROOT_MANAGER (self));
+ g_return_if_fail (GBP_IS_SYSROOT_MANAGER (self));
g_return_if_fail (self->key_file != NULL);
g_return_if_fail (target != NULL);
g_key_file_set_string (self->key_file, target, "PkgConfigPath", path);
- g_signal_emit (self, signals[TARGET_MODIFIED], 0, target, IDE_SYSROOT_MANAGER_TARGET_CHANGED);
+ g_signal_emit (self, signals[TARGET_MODIFIED], 0, target, GBP_SYSROOT_MANAGER_TARGET_CHANGED);
sysroot_manager_save (self);
}
gchar *
-ide_sysroot_manager_get_target_pkg_config_path (IdeSysrootManager *self,
+gbp_sysroot_manager_get_target_pkg_config_path (GbpSysrootManager *self,
const gchar *target)
{
- g_return_val_if_fail (IDE_IS_SYSROOT_MANAGER (self), NULL);
+ g_return_val_if_fail (GBP_IS_SYSROOT_MANAGER (self), NULL);
g_return_val_if_fail (self->key_file != NULL, NULL);
g_return_val_if_fail (target != NULL, NULL);
@@ -199,28 +199,28 @@ ide_sysroot_manager_get_target_pkg_config_path (IdeSysrootManager *self,
}
gchar **
-ide_sysroot_manager_list (IdeSysrootManager *self)
+gbp_sysroot_manager_list (GbpSysrootManager *self)
{
- g_return_val_if_fail (IDE_IS_SYSROOT_MANAGER (self), NULL);
+ g_return_val_if_fail (GBP_IS_SYSROOT_MANAGER (self), NULL);
g_return_val_if_fail (self->key_file != NULL, NULL);
return g_key_file_get_groups (self->key_file, NULL);
}
void
-ide_sysroot_manager_finalize (GObject *object)
+gbp_sysroot_manager_finalize (GObject *object)
{
- IdeSysrootManager *self = IDE_SYSROOT_MANAGER(object);
+ GbpSysrootManager *self = GBP_SYSROOT_MANAGER(object);
g_clear_pointer (&self->key_file, g_key_file_free);
- G_OBJECT_CLASS (ide_sysroot_manager_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gbp_sysroot_manager_parent_class)->finalize (object);
}
void
-ide_sysroot_manager_class_init (IdeSysrootManagerClass *klass)
+gbp_sysroot_manager_class_init (GbpSysrootManagerClass *klass)
{
- G_OBJECT_CLASS (klass)->finalize = ide_sysroot_manager_finalize;
+ G_OBJECT_CLASS (klass)->finalize = gbp_sysroot_manager_finalize;
signals [TARGET_MODIFIED] =
g_signal_new_class_handler ("target-changed",
@@ -244,7 +244,7 @@ ide_sysroot_manager_class_init (IdeSysrootManagerClass *klass)
}
static void
-ide_sysroot_manager_init (IdeSysrootManager *self)
+gbp_sysroot_manager_init (GbpSysrootManager *self)
{
gchar *conf_file = NULL;
g_autoptr(GError) error = NULL;
diff --git a/src/plugins/sysroot/ide-sysroot-manager.h b/src/plugins/sysroot/gbp-sysroot-manager.h
similarity index 59%
rename from src/plugins/sysroot/ide-sysroot-manager.h
rename to src/plugins/sysroot/gbp-sysroot-manager.h
index 935b13068..eceac01fa 100644
--- a/src/plugins/sysroot/ide-sysroot-manager.h
+++ b/src/plugins/sysroot/gbp-sysroot-manager.h
@@ -1,4 +1,4 @@
-/* ide-sysroot-manager.h
+/* gbp-sysroot-manager.h
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -23,35 +23,35 @@
G_BEGIN_DECLS
-#define IDE_TYPE_SYSROOT_MANAGER (ide_sysroot_manager_get_type())
+#define GBP_TYPE_SYSROOT_MANAGER (gbp_sysroot_manager_get_type())
-G_DECLARE_FINAL_TYPE (IdeSysrootManager, ide_sysroot_manager, IDE, SYSROOT_MANAGER, GObject)
+G_DECLARE_FINAL_TYPE (GbpSysrootManager, gbp_sysroot_manager, GBP, SYSROOT_MANAGER, GObject)
typedef enum {
- IDE_SYSROOT_MANAGER_TARGET_CHANGED,
- IDE_SYSROOT_MANAGER_TARGET_CREATED,
- IDE_SYSROOT_MANAGER_TARGET_REMOVED
-} IdeSysrootManagerTargetModificationType;
-
-IdeSysrootManager *ide_sysroot_manager_get_default (void);
-gchar *ide_sysroot_manager_create_target (IdeSysrootManager *self);
-void ide_sysroot_manager_remove_target (IdeSysrootManager *self,
+ GBP_SYSROOT_MANAGER_TARGET_CHANGED,
+ GBP_SYSROOT_MANAGER_TARGET_CREATED,
+ GBP_SYSROOT_MANAGER_TARGET_REMOVED
+} GbpSysrootManagerTargetModificationType;
+
+GbpSysrootManager *gbp_sysroot_manager_get_default (void);
+gchar *gbp_sysroot_manager_create_target (GbpSysrootManager *self);
+void gbp_sysroot_manager_remove_target (GbpSysrootManager *self,
const gchar *target);
-void ide_sysroot_manager_set_target_name (IdeSysrootManager *self,
+void gbp_sysroot_manager_set_target_name (GbpSysrootManager *self,
const gchar *target,
const gchar *path);
-gchar *ide_sysroot_manager_get_target_name (IdeSysrootManager *self,
+gchar *gbp_sysroot_manager_get_target_name (GbpSysrootManager *self,
const gchar *target);
-void ide_sysroot_manager_set_target_path (IdeSysrootManager *self,
+void gbp_sysroot_manager_set_target_path (GbpSysrootManager *self,
const gchar *target,
const gchar *path);
-gchar *ide_sysroot_manager_get_target_path (IdeSysrootManager *self,
+gchar *gbp_sysroot_manager_get_target_path (GbpSysrootManager *self,
const gchar *target);
-void ide_sysroot_manager_set_target_pkg_config_path (IdeSysrootManager *self,
+void gbp_sysroot_manager_set_target_pkg_config_path (GbpSysrootManager *self,
const gchar *target,
const gchar *path);
-gchar *ide_sysroot_manager_get_target_pkg_config_path (IdeSysrootManager *self,
+gchar *gbp_sysroot_manager_get_target_pkg_config_path (GbpSysrootManager *self,
const gchar *target);
-gchar **ide_sysroot_manager_list (IdeSysrootManager *self);
+gchar **gbp_sysroot_manager_list (GbpSysrootManager *self);
G_END_DECLS
diff --git a/src/plugins/sysroot/ide-sysroot-preferences-addin.c
b/src/plugins/sysroot/gbp-sysroot-preferences-addin.c
similarity index 76%
rename from src/plugins/sysroot/ide-sysroot-preferences-addin.c
rename to src/plugins/sysroot/gbp-sysroot-preferences-addin.c
index d6fe339f1..607340ab4 100644
--- a/src/plugins/sysroot/ide-sysroot-preferences-addin.c
+++ b/src/plugins/sysroot/gbp-sysroot-preferences-addin.c
@@ -1,4 +1,4 @@
-/* ide-sysroot-preferences.c
+/* gbp-sysroot-preferences.c
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -17,15 +17,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-sysroot-preferences-addin"
+#define G_LOG_DOMAIN "gbp-sysroot-preferences-addin"
#include <glib/gi18n.h>
-#include "ide-sysroot-preferences-addin.h"
-#include "ide-sysroot-preferences-row.h"
-#include "ide-sysroot-manager.h"
+#include "gbp-sysroot-preferences-addin.h"
+#include "gbp-sysroot-preferences-row.h"
+#include "gbp-sysroot-manager.h"
-struct _IdeSysrootPreferencesAddin
+struct _GbpSysrootPreferencesAddin
{
GObject parent_instance;
@@ -34,20 +34,20 @@ struct _IdeSysrootPreferencesAddin
};
static void
-sysroot_preferences_add_new (IdeSysrootPreferencesAddin *self,
+sysroot_preferences_add_new (GbpSysrootPreferencesAddin *self,
GtkWidget *emitter)
{
GtkWidget *pref_row = NULL;
guint id = 0;
g_autofree gchar *new_target;
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
- g_assert (IDE_IS_SYSROOT_PREFERENCES_ADDIN (self));
+ g_assert (GBP_IS_SYSROOT_PREFERENCES_ADDIN (self));
g_assert (DZL_IS_PREFERENCES_BIN (emitter));
- sysroot_manager = ide_sysroot_manager_get_default ();
- new_target = ide_sysroot_manager_create_target (sysroot_manager);
- pref_row = g_object_new (IDE_TYPE_SYSROOT_PREFERENCES_ROW,
+ sysroot_manager = gbp_sysroot_manager_get_default ();
+ new_target = gbp_sysroot_manager_create_target (sysroot_manager);
+ pref_row = g_object_new (GBP_TYPE_SYSROOT_PREFERENCES_ROW,
"visible", TRUE,
"sysroot-id", new_target,
NULL);
@@ -55,11 +55,11 @@ sysroot_preferences_add_new (IdeSysrootPreferencesAddin *self,
id = dzl_preferences_add_custom (self->preferences, "sdk", "sysroot", pref_row, "", 1);
g_array_append_val (self->ids, id);
- ide_sysroot_preferences_row_show_popup (IDE_SYSROOT_PREFERENCES_ROW (pref_row));
+ gbp_sysroot_preferences_row_show_popup (GBP_SYSROOT_PREFERENCES_ROW (pref_row));
}
static GtkWidget *
-sysroot_preferences_get_add_widget (IdeSysrootPreferencesAddin *self)
+sysroot_preferences_get_add_widget (GbpSysrootPreferencesAddin *self)
{
GtkWidget *bin = NULL;
GtkWidget *grid = NULL;
@@ -114,19 +114,19 @@ sysroot_preferences_get_add_widget (IdeSysrootPreferencesAddin *self)
}
static void
-ide_sysroot_preferences_addin_load (IdePreferencesAddin *addin,
+gbp_sysroot_preferences_addin_load (IdePreferencesAddin *addin,
DzlPreferences *preferences)
{
- IdeSysrootPreferencesAddin *self = (IdeSysrootPreferencesAddin *)addin;
+ GbpSysrootPreferencesAddin *self = (GbpSysrootPreferencesAddin *)addin;
GtkWidget *widget = NULL;
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
g_auto(GStrv) sysroots = NULL;
guint sysroots_length = 0;
guint id = 0;
IDE_ENTRY;
- g_assert (IDE_IS_SYSROOT_PREFERENCES_ADDIN (self));
+ g_assert (GBP_IS_SYSROOT_PREFERENCES_ADDIN (self));
g_assert (DZL_IS_PREFERENCES (preferences));
self->ids = g_array_new (FALSE, FALSE, sizeof (guint));
@@ -139,12 +139,12 @@ ide_sysroot_preferences_addin_load (IdePreferencesAddin *addin,
g_array_append_val (self->ids, id);
- sysroot_manager = ide_sysroot_manager_get_default ();
- sysroots = ide_sysroot_manager_list (sysroot_manager);
+ sysroot_manager = gbp_sysroot_manager_get_default ();
+ sysroots = gbp_sysroot_manager_list (sysroot_manager);
sysroots_length = g_strv_length (sysroots);
for (guint i = 0; i < sysroots_length; i++)
{
- GtkWidget *pref_row = g_object_new (IDE_TYPE_SYSROOT_PREFERENCES_ROW,
+ GtkWidget *pref_row = g_object_new (GBP_TYPE_SYSROOT_PREFERENCES_ROW,
"visible", TRUE,
"sysroot-id", sysroots[i],
NULL);
@@ -157,14 +157,14 @@ ide_sysroot_preferences_addin_load (IdePreferencesAddin *addin,
}
static void
-ide_sysroot_preferences_addin_unload (IdePreferencesAddin *addin,
+gbp_sysroot_preferences_addin_unload (IdePreferencesAddin *addin,
DzlPreferences *preferences)
{
- IdeSysrootPreferencesAddin *self = IDE_SYSROOT_PREFERENCES_ADDIN (addin);
+ GbpSysrootPreferencesAddin *self = (GbpSysrootPreferencesAddin *)addin;
IDE_ENTRY;
- g_assert (IDE_IS_SYSROOT_PREFERENCES_ADDIN (self));
+ g_assert (GBP_IS_SYSROOT_PREFERENCES_ADDIN (self));
g_assert (DZL_IS_PREFERENCES (preferences));
/* Clear preferences so reload code doesn't try to
@@ -187,19 +187,19 @@ ide_sysroot_preferences_addin_unload (IdePreferencesAddin *addin,
static void
preferences_addin_iface_init (IdePreferencesAddinInterface *iface)
{
- iface->load = ide_sysroot_preferences_addin_load;
- iface->unload = ide_sysroot_preferences_addin_unload;
+ iface->load = gbp_sysroot_preferences_addin_load;
+ iface->unload = gbp_sysroot_preferences_addin_unload;
}
-G_DEFINE_TYPE_EXTENDED (IdeSysrootPreferencesAddin, ide_sysroot_preferences_addin, G_TYPE_OBJECT, 0,
+G_DEFINE_TYPE_EXTENDED (GbpSysrootPreferencesAddin, gbp_sysroot_preferences_addin, G_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE (IDE_TYPE_PREFERENCES_ADDIN, preferences_addin_iface_init))
static void
-ide_sysroot_preferences_addin_class_init (IdeSysrootPreferencesAddinClass *klass)
+gbp_sysroot_preferences_addin_class_init (GbpSysrootPreferencesAddinClass *klass)
{
}
static void
-ide_sysroot_preferences_addin_init (IdeSysrootPreferencesAddin *self)
+gbp_sysroot_preferences_addin_init (GbpSysrootPreferencesAddin *self)
{
}
diff --git a/src/plugins/sysroot/ide-sysroot-preferences-addin.h
b/src/plugins/sysroot/gbp-sysroot-preferences-addin.h
similarity index 79%
rename from src/plugins/sysroot/ide-sysroot-preferences-addin.h
rename to src/plugins/sysroot/gbp-sysroot-preferences-addin.h
index a1f8e7b46..e8a4072cc 100644
--- a/src/plugins/sysroot/ide-sysroot-preferences-addin.h
+++ b/src/plugins/sysroot/gbp-sysroot-preferences-addin.h
@@ -1,4 +1,4 @@
-/* ide-sysroot-preferences.h
+/* gbp-sysroot-preferences.h
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -23,8 +23,8 @@
G_BEGIN_DECLS
-#define IDE_TYPE_SYSROOT_PREFERENCES_ADDIN (ide_sysroot_preferences_addin_get_type())
+#define GBP_TYPE_SYSROOT_PREFERENCES_ADDIN (gbp_sysroot_preferences_addin_get_type())
-G_DECLARE_FINAL_TYPE (IdeSysrootPreferencesAddin, ide_sysroot_preferences_addin, IDE,
SYSROOT_PREFERENCES_ADDIN, GObject)
+G_DECLARE_FINAL_TYPE (GbpSysrootPreferencesAddin, gbp_sysroot_preferences_addin, GBP,
SYSROOT_PREFERENCES_ADDIN, GObject)
G_END_DECLS
diff --git a/src/plugins/sysroot/ide-sysroot-preferences-row.c
b/src/plugins/sysroot/gbp-sysroot-preferences-row.c
similarity index 62%
rename from src/plugins/sysroot/ide-sysroot-preferences-row.c
rename to src/plugins/sysroot/gbp-sysroot-preferences-row.c
index 01ea6e0ed..5b23614b1 100644
--- a/src/plugins/sysroot/ide-sysroot-preferences-row.c
+++ b/src/plugins/sysroot/gbp-sysroot-preferences-row.c
@@ -1,4 +1,4 @@
-/* ide-sysroot-preferences-row.c
+/* gbp-sysroot-preferences-row.c
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -17,12 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-sysroot-preferences-row"
+#define G_LOG_DOMAIN "gbp-sysroot-preferences-row"
-#include "ide-sysroot-preferences-row.h"
-#include "ide-sysroot-manager.h"
+#include "gbp-sysroot-preferences-row.h"
+#include "gbp-sysroot-manager.h"
-struct _IdeSysrootPreferencesRow
+struct _GbpSysrootPreferencesRow
{
DzlPreferencesBin parent_instance;
gchar *sysroot_id;
@@ -34,7 +34,7 @@ struct _IdeSysrootPreferencesRow
GtkWidget *popover;
};
-G_DEFINE_TYPE (IdeSysrootPreferencesRow, ide_sysroot_preferences_row, DZL_TYPE_PREFERENCES_BIN)
+G_DEFINE_TYPE (GbpSysrootPreferencesRow, gbp_sysroot_preferences_row, DZL_TYPE_PREFERENCES_BIN)
enum {
PROP_0,
@@ -45,81 +45,81 @@ enum {
static GParamSpec *properties [N_PROPS];
static void
-sysroot_preferences_row_name_changed (IdeSysrootPreferencesRow *self,
+sysroot_preferences_row_name_changed (GbpSysrootPreferencesRow *self,
gpointer user_data)
{
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
- g_assert (IDE_IS_SYSROOT_PREFERENCES_ROW (self));
+ g_assert (GBP_IS_SYSROOT_PREFERENCES_ROW (self));
g_assert (GTK_IS_ENTRY (user_data));
- sysroot_manager = ide_sysroot_manager_get_default ();
- ide_sysroot_manager_set_target_name (sysroot_manager,
+ sysroot_manager = gbp_sysroot_manager_get_default ();
+ gbp_sysroot_manager_set_target_name (sysroot_manager,
self->sysroot_id,
gtk_entry_get_text (GTK_ENTRY (user_data)));
}
static void
-sysroot_preferences_row_sysroot_changed (IdeSysrootPreferencesRow *self,
+sysroot_preferences_row_sysroot_changed (GbpSysrootPreferencesRow *self,
gpointer user_data)
{
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
- g_assert (IDE_IS_SYSROOT_PREFERENCES_ROW (self));
+ g_assert (GBP_IS_SYSROOT_PREFERENCES_ROW (self));
g_assert (GTK_IS_ENTRY (user_data));
- sysroot_manager = ide_sysroot_manager_get_default ();
- ide_sysroot_manager_set_target_path (sysroot_manager,
+ sysroot_manager = gbp_sysroot_manager_get_default ();
+ gbp_sysroot_manager_set_target_path (sysroot_manager,
self->sysroot_id,
gtk_entry_get_text (GTK_ENTRY (user_data)));
}
static void
-sysroot_preferences_row_pkg_config_changed (IdeSysrootPreferencesRow *self,
+sysroot_preferences_row_pkg_config_changed (GbpSysrootPreferencesRow *self,
gpointer user_data)
{
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
- g_assert (IDE_IS_SYSROOT_PREFERENCES_ROW (self));
+ g_assert (GBP_IS_SYSROOT_PREFERENCES_ROW (self));
g_assert (GTK_IS_ENTRY (user_data));
- sysroot_manager = ide_sysroot_manager_get_default ();
- ide_sysroot_manager_set_target_pkg_config_path (sysroot_manager,
+ sysroot_manager = gbp_sysroot_manager_get_default ();
+ gbp_sysroot_manager_set_target_pkg_config_path (sysroot_manager,
self->sysroot_id,
gtk_entry_get_text (GTK_ENTRY (user_data)));
}
static void
-sysroot_preferences_row_clicked (IdeSysrootPreferencesRow *self,
+sysroot_preferences_row_clicked (GbpSysrootPreferencesRow *self,
gpointer user_data)
{
- g_assert (IDE_IS_SYSROOT_PREFERENCES_ROW (self));
+ g_assert (GBP_IS_SYSROOT_PREFERENCES_ROW (self));
- ide_sysroot_preferences_row_show_popup (self);
+ gbp_sysroot_preferences_row_show_popup (self);
}
static void
-sysroot_preferences_delete (IdeSysrootPreferencesRow *self,
+sysroot_preferences_delete (GbpSysrootPreferencesRow *self,
gpointer user_data)
{
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
- g_assert (IDE_IS_SYSROOT_PREFERENCES_ROW (self));
+ g_assert (GBP_IS_SYSROOT_PREFERENCES_ROW (self));
- sysroot_manager = ide_sysroot_manager_get_default ();
- ide_sysroot_manager_remove_target (sysroot_manager, self->sysroot_id);
+ sysroot_manager = gbp_sysroot_manager_get_default ();
+ gbp_sysroot_manager_remove_target (sysroot_manager, self->sysroot_id);
/* The row is wrapped into a GtkListBoxRow that won't be removed when child is destroyed */
gtk_widget_destroy (gtk_widget_get_parent (GTK_WIDGET (self)));
}
static void
-ide_sysroot_preferences_row_get_property (GObject *object,
+gbp_sysroot_preferences_row_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
- IdeSysrootPreferencesRow *self = IDE_SYSROOT_PREFERENCES_ROW (object);
+ GbpSysrootPreferencesRow *self = GBP_SYSROOT_PREFERENCES_ROW (object);
switch (prop_id)
{
@@ -133,12 +133,12 @@ ide_sysroot_preferences_row_get_property (GObject *object,
}
static void
-ide_sysroot_preferences_row_set_property (GObject *object,
+gbp_sysroot_preferences_row_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- IdeSysrootPreferencesRow *self = IDE_SYSROOT_PREFERENCES_ROW (object);
+ GbpSysrootPreferencesRow *self = GBP_SYSROOT_PREFERENCES_ROW (object);
switch (prop_id)
{
@@ -152,19 +152,19 @@ ide_sysroot_preferences_row_set_property (GObject *object,
}
static void
-ide_sysroot_preferences_row_finalize (GObject *object)
+gbp_sysroot_preferences_row_finalize (GObject *object)
{
- IdeSysrootPreferencesRow *self = (IdeSysrootPreferencesRow *) object;
+ GbpSysrootPreferencesRow *self = (GbpSysrootPreferencesRow *) object;
g_clear_pointer (&self->sysroot_id, g_free);
- G_OBJECT_CLASS (ide_sysroot_preferences_row_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gbp_sysroot_preferences_row_parent_class)->finalize (object);
}
void
-ide_sysroot_preferences_row_show_popup (IdeSysrootPreferencesRow *self)
+gbp_sysroot_preferences_row_show_popup (GbpSysrootPreferencesRow *self)
{
- g_return_if_fail (IDE_IS_SYSROOT_PREFERENCES_ROW (self));
+ g_return_if_fail (GBP_IS_SYSROOT_PREFERENCES_ROW (self));
g_return_if_fail (GTK_IS_POPOVER (self->popover));
gtk_popover_popup (GTK_POPOVER (self->popover));
@@ -172,18 +172,18 @@ ide_sysroot_preferences_row_show_popup (IdeSysrootPreferencesRow *self)
}
static void
-ide_sysroot_preferences_row_constructed (GObject *object)
+gbp_sysroot_preferences_row_constructed (GObject *object)
{
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
gchar *value;
- IdeSysrootPreferencesRow *self = (IdeSysrootPreferencesRow *) object;
+ GbpSysrootPreferencesRow *self = (GbpSysrootPreferencesRow *) object;
- sysroot_manager = ide_sysroot_manager_get_default ();
+ sysroot_manager = gbp_sysroot_manager_get_default ();
gtk_entry_set_text (self->name_entry,
- ide_sysroot_manager_get_target_name (sysroot_manager, self->sysroot_id));
+ gbp_sysroot_manager_get_target_name (sysroot_manager, self->sysroot_id));
gtk_entry_set_text (self->sysroot_entry,
- ide_sysroot_manager_get_target_path (sysroot_manager, self->sysroot_id));
- value = ide_sysroot_manager_get_target_pkg_config_path (sysroot_manager, self->sysroot_id);
+ gbp_sysroot_manager_get_target_path (sysroot_manager, self->sysroot_id));
+ value = gbp_sysroot_manager_get_target_pkg_config_path (sysroot_manager, self->sysroot_id);
if (value != NULL)
gtk_entry_set_text (self->pkg_config_entry, value);
@@ -207,15 +207,15 @@ ide_sysroot_preferences_row_constructed (GObject *object)
}
static void
-ide_sysroot_preferences_row_class_init (IdeSysrootPreferencesRowClass *klass)
+gbp_sysroot_preferences_row_class_init (GbpSysrootPreferencesRowClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->finalize = ide_sysroot_preferences_row_finalize;
- object_class->get_property = ide_sysroot_preferences_row_get_property;
- object_class->set_property = ide_sysroot_preferences_row_set_property;
- object_class->constructed = ide_sysroot_preferences_row_constructed;
+ object_class->finalize = gbp_sysroot_preferences_row_finalize;
+ object_class->get_property = gbp_sysroot_preferences_row_get_property;
+ object_class->set_property = gbp_sysroot_preferences_row_set_property;
+ object_class->constructed = gbp_sysroot_preferences_row_constructed;
properties [PROP_SYSROOT_ID] =
g_param_spec_string ("sysroot-id",
@@ -226,17 +226,17 @@ ide_sysroot_preferences_row_class_init (IdeSysrootPreferencesRowClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/builder/plugins/sysroot-plugin/ide-sysroot-preferences-row.ui");
- gtk_widget_class_bind_template_child (widget_class, IdeSysrootPreferencesRow, display_name);
- gtk_widget_class_bind_template_child (widget_class, IdeSysrootPreferencesRow, popover);
- gtk_widget_class_bind_template_child (widget_class, IdeSysrootPreferencesRow, name_entry);
- gtk_widget_class_bind_template_child (widget_class, IdeSysrootPreferencesRow, sysroot_entry);
- gtk_widget_class_bind_template_child (widget_class, IdeSysrootPreferencesRow, pkg_config_entry);
- gtk_widget_class_bind_template_child (widget_class, IdeSysrootPreferencesRow, delete_button);
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/builder/plugins/sysroot-plugin/gbp-sysroot-preferences-row.ui");
+ gtk_widget_class_bind_template_child (widget_class, GbpSysrootPreferencesRow, display_name);
+ gtk_widget_class_bind_template_child (widget_class, GbpSysrootPreferencesRow, popover);
+ gtk_widget_class_bind_template_child (widget_class, GbpSysrootPreferencesRow, name_entry);
+ gtk_widget_class_bind_template_child (widget_class, GbpSysrootPreferencesRow, sysroot_entry);
+ gtk_widget_class_bind_template_child (widget_class, GbpSysrootPreferencesRow, pkg_config_entry);
+ gtk_widget_class_bind_template_child (widget_class, GbpSysrootPreferencesRow, delete_button);
}
static void
-ide_sysroot_preferences_row_init (IdeSysrootPreferencesRow *self)
+gbp_sysroot_preferences_row_init (GbpSysrootPreferencesRow *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
diff --git a/src/plugins/sysroot/ide-sysroot-preferences-row.h
b/src/plugins/sysroot/gbp-sysroot-preferences-row.h
similarity index 74%
rename from src/plugins/sysroot/ide-sysroot-preferences-row.h
rename to src/plugins/sysroot/gbp-sysroot-preferences-row.h
index 4fd314c95..ac3e08206 100644
--- a/src/plugins/sysroot/ide-sysroot-preferences-row.h
+++ b/src/plugins/sysroot/gbp-sysroot-preferences-row.h
@@ -1,4 +1,4 @@
-/* ide-sysroot-preferences-row.h
+/* gbp-sysroot-preferences-row.h
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -23,10 +23,10 @@
G_BEGIN_DECLS
-#define IDE_TYPE_SYSROOT_PREFERENCES_ROW (ide_sysroot_preferences_row_get_type())
+#define GBP_TYPE_SYSROOT_PREFERENCES_ROW (gbp_sysroot_preferences_row_get_type())
-G_DECLARE_FINAL_TYPE (IdeSysrootPreferencesRow, ide_sysroot_preferences_row, IDE, SYSROOT_PREFERENCES_ROW,
DzlPreferencesBin)
+G_DECLARE_FINAL_TYPE (GbpSysrootPreferencesRow, gbp_sysroot_preferences_row, GBP, SYSROOT_PREFERENCES_ROW,
DzlPreferencesBin)
-void ide_sysroot_preferences_row_show_popup (IdeSysrootPreferencesRow *self);
+void gbp_sysroot_preferences_row_show_popup (GbpSysrootPreferencesRow *self);
G_END_DECLS
diff --git a/src/plugins/sysroot/ide-sysroot-preferences-row.ui
b/src/plugins/sysroot/gbp-sysroot-preferences-row.ui
similarity index 98%
rename from src/plugins/sysroot/ide-sysroot-preferences-row.ui
rename to src/plugins/sysroot/gbp-sysroot-preferences-row.ui
index bddd70179..853ed6a8e 100644
--- a/src/plugins/sysroot/ide-sysroot-preferences-row.ui
+++ b/src/plugins/sysroot/gbp-sysroot-preferences-row.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.18 -->
- <template class="IdeSysrootPreferencesRow" parent="DzlPreferencesBin">
+ <template class="GbpSysrootPreferencesRow" parent="DzlPreferencesBin">
<child>
<object class="GtkGrid" id="grid">
<property name="orientation">horizontal</property>
diff --git a/src/plugins/sysroot/ide-sysroot-runtime-provider.c
b/src/plugins/sysroot/gbp-sysroot-runtime-provider.c
similarity index 66%
rename from src/plugins/sysroot/ide-sysroot-runtime-provider.c
rename to src/plugins/sysroot/gbp-sysroot-runtime-provider.c
index 2966b77ad..5c1244715 100644
--- a/src/plugins/sysroot/ide-sysroot-runtime-provider.c
+++ b/src/plugins/sysroot/gbp-sysroot-runtime-provider.c
@@ -1,4 +1,4 @@
-/* ide-sysroot-runtime-provider.c
+/* gbp-sysroot-runtime-provider.c
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -17,15 +17,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-sysroot-runtime-provider"
+#define G_LOG_DOMAIN "gbp-sysroot-runtime-provider"
#include <glib/gi18n.h>
-#include "ide-sysroot-runtime.h"
-#include "ide-sysroot-runtime-provider.h"
-#include "ide-sysroot-manager.h"
+#include "gbp-sysroot-runtime.h"
+#include "gbp-sysroot-runtime-provider.h"
+#include "gbp-sysroot-manager.h"
-struct _IdeSysrootRuntimeProvider
+struct _GbpSysrootRuntimeProvider
{
IdeObject parent_instance;
@@ -35,23 +35,23 @@ struct _IdeSysrootRuntimeProvider
static void runtime_provider_iface_init (IdeRuntimeProviderInterface *iface);
-G_DEFINE_TYPE_EXTENDED (IdeSysrootRuntimeProvider,
- ide_sysroot_runtime_provider,
+G_DEFINE_TYPE_EXTENDED (GbpSysrootRuntimeProvider,
+ gbp_sysroot_runtime_provider,
IDE_TYPE_OBJECT,
0,
G_IMPLEMENT_INTERFACE (IDE_TYPE_RUNTIME_PROVIDER,
runtime_provider_iface_init))
static void
-sysroot_runtime_provider_remove_target (IdeSysrootRuntimeProvider *self,
+sysroot_runtime_provider_remove_target (GbpSysrootRuntimeProvider *self,
const gchar *target)
{
if (self->runtimes != NULL)
{
for (guint i= 0; i < self->runtimes->len; i++)
{
- IdeSysrootRuntime *runtime = g_ptr_array_index (self->runtimes, i);
- const gchar *sysroot_id = ide_sysroot_runtime_get_sysroot_id (runtime);
+ GbpSysrootRuntime *runtime = g_ptr_array_index (self->runtimes, i);
+ const gchar *sysroot_id = gbp_sysroot_runtime_get_sysroot_id (runtime);
if (g_strcmp0 (target, sysroot_id) == 0)
{
@@ -63,62 +63,62 @@ sysroot_runtime_provider_remove_target (IdeSysrootRuntimeProvider *self,
}
static void
-sysroot_runtime_provider_add_target (IdeSysrootRuntimeProvider *self,
+sysroot_runtime_provider_add_target (GbpSysrootRuntimeProvider *self,
const gchar *target)
{
- g_autoptr(IdeSysrootRuntime) runtime = NULL;
+ g_autoptr(GbpSysrootRuntime) runtime = NULL;
IdeContext *context = NULL;
context = ide_object_get_context (IDE_OBJECT (self->runtime_manager));
- runtime = ide_sysroot_runtime_new (context, target);
+ runtime = gbp_sysroot_runtime_new (context, target);
ide_runtime_manager_add (self->runtime_manager, IDE_RUNTIME (runtime));
g_ptr_array_add (self->runtimes, g_steal_pointer (&runtime));
}
static void
-sysroot_runtime_provider_target_changed (IdeSysrootRuntimeProvider *self,
+sysroot_runtime_provider_target_changed (GbpSysrootRuntimeProvider *self,
const gchar *target,
- IdeSysrootManagerTargetModificationType mod_type,
+ GbpSysrootManagerTargetModificationType mod_type,
gpointer user_data)
{
- if (mod_type == IDE_SYSROOT_MANAGER_TARGET_CREATED)
+ if (mod_type == GBP_SYSROOT_MANAGER_TARGET_CREATED)
sysroot_runtime_provider_add_target (self, target);
- else if (mod_type == IDE_SYSROOT_MANAGER_TARGET_REMOVED)
+ else if (mod_type == GBP_SYSROOT_MANAGER_TARGET_REMOVED)
sysroot_runtime_provider_remove_target (self, target);
}
static void
-ide_sysroot_runtime_provider_class_init (IdeSysrootRuntimeProviderClass *klass)
+gbp_sysroot_runtime_provider_class_init (GbpSysrootRuntimeProviderClass *klass)
{
}
static void
-ide_sysroot_runtime_provider_init (IdeSysrootRuntimeProvider *self)
+gbp_sysroot_runtime_provider_init (GbpSysrootRuntimeProvider *self)
{
}
static void
-ide_sysroot_runtime_provider_load (IdeRuntimeProvider *provider,
+gbp_sysroot_runtime_provider_load (IdeRuntimeProvider *provider,
IdeRuntimeManager *manager)
{
- IdeSysrootRuntimeProvider *self = IDE_SYSROOT_RUNTIME_PROVIDER (provider);
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootRuntimeProvider *self = (GbpSysrootRuntimeProvider *)provider;
+ GbpSysrootManager *sysroot_manager = NULL;
g_auto(GStrv) sysroots = NULL;
guint sysroots_length = 0;
IDE_ENTRY;
- g_assert (IDE_IS_SYSROOT_RUNTIME_PROVIDER (self));
+ g_assert (GBP_IS_SYSROOT_RUNTIME_PROVIDER (self));
g_assert (IDE_IS_RUNTIME_MANAGER (manager));
self->runtime_manager = manager;
self->runtimes = g_ptr_array_new_with_free_func (g_object_unref);
- sysroot_manager = ide_sysroot_manager_get_default ();
- sysroots = ide_sysroot_manager_list (sysroot_manager);
+ sysroot_manager = gbp_sysroot_manager_get_default ();
+ sysroots = gbp_sysroot_manager_list (sysroot_manager);
sysroots_length = g_strv_length (sysroots);
for (guint i = 0; i < sysroots_length; i++)
{
@@ -134,18 +134,18 @@ ide_sysroot_runtime_provider_load (IdeRuntimeProvider *provider,
}
static void
-ide_sysroot_runtime_provider_unload (IdeRuntimeProvider *provider,
+gbp_sysroot_runtime_provider_unload (IdeRuntimeProvider *provider,
IdeRuntimeManager *manager)
{
- IdeSysrootRuntimeProvider *self = IDE_SYSROOT_RUNTIME_PROVIDER (provider);
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootRuntimeProvider *self = (GbpSysrootRuntimeProvider *)provider;
+ GbpSysrootManager *sysroot_manager = NULL;
IDE_ENTRY;
- g_assert (IDE_IS_SYSROOT_RUNTIME_PROVIDER (self));
+ g_assert (GBP_IS_SYSROOT_RUNTIME_PROVIDER (self));
g_assert (IDE_IS_RUNTIME_MANAGER (manager));
- sysroot_manager = ide_sysroot_manager_get_default ();
+ sysroot_manager = gbp_sysroot_manager_get_default ();
g_object_unref (sysroot_manager);
if (self->runtimes != NULL)
@@ -166,6 +166,6 @@ ide_sysroot_runtime_provider_unload (IdeRuntimeProvider *provider,
static void
runtime_provider_iface_init (IdeRuntimeProviderInterface *iface)
{
- iface->load = ide_sysroot_runtime_provider_load;
- iface->unload = ide_sysroot_runtime_provider_unload;
+ iface->load = gbp_sysroot_runtime_provider_load;
+ iface->unload = gbp_sysroot_runtime_provider_unload;
}
diff --git a/src/plugins/sysroot/ide-sysroot-runtime-provider.h
b/src/plugins/sysroot/gbp-sysroot-runtime-provider.h
similarity index 79%
rename from src/plugins/sysroot/ide-sysroot-runtime-provider.h
rename to src/plugins/sysroot/gbp-sysroot-runtime-provider.h
index 04a1ccc04..bb20f477e 100644
--- a/src/plugins/sysroot/ide-sysroot-runtime-provider.h
+++ b/src/plugins/sysroot/gbp-sysroot-runtime-provider.h
@@ -1,4 +1,4 @@
-/* ide-sysroot-runtime-provider.h
+/* gbp-sysroot-runtime-provider.h
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -23,8 +23,8 @@
G_BEGIN_DECLS
-#define IDE_TYPE_SYSROOT_RUNTIME_PROVIDER (ide_sysroot_runtime_provider_get_type())
+#define GBP_TYPE_SYSROOT_RUNTIME_PROVIDER (gbp_sysroot_runtime_provider_get_type())
-G_DECLARE_FINAL_TYPE (IdeSysrootRuntimeProvider,ide_sysroot_runtime_provider, IDE, SYSROOT_RUNTIME_PROVIDER,
IdeObject)
+G_DECLARE_FINAL_TYPE (GbpSysrootRuntimeProvider, gbp_sysroot_runtime_provider, GBP,
SYSROOT_RUNTIME_PROVIDER, IdeObject)
G_END_DECLS
diff --git a/src/plugins/sysroot/ide-sysroot-runtime.c b/src/plugins/sysroot/gbp-sysroot-runtime.c
similarity index 73%
rename from src/plugins/sysroot/ide-sysroot-runtime.c
rename to src/plugins/sysroot/gbp-sysroot-runtime.c
index 58dfd0fcf..c8f1e05ce 100644
--- a/src/plugins/sysroot/ide-sysroot-runtime.c
+++ b/src/plugins/sysroot/gbp-sysroot-runtime.c
@@ -1,4 +1,4 @@
-/* ide-sysroot-runtime.c
+/* gbp-sysroot-runtime.c
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -17,27 +17,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-sysroot-runtime"
+#define G_LOG_DOMAIN "gbp-sysroot-runtime"
#include "config.h"
-#include "ide-sysroot-runtime.h"
-#include "ide-sysroot-manager.h"
-#include "ide-host-subprocess-launcher.h"
+#include "gbp-sysroot-runtime.h"
+#include "gbp-sysroot-manager.h"
+#include "gbp-sysroot-subprocess-launcher.h"
// This is a list of common libdirs to use
#define BASIC_LIBDIRS "/usr/lib/pkgconfig:/usr/share/pkgconfig"
#define RUNTIME_PREFIX "sysroot:"
-struct _IdeSysrootRuntime
+struct _GbpSysrootRuntime
{
IdeRuntime parent_instance;
};
-G_DEFINE_TYPE (IdeSysrootRuntime, ide_sysroot_runtime, IDE_TYPE_RUNTIME)
+G_DEFINE_TYPE (GbpSysrootRuntime, gbp_sysroot_runtime, IDE_TYPE_RUNTIME)
-IdeSysrootRuntime *
-ide_sysroot_runtime_new (IdeContext *context,
+GbpSysrootRuntime *
+gbp_sysroot_runtime_new (IdeContext *context,
const gchar *sysroot_id)
{
g_autoptr(IdeRuntime) runtime = NULL;
@@ -47,7 +47,7 @@ ide_sysroot_runtime_new (IdeContext *context,
g_return_val_if_fail (sysroot_id != NULL, NULL);
built_id = g_strconcat (RUNTIME_PREFIX, sysroot_id, NULL);
- runtime = g_object_new (IDE_TYPE_SYSROOT_RUNTIME,
+ runtime = g_object_new (GBP_TYPE_SYSROOT_RUNTIME,
"id", g_steal_pointer (&built_id),
"context", context,
"display-name", "",
@@ -56,7 +56,7 @@ ide_sysroot_runtime_new (IdeContext *context,
}
const gchar *
-ide_sysroot_runtime_get_sysroot_id (IdeSysrootRuntime *self)
+gbp_sysroot_runtime_get_sysroot_id (GbpSysrootRuntime *self)
{
const gchar *runtime_id = ide_runtime_get_id (IDE_RUNTIME (self));
@@ -67,21 +67,21 @@ ide_sysroot_runtime_get_sysroot_id (IdeSysrootRuntime *self)
}
static IdeSubprocessLauncher *
-ide_sysroot_runtime_create_launcher (IdeRuntime *runtime,
+gbp_sysroot_runtime_create_launcher (IdeRuntime *runtime,
GError **error)
{
IdeSubprocessLauncher *ret;
- IdeSysrootRuntime *self = IDE_SYSROOT_RUNTIME(runtime);
+ GbpSysrootRuntime *self = GBP_SYSROOT_RUNTIME(runtime);
IDE_ENTRY;
- g_return_val_if_fail (IDE_IS_SYSROOT_RUNTIME (self), NULL);
+ g_return_val_if_fail (GBP_IS_SYSROOT_RUNTIME (self), NULL);
- ret = (IdeSubprocessLauncher *)ide_host_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE |
G_SUBPROCESS_FLAGS_STDERR_PIPE);
+ ret = (IdeSubprocessLauncher *)gbp_sysroot_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE |
G_SUBPROCESS_FLAGS_STDERR_PIPE);
if (ret != NULL)
{
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
const gchar *env_var = NULL;
const gchar *sysroot_id = NULL;
g_autofree gchar *sysroot_cflags = NULL;
@@ -90,14 +90,14 @@ ide_sysroot_runtime_create_launcher (IdeRuntime *runtime,
g_autofree gchar *sysroot_path = NULL;
g_autofree gchar *pkgconfig_dirs = NULL;
- sysroot_id = ide_sysroot_runtime_get_sysroot_id (self);
+ sysroot_id = gbp_sysroot_runtime_get_sysroot_id (self);
- sysroot_manager = ide_sysroot_manager_get_default ();
+ sysroot_manager = gbp_sysroot_manager_get_default ();
ide_subprocess_launcher_set_run_on_host (ret, TRUE);
ide_subprocess_launcher_set_clear_env (ret, FALSE);
- sysroot_path = ide_sysroot_manager_get_target_path (sysroot_manager, sysroot_id);
+ sysroot_path = gbp_sysroot_manager_get_target_path (sysroot_manager, sysroot_id);
env_var = ide_subprocess_launcher_getenv (ret, "CFLAGS");
sysroot_cflags = g_strconcat ("--sysroot=", sysroot_path, NULL);
@@ -119,7 +119,7 @@ ide_sysroot_runtime_create_launcher (IdeRuntime *runtime,
sysroot_libdirs = g_steal_pointer (&libdir_tmp);
}
- pkgconfig_dirs = ide_sysroot_manager_get_target_pkg_config_path (sysroot_manager, sysroot_id);
+ pkgconfig_dirs = gbp_sysroot_manager_get_target_pkg_config_path (sysroot_manager, sysroot_id);
if (pkgconfig_dirs != NULL && g_strcmp0 (pkgconfig_dirs, "") != 0)
{
g_autofree gchar *libdir_tmp = NULL;
@@ -143,45 +143,45 @@ ide_sysroot_runtime_create_launcher (IdeRuntime *runtime,
static void
-sysroot_runtime_target_name_changed (IdeSysrootRuntime *self,
+sysroot_runtime_target_name_changed (GbpSysrootRuntime *self,
gchar *target,
gchar *new_name,
gpointer user_data)
{
- const gchar* sysroot_id = ide_sysroot_runtime_get_sysroot_id (self);
+ const gchar* sysroot_id = gbp_sysroot_runtime_get_sysroot_id (self);
if (g_strcmp0 (target, sysroot_id) == 0)
ide_runtime_set_display_name (IDE_RUNTIME (self), new_name);
}
static void
-ide_sysroot_runtime_constructed (GObject *object)
+gbp_sysroot_runtime_constructed (GObject *object)
{
- IdeSysrootManager *sysroot_manager = NULL;
+ GbpSysrootManager *sysroot_manager = NULL;
g_autofree gchar *display_name = NULL;
const gchar* sysroot_id = NULL;
- sysroot_id = ide_sysroot_runtime_get_sysroot_id (IDE_SYSROOT_RUNTIME (object));
- sysroot_manager = ide_sysroot_manager_get_default ();
- display_name = ide_sysroot_manager_get_target_name (sysroot_manager, sysroot_id);
+ sysroot_id = gbp_sysroot_runtime_get_sysroot_id (GBP_SYSROOT_RUNTIME (object));
+ sysroot_manager = gbp_sysroot_manager_get_default ();
+ display_name = gbp_sysroot_manager_get_target_name (sysroot_manager, sysroot_id);
ide_runtime_set_display_name (IDE_RUNTIME (object), display_name);
g_signal_connect_swapped (sysroot_manager, "target-name-changed", G_CALLBACK
(sysroot_runtime_target_name_changed), object);
}
static void
-ide_sysroot_runtime_class_init (IdeSysrootRuntimeClass *klass)
+gbp_sysroot_runtime_class_init (GbpSysrootRuntimeClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
IdeRuntimeClass *runtime_class = IDE_RUNTIME_CLASS (klass);
- object_class->constructed = ide_sysroot_runtime_constructed;
+ object_class->constructed = gbp_sysroot_runtime_constructed;
- runtime_class->create_launcher = ide_sysroot_runtime_create_launcher;
+ runtime_class->create_launcher = gbp_sysroot_runtime_create_launcher;
}
static void
-ide_sysroot_runtime_init (IdeSysrootRuntime *self)
+gbp_sysroot_runtime_init (GbpSysrootRuntime *self)
{
}
diff --git a/src/plugins/sysroot/ide-sysroot-runtime.h b/src/plugins/sysroot/gbp-sysroot-runtime.h
similarity index 71%
rename from src/plugins/sysroot/ide-sysroot-runtime.h
rename to src/plugins/sysroot/gbp-sysroot-runtime.h
index b269ad0cd..11504a3c1 100644
--- a/src/plugins/sysroot/ide-sysroot-runtime.h
+++ b/src/plugins/sysroot/gbp-sysroot-runtime.h
@@ -1,4 +1,4 @@
-/* ide-sysroot-runtime.h
+/* gbp-sysroot-runtime.h
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -23,12 +23,12 @@
G_BEGIN_DECLS
-#define IDE_TYPE_SYSROOT_RUNTIME (ide_sysroot_runtime_get_type())
+#define GBP_TYPE_SYSROOT_RUNTIME (gbp_sysroot_runtime_get_type())
-G_DECLARE_FINAL_TYPE (IdeSysrootRuntime, ide_sysroot_runtime, IDE, SYSROOT_RUNTIME, IdeRuntime)
+G_DECLARE_FINAL_TYPE (GbpSysrootRuntime, gbp_sysroot_runtime, GBP, SYSROOT_RUNTIME, IdeRuntime)
-IdeSysrootRuntime *ide_sysroot_runtime_new (IdeContext *context,
- const gchar* sysroot_id);
-const gchar *ide_sysroot_runtime_get_sysroot_id (IdeSysrootRuntime *self);
+GbpSysrootRuntime *gbp_sysroot_runtime_new (IdeContext *context,
+ const gchar *sysroot_id);
+const gchar *gbp_sysroot_runtime_get_sysroot_id (GbpSysrootRuntime *self);
G_END_DECLS
diff --git a/src/plugins/sysroot/ide-host-subprocess-launcher.c
b/src/plugins/sysroot/gbp-sysroot-subprocess-launcher.c
similarity index 61%
rename from src/plugins/sysroot/ide-host-subprocess-launcher.c
rename to src/plugins/sysroot/gbp-sysroot-subprocess-launcher.c
index 815ca6bd7..262b4d411 100644
--- a/src/plugins/sysroot/ide-host-subprocess-launcher.c
+++ b/src/plugins/sysroot/gbp-sysroot-subprocess-launcher.c
@@ -1,4 +1,4 @@
-/* ide-host-subprocess-launcher.c
+/* gbp-sysroot-subprocess-launcher.c
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -17,45 +17,45 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define G_LOG_DOMAIN "ide-host-subprocess-launcher"
+#define G_LOG_DOMAIN "gbp-sysroot-subprocess-launcher"
#include <glib/gi18n.h>
-#include "ide-host-subprocess-launcher.h"
+#include "gbp-sysroot-subprocess-launcher.h"
-struct _IdeHostSubprocessLauncher
+struct _GbpSysrootSubprocessLauncher
{
IdeSubprocessLauncher parent_instance;
};
-G_DEFINE_TYPE (IdeHostSubprocessLauncher,
- ide_host_subprocess_launcher,
+G_DEFINE_TYPE (GbpSysrootSubprocessLauncher,
+ gbp_sysroot_subprocess_launcher,
IDE_TYPE_SUBPROCESS_LAUNCHER)
-IdeHostSubprocessLauncher *
-ide_host_subprocess_launcher_new (GSubprocessFlags flags)
+GbpSysrootSubprocessLauncher *
+gbp_sysroot_subprocess_launcher_new (GSubprocessFlags flags)
{
- return g_object_new (IDE_TYPE_HOST_SUBPROCESS_LAUNCHER,
+ return g_object_new (GBP_TYPE_SYSROOT_SUBPROCESS_LAUNCHER,
"flags", flags,
NULL);
}
static IdeSubprocess *
-ide_host_subprocess_launcher_spawn (IdeSubprocessLauncher *self,
- GCancellable *cancellable,
- GError **error)
+gbp_sysroot_subprocess_launcher_spawn (IdeSubprocessLauncher *self,
+ GCancellable *cancellable,
+ GError **error)
{
g_autofree gchar *argv = NULL;
const gchar * const *args = NULL;
g_autoptr(GString) cmd = NULL;
- g_assert (IDE_IS_HOST_SUBPROCESS_LAUNCHER (self));
+ g_assert (GBP_IS_SYSROOT_SUBPROCESS_LAUNCHER (self));
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
/* don't prepend `sh -c` twice */
args = ide_subprocess_launcher_get_argv (self);
if (args[0] != NULL && g_strcmp0 (args[0], "sh") == 0 && g_strcmp0 (args[1], "-c") == 0)
- return IDE_SUBPROCESS_LAUNCHER_CLASS (ide_host_subprocess_launcher_parent_class)->spawn (self,
cancellable, error);
+ return IDE_SUBPROCESS_LAUNCHER_CLASS (gbp_sysroot_subprocess_launcher_parent_class)->spawn (self,
cancellable, error);
argv = ide_subprocess_launcher_pop_argv (self);
cmd = g_string_new (argv);
@@ -71,19 +71,19 @@ ide_host_subprocess_launcher_spawn (IdeSubprocessLauncher *self,
ide_subprocess_launcher_push_argv (self, "-c");
ide_subprocess_launcher_push_argv (self, cmd->str);
- return IDE_SUBPROCESS_LAUNCHER_CLASS (ide_host_subprocess_launcher_parent_class)->spawn (self,
cancellable, error);
+ return IDE_SUBPROCESS_LAUNCHER_CLASS (gbp_sysroot_subprocess_launcher_parent_class)->spawn (self,
cancellable, error);
}
static void
-ide_host_subprocess_launcher_class_init (IdeHostSubprocessLauncherClass *klass)
+gbp_sysroot_subprocess_launcher_class_init (GbpSysrootSubprocessLauncherClass *klass)
{
IdeSubprocessLauncherClass *subprocess_launcher_class = IDE_SUBPROCESS_LAUNCHER_CLASS (klass);
- subprocess_launcher_class->spawn = ide_host_subprocess_launcher_spawn;
+ subprocess_launcher_class->spawn = gbp_sysroot_subprocess_launcher_spawn;
}
static void
-ide_host_subprocess_launcher_init (IdeHostSubprocessLauncher *self)
+gbp_sysroot_subprocess_launcher_init (GbpSysrootSubprocessLauncher *self)
{
}
diff --git a/src/plugins/sysroot/ide-host-subprocess-launcher.h
b/src/plugins/sysroot/gbp-sysroot-subprocess-launcher.h
similarity index 69%
rename from src/plugins/sysroot/ide-host-subprocess-launcher.h
rename to src/plugins/sysroot/gbp-sysroot-subprocess-launcher.h
index e5f0f8f7f..9e6f901c5 100644
--- a/src/plugins/sysroot/ide-host-subprocess-launcher.h
+++ b/src/plugins/sysroot/gbp-sysroot-subprocess-launcher.h
@@ -1,4 +1,4 @@
-/* ide-host-subprocess-launcher.h
+/* gbp-sysroot-subprocess-launcher.h
*
* Copyright (C) 2018 Corentin Noël <corentin noel collabora com>
* Copyright (C) 2018 Collabora Ltd.
@@ -23,10 +23,10 @@
G_BEGIN_DECLS
-#define IDE_TYPE_HOST_SUBPROCESS_LAUNCHER (ide_host_subprocess_launcher_get_type())
+#define GBP_TYPE_SYSROOT_SUBPROCESS_LAUNCHER (gbp_sysroot_subprocess_launcher_get_type())
-G_DECLARE_FINAL_TYPE (IdeHostSubprocessLauncher, ide_host_subprocess_launcher, IDE,
HOST_SUBPROCESS_LAUNCHER, IdeSubprocessLauncher)
+G_DECLARE_FINAL_TYPE (GbpSysrootSubprocessLauncher, gbp_sysroot_subprocess_launcher, GBP,
SYSROOT_SUBPROCESS_LAUNCHER, IdeSubprocessLauncher)
-IdeHostSubprocessLauncher *ide_host_subprocess_launcher_new (GSubprocessFlags flags);
+GbpSysrootSubprocessLauncher *gbp_sysroot_subprocess_launcher_new (GSubprocessFlags flags);
G_END_DECLS
diff --git a/src/plugins/sysroot/meson.build b/src/plugins/sysroot/meson.build
index 1a15b79e2..ffdea996f 100644
--- a/src/plugins/sysroot/meson.build
+++ b/src/plugins/sysroot/meson.build
@@ -3,23 +3,23 @@ if get_option('with_sysroot')
sysroot_resources = gnome.compile_resources(
'sysroot-resources',
'sysroot.gresource.xml',
- c_name: 'ide_sysroot',
+ c_name: 'gbp_sysroot',
)
sysroot_sources = [
'sysroot-plugin.c',
- 'ide-sysroot-runtime.c',
- 'ide-sysroot-runtime.h',
- 'ide-sysroot-runtime-provider.c',
- 'ide-sysroot-runtime-provider.h',
- 'ide-host-subprocess-launcher.c',
- 'ide-host-subprocess-launcher.h',
- 'ide-sysroot-preferences-addin.c',
- 'ide-sysroot-preferences-addin.h',
- 'ide-sysroot-preferences-row.c',
- 'ide-sysroot-preferences-row.h',
- 'ide-sysroot-manager.c',
- 'ide-sysroot-manager.h'
+ 'gbp-sysroot-manager.c',
+ 'gbp-sysroot-manager.h',
+ 'gbp-sysroot-preferences-addin.c',
+ 'gbp-sysroot-preferences-addin.h',
+ 'gbp-sysroot-preferences-row.c',
+ 'gbp-sysroot-preferences-row.h',
+ 'gbp-sysroot-runtime.c',
+ 'gbp-sysroot-runtime.h',
+ 'gbp-sysroot-runtime-provider.c',
+ 'gbp-sysroot-runtime-provider.h',
+ 'gbp-sysroot-subprocess-launcher.c',
+ 'gbp-sysroot-subprocess-launcher.h'
]
gnome_builder_plugins_sources += files(sysroot_sources)
diff --git a/src/plugins/sysroot/sysroot-plugin.c b/src/plugins/sysroot/sysroot-plugin.c
index 424e2dda2..404c6a451 100644
--- a/src/plugins/sysroot/sysroot-plugin.c
+++ b/src/plugins/sysroot/sysroot-plugin.c
@@ -19,12 +19,12 @@
#include <libpeas/peas.h>
-#include "ide-sysroot-runtime-provider.h"
-#include "ide-sysroot-preferences-addin.h"
+#include "gbp-sysroot-runtime-provider.h"
+#include "gbp-sysroot-preferences-addin.h"
void
-ide_sysroot_register_types (PeasObjectModule *module)
+gbp_sysroot_register_types (PeasObjectModule *module)
{
- peas_object_module_register_extension_type (module, IDE_TYPE_RUNTIME_PROVIDER,
IDE_TYPE_SYSROOT_RUNTIME_PROVIDER);
- peas_object_module_register_extension_type (module, IDE_TYPE_PREFERENCES_ADDIN,
IDE_TYPE_SYSROOT_PREFERENCES_ADDIN);
+ peas_object_module_register_extension_type (module, IDE_TYPE_RUNTIME_PROVIDER,
GBP_TYPE_SYSROOT_RUNTIME_PROVIDER);
+ peas_object_module_register_extension_type (module, IDE_TYPE_PREFERENCES_ADDIN,
GBP_TYPE_SYSROOT_PREFERENCES_ADDIN);
}
diff --git a/src/plugins/sysroot/sysroot.gresource.xml b/src/plugins/sysroot/sysroot.gresource.xml
index b03f6e6a0..298d19cef 100644
--- a/src/plugins/sysroot/sysroot.gresource.xml
+++ b/src/plugins/sysroot/sysroot.gresource.xml
@@ -4,6 +4,6 @@
<file>sysroot.plugin</file>
</gresource>
<gresource prefix="/org/gnome/builder/plugins/sysroot-plugin">
- <file>ide-sysroot-preferences-row.ui</file>
+ <file>gbp-sysroot-preferences-row.ui</file>
</gresource>
</gresources>
diff --git a/src/plugins/sysroot/sysroot.plugin b/src/plugins/sysroot/sysroot.plugin
index 3277b70cc..e98638bc7 100644
--- a/src/plugins/sysroot/sysroot.plugin
+++ b/src/plugins/sysroot/sysroot.plugin
@@ -5,4 +5,4 @@ Description=Provides sysroot support
Authors=Corentin Noël <corentin noel collabora com>
Copyright=Copyright © 2018 Collabora Ltd.
Builtin=true
-Embedded=ide_sysroot_register_types
+Embedded=gbp_sysroot_register_types
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]