anjuta r4928 - in branches/gnome-2-26: . libanjuta/interfaces plugins/build-basic-autotools plugins/message-view plugins/project-wizard plugins/symbol-db po scripts
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4928 - in branches/gnome-2-26: . libanjuta/interfaces plugins/build-basic-autotools plugins/message-view plugins/project-wizard plugins/symbol-db po scripts
- Date: Mon, 6 Apr 2009 08:12:03 +0000 (UTC)
Author: jhs
Date: Mon Apr 6 08:12:03 2009
New Revision: 4928
URL: http://svn.gnome.org/viewvc/anjuta?rev=4928&view=rev
Log:
Backported some bug-fixes to 2.26 branch
Modified:
branches/gnome-2-26/ (props changed)
branches/gnome-2-26/ChangeLog
branches/gnome-2-26/libanjuta/interfaces/libanjuta.idl
branches/gnome-2-26/plugins/build-basic-autotools/plugin.c
branches/gnome-2-26/plugins/message-view/anjuta-msgman.c
branches/gnome-2-26/plugins/message-view/anjuta-msgman.h
branches/gnome-2-26/plugins/message-view/plugin.c
branches/gnome-2-26/plugins/project-wizard/anjuta-project-wizard.ui
branches/gnome-2-26/plugins/symbol-db/ (props changed)
branches/gnome-2-26/po/ChangeLog
branches/gnome-2-26/po/POTFILES.in
branches/gnome-2-26/po/POTFILES.skip
branches/gnome-2-26/scripts/ (props changed)
Modified: branches/gnome-2-26/libanjuta/interfaces/libanjuta.idl
==============================================================================
--- branches/gnome-2-26/libanjuta/interfaces/libanjuta.idl (original)
+++ branches/gnome-2-26/libanjuta/interfaces/libanjuta.idl Mon Apr 6 08:12:03 2009
@@ -2688,7 +2688,8 @@
interface IAnjutaMessageManager
{
#include "ianjuta-message-view.h"
-
+ #include <gdk/gdk.h>
+
enum Error
{
DOESNT_EXIST
@@ -2777,6 +2778,30 @@
*
*/
void set_view_title (IAnjutaMessageView *view, const gchar *title);
+
+ /**
+ * ianjuta_message_manager_set_view_icon:
+ * @obj: Self
+ * @view: A message view
+ * @icon: Sets the icon of view.
+ * @err: Error propagation and reporting
+ *
+ * Sets the icon of view.
+ *
+ */
+ void set_view_icon (IAnjutaMessageView *view, GdkPixbufAnimation *icon);
+
+ /**
+ * ianjuta_message_manager_set_view_icon_from_stock:
+ * @obj: Self
+ * @view: A message view
+ * @icon: Sets the icon of view.
+ * @err: Error propagation and reporting
+ *
+ * Sets the icon of view.
+ *
+ */
+ void set_view_icon_from_stock (IAnjutaMessageView *view, const gchar *icon);
}
/**
Modified: branches/gnome-2-26/plugins/build-basic-autotools/plugin.c
==============================================================================
--- branches/gnome-2-26/plugins/build-basic-autotools/plugin.c (original)
+++ branches/gnome-2-26/plugins/build-basic-autotools/plugin.c Mon Apr 6 08:12:03 2009
@@ -460,6 +460,7 @@
static gboolean
build_context_destroy_view (BuildContext *context)
{
+ BasicAutotoolsPlugin* plugin = ANJUTA_PLUGIN_BASIC_AUTOTOOLS (context->plugin);
if (context->message_view)
{
gtk_widget_destroy (GTK_WIDGET (context->message_view));
@@ -481,21 +482,22 @@
NULL);
g_slist_free (context->locations);
context->locations = NULL;
-
+
/* Empty context, remove from pool */
if (context->launcher == NULL)
- {
- ANJUTA_PLUGIN_BASIC_AUTOTOOLS (context->plugin)->contexts_pool =
- g_list_remove (ANJUTA_PLUGIN_BASIC_AUTOTOOLS (context->plugin)->contexts_pool,
- context);
+ {
+ plugin->contexts_pool =
+ g_list_remove (plugin->contexts_pool,
+ context);
g_free (context);
-
- return TRUE;
}
else
{
- return FALSE;
+ /* Kill process */
+ anjuta_launcher_signal (context->launcher, SIGKILL);
}
+
+ return TRUE;
}
static void
@@ -545,8 +547,7 @@
gchar **tokens;
BuildPattern *pattern;
- fgets (buffer, 1024, fp);
- if (ferror (fp))
+ if (!fgets (buffer, 1024, fp))
break;
tokens = g_strsplit (buffer, "|||", 3);
@@ -1056,19 +1057,28 @@
/* Message view could have been destroyed before */
if (context->message_view)
{
+ IAnjutaMessageManager *mesg_manager;
gchar *buff1;
buff1 = g_strdup_printf (_("Total time taken: %lu secs\n"),
time_taken);
+ mesg_manager = anjuta_shell_get_interface (ANJUTA_PLUGIN (context->plugin)->shell,
+ IAnjutaMessageManager, NULL);
if (status)
{
ianjuta_message_view_buffer_append (context->message_view,
_("Completed unsuccessfully\n"), NULL);
+ ianjuta_message_manager_set_view_icon_from_stock (mesg_manager,
+ context->message_view,
+ GTK_STOCK_STOP, NULL);
}
else
{
ianjuta_message_view_buffer_append (context->message_view,
_("Completed successfully\n"), NULL);
+ ianjuta_message_manager_set_view_icon_from_stock (mesg_manager,
+ context->message_view,
+ GTK_STOCK_APPLY, NULL);
}
ianjuta_message_view_buffer_append (context->message_view, buff1, NULL);
g_free (buff1);
@@ -1099,6 +1109,45 @@
return TRUE;
}
+static void
+build_set_animation (IAnjutaMessageManager* mesg_manager, BuildContext* context)
+{
+ GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
+ GtkIconInfo *icon_info;
+ const gchar *name;
+ icon_info = gtk_icon_theme_lookup_icon (icon_theme, "process-working", 16, 0);
+ name = gtk_icon_info_get_filename (icon_info);
+ if (name != NULL)
+ {
+ int size = gtk_icon_info_get_base_size (icon_info);
+ GdkPixbufSimpleAnim* anim = gdk_pixbuf_simple_anim_new (size, size, 5);
+ GdkPixbuf *image = gdk_pixbuf_new_from_file (name, NULL);
+ if (image)
+ {
+ int grid_width = gdk_pixbuf_get_width (image);
+ int grid_height = gdk_pixbuf_get_height (image);
+ int x,y;
+ for (y = 0; y < grid_height; y += size)
+ {
+ for (x = 0; x < grid_width ; x += size)
+ {
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_subpixbuf (image, x, y, size,size);
+ if (pixbuf)
+ {
+ gdk_pixbuf_simple_anim_add_frame (anim, pixbuf);
+ }
+ }
+ }
+ ianjuta_message_manager_set_view_icon (mesg_manager,
+ context->message_view,
+ GDK_PIXBUF_ANIMATION (anim), NULL);
+ g_object_unref (image);
+ }
+ }
+ gtk_icon_info_free (icon_info);
+}
+
+
static BuildContext*
build_get_context_with_message(BasicAutotoolsPlugin *plugin, const gchar *dir)
{
@@ -1149,6 +1198,7 @@
}
else
{
+
/* If no free context found, create one */
context = g_new0 (BuildContext, 1);
context->plugin = ANJUTA_PLUGIN(plugin);
@@ -1158,6 +1208,7 @@
context->message_view =
ianjuta_message_manager_add_view (mesg_manager, mname,
ICON_FILE, NULL);
+
g_signal_connect (G_OBJECT (context->message_view), "buffer_flushed",
G_CALLBACK (on_build_mesg_format), context);
g_signal_connect (G_OBJECT (context->message_view), "message_clicked",
@@ -1165,6 +1216,7 @@
g_object_weak_ref (G_OBJECT (context->message_view),
(GWeakNotify)on_message_view_destroyed, context);
}
+ build_set_animation (mesg_manager, context);
ianjuta_message_manager_set_current_view (mesg_manager,
context->message_view, NULL);
Modified: branches/gnome-2-26/plugins/message-view/anjuta-msgman.c
==============================================================================
--- branches/gnome-2-26/plugins/message-view/anjuta-msgman.c (original)
+++ branches/gnome-2-26/plugins/message-view/anjuta-msgman.c Mon Apr 6 08:12:03 2009
@@ -499,6 +499,35 @@
gtk_label_set_text (GTK_LABEL (page->label), title);
}
+void
+anjuta_msgman_set_view_icon (AnjutaMsgman *msgman, MessageView *view,
+ GdkPixbufAnimation *icon)
+{
+ AnjutaMsgmanPage *page;
+
+ g_return_if_fail (icon != NULL);
+
+ page = anjuta_msgman_page_from_widget (msgman, view);
+ g_return_if_fail (page != NULL);
+
+ gtk_image_set_from_animation (GTK_IMAGE (page->pixmap), icon);
+}
+
+void
+anjuta_msgman_set_view_icon_from_stock (AnjutaMsgman *msgman, MessageView *view,
+ const gchar *icon)
+{
+ AnjutaMsgmanPage *page;
+
+ g_return_if_fail (icon != NULL);
+
+ page = anjuta_msgman_page_from_widget (msgman, view);
+ g_return_if_fail (page != NULL);
+
+ gtk_image_set_from_stock (GTK_IMAGE (page->pixmap), icon,
+ GTK_ICON_SIZE_MENU);
+}
+
gboolean
anjuta_msgman_serialize (AnjutaMsgman *msgman, AnjutaSerializer *serializer)
{
Modified: branches/gnome-2-26/plugins/message-view/anjuta-msgman.h
==============================================================================
--- branches/gnome-2-26/plugins/message-view/anjuta-msgman.h (original)
+++ branches/gnome-2-26/plugins/message-view/anjuta-msgman.h Mon Apr 6 08:12:03 2009
@@ -68,6 +68,12 @@
void anjuta_msgman_set_view_title (AnjutaMsgman *msgman, MessageView *view,
const gchar *title);
+void anjuta_msgman_set_view_icon (AnjutaMsgman *msgman, MessageView *view,
+ GdkPixbufAnimation *icon);
+
+void anjuta_msgman_set_view_icon_from_stock (AnjutaMsgman *msgman, MessageView *view,
+ const gchar *icon);
+
gboolean anjuta_msgman_serialize (AnjutaMsgman *msgman,
AnjutaSerializer *serializer);
gboolean anjuta_msgman_deserialize (AnjutaMsgman *msgman,
Modified: branches/gnome-2-26/plugins/message-view/plugin.c
==============================================================================
--- branches/gnome-2-26/plugins/message-view/plugin.c (original)
+++ branches/gnome-2-26/plugins/message-view/plugin.c Mon Apr 6 08:12:03 2009
@@ -393,6 +393,26 @@
}
static void
+ianjuta_msgman_set_view_icon_from_stock (IAnjutaMessageManager *plugin,
+ IAnjutaMessageView *message_view,
+ const gchar *icon, GError ** e)
+{
+ GtkWidget *msgman = ANJUTA_PLUGIN_MESSAGE_VIEW (plugin)->msgman;
+ anjuta_msgman_set_view_icon_from_stock (ANJUTA_MSGMAN (msgman),
+ MESSAGE_VIEW (message_view), icon);
+}
+
+static void
+ianjuta_msgman_set_view_icon (IAnjutaMessageManager *plugin,
+ IAnjutaMessageView *message_view,
+ GdkPixbufAnimation *icon, GError ** e)
+{
+ GtkWidget *msgman = ANJUTA_PLUGIN_MESSAGE_VIEW (plugin)->msgman;
+ anjuta_msgman_set_view_icon (ANJUTA_MSGMAN (msgman),
+ MESSAGE_VIEW (message_view), icon);
+}
+
+static void
ianjuta_msgman_iface_init (IAnjutaMessageManagerIface *iface)
{
iface->add_view = ianjuta_msgman_add_view;
@@ -402,6 +422,8 @@
iface->set_current_view = ianjuta_msgman_set_current_view;
iface->get_all_views = ianjuta_msgman_get_all_views;
iface->set_view_title = ianjuta_msgman_set_view_title;
+ iface->set_view_icon = ianjuta_msgman_set_view_icon;
+ iface->set_view_icon_from_stock = ianjuta_msgman_set_view_icon_from_stock;
}
static guint notify_id;
Modified: branches/gnome-2-26/plugins/project-wizard/anjuta-project-wizard.ui
==============================================================================
--- branches/gnome-2-26/plugins/project-wizard/anjuta-project-wizard.ui (original)
+++ branches/gnome-2-26/plugins/project-wizard/anjuta-project-wizard.ui Mon Apr 6 08:12:03 2009
@@ -47,7 +47,7 @@
</object>
<packing>
<property name="page_type">GTK_ASSISTANT_PAGE_INTRO</property>
- <property name="title">Select project type</property>
+ <property name="title" translatable="yes">Select project type</property>
<property name="header_image">applogo.png</property>
</packing>
</child>
Modified: branches/gnome-2-26/po/POTFILES.in
==============================================================================
--- branches/gnome-2-26/po/POTFILES.in (original)
+++ branches/gnome-2-26/po/POTFILES.in Mon Apr 6 08:12:03 2009
@@ -168,7 +168,8 @@
plugins/profiler/profiler-function-call-tree.glade
plugins/profiler/profiler.glade
plugins/profiler/string-utils.c
-plugins/project-import/project-import.c
+plugins/project-import/project-import.glade
+plugins/project-import/project-import-dialog.c
plugins/project-manager/create_dialogs.glade
plugins/project-manager/gbf-project-model.c
plugins/project-manager/gbf-project-util.c
@@ -216,8 +217,11 @@
plugins/subversion/subversion-ui-utils.c
plugins/subversion/subversion-update-dialog.c
plugins/subversion/svn-command.c
+plugins/symbol-db/plugin.c
plugins/symbol-db/symbol-db-prefs.c
plugins/symbol-db/symbol-db-system.c
+plugins/symbol-db/symbol-db-view-locals.c
+plugins/symbol-db/symbol-db-view.c
plugins/symbol-db/anjuta-symbol-db.glade
plugins/terminal/anjuta-terminal-plugin.glade
plugins/terminal/terminal.c
Modified: branches/gnome-2-26/po/POTFILES.skip
==============================================================================
--- branches/gnome-2-26/po/POTFILES.skip (original)
+++ branches/gnome-2-26/po/POTFILES.skip Mon Apr 6 08:12:03 2009
@@ -22,9 +22,6 @@
plugins/project-wizard/templates/gtk/src/project.glade
plugins/project-wizard/templates/gtkmm/src/project.glade
plugins/scintilla/text_editor_cbs.c
-plugins/symbol-db/plugin.c
-plugins/symbol-db/symbol-db-view-locals.c
-plugins/symbol-db/symbol-db-view.c
plugins/symbol-db/symbol-db.glade
libegg/egg-combo-action.c
libegg/egg-entry-action.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]