[anjuta] document-manager: Remove editor settings



commit 07ddf6b771e8a98c3c3a1512612867811edf8dc6
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Sun Dec 18 12:50:21 2011 +0100

    document-manager: Remove editor settings

 plugins/document-manager/action-callbacks.c        |  189 ++++++--------------
 .../document-manager/anjuta-document-manager.xml   |   36 +----
 plugins/document-manager/plugin.c                  |   75 --------
 3 files changed, 54 insertions(+), 246 deletions(-)
---
diff --git a/plugins/document-manager/action-callbacks.c b/plugins/document-manager/action-callbacks.c
index c7239f7..2b64379 100644
--- a/plugins/document-manager/action-callbacks.c
+++ b/plugins/document-manager/action-callbacks.c
@@ -2,7 +2,7 @@
 /*
  * action-callbacks.c
  * Copyright (C) 2003 Naba Kumar
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -12,7 +12,7 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
@@ -106,7 +106,7 @@ on_save_activate (GtkAction *action, gpointer user_data)
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	docman = ANJUTA_DOCMAN (plugin->docman);
-	
+
 	doc = anjuta_docman_get_current_document (docman);
 	if (doc)
 		anjuta_docman_save_document (docman, doc, NULL);
@@ -118,10 +118,10 @@ on_save_as_activate (GtkAction *action, gpointer user_data)
 	IAnjutaDocument *doc;
 	AnjutaDocman *docman;
 	DocmanPlugin *plugin;
-	
+
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	docman = ANJUTA_DOCMAN (plugin->docman);
-	
+
 	doc = anjuta_docman_get_current_document (docman);
 	if (doc)
 		anjuta_docman_save_document_as (docman, doc, NULL);
@@ -135,7 +135,7 @@ on_save_all_activate (GtkAction *action, gpointer user_data)
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	docman = ANJUTA_DOCMAN (plugin->docman);
-	
+
 	buffers = anjuta_docman_get_all_doc_widgets (docman);
 	if (buffers)
 	{
@@ -162,7 +162,7 @@ on_save_prompt_save_editor (AnjutaSavePrompt *save_prompt,
 							gpointer item, gpointer user_data)
 {
 	AnjutaDocman *docman;
-	
+
 	docman = ANJUTA_DOCMAN (user_data);
 	return anjuta_docman_save_document (docman, IANJUTA_DOCUMENT (item),
 										GTK_WIDGET (save_prompt));
@@ -187,7 +187,7 @@ on_close_file_activate (GtkAction *action, gpointer user_data)
 		gchar *uri;
 		GFile* file;
 		AnjutaSavePrompt *save_prompt;
-		
+
 		parent = gtk_widget_get_toplevel (GTK_WIDGET (doc));
 		/* Prompt for unsaved data */
 		save_prompt = anjuta_save_prompt_new (GTK_WINDOW (parent));
@@ -205,7 +205,7 @@ on_close_file_activate (GtkAction *action, gpointer user_data)
 									 uri, doc, on_save_prompt_save_editor,
 									 docman);
 		g_free (uri);
-		
+
 		switch (gtk_dialog_run (GTK_DIALOG (save_prompt)))
 		{
 			case ANJUTA_SAVE_PROMPT_RESPONSE_CANCEL:
@@ -231,7 +231,7 @@ on_close_all_file_activate (GtkAction *action, gpointer user_data)
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	docman = ANJUTA_DOCMAN (plugin->docman);
-	
+
 	/* Close all 'saved' files */
 	buffers = anjuta_docman_get_all_doc_widgets (docman);
 	if (buffers)
@@ -257,7 +257,7 @@ on_close_all_file_activate (GtkAction *action, gpointer user_data)
 	}
 }
 
-void 
+void
 on_close_other_file_activate (GtkAction *action, gpointer user_data)
 {
 	GList *buffers;
@@ -266,7 +266,7 @@ on_close_other_file_activate (GtkAction *action, gpointer user_data)
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	docman = ANJUTA_DOCMAN (plugin->docman);
-	
+
 	/* Close all 'saved' files */
 	buffers = anjuta_docman_get_all_doc_widgets (docman);
 	if (buffers)
@@ -276,7 +276,7 @@ on_close_other_file_activate (GtkAction *action, gpointer user_data)
 
 		curr_doc = anjuta_docman_get_current_document (docman);
 		while (node)
-		{	
+		{
 			IAnjutaDocument *doc;
 			GList* next;
 			doc = IANJUTA_DOCUMENT (node->data);
@@ -291,7 +291,7 @@ on_close_other_file_activate (GtkAction *action, gpointer user_data)
 			node = next;
 		}
 		g_list_free (buffers);
-	}	
+	}
 }
 
 void
