aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiping Ke <liping.ke@intel.com>2010-07-15 23:29:20 +0800
committerLiping Ke <liping.ke@intel.com>2010-07-15 16:09:04 +0800
commitfb2bf5d585cfe3e5da50aafdc20f2dd1760cb6bb (patch)
treeb5183de766d5a668e04ebb18bb915ddb4598fc83
parente3e71bb9ae88a69f0fe5df9952af7b1ae40fc331 (diff)
downloadanjuta-poky-fb2bf5d585cfe3e5da50aafdc20f2dd1760cb6bb.tar.gz
anjuta-poky-fb2bf5d585cfe3e5da50aafdc20f2dd1760cb6bb.tar.bz2
anjuta-poky-fb2bf5d585cfe3e5da50aafdc20f2dd1760cb6bb.zip
Remove old conditional build
From this changeset, we only support anjuta 2.30 and above versions. We will remove old conditional build for easy to maintain. Signed-off-by: Liping Ke <liping.ke@intel.com>
-rw-r--r--configure.ac2
-rw-r--r--src/beaver-settings-page.c22
-rw-r--r--src/beaver-target-qemu.c21
-rw-r--r--src/beaver-target.c42
-rw-r--r--src/plugin.c133
5 files changed, 1 insertions, 219 deletions
diff --git a/configure.ac b/configure.ac
index bdb3e81..b8d496f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ AM_PROG_LIBTOOL
PKG_CHECK_MODULES(GLIB, [glib-2.0])
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0])
-PKG_CHECK_MODULES(LIBANJUTA, [libanjuta-1.0])
+PKG_CHECK_MODULES(LIBANJUTA, [libanjuta-1.0 >= 2.30.0.0])
PKG_CHECK_MODULES(GNOME_VFS, [gnome-vfs-2.0])
AC_SUBST(LIBANJUTA_CFLAGS)
AC_SUBST(LIBANJUTA_LIBS)
diff --git a/src/beaver-settings-page.c b/src/beaver-settings-page.c
index 9e20c9b..be5f267 100644
--- a/src/beaver-settings-page.c
+++ b/src/beaver-settings-page.c
@@ -294,7 +294,6 @@ create_ui (BeaverSettingsPage *page)
* state...Ah, but actually when the widgets are created the first is
* toggled on by default.
*/
-#ifdef ANJUTA_2_28_OR_HIGHER
res = anjuta_preferences_register_property_raw (
priv->prefs,
full_radio,
@@ -303,16 +302,6 @@ create_ui (BeaverSettingsPage *page)
0,
ANJUTA_PROPERTY_OBJECT_TYPE_TOGGLE,
ANJUTA_PROPERTY_DATA_TYPE_BOOL);
-#else
- res = anjuta_preferences_register_property_raw (
- priv->prefs,
- full_radio,
- PREFS_PROP_POKY_MODE,
- NULL,
- 0,
- ANJUTA_PROPERTY_OBJECT_TYPE_TOGGLE,
- ANJUTA_PROPERTY_DATA_TYPE_INT);
-#endif
if (!res)
g_warning ("Error adding preference for mode of operation");
@@ -455,7 +444,6 @@ create_ui (BeaverSettingsPage *page)
* state...Ah, but actually when the widgets are created the first is
* toggled on by default.
*/
-#ifdef ANJUTA_2_28_OR_HIGHER
res = anjuta_preferences_register_property_raw (
priv->prefs,
device_radio,
@@ -464,16 +452,6 @@ create_ui (BeaverSettingsPage *page)
0,
ANJUTA_PROPERTY_OBJECT_TYPE_TOGGLE,
ANJUTA_PROPERTY_DATA_TYPE_BOOL);
-#else
- res = anjuta_preferences_register_property_raw (
- priv->prefs,
- device_radio,
- PREFS_PROP_TARGET_MODE,
- NULL,
- 0,
- ANJUTA_PROPERTY_OBJECT_TYPE_TOGGLE,
- ANJUTA_PROPERTY_DATA_TYPE_INT);
-#endif
if (!res)
g_warning ("Error adding preference for mode of operation");
diff --git a/src/beaver-target-qemu.c b/src/beaver-target-qemu.c
index 9b1dd1e..7a7fbe7 100644
--- a/src/beaver-target-qemu.c
+++ b/src/beaver-target-qemu.c
@@ -239,7 +239,6 @@ beaver_target_qemu_start (BeaverTargetQEMU *btq, GError **out_err)
if (priv->kernel && priv->rootfs)
{
gchar *args[] = {QEMU_SCRIPT, priv->kernel, priv->rootfs, NULL};
-#ifdef ANJUTA_2_28_OR_HIGHER
if (!anjuta_launcher_execute_v (priv->launcher,
NULL,
args,
@@ -249,26 +248,6 @@ beaver_target_qemu_start (BeaverTargetQEMU *btq, GError **out_err)
{
g_warning ("Error launching QEMU");
return FALSE;
-#else
-#ifdef ANJUTA_2_23_TO_26
- if (!anjuta_launcher_execute_v (priv->launcher,
- args,
- NULL,
- launcher_data_cb,
- btq))
- {
- g_warning ("Error launching QEMU");
- return FALSE;
-#else
- if (!anjuta_launcher_execute_v (priv->launcher,
- args,
- launcher_data_cb,
- btq))
- {
- g_warning ("Error launching QEMU");
- return FALSE;
-#endif
-#endif
} else {
beaver_target_qemu_set_state (BEAVER_TARGET (btq),
TARGET_STATE_READY);
diff --git a/src/beaver-target.c b/src/beaver-target.c
index f936ea2..2e7d619 100644
--- a/src/beaver-target.c
+++ b/src/beaver-target.c
@@ -321,7 +321,6 @@ _beaver_target_run_remote_v (BeaverTarget *target, gchar **in_args,
}
}
-#ifdef ANJUTA_2_28_OR_HIGHER
if (anjuta_launcher_execute_v (priv->launcher,
NULL,
args,
@@ -331,26 +330,6 @@ _beaver_target_run_remote_v (BeaverTarget *target, gchar **in_args,
{
beaver_target_set_state (target, TARGET_STATE_REMOTE_RUNNING);
return TRUE;
-#else
-#ifdef ANJUTA_2_23_TO_26
- if (anjuta_launcher_execute_v (priv->launcher,
- args,
- NULL,
- launcher_data_cb,
- target))
- {
- beaver_target_set_state (target, TARGET_STATE_REMOTE_RUNNING);
- return TRUE;
-#else
- if (anjuta_launcher_execute_v (priv->launcher,
- args,
- launcher_data_cb,
- target))
- {
- beaver_target_set_state (target, TARGET_STATE_REMOTE_RUNNING);
- return TRUE;
-#endif
-#endif
} else {
gchar *debug_str = NULL;
@@ -437,7 +416,6 @@ _beaver_target_remote_debug (BeaverTarget *target, gchar *cmd, gchar *cmd_args,
}
}
-#ifdef ANJUTA_2_28_OR_HIGHER
if (anjuta_launcher_execute_v (priv->debug_launcher,
NULL,
args,
@@ -447,26 +425,6 @@ _beaver_target_remote_debug (BeaverTarget *target, gchar *cmd, gchar *cmd_args,
{
beaver_target_set_state (target, TARGET_STATE_BUSY);
return TRUE;
-#else
-#ifdef ANJUTA_2_23_TO_26
- if (anjuta_launcher_execute_v (priv->debug_launcher,
- args,
- NULL,
- debug_launcher_data_cb,
- target))
- {
- beaver_target_set_state (target, TARGET_STATE_BUSY);
- return TRUE;
-#else
- if (anjuta_launcher_execute_v (priv->debug_launcher,
- args,
- debug_launcher_data_cb,
- target))
- {
- beaver_target_set_state (target, TARGET_STATE_BUSY);
- return TRUE;
-#endif
-#endif
} else {
gchar *debug_str = NULL;
diff --git a/src/plugin.c b/src/plugin.c
index 999b65d..e33a5a7 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -1268,8 +1268,6 @@ setup_target (AnjutaPluginSdk *sp)
update_state (sp);
}
-#ifdef ANJUTA_2_28_OR_HIGHER
-/* Callbacks fired when preferences changed */
static void
sdk_root_preference_notify_cb (AnjutaPreferences *pref, const gchar *key,
const gchar *value, gpointer userdata)
@@ -1373,113 +1371,6 @@ target_ip_preference_notify_cb (AnjutaPreferences *pref, const gchar *key,
g_free (ip_address);
}
}
-#else
-/* Callbacks fired when preferences changed */
-static void
-sdk_root_preference_notify_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
-
- g_free (sp->sdk_root);
- sp->sdk_root = anjuta_preferences_get (sp->prefs, PREFS_PROP_SDK_ROOT);
-
- update_environment (sp);
-}
-
-static void
-triplet_preference_notify_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
-
- g_free (sp->triplet);
- sp->triplet = anjuta_preferences_get (sp->prefs, PREFS_PROP_TRIPLET);
-
- update_environment (sp);
-}
-
-static void
-rootfs_preference_notify_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
- gchar *rootfs = NULL;
-
- if (BEAVER_IS_TARGET_QEMU (sp->target))
- {
- rootfs = anjuta_preferences_get (sp->prefs, PREFS_PROP_ROOTFS);
- g_object_set (sp->target, "rootfs", rootfs, NULL);
- g_free (rootfs);
- }
-}
-
-static void
-kernel_preference_notify_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
- gchar *kernel = NULL;
-
- if (BEAVER_IS_TARGET_QEMU (sp->target))
- {
- kernel = anjuta_preferences_get (sp->prefs, PREFS_PROP_KERNEL);
- g_object_set (sp->target, "kernel", kernel, NULL);
- g_free (kernel);
- }
-}
-
-static void
-poky_mode_preference_notify_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
-
- sp->poky_mode = anjuta_preferences_get_int (sp->prefs, PREFS_PROP_POKY_MODE);
-
- update_environment (sp);
-}
-
-static void
-poky_root_preference_notify_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
-
- g_free (sp->poky_root);
- sp->poky_root = anjuta_preferences_get (sp->prefs, PREFS_PROP_POKY_ROOT);
-
- update_environment (sp);
-}
-
-static void
-target_mode_preference_notify_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
-
- sp->target_mode = anjuta_preferences_get_int (sp->prefs, PREFS_PROP_TARGET_MODE);
-
- setup_target (sp);
-}
-
-static void
-target_ip_preference_notify_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
- gchar *ip_address = NULL;
-
- if (sp->target &&
- BEAVER_IS_TARGET_DEVICE (sp->target))
- {
- ip_address = anjuta_preferences_get (sp->prefs, PREFS_PROP_TARGET_IP);
- g_object_set (sp->target, "ip-address", ip_address, NULL);
- g_free (ip_address);
- }
-}
-#endif
-
/*
* Callbacks for when a value for "project_root_uri" is added to the shell aka
* when a project is opened
@@ -1602,7 +1493,6 @@ anjuta_plugin_sdk_activate (AnjutaPlugin *plugin)
gtk_action_set_sensitive (sp->remote_profile_action, FALSE);
gtk_action_set_sensitive (sp->remote_stop_action, FALSE);
-#ifdef ANJUTA_2_28_OR_HIGHER
sp->sdk_root_notifyid = anjuta_preferences_notify_add_string (sp->prefs,
PREFS_PROP_SDK_ROOT, sdk_root_preference_notify_cb, sp, NULL);
sp->triplet_notifyid = anjuta_preferences_notify_add_string (sp->prefs,
@@ -1619,37 +1509,14 @@ anjuta_plugin_sdk_activate (AnjutaPlugin *plugin)
PREFS_PROP_TARGET_MODE, target_mode_preference_notify_cb, sp, NULL);
sp->target_ip_notifyid = anjuta_preferences_notify_add_string (sp->prefs,
PREFS_PROP_TARGET_IP, target_ip_preference_notify_cb, sp, NULL);
-#else
- sp->sdk_root_notifyid = anjuta_preferences_notify_add (sp->prefs,
- PREFS_PROP_SDK_ROOT, sdk_root_preference_notify_cb, sp, NULL);
- sp->triplet_notifyid = anjuta_preferences_notify_add (sp->prefs,
- PREFS_PROP_TRIPLET, triplet_preference_notify_cb, sp, NULL);
- sp->rootfs_notifyid = anjuta_preferences_notify_add (sp->prefs,
- PREFS_PROP_ROOTFS, rootfs_preference_notify_cb, sp, NULL);
- sp->kernel_notifyid = anjuta_preferences_notify_add (sp->prefs,
- PREFS_PROP_KERNEL, kernel_preference_notify_cb, sp, NULL);
- sp->poky_root_notifyid = anjuta_preferences_notify_add (sp->prefs,
- PREFS_PROP_POKY_ROOT, poky_root_preference_notify_cb, sp, NULL);
- sp->poky_mode_notifyid = anjuta_preferences_notify_add (sp->prefs,
- PREFS_PROP_POKY_MODE, poky_mode_preference_notify_cb, sp, NULL);
- sp->target_mode_notifyid = anjuta_preferences_notify_add (sp->prefs,
- PREFS_PROP_TARGET_MODE, target_mode_preference_notify_cb, sp, NULL);
- sp->target_ip_notifyid = anjuta_preferences_notify_add (sp->prefs,
- PREFS_PROP_TARGET_IP, target_ip_preference_notify_cb, sp, NULL);
-#endif
sp->sdk_root = anjuta_preferences_get (sp->prefs, PREFS_PROP_SDK_ROOT);
sp->triplet = anjuta_preferences_get (sp->prefs, PREFS_PROP_TRIPLET);
sp->poky_root = anjuta_preferences_get (sp->prefs, PREFS_PROP_POKY_ROOT);
-#ifdef ANJUTA_2_28_OR_HIGHER
sp->poky_mode = anjuta_preferences_get_bool (sp->prefs, PREFS_PROP_POKY_MODE);
sp->target_mode = anjuta_preferences_get_bool (sp->prefs, PREFS_PROP_TARGET_MODE);
-#else
- sp->poky_mode = anjuta_preferences_get_int (sp->prefs, PREFS_PROP_POKY_MODE);
- sp->target_mode = anjuta_preferences_get_int (sp->prefs, PREFS_PROP_TARGET_MODE);
-#endif
setup_target (sp);
update_environment (sp);