[anjuta] anjuta: Remove "exiting" signal from AnjutaShell.



commit cdea548ccfea5333df736b7bf56f3904f0cd92fe
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Thu Nov 29 23:47:05 2012 +0100

    anjuta: Remove "exiting" signal from AnjutaShell.
    
    It's not needed anymore since plugins will always be deactivated during destruction of a
    AnjutaWindow and the AnjutaProfileManager "profile-descoped" signal will also be
    emitted when a AnjutaWindow is destroyed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689054

 libanjuta/anjuta-shell.c         |   15 ---------------
 libanjuta/anjuta-shell.h         |    2 --
 plugins/git/plugin.c             |   23 +----------------------
 plugins/project-manager/plugin.c |   15 ---------------
 src/anjuta-application.c         |    2 --
 5 files changed, 1 insertions(+), 56 deletions(-)
---
diff --git a/libanjuta/anjuta-shell.c b/libanjuta/anjuta-shell.c
index a4a7a55..3508b1c 100644
--- a/libanjuta/anjuta-shell.c
+++ b/libanjuta/anjuta-shell.c
@@ -1002,14 +1002,6 @@ anjuta_shell_save_prompt (AnjutaShell *shell,
 	g_signal_emit_by_name (shell, "save-prompt", save_prompt);
 }
 
-void
-anjuta_shell_notify_exit (AnjutaShell *shell,
-						  GError **error)
-{
-	g_return_if_fail (ANJUTA_IS_SHELL (shell));
-	g_signal_emit_by_name (shell, "exiting");
-}
-
 static void
 anjuta_shell_base_init (gpointer gclass)
 {
@@ -1059,13 +1051,6 @@ anjuta_shell_base_init (gpointer gclass)
 			      anjuta_cclosure_marshal_VOID__OBJECT,
 			      G_TYPE_NONE, 1,
 			      G_TYPE_OBJECT);
-		g_signal_new ("exiting",
-			      ANJUTA_TYPE_SHELL,
-			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (AnjutaShellIface, exiting),
-			      NULL, NULL,
-			      anjuta_cclosure_marshal_VOID__VOID,
-			      G_TYPE_NONE, 0);
 		initialized = TRUE;
 	}
 }
diff --git a/libanjuta/anjuta-shell.h b/libanjuta/anjuta-shell.h
index a93eb66..d3258b2 100644
--- a/libanjuta/anjuta-shell.h
+++ b/libanjuta/anjuta-shell.h
@@ -75,7 +75,6 @@ struct _AnjutaShellIface {
 	void (*load_session) (AnjutaShell *shell, AnjutaSessionPhase phase,
 						  AnjutaSession *session);
 	void (*save_prompt)  (AnjutaShell *shell, AnjutaSavePrompt *save_prompt);
-	void (*exiting)      (AnjutaShell *shell);
 	
 	/* Virtual Table */
 	AnjutaStatus* (*get_status) (AnjutaShell  *shell, GError **err);
@@ -251,7 +250,6 @@ void anjuta_shell_session_load      (AnjutaShell *shell,
 void anjuta_shell_save_prompt       (AnjutaShell *shell,
 									 AnjutaSavePrompt *prompt,
 									 GError **error);
-void anjuta_shell_notify_exit       (AnjutaShell *shell, GError **error);
 void anjuta_shell_saving_push	    (AnjutaShell* shell);
 void anjuta_shell_saving_pop	    (AnjutaShell* shell);
 
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index 4ebb856..d6d151f 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -662,19 +662,6 @@ on_dock_window_unmapped (GtkWidget *dock_window, Git *plugin)
 	                                   plugin->command_bar_window, NULL);
 }
 
-static void
-on_shell_exiting (AnjutaShell *shell, Git *plugin)
-{
-	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->dock_window),
-	                                      G_CALLBACK (on_dock_window_mapped),
-	                                      plugin);
-
-	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->dock_window),
-	                                      G_CALLBACK (on_dock_window_unmapped),
-	                                      plugin);
-}
-
-
 static gboolean
 git_activate_plugin (AnjutaPlugin *plugin)
 {
@@ -843,11 +830,7 @@ git_activate_plugin (AnjutaPlugin *plugin)
 														   on_editor_removed,
 														   NULL);
 
-	g_signal_connect (G_OBJECT (plugin->shell), "exiting",
-	                  G_CALLBACK (on_shell_exiting),
-	                  git_plugin);
-	
-	
+
 	/* Git needs a working directory to work with; it can't take full paths,
 	 * so make sure that Git can't be used if there's no project opened. */
 	if (!git_plugin->project_root_directory)
@@ -883,10 +866,6 @@ git_deactivate_plugin (AnjutaPlugin *plugin)
 	                                      G_CALLBACK (on_dock_window_unmapped),
 	                                      plugin);
 
-	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->shell),
-	                                      G_CALLBACK (on_shell_exiting),
-	                                      git_plugin);
-	
 	anjuta_shell_remove_widget (plugin->shell, git_plugin->command_bar_window, NULL);
 	anjuta_shell_remove_widget (plugin->shell, git_plugin->dock_window, NULL);
 
diff --git a/plugins/project-manager/plugin.c b/plugins/project-manager/plugin.c
index fa8588a..286862e 100644
--- a/plugins/project-manager/plugin.c
+++ b/plugins/project-manager/plugin.c
@@ -206,16 +206,6 @@ on_session_load (AnjutaShell *shell, AnjutaSessionPhase phase, AnjutaSession *se
 	g_list_free (list);
 }
 
-static void
-on_shell_exiting (AnjutaShell *shell, ProjectManagerPlugin *plugin)
-{
-	if (plugin->project_file)
-	{
-		/* Also make sure we save the project session also */
-		project_manager_save_session (plugin);
-	}
-}
-
 static gboolean
 on_close_project_idle (gpointer plugin)
 {
@@ -1648,8 +1638,6 @@ project_manager_plugin_activate_plugin (AnjutaPlugin *plugin)
 					  G_CALLBACK (on_session_save), plugin);
 	g_signal_connect (G_OBJECT (plugin->shell), "load_session",
 					  G_CALLBACK (on_session_load), plugin);
-	g_signal_connect (G_OBJECT (plugin->shell), "exiting",
-					  G_CALLBACK (on_shell_exiting), plugin);
 	profile_manager = anjuta_shell_get_profile_manager (plugin->shell, NULL);
 
 	/* Connect to profile scoping */
@@ -1686,9 +1674,6 @@ project_manager_plugin_deactivate_plugin (AnjutaPlugin *plugin)
 	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->shell),
 										  G_CALLBACK (on_session_load),
 										  plugin);
-	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->shell),
-										  G_CALLBACK (on_shell_exiting),
-										  plugin);
 	g_signal_handlers_disconnect_by_func (G_OBJECT (profile_manager),
 										  G_CALLBACK (on_profile_descoped),
 										  plugin);
diff --git a/src/anjuta-application.c b/src/anjuta-application.c
index 7fdc856..41a8f0a 100644
--- a/src/anjuta-application.c
+++ b/src/anjuta-application.c
@@ -114,8 +114,6 @@ on_anjuta_delete_event (AnjutaWindow *win, GdkEvent *event, gpointer user_data)
 		}
 	}
 
-	anjuta_shell_notify_exit (ANJUTA_SHELL (win), NULL);
-
 	/* Close the profile manager which will emit "profile-descoped" and release
 	 * all previous profiles. */
 	anjuta_profile_manager_close (profile_manager);



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