anjuta r4064 - in trunk: . libanjuta manuals/reference/libanjuta plugins/message-view plugins/project-wizard/templates



Author: jhs
Date: Sun Jul  6 22:55:45 2008
New Revision: 4064
URL: http://svn.gnome.org/viewvc/anjuta?rev=4064&view=rev

Log:
2008-07-07  Johannes Schmid  <jhs idefix>

	* plugins/message-view/message-view.c:
	Use correct plural forms for buttons and update buttons on clear()

Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/libanjuta/Makefile.am
   trunk/libanjuta/anjuta-plugin-description.h
   trunk/libanjuta/anjuta-session.h
   trunk/manuals/reference/libanjuta/libanjuta-docs.sgml
   trunk/plugins/message-view/message-view.c
   trunk/plugins/project-wizard/templates/Makefile.am

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Sun Jul  6 22:55:45 2008
@@ -434,6 +434,17 @@
 
 AM_CONDITIONAL(HAVE_PLUGIN_SYMBOL_DB, [test x$symboldb = xyes])
 
+dnl Check for Vala
+dnl -------------------------------------------------------------
+PKG_CHECK_MODULES(VALA, vala-1.0, [have_vala="yes"], [have_vala="no"])
+
+if test x$have_vala = xyes; then
+	vapidir=`pkg-config --variable=vapidir vala-1.0`
+	AC_SUBST(vapidir)
+fi
+
+AM_CONDITIONAL(HAVE_VALA, [test x$have_vala = xyes])
+
 dnl Valgrind plugin
 dnl check for libbfd
 dnl -------------------------------------------------------------
@@ -1102,6 +1113,9 @@
 plugins/project-wizard/templates/anjuta-plugin/Makefile
 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
+plugins/project-wizard/templates/anjuta-plugin-vala/Makefile
+plugins/project-wizard/templates/anjuta-plugin-vala/src/Makefile
+plugins/project-wizard/templates/anjuta-plugin-vala/po/Makefile
 plugins/project-wizard/templates/gnome/Makefile
 plugins/project-wizard/templates/gnome/src/Makefile
 plugins/project-wizard/templates/gnome/po/Makefile
@@ -1201,9 +1215,14 @@
 if [ test x$symboldb = xyes ]; then
         echo "Building new (unstable) Symbol-db plugin: ..............YES"
 else
-        echo "Building new (unstable) Symbol-db plugin: .......,,.....NO"
+        echo "Building new (unstable) Symbol-db plugin: ..............NO"
+fi
+if [ test x$have_vala = xyes]; then
+        echo "Building support for Vala plugins: .....................YES"
+else
+        echo "Building support for Vala plugins: .....................NO"
 fi
 echo "-------------------------------------------------------------------"
-echo "AM_CFLAGS = $AM_CFLAGS"
-echo "AM_CXXFLAGS = $AM_CXXFLAGS"
+#echo "AM_CFLAGS = $AM_CFLAGS"
+#echo "AM_CXXFLAGS = $AM_CXXFLAGS"
 

Modified: trunk/libanjuta/Makefile.am
==============================================================================
--- trunk/libanjuta/Makefile.am	(original)
+++ trunk/libanjuta/Makefile.am	Sun Jul  6 22:55:45 2008
@@ -171,6 +171,10 @@
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libanjuta-1.0.pc
 
+if HAVE_VALA
+vapi_DATA = libanjuta-1.0.vapi libanjuta-1.0.deps
+endif
+
 EXTRA_DIST = \
 	$(libanjutainclude_HEADERS) \
 	libanjuta-1.0.pc.in \

Modified: trunk/libanjuta/anjuta-plugin-description.h
==============================================================================
--- trunk/libanjuta/anjuta-plugin-description.h	(original)
+++ trunk/libanjuta/anjuta-plugin-description.h	Sun Jul  6 22:55:45 2008
@@ -93,6 +93,6 @@
 													  const gchar *section,
 													  const gchar *keyname,
 													  gchar **val);
-G_END_DECLS;
+G_END_DECLS
 
 #endif /* ANJUTA_PLUGIN_PARSER_H */

Modified: trunk/libanjuta/anjuta-session.h
==============================================================================
--- trunk/libanjuta/anjuta-session.h	(original)
+++ trunk/libanjuta/anjuta-session.h	Sun Jul  6 22:55:45 2008
@@ -85,6 +85,6 @@
 									   const gchar *section,
 									   const gchar *key);
 									   
-G_END_DECLS;
+G_END_DECLS
 
 #endif /* _ANJUTA_SESSION_H_ */

Modified: trunk/manuals/reference/libanjuta/libanjuta-docs.sgml
==============================================================================
--- trunk/manuals/reference/libanjuta/libanjuta-docs.sgml	(original)
+++ trunk/manuals/reference/libanjuta/libanjuta-docs.sgml	Sun Jul  6 22:55:45 2008
@@ -3,6 +3,7 @@
     "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; [
 <!ENTITY AnjutaArchitecture SYSTEM "anjuta-architecture.sgml">
 <!ENTITY WritingPlugins SYSTEM "writing-plugins.sgml">
