anjuta r4429 - in trunk: . data plugins plugins/starter



Author: naba
Date: Sun Dec  7 18:29:14 2008
New Revision: 4429
URL: http://svn.gnome.org/viewvc/anjuta?rev=4429&view=rev

Log:
	* data/default.profile:
	* plugins/Makefile.am:
	* plugins/starter/starter.c (recent_project_clicked_cb),
	(starter_instance_init), (starter_new):
	Added the subdir to plugins/Makefile.am. Since we are not going to
	use it in the document-manager then it is not
	neccessary implement all that interfaces in the starter.[ch]


Modified:
   trunk/ChangeLog
   trunk/data/default.profile
   trunk/plugins/Makefile.am
   trunk/plugins/starter/starter.c

Modified: trunk/data/default.profile
==============================================================================
--- trunk/data/default.profile	(original)
+++ trunk/data/default.profile	Sun Dec  7 18:29:14 2008
@@ -7,7 +7,7 @@
                  attribute="Interfaces"
                  value="IAnjutaFileLoader"/>
     </plugin>
-    <plugin name="Starter View"
+    <plugin name="Starter"
             url="http://anjuta.org/plugins/";
             mandatory="no">
                 <require group="Anjuta Plugin"

Modified: trunk/plugins/Makefile.am
==============================================================================
--- trunk/plugins/Makefile.am	(original)
+++ trunk/plugins/Makefile.am	Sun Dec  7 18:29:14 2008
@@ -35,7 +35,8 @@
 	git \
 	sourceview \
 	run-program \
-	scratchbox
+	scratchbox \
+	starter
 
 # indent
 

Modified: trunk/plugins/starter/starter.c
==============================================================================
--- trunk/plugins/starter/starter.c	(original)
+++ trunk/plugins/starter/starter.c	Sun Dec  7 18:29:14 2008
@@ -21,10 +21,7 @@
 #include <libanjuta/anjuta-shell.h>
 #include <libanjuta/anjuta-utils.h>
 #include <libanjuta/resources.h>
-#include <libanjuta/interfaces/ianjuta-document.h>
 #include <libanjuta/interfaces/ianjuta-document-manager.h>
-#include <libanjuta/interfaces/ianjuta-file.h>
-#include <libanjuta/interfaces/ianjuta-file-savable.h>
 #include <libanjuta/interfaces/ianjuta-file-loader.h>
 #include <libanjuta/interfaces/ianjuta-wizard.h>
 
@@ -69,8 +66,8 @@
 recent_project_clicked_cb (GtkButton *button, Starter *wcm)
 {
 	GFile *file;
-	IAnjutaLoader *loader = anjuta_shell_get_interface (wcm->priv->shell, IAnjutaFileLoader,
-														NULL);
+	IAnjutaFileLoader *loader = anjuta_shell_get_interface (wcm->priv->shell, IAnjutaFileLoader,
+															NULL);
 
 	file = g_object_get_data (G_OBJECT (button), "file");
 
@@ -352,7 +349,7 @@
 	
 	if (error != NULL)
 	{
-		g_warning (error->message);
+		g_warning ("%s", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -523,174 +520,11 @@
 	object_class->finalize = starter_finalize;
 }
 
-/* Return true if editor can redo */
-static gboolean
-idocument_can_redo (IAnjutaDocument *editor, GError **e)
-{
-	return FALSE;
-}
-
-/* Return true if editor can undo */
-static gboolean
-idocument_can_undo (IAnjutaDocument *editor, GError **e)
-{
-	return FALSE;
-}
-
-/* Return true if editor can undo */
-static void
-idocument_begin_undo_action (IAnjutaDocument *editor, GError **e)
-{
-	return;
-}
-
-/* Return true if editor can undo */
-static void
-idocument_end_undo_action (IAnjutaDocument *editor, GError **e)
-{
-	return;
-}
-
-
-static void 
-idocument_undo (IAnjutaDocument* edit, GError** ee)
-{
-	return;
-}
-
-static void 
-idocument_redo (IAnjutaDocument* edit, GError** ee)
-{
-	return;
-}
-
-/* Grab focus */
-static void
-idocument_grab_focus (IAnjutaDocument *editor, GError **e)
-{
-	return;
-}
-
-/* Return the opened filename */
-static const gchar* 
-idocument_get_filename (IAnjutaDocument *editor, GError **e)
-{
-	Starter *wcm = ANJUTA_STARTER (editor);
-
-	return wcm->priv->filename;
-}
-
-static void 
-idocument_cut (IAnjutaDocument* edit, GError** ee)
-{
-	return;
-}
-
-static void 
-idocument_copy (IAnjutaDocument* edit, GError** ee)
-{
-	return;
-}
-
-static void 
-idocument_paste (IAnjutaDocument* edit, GError** ee)
-{
-	return;
-}
-
-static void 
-idocument_clear (IAnjutaDocument* edit, GError** ee)
-{
-	return;
-}
-
-static void
-idocument_iface_init (IAnjutaDocumentIface *iface)
-{
-	iface->grab_focus = idocument_grab_focus;
-	iface->get_filename = idocument_get_filename;
-	iface->can_undo = idocument_can_undo;
-	iface->can_redo = idocument_can_redo;
-	iface->begin_undo_action = idocument_begin_undo_action;
-	iface->end_undo_action = idocument_end_undo_action;
-	iface->undo = idocument_undo;
-	iface->redo = idocument_redo;
-	iface->cut = idocument_cut;
-	iface->copy = idocument_copy;
-	iface->paste = idocument_paste;
-	iface->clear = idocument_clear;
-}
-
-/* IAnjutaFile interface */
-
-/* Open uri in Editor */
-static void
-ifile_open (IAnjutaFile* file, GFile *uri, GError** e)
-{
-	return;
-}
-
-/* Return the currently loaded uri */
-
-static GFile *
-ifile_get_file (IAnjutaFile* file, GError** e)
-{
-	GFile *f;
-	
-	f = g_file_new_for_path (_("Starter"));
-	
-	return f;
-}
-
-/* IAnjutaFileSavable interface */
-
-/* Save file */
-static void 
-ifile_savable_save (IAnjutaFileSavable* file, GError** e)
-{
-	return;
-}
-
-/* Save file as */
-static void 
-ifile_savable_save_as (IAnjutaFileSavable* file, GFile *uri, GError** e)
-{
-	return;
-}
-
-static void 
-ifile_savable_set_dirty (IAnjutaFileSavable* file, gboolean dirty, GError** e)
-{
-	return;
-}
-
-static gboolean 
-ifile_savable_is_dirty (IAnjutaFileSavable* file, GError** e)
-{
-	return FALSE;
-}
-
-static void
-isavable_iface_init (IAnjutaFileSavableIface *iface)
-{
-	iface->save = ifile_savable_save;
-	iface->save_as = ifile_savable_save_as;
-	iface->set_dirty = ifile_savable_set_dirty;
-	iface->is_dirty = ifile_savable_is_dirty;
-}
-
-static void
-ifile_iface_init (IAnjutaFileIface *iface)
-{
-	iface->open = ifile_open;
-	iface->get_file = ifile_get_file;
-}
-
 /* Plublic funcs */
 Starter *
 starter_new (AnjutaShell *shell)
 {
-	Starter *starter = ANJUTA_STARTER(g_object_new(ANJUTA_TYPE_STARTER, NULL));
+	Starter *starter = ANJUTA_STARTER (g_object_new (ANJUTA_TYPE_STARTER, NULL));
 
 	starter->priv->shell = shell;
 	
@@ -709,7 +543,4 @@
 }
 
 ANJUTA_TYPE_BEGIN(Starter, starter, GTK_TYPE_SCROLLED_WINDOW);
-ANJUTA_TYPE_ADD_INTERFACE(idocument, IANJUTA_TYPE_DOCUMENT);
-ANJUTA_TYPE_ADD_INTERFACE(ifile, IANJUTA_TYPE_FILE);
-ANJUTA_TYPE_ADD_INTERFACE(isavable, IANJUTA_TYPE_FILE_SAVABLE);
 ANJUTA_TYPE_END;



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