@@ -302,7 +302,7 @@ on_reload_file_activate (GtkAction *action, gpointer user_data)
 	GtkWidget *dialog;
 	GtkWidget *parent;
 	gint reply = GTK_RESPONSE_YES;
-	
+
 	doc = get_current_document (user_data);
 	if (doc == NULL)
 		return;
@@ -329,7 +329,7 @@ on_reload_file_activate (GtkAction *action, gpointer user_data)
 		gtk_widget_destroy (dialog);
 		g_free (msg);
 	}
-		
+
 	if (reply == GTK_RESPONSE_YES)
 	{
 		GFile* file;
@@ -346,7 +346,7 @@ void
 on_print_activate (GtkAction *action, gpointer user_data)
 {
 	IAnjutaDocument *doc;
-	
+
 	doc = get_current_document (user_data);
 	if (doc)
 		ianjuta_print_print (IANJUTA_PRINT (doc), NULL);
@@ -356,7 +356,7 @@ void
 on_print_preview_activate (GtkAction *action, gpointer user_data)
 {
 	IAnjutaDocument *doc;
-	
+
 	doc = get_current_document (user_data);
 	if (doc)
 		ianjuta_print_print_preview (IANJUTA_PRINT (doc), NULL);
@@ -370,17 +370,17 @@ on_editor_command_upper_case_activate (GtkAction *action, gpointer user_data)
 	doc = get_current_document (user_data);
 	if (doc)
 	{
-		if (ianjuta_editor_selection_has_selection (IANJUTA_EDITOR_SELECTION (doc), 
+		if (ianjuta_editor_selection_has_selection (IANJUTA_EDITOR_SELECTION (doc),
 													NULL))
 		{
 			IAnjutaIterable *start, *end;
 			start = ianjuta_editor_selection_get_start (IANJUTA_EDITOR_SELECTION (doc),
 														NULL);
-			end = ianjuta_editor_selection_get_end (IANJUTA_EDITOR_SELECTION (doc), NULL);			
-			ianjuta_editor_convert_to_upper (IANJUTA_EDITOR_CONVERT (doc), 
+			end = ianjuta_editor_selection_get_end (IANJUTA_EDITOR_SELECTION (doc), NULL);
+			ianjuta_editor_convert_to_upper (IANJUTA_EDITOR_CONVERT (doc),
 											 start, end, NULL);
 			g_object_unref (start);
-			g_object_unref (end);			
+			g_object_unref (end);
 		}
 	}
 }
@@ -397,8 +397,8 @@ on_editor_command_lower_case_activate (GtkAction *action, gpointer user_data)
 		{
 			IAnjutaIterable *start, *end;
 			start = ianjuta_editor_selection_get_start (IANJUTA_EDITOR_SELECTION (doc), NULL);
-			end = ianjuta_editor_selection_get_end (IANJUTA_EDITOR_SELECTION (doc), NULL);			
-			ianjuta_editor_convert_to_lower (IANJUTA_EDITOR_CONVERT (doc), 
+			end = ianjuta_editor_selection_get_end (IANJUTA_EDITOR_SELECTION (doc), NULL);
+			ianjuta_editor_convert_to_lower (IANJUTA_EDITOR_CONVERT (doc),
 											 start, end, NULL);
 			g_object_unref (start);
 			g_object_unref (end);
@@ -443,7 +443,7 @@ void
 on_editor_command_select_all_activate (GtkAction *action, gpointer user_data)
 {
 	GtkWidget *widget;
-	
+
 	widget = get_current_focus_widget (user_data);
 
 	if (widget && GTK_IS_EDITABLE (widget))
@@ -456,7 +456,7 @@ on_editor_command_select_all_activate (GtkAction *action, gpointer user_data)
 			|| get_current_popup_active (user_data))
 		{
 			IAnjutaDocument *doc;
-			
+
 			doc = get_current_document (user_data);
 			if (doc)
 				ianjuta_editor_selection_select_all
@@ -507,7 +507,7 @@ on_editor_command_redo_activate (GtkAction *action, gpointer user_data)
 
 void
 on_editor_command_cut_activate (GtkAction *action, gpointer user_data)
-{	
+{
 	GtkWidget *widget;
 
 	widget = get_current_focus_widget (user_data);
@@ -522,7 +522,7 @@ on_editor_command_cut_activate (GtkAction *action, gpointer user_data)
 			|| get_current_popup_active (user_data))
 		{
 			IAnjutaDocument *doc;
-			
+
 			doc = get_current_document (user_data);
 			if (doc)
 				ianjuta_document_cut (doc, NULL);
@@ -547,7 +547,7 @@ on_editor_command_paste_activate (GtkAction *action, gpointer user_data)
 			|| get_current_popup_active (user_data))
 		{
 			IAnjutaDocument *doc;
-			
+
 			doc = get_current_document (user_data);
 			if (doc)
 				ianjuta_document_paste (doc, NULL);
@@ -572,7 +572,7 @@ on_editor_command_copy_activate (GtkAction *action, gpointer user_data)
 			|| get_current_popup_active (user_data))
 		{
 			IAnjutaDocument *doc;
-			
+
 			doc = get_current_document (user_data);
 			if (doc)
 				ianjuta_document_copy (doc, NULL);
@@ -701,9 +701,9 @@ void
 on_goto_line_no1_activate (GtkAction *action, gpointer user_data)
 {
 	DocmanPlugin *plugin;
-	
+
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	
+
 	if (!gtk_widget_get_parent (plugin->search_box))
 	{
 		gtk_box_pack_end (GTK_BOX (plugin->vbox), plugin->search_box, FALSE, FALSE, 0);
@@ -717,7 +717,7 @@ void
 on_goto_block_start1_activate (GtkAction *action, gpointer user_data)
 {
 	IAnjutaDocument *doc;
-	
+
 	doc = get_current_document (user_data);
 	if (doc)
 		ianjuta_editor_goto_start_block (IANJUTA_EDITOR_GOTO (doc), NULL);
@@ -727,102 +727,17 @@ void
 on_goto_block_end1_activate (GtkAction *action, gpointer user_data)
 {
 	IAnjutaDocument *doc;
-	
+
 	doc = get_current_document (user_data);
 	if (doc)
 		ianjuta_editor_goto_end_block (IANJUTA_EDITOR_GOTO (doc), NULL);
 }
 
-#define VIEW_LINENUMBERS_MARGIN    "docman-linenumber-visible"
-#define VIEW_MARKER_MARGIN         "docman-marker-visible"
-#define VIEW_FOLD_MARGIN           "docman-fold-visible"
-#define VIEW_INDENTATION_GUIDES    "docman-indentation-guides"
-#define VIEW_WHITE_SPACES          "docman-whitespace"
-#define VIEW_EOL                   "docman-eol"
-#define VIEW_LINE_WRAP             "docman-line-wrap"
-
-void
-on_editor_linenos1_activate (GtkAction *action, gpointer user_data)
-{
-	gboolean state;
-	DocmanPlugin *plugin;
-	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	g_settings_set_boolean (plugin->settings,
-	                        VIEW_LINENUMBERS_MARGIN, state);
-}
-
-void
-on_editor_markers1_activate (GtkAction *action, gpointer user_data)
-{
-	gboolean state;
-	DocmanPlugin *plugin;
-	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	g_settings_set_boolean (plugin->settings,
-	                        VIEW_MARKER_MARGIN, state);
-}
-
-void
-on_editor_codefold1_activate (GtkAction *action, gpointer user_data)
-{
-	gboolean state;
-	DocmanPlugin *plugin;
-	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	g_settings_set_boolean (plugin->settings,
-	                        VIEW_FOLD_MARGIN, state);
-}
-
-void
-on_editor_indentguides1_activate (GtkAction *action, gpointer user_data)
-{
-	gboolean state;
-	DocmanPlugin *plugin;
-	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	g_settings_set_boolean (plugin->settings,
-	                        VIEW_INDENTATION_GUIDES, state);
-}
-
-void
-on_editor_whitespaces1_activate (GtkAction *action, gpointer user_data)
-{
-	gboolean state;
-	DocmanPlugin *plugin;
-	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	g_settings_set_boolean (plugin->settings,
-	                        VIEW_WHITE_SPACES, state);
-}
-
-void
-on_editor_eolchars1_activate (GtkAction *action, gpointer user_data)
-{
-	gboolean state;
-	DocmanPlugin *plugin;
-	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	g_settings_set_boolean (plugin->settings,
-	                        VIEW_EOL, state);
-}
-
-void
-on_editor_linewrap1_activate (GtkAction *action, gpointer user_data)
-{
-	gboolean state;
-	DocmanPlugin *plugin;
-	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-	g_settings_set_boolean (plugin->settings,
-	                        VIEW_LINE_WRAP, state);
-}
-
 void
 on_zoom_in_text_activate (GtkAction *action, gpointer user_data)
 {
 	IAnjutaDocument *doc;
-	
+
 	doc = get_current_document (user_data);
 	if (doc)
 		ianjuta_editor_zoom_in (IANJUTA_EDITOR_ZOOM (doc), NULL);
@@ -832,7 +747,7 @@ void
 on_zoom_out_text_activate (GtkAction *action, gpointer user_data)
 {
 	IAnjutaDocument *doc;
-	
+
 	doc = get_current_document (user_data);
 	if (doc)
 		ianjuta_editor_zoom_out (IANJUTA_EDITOR_ZOOM (doc), NULL);
@@ -904,14 +819,14 @@ on_search_previous (GtkAction *action, gpointer user_data)
 	search_box_incremental_search (SEARCH_BOX (search_box), FALSE, TRUE);
 }
 
-void 
+void
 on_search_and_replace (GtkAction *action, gpointer user_data)
 {
 	DocmanPlugin *plugin;
 	GtkWidget *search_box;
 
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
-	
+
 	search_box = plugin->search_box;
 	if (!gtk_widget_get_parent (search_box))
 		gtk_box_pack_end (GTK_BOX (plugin->vbox), search_box, FALSE, FALSE, 0);
@@ -920,13 +835,13 @@ on_search_and_replace (GtkAction *action, gpointer user_data)
 	gtk_widget_show (search_box);
 }
 
-void 
+void
 on_search_popup_case_sensitive_toggle (GtkAction *action, gpointer user_data)
 {
 	DocmanPlugin *plugin;
 	GtkWidget *search_box;
 
-	gboolean case_sensitive_status = 
+	gboolean case_sensitive_status =
 		gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 
@@ -936,17 +851,17 @@ on_search_popup_case_sensitive_toggle (GtkAction *action, gpointer user_data)
 
 	if (!gtk_widget_get_visible (search_box))
 		gtk_widget_show (search_box);
-	
+
 	search_box_toggle_case_sensitive (SEARCH_BOX (search_box), case_sensitive_status);
 }
 
-void 
+void
 on_search_popup_highlight_toggle (GtkAction *action, gpointer user_data)
 {
 	DocmanPlugin *plugin;
 	GtkWidget *search_box;
 
-	gboolean highlight_status = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));	
+	gboolean highlight_status = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 
 	search_box = plugin->search_box;
@@ -1021,7 +936,7 @@ on_next_document (GtkAction *action, gpointer user_data)
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	docman = ANJUTA_DOCMAN (plugin->docman);
-	GtkNotebook* notebook = GTK_NOTEBOOK (docman); 
+	GtkNotebook* notebook = GTK_NOTEBOOK (docman);
 	gint cur_page = gtk_notebook_get_current_page(notebook);
 	if (cur_page <
 		gtk_notebook_get_n_pages(notebook) - 1)
@@ -1033,20 +948,20 @@ on_next_document (GtkAction *action, gpointer user_data)
 								   cur_page);
 }
 
-void 
+void
 on_previous_document (GtkAction *action, gpointer user_data)
 {
 	AnjutaDocman *docman;
 	DocmanPlugin *plugin;
 	plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
 	docman = ANJUTA_DOCMAN (plugin->docman);
-	GtkNotebook* notebook = GTK_NOTEBOOK (docman); 
+	GtkNotebook* notebook = GTK_NOTEBOOK (docman);
 	gint cur_page = gtk_notebook_get_current_page(notebook);
 	if (cur_page > 0)
 		cur_page--;
 	else
 		cur_page = -1; /* last_page */
-	
+
 	gtk_notebook_set_current_page (notebook,
 								   cur_page);
 }
@@ -1061,12 +976,12 @@ on_bookmark_toggle_activate (GtkAction *action, gpointer user_data)
 	if (doc && IANJUTA_IS_EDITOR(doc))
 	{
 		IAnjutaEditor* editor = IANJUTA_EDITOR(doc);
-		anjuta_bookmarks_toggle (ANJUTA_BOOKMARKS (plugin->bookmarks), editor, 
+		anjuta_bookmarks_toggle (ANJUTA_BOOKMARKS (plugin->bookmarks), editor,
 							  ianjuta_editor_get_lineno (editor, NULL));
 	}
 }
 
-void 
+void
 on_bookmark_next_activate (GtkAction *action, gpointer user_data)
 {
 	IAnjutaDocument *doc;
@@ -1076,7 +991,7 @@ on_bookmark_next_activate (GtkAction *action, gpointer user_data)
 	if (doc && IANJUTA_IS_EDITOR(doc))
 	{
 		IAnjutaEditor* editor = IANJUTA_EDITOR(doc);
-		anjuta_bookmarks_next (ANJUTA_BOOKMARKS (plugin->bookmarks), editor, 
+		anjuta_bookmarks_next (ANJUTA_BOOKMARKS (plugin->bookmarks), editor,
 							  ianjuta_editor_get_lineno (editor, NULL));
 	}
 }
@@ -1091,7 +1006,7 @@ on_bookmark_prev_activate (GtkAction *action, gpointer user_data)
 	if (doc && IANJUTA_IS_EDITOR(doc))
 	{
 		IAnjutaEditor* editor = IANJUTA_EDITOR(doc);
-		anjuta_bookmarks_prev (ANJUTA_BOOKMARKS (plugin->bookmarks), editor, 
+		anjuta_bookmarks_prev (ANJUTA_BOOKMARKS (plugin->bookmarks), editor,
 							   ianjuta_editor_get_lineno (editor, NULL));
 	}
 }
@@ -1115,5 +1030,5 @@ on_autocomplete_activate (GtkAction *action, gpointer user_data)
 	{
 		IAnjutaEditorAssist* assist = IANJUTA_EDITOR_ASSIST (doc);
 		ianjuta_editor_assist_invoke (assist, NULL, NULL);
-	}   
+	}
 }
diff --git a/plugins/document-manager/anjuta-document-manager.xml b/plugins/document-manager/anjuta-document-manager.xml
index ed8e1f9..e544955 100644
--- a/plugins/document-manager/anjuta-document-manager.xml
+++ b/plugins/document-manager/anjuta-document-manager.xml
@@ -67,13 +67,7 @@
 		</menu>
 		<menu name="MenuView" action="ActionMenuView">
 			<menu name="MenuViewEditor" action="ActionMenuViewEditor">
-				<menuitem name="LineNumbersMargin" action="ActionViewEditorLinenumbers" />
-				<menuitem name="MarkersMargin" action="ActionViewEditorMarkers" />
-				<menuitem name="CodeFoldMargin" action="ActionViewEditorFolds" />
-				<menuitem name="IndentationGuides" action="ActionViewEditorGuides" />
-				<menuitem name="WhiteSpaces" action="ActionViewEditorSpaces" />
-				<menuitem name="LineEndCharacters" action="ActionViewEditorEOL" />
-				<menuitem name="LineWrapping" action="ActionViewEditorWrapping" />
+				<placeholder name="PlaceholderViewEditorMenus"/>
 				<separator name="separator9"/>
 				<menuitem name="MenuFormatStyle" action="ActionMenuFormatStyle"/>
 				<menuitem name="AddView" action="ActionViewEditorAddView" />
@@ -144,33 +138,7 @@
 				<menuitem name="HistoryNext" action="ActionEditGotoHistoryNext" />
 		</menu>
 		<menu name="MenuView" action="ActionMenuView">
-			<menuitem name="LineNumbersMargin" action="ActionViewEditorLinenumbers" />
-			<menuitem name="MarkersMargin" action="ActionViewEditorMarkers" />
-			<menuitem name="CodeFoldMargin" action="ActionViewEditorFolds" />
-			<menuitem name="IndentationGuides" action="ActionViewEditorGuides" />
-			<menuitem name="LineWrapping" action="ActionViewEditorWrapping" />
-			<separator name="separator28"/>
-			<menuitem name="ZoomIn" action="ActionViewEditorZoomIn" />
-			<menuitem name="ZoomOut" action="ActionViewEditorZoomOut" />
-		</menu>
-		<menuitem name="Close" action="ActionFileClose" />
-	</popup>
-	<popup name="PopupDocumentManager">
-		<menuitem name="Cut" action="ActionEditCut" />
-		<menuitem name="Copy" action="ActionEditCopy" />
-		<menuitem name="Paste" action="ActionEditPaste" />
-		<separator name="separator26"/>
-		<menu name="Goto" action="ActionMenuGoto">
-				<separator name="separator27"/>
-				<menuitem name="HistoryPrevious" action="ActionEditGotoHistoryPrev" />
-				<menuitem name="HistoryNext" action="ActionEditGotoHistoryNext" />
-		</menu>
-		<menu name="MenuView" action="ActionMenuView">
-			<menuitem name="LineNumbersMargin" action="ActionViewEditorLinenumbers" />
-			<menuitem name="MarkersMargin" action="ActionViewEditorMarkers" />
-			<menuitem name="CodeFoldMargin" action="ActionViewEditorFolds" />
-			<menuitem name="IndentationGuides" action="ActionViewEditorGuides" />
-			<menuitem name="LineWrapping" action="ActionViewEditorWrapping" />
+			<placeholder name="PlaceholderViewEditorPopup"/>
 			<separator name="separator28"/>
 			<menuitem name="ZoomIn" action="ActionViewEditorZoomIn" />
 			<menuitem name="ZoomOut" action="ActionViewEditorZoomOut" />
diff --git a/plugins/document-manager/plugin.c b/plugins/document-manager/plugin.c
index 5cb01d2..1412649 100644
--- a/plugins/document-manager/plugin.c
+++ b/plugins/document-manager/plugin.c
@@ -343,30 +343,6 @@ static GtkActionEntry actions_edit[] = {
 };
 
 
-static GtkToggleActionEntry actions_view[] = {
-  { "ActionViewEditorLinenumbers", NULL, N_("_Line Number Margin"), NULL,
-	N_("Show/Hide line numbers"),
-    G_CALLBACK (on_editor_linenos1_activate), FALSE},
-  { "ActionViewEditorMarkers", NULL, N_("_Marker Margin"), NULL,
-	N_("Show/Hide marker margin"),
-    G_CALLBACK (on_editor_markers1_activate), FALSE},
-  { "ActionViewEditorFolds", NULL, N_("_Code Fold Margin"), NULL,
-	N_("Show/Hide code fold margin"),
-    G_CALLBACK (on_editor_codefold1_activate), FALSE},
-  { "ActionViewEditorGuides", NULL, N_("_Indentation Guides"), NULL,
-	N_("Show/Hide indentation guides"),
-    G_CALLBACK (on_editor_indentguides1_activate), FALSE},
-  { "ActionViewEditorSpaces", NULL, N_("_White Space"), NULL,
-	N_("Show/Hide white spaces"),
-    G_CALLBACK (on_editor_whitespaces1_activate), FALSE},
-  { "ActionViewEditorEOL", NULL, N_("_Line End Characters"), NULL,
-	N_("Show/Hide line end characters"),
-    G_CALLBACK (on_editor_eolchars1_activate), FALSE},
-  { "ActionViewEditorWrapping", NULL, N_("Line _Wrapping"), NULL,
-	N_("Enable/disable line wrapping"),
-    G_CALLBACK (on_editor_linewrap1_activate), FALSE}
-};
-
 static GtkActionEntry actions_zoom[] = {
   { "ActionViewEditorZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom In"), "<control>KP_Add",
 	N_("Zoom in: Increase font size"),
@@ -450,22 +426,12 @@ static struct ActionGroupInfo action_groups[] = {
 };
 
 static struct ActionToggleGroupInfo action_toggle_groups[] = {
-	{ actions_view, G_N_ELEMENTS (actions_view), "ActionGroupEditorView", N_("Editor view settings") },
 	{ actions_searchbox_popup, G_N_ELEMENTS(actions_searchbox_popup),
 	  "ActionGroupEditorSearchOptions", N_("Toggle search options")	}
 };
 
 // void pref_set_style_combo(DocmanPlugin *plugin);
 
-
-#define VIEW_LINENUMBERS_MARGIN    "docman-linenumber-visible"
-#define VIEW_MARKER_MARGIN         "docman-marker-visible"
-#define VIEW_FOLD_MARGIN           "docman-fold-visible"
-#define VIEW_INDENTATION_GUIDES    "docman-indentation-guides"
-#define VIEW_WHITE_SPACES          "docman-whitespace"
-#define VIEW_EOL                   "docman-eol"
-#define VIEW_LINE_WRAP             "docman-line-wrap"
-
 #define MAX_TITLE_LENGTH 80
 
 static void
@@ -601,34 +567,6 @@ value_removed_project_root_uri (AnjutaPlugin *plugin, const gchar *name,
 }
 
 static void
-ui_states_init (AnjutaPlugin *plugin)
-{
-	gint i;
-	DocmanPlugin *eplugin;
-	static const gchar *prefs[] = {
-		VIEW_LINENUMBERS_MARGIN,
-		VIEW_MARKER_MARGIN,
-		VIEW_FOLD_MARGIN,
-		VIEW_INDENTATION_GUIDES,
-		VIEW_WHITE_SPACES,
-		VIEW_EOL,
-		VIEW_LINE_WRAP
-	};
-
-	eplugin = ANJUTA_PLUGIN_DOCMAN (plugin);
-	for (i = 0; i < sizeof (actions_view)/sizeof(GtkToggleActionEntry); i++)
-	{
-		GtkAction *action;
-		gboolean state;
-
-		state = g_settings_get_boolean (eplugin->settings, prefs[i]);
-		action = anjuta_ui_get_action (eplugin->ui, "ActionGroupEditorView",
-									   actions_view[i].name);
-		gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), state);
-	}
-}
-
-static void
 ui_give_shorter_names (AnjutaPlugin *plugin)
 {
 	AnjutaUI *ui;
@@ -812,13 +750,6 @@ update_document_ui_interface_items (AnjutaPlugin *plugin, IAnjutaDocument *doc)
 								   "ActionViewEditorRemoveView");
 	g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
 
-	/* Actually this does not really belong here but it would be annoying to
-	 * add another interface for it
-	 */
-	action = anjuta_ui_get_action (ui, "ActionGroupEditorView",
-								   "ActionViewEditorGuides");
-	g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
-
 	/* IAnjutaEditorFolds */
 	flag = IANJUTA_IS_EDITOR_FOLDS (doc);
 	action = anjuta_ui_get_action (ui, "ActionGroupEditorFormat",
@@ -835,11 +766,6 @@ update_document_ui_interface_items (AnjutaPlugin *plugin, IAnjutaDocument *doc)
 								   "ActionFormatFoldToggle");
 	g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
 
-	flag = IANJUTA_IS_EDITOR_FOLDS (doc);
-	action = anjuta_ui_get_action (ui, "ActionGroupEditorView",
-								   "ActionViewEditorFolds");
-	g_object_set (G_OBJECT (action), "visible", flag, "sensitive", flag, NULL);
-
 	/* IAnjutaEditorComment */
 	flag = IANJUTA_IS_EDITOR_COMMENT (doc);
 	action = anjuta_ui_get_action (ui, "ActionGroupEditorComment",
@@ -1798,7 +1724,6 @@ activate_plugin (AnjutaPlugin *plugin)
 							 TRUE, NULL);
 	anjuta_shell_present_widget (plugin->shell, dplugin->vbox, NULL);
 
-	ui_states_init(plugin);
 	ui_give_shorter_names (plugin);
 	update_document_ui (plugin, NULL);
 



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