Commit abdfe5d9 authored by Johannes Schmid's avatar Johannes Schmid

Merge branch 'master' into python-support

parents afe74e7b a90ebd4c
Anjuta 2.31.6.1 "Thank you, The Hague (5 Aug 2010) -- Johannes Schmid
Bugs fixed:
symbol-db: bgo#625964 anjuta-tags does not build
libanjuta: bgo#621919 AnjutaAsyncCommand class is inconsistent
Thanks to James Liggett and Vicent Untz
Anjuta 2.31.6 "Thank you, The Hague" (2 Aug 2010) -- Johannes Schmid
Updated:
- Debugger is now much more polished (Sebastien)
- Project wizard shows better package chooser
Bugs fixed:
devhelp: Use Devhelp-2 API (bgo#625841)
build: bgo #625604 - anjuta crashes on starting the debugger
gdb: bgo#625605 - register function is not found in a pretty printer
symbol-db: bgo #625350 - critical warning on project unload
debugger: bgo#558954 - Documentation for debug interfaces is incomplete
libanjuta: bgo#624660 introspection build order problem
debugger: bgo #515395 - Mouse cursor is a clock in debug mode
debugger: bgo #598187 - Feature request: Make 'Locals' columns configurable
project-wizard: bgo #624091 - Use AnjutaPkgConfigChooser
debugger: bgo #516112 - Debugger create too much variable objects
Thanks to Chao-Hsiung Liao, Eleanor Chen, Fran Diéguez, Frédéric Péters,
Jorge González, Mario Blättermann, Massimo Corà, Matej Urbančič, Naba Kumar,
Sébastien Granjoux, Sergei Grudinin, Tao Wang
Anjuta 2.31.5 "Too hot to code" (12 June 2010) -- Johannes Schmid
New:
......
......@@ -4,8 +4,8 @@ AC_PREREQ(2.59)
m4_define(anjuta_major_version, 2)
m4_define(anjuta_minor_version, 31)
m4_define(anjuta_micro_version, 5)
m4_define(anjuta_nano_version, 0)
m4_define(anjuta_micro_version, 6)
m4_define(anjuta_nano_version, 1)
m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version.anjuta_nano_version)
AC_INIT(anjuta, anjuta_version, http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta)
......@@ -45,7 +45,7 @@ dnl Glade
GLADEUI_REQUIRED=3.7.1
dnl Vala
VALA_REQUIRED=0.7.8
VALA_REQUIRED=0.9.4
dnl Introspection
GI_REQUIRED=0.6.6
......@@ -201,7 +201,7 @@ if test "$user_disabled_devhelp" = 1; then
else
AC_MSG_RESULT(no)
PKG_CHECK_MODULES(PLUGIN_DEVHELP,
[libdevhelp-1.0 >= $LIBDEVHELP_REQUIRED webkit-1.0],
[libdevhelp-2.0 >= $LIBDEVHELP_REQUIRED webkit-1.0],
[
devhelp_enabled=yes
], [
......@@ -917,7 +917,7 @@ if [ test x$devhelp_enabled = xyes ]; then
echo "Building devhelp plugin: ...............................YES"
else
echo "Building devhelp plugin: ...............................NO"
echo " Requires devhelp >= 0.22"
echo " Requires libdevhelp-2.0 (>= $LIBDEVHELP_REQUIRED)"
fi
if [ test x$sourceview = xyes ]; then
......
......@@ -235,7 +235,7 @@ Anjuta_1_0_gir_LIBS = libanjuta.la
Anjuta_1_0_gir_FILES = $(addprefix $(srcdir)/,$(anjuta_introspection_sources))
INTROSPECTION_GIRS += Anjuta-1.0.gir
IAnjuta-1_0.gir: interfaces/libanjuta-interfaces.la libanjuta.la
IAnjuta-1_0.gir: interfaces/libanjuta-interfaces.la libanjuta.la Anjuta-1.0.gir
IAnjuta_1_0_gir_INCLUDES = GObject-2.0 Gtk-2.0 Anjuta-1.0
IAnjuta_1_0_gir_CFLAGS = $(LIBANJUTA_CFLAGS) -I$(top_srcdir)
IAnjuta_1_0_gir_LIBS = interfaces/libanjuta-interfaces.la libanjuta.la
......
......@@ -54,12 +54,14 @@
struct _AnjutaCommandPriv
{
gboolean running;
gchar *error_message;
};
enum
{
DATA_ARRIVED,
COMMAND_STARTED,
COMMAND_FINISHED,
PROGRESS,
......@@ -90,6 +92,39 @@ anjuta_command_finalize (GObject *object)
G_OBJECT_CLASS (anjuta_command_parent_class)->finalize (object);
}
static gboolean
start_automatic_monitor (AnjutaCommand *self)
{
return FALSE;
}
static void
stop_automatic_monitor (AnjutaCommand *self)
{
}
static void
data_arrived (AnjutaCommand *command)
{
}
static void
command_started (AnjutaCommand *command)
{
command->priv->running = TRUE;
}
static void
command_finished (AnjutaCommand *command, guint return_code)
{
command->priv->running = FALSE;
}
static void
progress (AnjutaCommand *command, gfloat progress)
{
}
static void
anjuta_command_class_init (AnjutaCommandClass *klass)
{
......@@ -105,7 +140,12 @@ anjuta_command_class_init (AnjutaCommandClass *klass)
klass->notify_progress = NULL;
klass->set_error_message = anjuta_command_set_error_message;
klass->get_error_message = anjuta_command_get_error_message;
klass->progress = NULL;
klass->start_automatic_monitor = start_automatic_monitor;
klass->stop_automatic_monitor = stop_automatic_monitor;
klass->data_arrived = data_arrived;
klass->command_started = command_started;
klass->command_finished = command_finished;
klass->progress = progress;
/**
* AnjutaCommand::data-arrived:
......@@ -117,26 +157,59 @@ anjuta_command_class_init (AnjutaCommandClass *klass)
anjuta_command_signals[DATA_ARRIVED] =
g_signal_new ("data-arrived",
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_FIRST,
0,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (AnjutaCommandClass, data_arrived),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
/**
* AnjuaCommand::command-started:
* @command: Command
*
* Indicates that a command has begun executing. This signal is intended to
* be used for commands that start themselves automatically.
*
* <note>
* <para>
* Sublasses that override the method for this signal should chain up to
* the parent implementation to ensure proper handling of running/not
* running states.
* </para>
* </note>
*/
anjuta_command_signals[COMMAND_STARTED] =
g_signal_new ("command-started",
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (AnjutaCommandClass, command_started),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
/**
* AnjutaCommand::command-finished:
* @command: Command
* @return_code: The return code of the finished commmand
*
* Indicates that the command has completed. Clients should at least handle
* this signal to unref the command object.
* this signal to unref the command object.
*
* <note>
* <para>
* Sublasses that override the method for this signal should chain up to
* the parent implementation to ensure proper handling of running/not
* running states.
* </para>
* </note>
*/
anjuta_command_signals[COMMAND_FINISHED] =
g_signal_new ("command-finished",
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_FIRST,
0,
G_STRUCT_OFFSET (AnjutaCommandClass, command_finished),
NULL, NULL,
g_cclosure_marshal_VOID__UINT ,
G_TYPE_NONE, 1,
......@@ -175,7 +248,12 @@ anjuta_command_class_init (AnjutaCommandClass *klass)
void
anjuta_command_start (AnjutaCommand *self)
{
ANJUTA_COMMAND_GET_CLASS (self)->start (self);
if (!self->priv->running)
{
g_signal_emit_by_name (self, "command-started");
ANJUTA_COMMAND_GET_CLASS (self)->start (self);
}
}
/**
......@@ -233,6 +311,18 @@ anjuta_command_notify_progress (AnjutaCommand *self, gfloat progress)
ANJUTA_COMMAND_GET_CLASS (self)->notify_progress (self, progress);
}
/**
* anjuta_command_is_running:
* @self: Command object.
*
* Return value: %TRUE if the command is currently running; %FALSE otherwise.
*/
gboolean
anjuta_command_is_running (AnjutaCommand *self)
{
return self->priv->running;
}
/**
* anjuta_command_set_error_message:
* @self: Command object.
......@@ -265,3 +355,33 @@ anjuta_command_get_error_message (AnjutaCommand *self)
{
return g_strdup (self->priv->error_message);
}
/**
* anjuta_command_start_automatic_monitor:
* @self: Command object.
*
* Sets up any monitoring needed for commands that should start themselves
* automatically in response to some event.
*
* Return value: %TRUE if automatic starting is supported by the command and
* no errors were encountered; %FALSE if automatic starting is unsupported or on
* error.
*/
gboolean
anjuta_command_start_automatic_monitor (AnjutaCommand *self)
{
return ANJUTA_COMMAND_GET_CLASS (self)->start_automatic_monitor (self);
}
/**
* anjuta_command_stop_automatic_monitor:
* @self: Command object.
*
* Stops automatic monitoring for self executing commands. For commands that
* do not support self-starting, this function does nothing.
*/
void
anjuta_command_stop_automatic_monitor (AnjutaCommand *self)
{
ANJUTA_COMMAND_GET_CLASS (self)->stop_automatic_monitor (self);
}
\ No newline at end of file
......@@ -53,8 +53,13 @@ struct _AnjutaCommandClass
void (*notify_progress) (AnjutaCommand *self, gfloat progress);
void (*set_error_message) (AnjutaCommand *self, const gchar *error_message);
gchar * (*get_error_message) (AnjutaCommand *self);
gboolean (*start_automatic_monitor) (AnjutaCommand *self);
void (*stop_automatic_monitor) (AnjutaCommand *self);
/* Signals */
void (*data_arrived) (AnjutaCommand *command);
void (*command_started) (AnjutaCommand *command);
void (*command_finished) (AnjutaCommand *command, guint return_code);
void (*progress) (AnjutaCommand *command, gfloat progress);
};
......@@ -73,10 +78,14 @@ void anjuta_command_cancel (AnjutaCommand *self);
void anjuta_command_notify_data_arrived (AnjutaCommand *self);
void anjuta_command_notify_complete (AnjutaCommand *self, guint return_code);
void anjuta_command_notify_progress (AnjutaCommand *self, gfloat progress);
gboolean anjuta_command_is_running (AnjutaCommand *self);
void anjuta_command_set_error_message (AnjutaCommand *self, const gchar *error_message);
gchar *anjuta_command_get_error_message (AnjutaCommand *self);
gboolean anjuta_command_start_automatic_monitor (AnjutaCommand *self);
void anjuta_command_stop_automatic_monitor (AnjutaCommand *self);
G_END_DECLS
#endif /* _ANJUTA_COMMAND_H_ */
......@@ -305,8 +305,7 @@ devhelp_activate (AnjutaPlugin *plugin)
#ifndef DISABLE_EMBEDDED_DEVHELP
static gboolean init = FALSE;
GNode *books;
GList *keywords;
DhBookManager *book_manager;
GtkWidget *label;
GtkWidget *books_sw;
......@@ -410,8 +409,7 @@ devhelp_activate (AnjutaPlugin *plugin)
/*
* Notebook
*/
books = dh_base_get_book_tree (devhelp->base);
keywords = dh_base_get_keywords (devhelp->base);
book_manager = dh_base_get_book_manager (devhelp->base);
books_sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (books_sw),
......@@ -421,9 +419,9 @@ devhelp_activate (AnjutaPlugin *plugin)
GTK_SHADOW_NONE);
gtk_container_set_border_width (GTK_CONTAINER (books_sw), 2);
devhelp->book_tree = dh_book_tree_new (books);
devhelp->book_tree = dh_book_tree_new (book_manager);
devhelp->search = dh_search_new (keywords);
devhelp->search = dh_search_new (book_manager);
gtk_widget_set_size_request (devhelp->search, 0, 0);
g_signal_connect (devhelp->book_tree,
......
......@@ -256,13 +256,13 @@ public class ValaPlugin : Plugin {
result.concat (symbol_lookup_inherited (variable.variable_type.data_type, name, prefix_match));
} else if (sym is Vala.Field) {
var field = (Vala.Field) sym;
result.concat (symbol_lookup_inherited (field.field_type.data_type, name, prefix_match));
result.concat (symbol_lookup_inherited (field.variable_type.data_type, name, prefix_match));
} else if (sym is Vala.Property) {
var prop = (Vala.Property) sym;
result.concat (symbol_lookup_inherited (prop.property_type.data_type, name, prefix_match));
} else if (sym is Vala.FormalParameter) {
var fp = (Vala.FormalParameter) sym;
result.concat (symbol_lookup_inherited (fp.parameter_type.data_type, name, prefix_match));
result.concat (symbol_lookup_inherited (fp.variable_type.data_type, name, prefix_match));
}
return result;
......
......@@ -116,7 +116,7 @@ public class ValaProvider : Object, IAnjuta.Provider {
if (p.ellipsis) {
calltip.append("...");
} else {
calltip.append (p.parameter_type.to_qualified_string());
calltip.append (p.variable_type.to_qualified_string());
calltip.append (" ").append (p.name);
}
}
......
SUBDIRS = minimal terminal cpp gtk anjuta-plugin \
gtkmm wxwin xlib xlib-dock gcj java
gtkmm wxwin xlib xlib-dock gcj java \
python mkfile sdl library directory licenses m4 js_minimal
template_in_files = \
......
......@@ -2182,11 +2182,13 @@ iassist_proposals(IAnjutaEditorAssist* iassist,
SourceviewProvider* prov;
if (!SOURCEVIEW_IS_PROVIDER (node->data))
continue;
prov = SOURCEVIEW_PROVIDER(node->data);
if (prov->cancelled)
continue;
if (prov->iprov == provider)
{
if (prov->cancelled)
break;
GList* prop;
GList* items = NULL;
for (prop = proposals; prop != NULL; prop = g_list_next(prop))
......@@ -2212,6 +2214,7 @@ iassist_proposals(IAnjutaEditorAssist* iassist,
}
gtk_source_completion_context_add_proposals (prov->context, GTK_SOURCE_COMPLETION_PROVIDER(prov),
items, finished);
break;
}
}
}
......
......@@ -29,39 +29,14 @@ struct _SvnCommandPriv
svn_client_ctx_t *client_context;
apr_pool_t *pool;
GQueue *info_messages;
GMutex *ui_lock;
gboolean main_thread_has_ui_lock;
GCond *dialog_finished_condition;
GMutex *dialog_finished_lock;
gboolean dialog_finished;
gboolean cancelled;
};
G_DEFINE_TYPE (SvnCommand, svn_command, ANJUTA_TYPE_ASYNC_COMMAND);
static gboolean
svn_command_acquire_ui_lock (SvnCommand *self)
{
gboolean got_lock;
if (!self->priv->main_thread_has_ui_lock)
{
got_lock = g_mutex_trylock (self->priv->ui_lock);
if (got_lock)
self->priv->main_thread_has_ui_lock = TRUE;
return !got_lock;
}
else
return FALSE;
}
static gboolean
svn_command_release_ui_lock (GMutex *ui_lock)
{
g_mutex_unlock (ui_lock);
g_mutex_free (ui_lock);
return FALSE;
}
/* Auth functions */
/* In order to prevent deadlocking when Subversion prompts for something, we
......@@ -94,6 +69,41 @@ typedef struct
svn_error_t *error;
} SSLServerTrustArgs;
/* Idle destroy functions. The command threads should wait for the dialogs to
* finish before continuing. These functions signals the condition structure,
* allowing them to continue. These functions are executed on the main thread */
static void
on_simple_prompt_finished (SimplePromptArgs *args)
{
SvnCommand *self;
self = SVN_COMMAND (args->baton);
g_mutex_lock (self->priv->dialog_finished_lock);
self->priv->dialog_finished = TRUE;
g_cond_signal (self->priv->dialog_finished_condition);
g_mutex_unlock (self->priv->dialog_finished_lock);
}
static void
on_ssl_server_trust_prompt_finished (SSLServerTrustArgs *args)
{
SvnCommand *self;
self = SVN_COMMAND (args->baton);
g_mutex_lock (self->priv->dialog_finished_lock);
self->priv->dialog_finished = TRUE;
g_cond_signal (self->priv->dialog_finished_condition);
g_mutex_unlock (self->priv->dialog_finished_lock);
}
static gboolean
simple_prompt (SimplePromptArgs *args)
{
......@@ -162,10 +172,6 @@ simple_prompt (SimplePromptArgs *args)
gtk_widget_destroy (svn_user_auth);
args->error = err;
/* Release because main thread should already have the lock */
svn_command = SVN_COMMAND (args->baton);
svn_command_unlock_ui (svn_command);
return FALSE;
}
......@@ -228,10 +234,6 @@ ssl_server_trust_prompt (SSLServerTrustArgs *args)
gtk_widget_destroy (svn_server_trust);
args->error = err;
/* Release because main thread should already have the lock */
svn_command = SVN_COMMAND (args->baton);
svn_command_unlock_ui (svn_command);
return FALSE;
}
......@@ -244,7 +246,7 @@ svn_auth_simple_prompt_func_cb (svn_auth_cred_simple_t **cred, void *baton,
SimplePromptArgs *args;
SvnCommand *svn_command;
svn_error_t *error;
args = g_new0 (SimplePromptArgs, 1);
args->cred = cred;
args->baton = baton;
......@@ -255,15 +257,27 @@ svn_auth_simple_prompt_func_cb (svn_auth_cred_simple_t **cred, void *baton,
svn_command = SVN_COMMAND (baton);
g_idle_add ((GSourceFunc) simple_prompt, args);
/* Wait for the dialog to finish */
g_mutex_lock (svn_command->priv->dialog_finished_lock);
svn_command_lock_ui (svn_command);
svn_command_unlock_ui (svn_command);
svn_command->priv->dialog_finished = FALSE;
g_idle_add_full (G_PRIORITY_HIGH_IDLE,
(GSourceFunc) simple_prompt, args,
(GDestroyNotify) on_simple_prompt_finished);
while (!svn_command->priv->dialog_finished)
{
g_cond_wait (svn_command->priv->dialog_finished_condition,
svn_command->priv->dialog_finished_lock);
}
error = args->error;
g_free (args->realm);
g_free (args->username);
g_free (args);
g_mutex_unlock (svn_command->priv->dialog_finished_lock);
return error;
......@@ -292,17 +306,28 @@ svn_auth_ssl_server_trust_prompt_func_cb (svn_auth_cred_ssl_server_trust_t **cre
args->pool = pool;
svn_command = SVN_COMMAND (baton);
/* Wait for the dialog to finish */
g_mutex_lock (svn_command->priv->dialog_finished_lock);
svn_command->priv->dialog_finished = FALSE;
g_idle_add_full (G_PRIORITY_HIGH_IDLE,
(GSourceFunc) ssl_server_trust_prompt, args, NULL);
svn_command_lock_ui (svn_command);
svn_command_unlock_ui (svn_command);
(GSourceFunc) ssl_server_trust_prompt, args,
(GDestroyNotify) on_ssl_server_trust_prompt_finished);
while (!svn_command->priv->dialog_finished)
{
g_cond_wait (svn_command->priv->dialog_finished_condition,
svn_command->priv->dialog_finished_lock);
}
error = args->error;
g_free (args->realm);
g_free (args->cert_info);
g_free (args);
g_mutex_unlock (svn_command->priv->dialog_finished_lock);
return error;
}
......@@ -467,10 +492,8 @@ svn_command_init (SvnCommand *self)
self->priv->pool);
self->priv->info_messages = g_queue_new ();
self->priv->ui_lock = g_mutex_new ();
/* Make sure that the main thread holds the lock */
g_idle_add ((GSourceFunc) svn_command_acquire_ui_lock, self);
self->priv->dialog_finished_lock = g_mutex_new ();
self->priv->dialog_finished_condition = g_cond_new ();
/* Fill in the auth baton callbacks */
providers = apr_array_make (self->priv->pool, 1,
......@@ -551,7 +574,8 @@ svn_command_finalize (GObject *object)
current_message_line = g_list_next (current_message_line);
}
g_idle_add ((GSourceFunc) svn_command_release_ui_lock, self->priv->ui_lock);
g_mutex_free (self->priv->dialog_finished_lock);
g_cond_free (self->priv->dialog_finished_condition);
g_queue_free (self->priv->info_messages);
g_free (self->priv);
......@@ -635,24 +659,6 @@ svn_command_get_pool (SvnCommand *self)
return self->priv->pool;
}
void
svn_command_lock_ui (SvnCommand *self)
{
g_mutex_lock (self->priv->ui_lock);
/* Have the main thread acquire the lock as soon as the other thread is done
* with it. The main thread should *not* acqure the lock, only release
* it. */
self->priv->main_thread_has_ui_lock = FALSE;
g_idle_add ((GSourceFunc) svn_command_acquire_ui_lock, self);
}
void
svn_command_unlock_ui (SvnCommand *self)
{
g_mutex_unlock (self->priv->ui_lock);
}
gchar *
svn_command_make_canonical_path (SvnCommand *self, const gchar *path)
{
......
......@@ -64,8 +64,6 @@ GQueue * svn_command_get_info_queue (SvnCommand *self);
void svn_command_set_error (SvnCommand *self, svn_error_t *error);
svn_client_ctx_t *svn_command_get_client_context (SvnCommand *self);
apr_pool_t *svn_command_get_pool (SvnCommand *self);
void svn_command_lock_ui (SvnCommand *self);
void svn_command_unlock_ui (SvnCommand *self);
gchar *svn_command_make_canonical_path (SvnCommand *self, const gchar *path);
/* Static methods */
......
......@@ -124,7 +124,7 @@ public class CTagsVisitor : CodeVisitor {
if (p.ellipsis) {
ret.append("...");
} else {
ret.append (p.parameter_type.to_qualified_string());
ret.append (p.variable_type.to_qualified_string());
ret.append (" ");
ret.append (p.name);
}
......@@ -295,7 +295,7 @@ public class CTagsVisitor : CodeVisitor {
entry.kind = 'f';
entry.access = get_access (f);
scope (f, entry.scope);
entry.typeref = f.field_type.to_qualified_string();
entry.typeref = f.variable_type.to_qualified_string();
taglist.append(entry);
// print_tag(entry);
......
......@@ -192,7 +192,6 @@ plugins/project-wizard/property.c
[type: gettext/xml]plugins/project-wizard/templates/python.wiz.in
[type: gettext/xml]plugins/project-wizard/templates/mkfile.wiz.in
[type: gettext/xml]plugins/project-wizard/templates/sdl.wiz.in
[type: gettext/xml]plugins/project-wizard/templates/gnome-applet.wiz.in
[type: gettext/xml]plugins/project-wizard/templates/library.wiz.in
[type: gettext/glade]plugins/run-program/anjuta-run-program.ui
plugins/run-program/execute.c
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment