SF.net SVN: geany:[3266] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Fri Nov 21 17:33:35 UTC 2008
Revision: 3266
http://geany.svn.sourceforge.net/geany/?rev=3266&view=rev
Author: ntrel
Date: 2008-11-21 17:33:35 +0000 (Fri, 21 Nov 2008)
Log Message:
-----------
Remove now-unnecessary checks for geany_object != NULL.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/document.c
trunk/src/editor.c
trunk/src/project.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-21 17:27:16 UTC (rev 3265)
+++ trunk/ChangeLog 2008-11-21 17:33:35 UTC (rev 3266)
@@ -21,6 +21,8 @@
* src/plugins.c, src/main.c:
Create geany_object in main.c so core functions can use it even
when plugins are disabled.
+ * src/project.c, src/callbacks.c, src/document.c, src/editor.c:
+ Remove now-unnecessary checks for geany_object != NULL.
2008-11-20 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2008-11-21 17:27:16 UTC (rev 3265)
+++ trunk/src/callbacks.c 2008-11-21 17:33:35 UTC (rev 3266)
@@ -738,10 +738,7 @@
vte_cwd(DOC_FILENAME(doc), FALSE);
#endif
- if (geany_object)
- {
- g_signal_emit_by_name(geany_object, "document-activate", doc);
- }
+ g_signal_emit_by_name(geany_object, "document-activate", doc);
}
}
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2008-11-21 17:27:16 UTC (rev 3265)
+++ trunk/src/document.c 2008-11-21 17:33:35 UTC (rev 3266)
@@ -477,10 +477,7 @@
}
/* tell any plugins that the document is about to be closed */
- if (geany_object)
- {
- g_signal_emit_by_name(geany_object, "document-close", doc);
- }
+ g_signal_emit_by_name(geany_object, "document-close", doc);
/* Checking real_path makes it likely the file exists on disk */
if (! main_status.closing_all && doc->real_path != NULL)
@@ -598,10 +595,7 @@
/* "the" SCI signal (connect after initial setup(i.e. adding text)) */
g_signal_connect(doc->editor->sci, "sci-notify", G_CALLBACK(on_editor_notification), doc);
- if (geany_object)
- {
- g_signal_emit_by_name(geany_object, "document-new", doc);
- }
+ g_signal_emit_by_name(geany_object, "document-new", doc);
msgwin_status_add(_("New file \"%s\" opened."),
DOC_FILENAME(doc));
@@ -1576,10 +1570,8 @@
vte_cwd(doc->file_name, FALSE);
#endif
}
- if (geany_object)
- {
- g_signal_emit_by_name(geany_object, "document-save", doc);
- }
+ g_signal_emit_by_name(geany_object, "document-save", doc);
+
return TRUE;
}
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2008-11-21 17:27:16 UTC (rev 3265)
+++ trunk/src/editor.c 2008-11-21 17:33:35 UTC (rev 3266)
@@ -225,11 +225,9 @@
ui_update_popup_copy_items(doc);
ui_update_insert_include_item(doc, 0);
- if (geany_object)
- {
- g_signal_emit_by_name(geany_object, "update-editor-menu",
- current_word, editor_info.click_pos, doc);
- }
+ g_signal_emit_by_name(geany_object, "update-editor-menu",
+ current_word, editor_info.click_pos, doc);
+
gtk_menu_popup(GTK_MENU(main_widgets.editor_menu),
NULL, NULL, NULL, NULL, event->button, event->time);
Modified: trunk/src/project.c
===================================================================
--- trunk/src/project.c 2008-11-21 17:27:16 UTC (rev 3265)
+++ trunk/src/project.c 2008-11-21 17:33:35 UTC (rev 3266)
@@ -333,11 +333,8 @@
document_new_file_if_non_open();
}
}
+ g_signal_emit_by_name(geany_object, "project-close");
- if (geany_object)
- {
- g_signal_emit_by_name(geany_object, "project-close");
- }
update_ui();
}
@@ -909,11 +906,7 @@
/* read session files so they can be opened with configuration_open_files() */
configuration_load_session_files(config);
}
-
- if (geany_object)
- {
- g_signal_emit_by_name(geany_object, "project-open", config);
- }
+ g_signal_emit_by_name(geany_object, "project-open", config);
g_key_file_free(config);
update_ui();
@@ -959,7 +952,7 @@
if (project_prefs.project_session)
configuration_save_session_files(config);
- if (geany_object && emit_signal)
+ if (emit_signal)
{
g_signal_emit_by_name(geany_object, "project-save", config);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list