Commit 6ddc5c3e authored by Johannes Schmid's avatar Johannes Schmid Committed by Johannes Schmid

Use correct plural forms for buttons and update buttons on clear()

2008-07-07  Johannes Schmid  <jhs@idefix>

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

svn path=/trunk/; revision=4064
parent 4aa6bb6b
2008-07-07 Johannes Schmid <jhs@idefix>
* plugins/message-view/message-view.c:
Use correct plural forms for buttons and update buttons on clear()
2008-07-06 Johannes Schmid <jhs@idefix>
* plugins/build-basic-autotools/build-basic-autotools.c
......
......@@ -434,6 +434,17 @@ fi
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/gtk/po/Makefile
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 @@ fi
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"
......@@ -171,6 +171,10 @@ anjuta-enum-types.c: Makefile
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 \
......
......@@ -93,6 +93,6 @@ gboolean anjuta_plugin_description_get_locale_string (AnjutaPluginDescription *d
const gchar *section,
const gchar *keyname,
gchar **val);
G_END_DECLS;
G_END_DECLS
#endif /* ANJUTA_PLUGIN_PARSER_H */
......@@ -85,6 +85,6 @@ GList* anjuta_session_get_string_list (AnjutaSession *session,
const gchar *section,
const gchar *key);
G_END_DECLS;
G_END_DECLS
#endif /* _ANJUTA_SESSION_H_ */
......@@ -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;
......
......@@ -1286,6 +1286,30 @@ imessage_view_buffer_append (IAnjutaMessageView * message_view,
}
}
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 @@ imessage_view_append (IAnjutaMessageView *message_view,
gchar *utf8_msg;
gchar *escaped_str;
gchar* stock_id = NULL;
gchar *temp;
MessageView *view;
Message *message;
......@@ -1318,36 +1341,28 @@ imessage_view_append (IAnjutaMessageView *message_view,
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 @@ imessage_view_clear (IAnjutaMessageView *message_view, GError **e)
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);
}
......
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 @@ wizard_files_DATA = \
gtk.wiz \
gtk-logo.png \
anjuta-plugin.wiz \
anjuta-plugin-vala.wiz \
anjuta-plugin-logo.png \
gnome.wiz \
gnome-logo.png \
......
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