anjuta r3431 - in trunk: . plugins/language-support-cpp-java plugins/sourceview



Author: jhs
Date: Mon Jan  7 14:53:46 2008
New Revision: 3431
URL: http://svn.gnome.org/viewvc/anjuta?rev=3431&view=rev

Log:
2008-01-07  Johannes Schmid <jhs gnome org>

	* plugins/language-support-cpp-java/anjuta-language-cpp-java.glade:
	* plugins/language-support-cpp-java/anjuta-language-cpp-java.plugin
	.in:
	* plugins/language-support-cpp-java/plugin.c: (install_support),
	(uninstall_support), (ipreferences_merge), (ipreferences_unmerge):
	Added basic Vala support
	
	* plugins/sourceview/sourceview.c: (autodetect_language):
	Fixed mime-type detection

Modified:
   trunk/ChangeLog
   trunk/plugins/language-support-cpp-java/anjuta-language-cpp-java.glade
   trunk/plugins/language-support-cpp-java/anjuta-language-cpp-java.plugin.in
   trunk/plugins/language-support-cpp-java/plugin.c
   trunk/plugins/sourceview/sourceview.c

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Mon Jan  7 14:53:46 2008
@@ -1,3 +1,15 @@
+2008-01-07  Johannes Schmid <jhs gnome org>
+
+	* plugins/language-support-cpp-java/anjuta-language-cpp-java.glade:
+	* plugins/language-support-cpp-java/anjuta-language-cpp-java.plugin
+	.in:
+	* plugins/language-support-cpp-java/plugin.c: (install_support),
+	(uninstall_support), (ipreferences_merge), (ipreferences_unmerge):
+	Added basic Vala support
+	
+	* plugins/sourceview/sourceview.c: (autodetect_language):
+	Fixed mime-type detection
+
 2008-01-06  Massimo Cora'  <maxcvs email it>
 
   Reviewed by: Johannes Schmid <jhs gnome org>

Modified: trunk/plugins/language-support-cpp-java/anjuta-language-cpp-java.glade
==============================================================================
--- trunk/plugins/language-support-cpp-java/anjuta-language-cpp-java.glade	(original)
+++ trunk/plugins/language-support-cpp-java/anjuta-language-cpp-java.glade	Mon Jan  7 14:53:46 2008
@@ -31,6 +31,7 @@
                         <property name="can_focus">True</property>
                         <property name="label" translatable="yes">Pressing tab indents</property>
                         <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
                         <property name="draw_indicator">True</property>
                       </widget>
                       <packing>
@@ -46,6 +47,7 @@
                         <property name="can_focus">True</property>
                         <property name="label" translatable="yes">Enable adaptive indentation</property>
                         <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
                         <property name="draw_indicator">True</property>
                       </widget>
                       <packing>
@@ -62,6 +64,7 @@
                         <property name="label" translatable="yes">Enable smart indentation</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
+                        <property name="response_id">0</property>
                         <property name="draw_indicator">True</property>
                       </widget>
                       <packing>
@@ -172,7 +175,7 @@
             <child>
               <widget class="GtkLabel" id="label12321">
                 <property name="visible">True</property>
-                <property name="label" translatable="yes">&lt;b&gt;C, C++ and Java smart Indentation&lt;/b&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Smart Indentation&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
               </widget>
               <packing>
@@ -180,9 +183,6 @@
               </packing>
             </child>
           </widget>
-          <packing>
-            <property name="tab_expand">False</property>
-          </packing>
         </child>
         <child>
           <widget class="GtkLabel" id="label12351">
@@ -191,7 +191,6 @@
           </widget>
           <packing>
             <property name="type">tab</property>
-            <property name="tab_expand">False</property>
             <property name="tab_fill">False</property>
           </packing>
         </child>
@@ -254,6 +253,7 @@
                         <property name="border_width">5</property>
                         <property name="label" translatable="yes">Enable code completion</property>
                         <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
                         <property name="draw_indicator">True</property>
                       </widget>
                       <packing>
@@ -269,6 +269,7 @@
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="border_width">5</property>
                         <property name="label" translatable="yes">Add a space after function call autocompletion</property>
+                        <property name="response_id">0</property>
                         <property name="draw_indicator">True</property>
                       </widget>
                       <packing>
@@ -282,6 +283,7 @@
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="border_width">5</property>
                         <property name="label" translatable="yes">Add '(' after function call autocompletion</property>
+                        <property name="response_id">0</property>
                         <property name="draw_indicator">True</property>
                       </widget>
                       <packing>
@@ -295,7 +297,7 @@
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
                     <property name="yalign">0</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Autocompletion&lt;/b&gt;</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Autocompletion (C/C++/Java only)&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                   </widget>
                   <packing>
@@ -331,6 +333,7 @@
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                             <property name="border_width">5</property>
                             <property name="label" translatable="yes">Show calltips</property>
+                            <property name="response_id">0</property>
                             <property name="draw_indicator">True</property>
                           </widget>
                           <packing>
@@ -363,7 +366,6 @@
           </widget>
           <packing>
             <property name="position">1</property>