+<!ENTITY WritingPluginsInVala SYSTEM "writing-plugins-vala.sgml">
 <!ENTITY PluginDescriptionFile SYSTEM "plugin-description-file.sgml">
 <!ENTITY ProjectWizardFormat SYSTEM "project-wizard-format.sgml">
 ]>
@@ -43,6 +44,7 @@
 
   &AnjutaArchitecture;
   &WritingPlugins;
+  &WritingPluginsInVala;
   &PluginDescriptionFile;
   &ProjectWizardFormat;
 

Modified: trunk/plugins/message-view/message-view.c
==============================================================================
--- trunk/plugins/message-view/message-view.c	(original)
+++ trunk/plugins/message-view/message-view.c	Sun Jul  6 22:55:45 2008
@@ -1286,6 +1286,30 @@
 	}
 }
 
+static void 
+update_button_labels (MessageView* view)
+{
+	gchar* temp;
+	
+	temp = g_strdup_printf(ngettext ("%d Message", "%d Messages", 
+									 view->privat->info_count),
+						   view->privat->info_count);
+	gtk_button_set_label (GTK_BUTTON (view->privat->info), temp);
+	g_free (temp);
+	temp = g_strdup_printf(ngettext ("%d Warning", "%d Warnings", 
+									 view->privat->warn_count),
+						   view->privat->warn_count);	
+	gtk_button_set_label (GTK_BUTTON (view->privat->warn), temp);
+	g_free (temp);
+	temp = g_strdup_printf(ngettext ("%d Error", "%d Errors", 
+									 view->privat->error_count),
+						   view->privat->error_count);	
+	gtk_button_set_label (GTK_BUTTON (view->privat->error), temp);
+	g_free (temp);
+	
+}
+
+
 static void
 imessage_view_append (IAnjutaMessageView *message_view,
 					  IAnjutaMessageViewType type,
@@ -1300,7 +1324,6 @@
 	gchar *utf8_msg;
 	gchar *escaped_str;
 	gchar* stock_id = NULL;
-	gchar *temp;
 	
 	MessageView *view;
 	Message *message;
@@ -1318,36 +1341,28 @@
 		switch (message->type)
 		{
 			case IANJUTA_MESSAGE_VIEW_TYPE_INFO:
-				stock_id = GTK_STOCK_INFO;
 				view->privat->info_count++;
-				temp = g_strdup_printf(_("%d Messages"), view->privat->info_count);
-				gtk_button_set_label (GTK_BUTTON (view->privat->info), temp);
-				g_free (temp);
+				stock_id = GTK_STOCK_INFO;
 				break;
 			case IANJUTA_MESSAGE_VIEW_TYPE_WARNING:
 				color = anjuta_preferences_get (view->privat->prefs,
 									  "messages.color.warning");
 				/* FIXME: There is no GTK_STOCK_WARNING which would fit better here */
 				view->privat->warn_count++;
-				temp = g_strdup_printf(_("%d Warnings"), view->privat->warn_count);
-				gtk_button_set_label (GTK_BUTTON (view->privat->warn), temp);
 				stock_id = GTK_STOCK_DIALOG_WARNING;
-				g_free (temp);
 				break;
 			case IANJUTA_MESSAGE_VIEW_TYPE_ERROR:
 				color = anjuta_preferences_get (view->privat->prefs,
 									  "messages.color.error");
 				view->privat->error_count++;
-				temp = g_strdup_printf(_("%d Errors"), view->privat->error_count);
-				gtk_button_set_label (GTK_BUTTON (view->privat->error), temp);
 				stock_id = GTK_STOCK_STOP;
-				g_free (temp);
 				break;
 			default:
 				color = NULL;
 		}
 	}
-
+	update_button_labels (view);
+	
 	/* Add the message to the tree */
 	store = GTK_LIST_STORE (view->privat->model);
 	gtk_list_store_append (store, &iter);
@@ -1405,6 +1420,8 @@
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (view->privat->warn), TRUE);
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (view->privat->error), TRUE);
 	
+	update_button_labels (view);
+	
 	store = GTK_LIST_STORE (view->privat->model);
 	gtk_list_store_clear (store);
 }

Modified: trunk/plugins/project-wizard/templates/Makefile.am
==============================================================================
--- trunk/plugins/project-wizard/templates/Makefile.am	(original)
+++ trunk/plugins/project-wizard/templates/Makefile.am	Sun Jul  6 22:55:45 2008
@@ -1,5 +1,5 @@
 
-SUBDIRS = minimal terminal cpp gtk anjuta-plugin gnome \
+SUBDIRS = minimal terminal cpp gtk anjuta-plugin anjuta-plugin-vala gnome \
 	gtkmm wxwin xlib xlib-dock gcj java \
 	python mkfile sdl
 
@@ -15,6 +15,7 @@
 	gtk.wiz \
 	gtk-logo.png \
 	anjuta-plugin.wiz \
+	anjuta-plugin-vala.wiz \
 	anjuta-plugin-logo.png \
 	gnome.wiz \
 	gnome-logo.png \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]