-            <property name="tab_expand">False</property>
           </packing>
         </child>
         <child>
@@ -375,7 +377,6 @@
           <packing>
             <property name="type">tab</property>
             <property name="position">1</property>
-            <property name="tab_expand">False</property>
             <property name="tab_fill">False</property>
           </packing>
         </child>

Modified: trunk/plugins/language-support-cpp-java/anjuta-language-cpp-java.plugin.in
==============================================================================
--- trunk/plugins/language-support-cpp-java/anjuta-language-cpp-java.plugin.in	(original)
+++ trunk/plugins/language-support-cpp-java/anjuta-language-cpp-java.plugin.in	Mon Jan  7 14:53:46 2008
@@ -7,5 +7,5 @@
 UserActivatable=no
 
 [Language Support]
-Languages=C,C++,Java
-MimeTypes=text/x-c,text/x-java-source
+Languages=C,C++,Java,Vala
+MimeTypes=text/x-c,text/x-java-source,text/x-vala

Modified: trunk/plugins/language-support-cpp-java/plugin.c
==============================================================================
--- trunk/plugins/language-support-cpp-java/plugin.c	(original)
+++ trunk/plugins/language-support-cpp-java/plugin.c	Mon Jan  7 14:53:46 2008
@@ -1237,7 +1237,8 @@
 	
 	if (lang_plugin->current_language &&
 		(g_str_equal (lang_plugin->current_language, "C")
-		|| g_str_equal (lang_plugin->current_language, "C++")))
+		|| g_str_equal (lang_plugin->current_language, "C++")
+		|| g_str_equal (lang_plugin->current_language, "Vala")))
 	{
 		g_signal_connect (lang_plugin->current_editor,
 						  "char-added",
@@ -1258,7 +1259,12 @@
 	}
 	
 	initialize_indentation_params (lang_plugin);
-	if (IANJUTA_IS_EDITOR_ASSIST (lang_plugin->current_editor))
+	/* Disable editor intern auto-indent */
+	ianjuta_editor_set_auto_indent (IANJUTA_EDITOR(lang_plugin->current_editor),
+								    FALSE, NULL);
+	
+	if (IANJUTA_IS_EDITOR_ASSIST (lang_plugin->current_editor) &&
+		!g_str_equal (lang_plugin->current_language, "Vala"))
 	{
 		AnjutaPlugin *plugin;
 		AnjutaUI *ui;
@@ -1283,10 +1289,8 @@
 									   "ActionEditAutocomplete");
 		g_object_set (G_OBJECT (action), "visible", TRUE,
 					  "sensitive", TRUE, NULL);
-	}
-	/* Disable editor intern auto-indent */
-	ianjuta_editor_set_auto_indent (IANJUTA_EDITOR(lang_plugin->current_editor),
-								    FALSE, NULL);
+	}	
+		
 	lang_plugin->support_installed = TRUE;
 }
 
@@ -1298,7 +1302,8 @@
 	
 	if (lang_plugin->current_language &&
 		(g_str_equal (lang_plugin->current_language, "C")
-		|| g_str_equal (lang_plugin->current_language, "C++")))
+		|| g_str_equal (lang_plugin->current_language, "C++")
+		|| g_str_equal (lang_plugin->current_language, "Vala")))
 	{
 		g_signal_handlers_disconnect_by_func (lang_plugin->current_editor,
 									G_CALLBACK (on_editor_char_inserted_cpp),
@@ -1579,7 +1584,7 @@
 	/* Add preferences */
 	gxml = glade_xml_new (PREFS_GLADE, "preferences_dialog", NULL);
 	anjuta_preferences_add_page (prefs,
-								 gxml, "preferences", _("C/C++/Java"),
+								 gxml, "preferences", _("C/C++/Java/Vala"),
 								 ICON_FILE);
 	g_object_unref (gxml);
 }
@@ -1588,7 +1593,7 @@
 ipreferences_unmerge (IAnjutaPreferences* ipref, AnjutaPreferences* prefs,
 					  GError** e)
 {
-	anjuta_preferences_remove_page(prefs, _("C/C++/Java"));
+	anjuta_preferences_remove_page(prefs, _("C/C++/Java/Vala"));
 }
 
 static void

Modified: trunk/plugins/sourceview/sourceview.c
==============================================================================
--- trunk/plugins/sourceview/sourceview.c	(original)
+++ trunk/plugins/sourceview/sourceview.c	Mon Jan  7 14:53:46 2008
@@ -1809,8 +1809,8 @@
 static const gchar*
 autodetect_language (Sourceview* sv)
 {
-	const gchar* filename = idocument_get_filename (IANJUTA_DOCUMENT(sv), NULL);
-	const gchar* vfs_mime_type = gnome_vfs_get_mime_type_for_name (filename);
+	const gchar* uri = anjuta_document_get_uri (sv->priv->document);
+	const gchar* vfs_mime_type = gnome_vfs_get_mime_type (uri);
 	GStrv languages;
 	GStrv cur_lang;
 	const gchar* detected_language = NULL;



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