[gedit] Updated coding style



commit d8a65c523391240ac445755cb8f1b7c179e21da0
Author: Garrett Regier <alias301 gmail com>
Date:   Sun May 23 02:50:02 2010 -0700

    Updated coding style

 gedit/dialogs/gedit-close-confirmation-dialog.c |   17 ++-
 gedit/dialogs/gedit-encodings-dialog.c          |    2 +
 gedit/dialogs/gedit-preferences-dialog.c        |    6 +-
 gedit/dialogs/gedit-search-dialog.c             |    1 +
 gedit/dialogs/gedit-search-dialog.h             |    3 +-
 gedit/dialogs/gedit-style-scheme-dialog.c       |    5 +-
 gedit/dialogs/gedit-style-scheme-generator.h    |    2 +-
 gedit/gedit-app-osx.c                           |    4 +-
 gedit/gedit-app-osx.h                           |   19 +-
 gedit/gedit-app-win32.h                         |    9 +-
 gedit/gedit-app-x11.h                           |    8 +-
 gedit/gedit-app.c                               |   10 +-
 gedit/gedit-app.h                               |   30 ++--
 gedit/gedit-close-button.c                      |    2 +-
 gedit/gedit-close-button.h                      |    8 +-
 gedit/gedit-command-line.c                      |   12 +-
 gedit/gedit-command-line.h                      |   37 ++--
 gedit/gedit-commands-documents.c                |    7 +-
 gedit/gedit-commands-edit.c                     |   17 +-
 gedit/gedit-commands-file.c                     |   35 ++--
 gedit/gedit-commands-help.c                     |    1 +
 gedit/gedit-commands-search.c                   |   37 ++-
 gedit/gedit-commands-view.c                     |   19 +-
 gedit/gedit-dbus.c                              |   17 +-
 gedit/gedit-dbus.h                              |   12 +-
 gedit/gedit-debug.c                             |    1 +
 gedit/gedit-dirs.c                              |    1 +
 gedit/gedit-dirs.h                              |    1 +
 gedit/gedit-document-input-stream.c             |    5 +-
 gedit/gedit-document-input-stream.h             |   11 +-
 gedit/gedit-document-loader.c                   |   14 +-
 gedit/gedit-document-loader.h                   |    4 +-
 gedit/gedit-document-output-stream.c            |   17 +-
 gedit/gedit-document-output-stream.h            |    1 +
 gedit/gedit-document-saver.c                    |    7 +-
 gedit/gedit-document-saver.h                    |    6 +-
 gedit/gedit-document.c                          |   70 +++++-
 gedit/gedit-document.h                          |   19 +-
 gedit/gedit-documents-panel.c                   |    5 +-
 gedit/gedit-documents-panel.h                   |    1 +
 gedit/gedit-encodings-combo-box.c               |    9 +-
 gedit/gedit-encodings-combo-box.h               |    5 +-
 gedit/gedit-encodings.h                         |    5 +-
 gedit/gedit-fifo.h                              |   46 ++--
 gedit/gedit-file-chooser-dialog.c               |   10 +-
 gedit/gedit-file-chooser-dialog.h               |   34 ++--
 gedit/gedit-history-entry.c                     |   51 +++--
 gedit/gedit-history-entry.h                     |    3 +-
 gedit/gedit-io-error-message-area.c             |  273 ++++++++++++-----------
 gedit/gedit-io-error-message-area.h             |    1 +
 gedit/gedit-message-area.c                      |   11 +-
 gedit/gedit-message-area.h                      |    1 +
 gedit/gedit-message-bus.c                       |   70 +++---
 gedit/gedit-message-bus.h                       |  140 ++++++------
 gedit/gedit-message-type.c                      |   32 ++--
 gedit/gedit-message-type.h                      |   80 ++++----
 gedit/gedit-message.c                           |   10 +-
 gedit/gedit-message.h                           |   61 +++---
 gedit/gedit-metadata-manager.c                  |    9 +
 gedit/gedit-metadata-manager.h                  |    1 +
 gedit/gedit-notebook.c                          |    9 +-
 gedit/gedit-notebook.h                          |   20 +-
 gedit/gedit-object-module.c                     |    7 +-
 gedit/gedit-object-module.h                     |    9 +-
 gedit/gedit-panel.c                             |  137 ++++++------
 gedit/gedit-panel.h                             |   17 +-
 gedit/gedit-plugin-info.c                       |    5 +
 gedit/gedit-plugin-loader.h                     |    3 +-
 gedit/gedit-plugin-manager.c                    |   24 ++-
 gedit/gedit-plugin-manager.h                    |    1 +
 gedit/gedit-plugin.c                            |   10 +-
 gedit/gedit-plugin.h                            |    1 +
 gedit/gedit-plugins-engine.c                    |   30 ++-
 gedit/gedit-plugins-engine.h                    |   41 ++--
 gedit/gedit-print-job.c                         |    1 +
 gedit/gedit-print-job.h                         |   15 +-
 gedit/gedit-print-preview.c                     |  244 +++++++++++----------
 gedit/gedit-print-preview.h                     |    2 +
 gedit/gedit-progress-message-area.c             |   23 +-
 gedit/gedit-progress-message-area.h             |    1 +
 gedit/gedit-session.c                           |   16 +-
 gedit/gedit-session.h                           |    1 +
 gedit/gedit-settings.c                          |   12 +
 gedit/gedit-settings.h                          |   22 +-
 gedit/gedit-smart-charset-converter.c           |   20 +-
 gedit/gedit-smart-charset-converter.h           |    1 +
 gedit/gedit-spinner.h                           |    1 +
 gedit/gedit-status-combo-box.c                  |    2 +-
 gedit/gedit-status-combo-box.h                  |    7 +-
 gedit/gedit-statusbar.h                         |    1 +
 gedit/gedit-style-scheme-manager.c              |    4 +-
 gedit/gedit-style-scheme-manager.h              |    1 +
 gedit/gedit-tab-label.c                         |   14 +-
 gedit/gedit-tab-label.h                         |   17 +-
 gedit/gedit-tab.c                               |   21 ++-
 gedit/gedit-tab.h                               |    1 +
 gedit/gedit-utils.c                             |   68 ++++--
 gedit/gedit-utils.h                             |  135 ++++++------
 gedit/gedit-view.c                              |   59 ++++--
 gedit/gedit-view.h                              |    1 +
 gedit/gedit-window.c                            |   91 ++++++--
 gedit/gedit-window.h                            |    1 +
 gedit/gedit.c                                   |    2 +-
 gedit/gseal-gtk-compat.h                        |   23 +-
 104 files changed, 1435 insertions(+), 1021 deletions(-)
---
diff --git a/gedit/dialogs/gedit-close-confirmation-dialog.c b/gedit/dialogs/gedit-close-confirmation-dialog.c
index 9756431..6b0578d 100644
--- a/gedit/dialogs/gedit-close-confirmation-dialog.c
+++ b/gedit/dialogs/gedit-close-confirmation-dialog.c
@@ -126,7 +126,9 @@ response_cb (GeditCloseConfirmationDialog *dlg,
 		}
 	}
 	else
+	{
 		priv->selected_documents = NULL;
+	}
 }
 
 static void
@@ -173,7 +175,9 @@ set_logout_mode (GeditCloseConfirmationDialog *dlg,
 			
 			if (gedit_document_get_readonly (doc) || 
 			    gedit_document_is_untitled (doc))
+			{
 				stock_id = GTK_STOCK_SAVE_AS;
+			}
 		}
 
 		gtk_dialog_add_button (GTK_DIALOG (dlg),
@@ -271,7 +275,7 @@ gedit_close_confirmation_dialog_get_property (GObject    *object,
 
 	priv = GEDIT_CLOSE_CONFIRMATION_DIALOG (object)->priv;
 
-	switch( prop_id )
+	switch (prop_id)
 	{
 		case PROP_UNSAVED_DOCUMENTS:
 			g_value_set_pointer (value, priv->unsaved_documents);
@@ -313,7 +317,7 @@ gedit_close_confirmation_dialog_class_init (GeditCloseConfirmationDialogClass *k
 							       "Whether the dialog is in logout mode",
 							       FALSE,
 							       (G_PARAM_READWRITE | 
-							        G_PARAM_CONSTRUCT_ONLY)));							        
+							        G_PARAM_CONSTRUCT_ONLY)));
 }
 
 static GList *
@@ -700,12 +704,15 @@ build_multiple_docs_dialog (GeditCloseConfirmationDialog *dlg)
 	gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
 
 	if (priv->disable_save_to_disk)
+	{
 		str = g_strdup_printf (
 				ngettext ("Changes to %d document will be permanently lost.",
 					  "Changes to %d documents will be permanently lost.",
 					  g_list_length (priv->unsaved_documents)),
 				g_list_length (priv->unsaved_documents));
+	}
 	else
+	{
 		str = g_strdup_printf (
 				ngettext ("There is %d document with unsaved changes. "
 					  "Save changes before closing?",
@@ -713,6 +720,7 @@ build_multiple_docs_dialog (GeditCloseConfirmationDialog *dlg)
 					  "Save changes before closing?",
 					  g_list_length (priv->unsaved_documents)),
 				g_list_length (priv->unsaved_documents));
+	}
 
 	markup_str = g_strconcat ("<span weight=\"bold\" size=\"larger\">", str, "</span>", NULL);
 	g_free (str);
@@ -746,10 +754,14 @@ build_multiple_docs_dialog (GeditCloseConfirmationDialog *dlg)
 
 	/* Secondary label */
 	if (priv->disable_save_to_disk)
+	{
 		secondary_label = gtk_label_new (_("Saving has been disabled by the system administrator."));
+	}
 	else
+	{
 		secondary_label = gtk_label_new (_("If you don't save, "
 						   "all your changes will be permanently lost."));
+	}
 
 	gtk_box_pack_start (GTK_BOX (vbox2), secondary_label, FALSE, FALSE, 0);
 	gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
@@ -791,4 +803,5 @@ gedit_close_confirmation_dialog_get_unsaved_documents (GeditCloseConfirmationDia
 
 	return dlg->priv->unsaved_documents;
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/dialogs/gedit-encodings-dialog.c b/gedit/dialogs/gedit-encodings-dialog.c
index 1f0a41a..063ba41 100644
--- a/gedit/dialogs/gedit-encodings-dialog.c
+++ b/gedit/dialogs/gedit-encodings-dialog.c
@@ -208,8 +208,10 @@ add_button_clicked_callback (GtkWidget            *button,
 	while (tmp != NULL)
 	{
 		if (g_slist_find (dialog->priv->show_in_menu_list, tmp->data) == NULL)
+		{
 			dialog->priv->show_in_menu_list = g_slist_prepend (dialog->priv->show_in_menu_list,
 									   tmp->data);
+		}
 
 		tmp = g_slist_next (tmp);
 	}
diff --git a/gedit/dialogs/gedit-preferences-dialog.c b/gedit/dialogs/gedit-preferences-dialog.c
index 0e41726..8728132 100644
--- a/gedit/dialogs/gedit-preferences-dialog.c
+++ b/gedit/dialogs/gedit-preferences-dialog.c
@@ -654,7 +654,8 @@ install_scheme_clicked (GtkButton              *button,
 	GtkWidget      *chooser;
 	GtkFileFilter  *filter;
 	
-	if (dlg->priv->install_scheme_file_schooser != NULL) {
+	if (dlg->priv->install_scheme_file_schooser != NULL)
+	{
 		gtk_window_present (GTK_WINDOW (dlg->priv->install_scheme_file_schooser));
 		gtk_widget_grab_focus (dlg->priv->install_scheme_file_schooser);
 		return;
@@ -764,7 +765,9 @@ uninstall_scheme_clicked (GtkButton              *button,
 					new_iter_set = TRUE;
 			}
 			else
+			{
 				new_iter_set = TRUE;
+			}
 
 			gtk_tree_path_free (path);
 						
@@ -1046,4 +1049,5 @@ gedit_show_preferences_dialog (GeditWindow *parent)
 
 	gtk_window_present (GTK_WINDOW (preferences_dialog));
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/dialogs/gedit-search-dialog.c b/gedit/dialogs/gedit-search-dialog.c
index 52d0673..83ee403 100644
--- a/gedit/dialogs/gedit-search-dialog.c
+++ b/gedit/dialogs/gedit-search-dialog.c
@@ -632,4 +632,5 @@ gedit_search_dialog_get_wrap_around (GeditSearchDialog *dialog)
 
 	return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->wrap_around_checkbutton));
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/dialogs/gedit-search-dialog.h b/gedit/dialogs/gedit-search-dialog.h
index 732e7cf..3b07e3d 100644
--- a/gedit/dialogs/gedit-search-dialog.h
+++ b/gedit/dialogs/gedit-search-dialog.h
@@ -91,7 +91,7 @@ GtkWidget	*gedit_search_dialog_new		(GtkWindow         *parent,
 							 gboolean           show_replace);
 
 void		 gedit_search_dialog_present_with_time	(GeditSearchDialog *dialog,
-							 guint32 timestamp);
+							 guint32            timestamp);
 
 gboolean	 gedit_search_dialog_get_show_replace	(GeditSearchDialog *dialog);
 
@@ -126,4 +126,5 @@ gboolean	 gedit_search_dialog_get_wrap_around	(GeditSearchDialog *dialog);
 G_END_DECLS
 
 #endif  /* __GEDIT_SEARCH_DIALOG_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/dialogs/gedit-style-scheme-dialog.c b/gedit/dialogs/gedit-style-scheme-dialog.c
index 654dc9a..dfa8025 100644
--- a/gedit/dialogs/gedit-style-scheme-dialog.c
+++ b/gedit/dialogs/gedit-style-scheme-dialog.c
@@ -91,7 +91,7 @@ gedit_style_scheme_dialog_class_init (GeditStyleSchemeDialogClass *klass)
 
 	object_class->finalize = gedit_style_scheme_dialog_finalize;
 
-	g_type_class_add_private (object_class, sizeof(GeditStyleSchemeDialogPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditStyleSchemeDialogPrivate));
 }
 
 static void
@@ -105,7 +105,7 @@ dialog_response_handler (GtkDialog *dlg,
 		case GTK_RESPONSE_HELP:
 			gedit_help_display (GTK_WINDOW (dlg),
 					    NULL,
-					    "gedit-prefs"); // FIXME
+					    "gedit-prefs"); /* FIXME */
 
 			g_signal_stop_emission_by_name (dlg, "response");
 
@@ -219,4 +219,5 @@ gedit_style_scheme_dialog_new (GeditStyleSchemeGenerator *generator)
 
 	return GTK_WIDGET (dlg);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/dialogs/gedit-style-scheme-generator.h b/gedit/dialogs/gedit-style-scheme-generator.h
index bd53d5f..7b067f9 100644
--- a/gedit/dialogs/gedit-style-scheme-generator.h
+++ b/gedit/dialogs/gedit-style-scheme-generator.h
@@ -53,7 +53,7 @@ struct _GeditStyleSchemeGeneratorClass
         GObjectClass base_class;        
 };
 
-GType                           gedit_style_scheme_generator_get_type (void)  G_GNUC_CONST;
+GType                           gedit_style_scheme_generator_get_type			(void)  G_GNUC_CONST;
 
 GeditStyleSchemeGenerator*      gedit_style_scheme_generator_new			(GtkSourceStyleScheme *scheme);
 
diff --git a/gedit/gedit-app-osx.c b/gedit/gedit-app-osx.c
index 1d1858d..35f9a62 100644
--- a/gedit/gedit-app-osx.c
+++ b/gedit/gedit-app-osx.c
@@ -63,7 +63,7 @@ gedit_app_osx_show_help_impl (GeditApp    *app,
 {
 	gboolean ret = FALSE;
 
-	if (name == NULL || strcmp(name, "gedit.xml") == NULL || strcmp(name, "gedit") == 0)
+	if (name == NULL || strcmp (name, "gedit.xml") == NULL || strcmp (name, "gedit") == 0)
 	{
 		gchar *link;
 
@@ -161,7 +161,7 @@ gedit_app_osx_init (GeditAppOSX *self)
 	ige_mac_menu_set_global_key_handler_enabled (FALSE);
 
 	/* manually set name and icon */
-	g_set_application_name("gedit");
+	g_set_application_name ("gedit");
 	gtk_window_set_default_icon_name ("accessories-text-editor");
 }
 
diff --git a/gedit/gedit-app-osx.h b/gedit/gedit-app-osx.h
index 94f699e..b5e88af 100644
--- a/gedit/gedit-app-osx.h
+++ b/gedit/gedit-app-osx.h
@@ -40,18 +40,25 @@ typedef struct _GeditAppOSX		GeditAppOSX;
 typedef struct _GeditAppOSXClass	GeditAppOSXClass;
 typedef struct _GeditAppOSXPrivate	GeditAppOSXPrivate;
 
-struct _GeditAppOSX {
+struct _GeditAppOSX
+{
 	GeditApp parent;
 };
 
-struct _GeditAppOSXClass {
+struct _GeditAppOSXClass
+{
 	GeditAppClass parent_class;
 };
 
-GType gedit_app_osx_get_type (void) G_GNUC_CONST;
-void gedit_app_osx_set_window_title (GeditAppOSX *app, GeditWindow *window, const gchar *title, GeditDocument *document);
-gboolean gedit_app_osx_show_url (GeditAppOSX *app, const gchar *url);
-gboolean gedit_app_osx_show_help (GeditAppOSX *app, const gchar *link_id);
+GType		 gedit_app_osx_get_type		(void) G_GNUC_CONST;
+void		 gedit_app_osx_set_window_title	(GeditAppOSX   *app,
+						 GeditWindow   *window,
+						 const gchar   *title,
+						 GeditDocument *document);
+gboolean	 gedit_app_osx_show_url		(GeditAppOSX   *app,
+						 const gchar   *url);
+gboolean	 gedit_app_osx_show_help	(GeditAppOSX   *app,
+						 const gchar   *link_id);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-app-win32.h b/gedit/gedit-app-win32.h
index 58bc8a2..59c0a08 100644
--- a/gedit/gedit-app-win32.h
+++ b/gedit/gedit-app-win32.h
@@ -39,19 +39,20 @@ typedef struct _GeditAppWin32		GeditAppWin32;
 typedef struct _GeditAppWin32Class	GeditAppWin32Class;
 typedef struct _GeditAppWin32Private	GeditAppWin32Private;
 
-struct _GeditAppWin32 {
+struct _GeditAppWin32
+{
 	GeditApp parent;
 };
 
-struct _GeditAppWin32Class {
+struct _GeditAppWin32Class
+{
 	GeditAppClass parent_class;
 };
 
-GType gedit_app_win32_get_type (void) G_GNUC_CONST;
+GType	 gedit_app_win32_get_type (void) G_GNUC_CONST;
 
 G_END_DECLS
 
 #endif /* __GEDIT_APP_WIN32_H__ */
 
-
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-app-x11.h b/gedit/gedit-app-x11.h
index f3231d4..ca4502e 100644
--- a/gedit/gedit-app-x11.h
+++ b/gedit/gedit-app-x11.h
@@ -39,15 +39,17 @@ typedef struct _GeditAppX11		GeditAppX11;
 typedef struct _GeditAppX11Class	GeditAppX11Class;
 typedef struct _GeditAppX11Private	GeditAppX11Private;
 
-struct _GeditAppX11 {
+struct _GeditAppX11
+{
 	GeditApp parent;
 };
 
-struct _GeditAppX11Class {
+struct _GeditAppX11Class
+{
 	GeditAppClass parent_class;
 };
 
-GType gedit_app_x11_get_type (void) G_GNUC_CONST;
+GType	 gedit_app_x11_get_type (void) G_GNUC_CONST;
 
 G_END_DECLS
 
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index b0f2cca..ecd1c6d 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -271,7 +271,7 @@ gedit_app_class_init (GeditAppClass *klass)
 							     G_PARAM_READABLE |
 							     G_PARAM_STATIC_STRINGS));
 
-	g_type_class_add_private (object_class, sizeof(GeditAppPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditAppPrivate));
 }
 
 static gboolean
@@ -560,10 +560,12 @@ window_delete_event (GeditWindow *window,
 	    (GEDIT_WINDOW_STATE_SAVING |
 	     GEDIT_WINDOW_STATE_PRINTING |
 	     GEDIT_WINDOW_STATE_SAVING_SESSION))
-	    	return TRUE;
-	
+	{
+		return TRUE;
+	}
+
 	_gedit_cmd_file_quit (NULL, window);
-		
+
 	/* Do not destroy the window */
 	return TRUE;
 }
diff --git a/gedit/gedit-app.h b/gedit/gedit-app.h
index b3db742..09af06e 100644
--- a/gedit/gedit-app.h
+++ b/gedit/gedit-app.h
@@ -72,7 +72,7 @@ struct _GeditAppClass
 {
 	GObjectClass parent_class;
 
-	gboolean (*last_window_destroyed)	(GeditApp *app);
+	gboolean (*last_window_destroyed)	(GeditApp    *app);
 
 	gboolean (*show_help)			(GeditApp    *app,
 	                                         GtkWindow   *parent,
@@ -107,20 +107,20 @@ GType 		 gedit_app_get_type 			(void) G_GNUC_CONST;
 
 GeditApp 	*gedit_app_get_default			(void);
 
-GeditWindow	*gedit_app_create_window		(GeditApp  *app,
-							 GdkScreen *screen);
+GeditWindow	*gedit_app_create_window		(GeditApp    *app,
+							 GdkScreen   *screen);
 
-const GList	*gedit_app_get_windows			(GeditApp *app);
-GeditWindow	*gedit_app_get_active_window		(GeditApp *app);
+const GList	*gedit_app_get_windows			(GeditApp    *app);
+GeditWindow	*gedit_app_get_active_window		(GeditApp    *app);
 
 /* Returns a newly allocated list with all the documents */
-GList		*gedit_app_get_documents		(GeditApp *app);
+GList		*gedit_app_get_documents		(GeditApp    *app);
 
 /* Returns a newly allocated list with all the views */
-GList		*gedit_app_get_views			(GeditApp *app);
+GList		*gedit_app_get_views			(GeditApp    *app);
 
 /* Lockdown state */
-GeditLockdownMask gedit_app_get_lockdown		(GeditApp *app);
+GeditLockdownMask gedit_app_get_lockdown		(GeditApp    *app);
 
 gboolean	 gedit_app_show_help			(GeditApp    *app,
                                                          GtkWindow   *parent,
@@ -137,10 +137,10 @@ void		 gedit_app_set_window_title		(GeditApp    *app,
 GeditWindow	*_gedit_app_restore_window		(GeditApp    *app,
 							 const gchar *role);
 GeditWindow	*_gedit_app_get_window_in_viewport	(GeditApp     *app,
-							 GdkScreen    *screen,
-							 gint          workspace,
-							 gint          viewport_x,
-							 gint          viewport_y);
+							 GdkScreen   *screen,
+							 gint         workspace,
+							 gint         viewport_x,
+							 gint         viewport_y);
 void		 _gedit_app_set_lockdown		(GeditApp          *app,
 							 GeditLockdownMask  lockdown);
 void		 _gedit_app_set_lockdown_bit		(GeditApp          *app,
@@ -150,8 +150,8 @@ void		 _gedit_app_set_lockdown_bit		(GeditApp          *app,
  * This one is a gedit-window function, but we declare it here to avoid
  * #include headaches since it needs the GeditLockdownMask declaration.
  */
-void		 _gedit_window_set_lockdown		(GeditWindow         *window,
-							 GeditLockdownMask    lockdown);
+void		 _gedit_window_set_lockdown		(GeditWindow       *window,
+							 GeditLockdownMask  lockdown);
 
 /* global print config */
 GtkPageSetup		*_gedit_app_get_default_page_setup	(GeditApp         *app);
@@ -161,7 +161,7 @@ GtkPrintSettings	*_gedit_app_get_default_print_settings	(GeditApp         *app);
 void			 _gedit_app_set_default_print_settings	(GeditApp         *app,
 								 GtkPrintSettings *settings);
 
-GSettings		*_gedit_app_get_settings		(GeditApp    *app);
+GSettings		*_gedit_app_get_settings		(GeditApp  *app);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-close-button.c b/gedit/gedit-close-button.c
index 29487c6..99e8bab 100644
--- a/gedit/gedit-close-button.c
+++ b/gedit/gedit-close-button.c
@@ -26,7 +26,7 @@ G_DEFINE_TYPE (GeditCloseButton, gedit_close_button, GTK_TYPE_BUTTON)
 
 static void
 gedit_close_button_style_set (GtkWidget *button,
-			      GtkStyle *previous_style)
+			      GtkStyle  *previous_style)
 {
 	gint h, w;
 
diff --git a/gedit/gedit-close-button.h b/gedit/gedit-close-button.h
index 2314d11..bb511c9 100644
--- a/gedit/gedit-close-button.h
+++ b/gedit/gedit-close-button.h
@@ -39,17 +39,19 @@ typedef struct _GeditCloseButton	GeditCloseButton;
 typedef struct _GeditCloseButtonClass	GeditCloseButtonClass;
 typedef struct _GeditCloseButtonPrivate	GeditCloseButtonPrivate;
 
-struct _GeditCloseButton {
+struct _GeditCloseButton
+{
 	GtkButton parent;
 };
 
-struct _GeditCloseButtonClass {
+struct _GeditCloseButtonClass
+{
 	GtkButtonClass parent_class;
 };
 
 GType		  gedit_close_button_get_type (void) G_GNUC_CONST;
 
-GtkWidget	 *gedit_close_button_new (void);
+GtkWidget	 *gedit_close_button_new      (void);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-command-line.c b/gedit/gedit-command-line.c
index 4e1ab25..6725c54 100644
--- a/gedit/gedit-command-line.c
+++ b/gedit/gedit-command-line.c
@@ -104,7 +104,7 @@ gedit_command_line_class_init (GeditCommandLineClass *klass)
 	object_class->finalize = gedit_command_line_finalize;
 	object_class->constructor = gedit_command_line_constructor;
 
-	g_type_class_add_private (object_class, sizeof(GeditCommandLinePrivate));
+	g_type_class_add_private (object_class, sizeof (GeditCommandLinePrivate));
 }
 
 static void
@@ -357,6 +357,7 @@ gboolean
 gedit_command_line_get_new_window (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), FALSE);
+
 	return command_line->priv->new_window;
 }
 
@@ -373,6 +374,7 @@ gboolean
 gedit_command_line_get_new_document (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), FALSE);
+
 	return command_line->priv->new_document;
 }
 
@@ -380,6 +382,7 @@ gint
 gedit_command_line_get_line_position (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), 0);
+
 	return command_line->priv->line_position;
 }
 
@@ -387,6 +390,7 @@ gint
 gedit_command_line_get_column_position (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), 0);
+
 	return command_line->priv->column_position;
 }
 
@@ -394,6 +398,7 @@ GSList *
 gedit_command_line_get_file_list (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), NULL);
+
 	return command_line->priv->file_list;
 }
 
@@ -401,6 +406,7 @@ const GeditEncoding *
 gedit_command_line_get_encoding (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), NULL);
+
 	return command_line->priv->encoding;
 }
 
@@ -408,6 +414,7 @@ gboolean
 gedit_command_line_get_wait (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), FALSE);
+
 	return command_line->priv->wait;
 }
 
@@ -415,6 +422,7 @@ gboolean
 gedit_command_line_get_background (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), FALSE);
+
 	return command_line->priv->background;
 }
 
@@ -422,6 +430,7 @@ gboolean
 gedit_command_line_get_standalone (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), FALSE);
+
 	return command_line->priv->standalone;
 }
 
@@ -429,6 +438,7 @@ const gchar *
 gedit_command_line_get_geometry (GeditCommandLine *command_line)
 {
 	g_return_val_if_fail (GEDIT_IS_COMMAND_LINE (command_line), NULL);
+
 	return command_line->priv->geometry;
 }
 
diff --git a/gedit/gedit-command-line.h b/gedit/gedit-command-line.h
index 5c7c67b..741c0b2 100644
--- a/gedit/gedit-command-line.h
+++ b/gedit/gedit-command-line.h
@@ -42,37 +42,42 @@ typedef struct _GeditCommandLinePrivate	GeditCommandLinePrivate;
 
 typedef struct _GeditCommandLineGeometry GeditCommandLineGeometry;
 
-struct _GeditCommandLine {
+struct _GeditCommandLine
+{
 	GInitiallyUnowned parent;
 
 	GeditCommandLinePrivate *priv;
 };
 
-struct _GeditCommandLineClass {
+struct _GeditCommandLineClass
+{
 	GObjectClass parent_class;
 };
 
-GType gedit_command_line_get_type (void) G_GNUC_CONST;
+GType			 gedit_command_line_get_type		(void) G_GNUC_CONST;
 
-GeditCommandLine *gedit_command_line_get_default (void);
+GeditCommandLine	*gedit_command_line_get_default		(void);
 
-gboolean gedit_command_line_parse (GeditCommandLine *command_line, int *argc, char ***argv);
+gboolean		 gedit_command_line_parse		(GeditCommandLine *command_line,
+								 int              *argc,
+								 char           ***argv);
 
-gboolean gedit_command_line_get_new_window (GeditCommandLine *command_line);
-void gedit_command_line_set_new_window (GeditCommandLine *command_line, gboolean new_window);
+gboolean		 gedit_command_line_get_new_window	(GeditCommandLine *command_line);
+void			 gedit_command_line_set_new_window	(GeditCommandLine *command_line,
+								 gboolean          new_window);
 
-gboolean gedit_command_line_get_new_document (GeditCommandLine *command_line);
-gint gedit_command_line_get_line_position (GeditCommandLine *command_line);
-gint gedit_command_line_get_column_position (GeditCommandLine *command_line);
+gboolean		 gedit_command_line_get_new_document	(GeditCommandLine *command_line);
+gint			 gedit_command_line_get_line_position	(GeditCommandLine *command_line);
+gint			 gedit_command_line_get_column_position	(GeditCommandLine *command_line);
 
-GSList *gedit_command_line_get_file_list (GeditCommandLine *command_line);
-const GeditEncoding *gedit_command_line_get_encoding (GeditCommandLine *command_line);
+GSList			*gedit_command_line_get_file_list	(GeditCommandLine *command_line);
+const GeditEncoding	*gedit_command_line_get_encoding	(GeditCommandLine *command_line);
 
-gboolean gedit_command_line_get_wait (GeditCommandLine *command_line);
-gboolean gedit_command_line_get_background (GeditCommandLine *command_line);
-gboolean gedit_command_line_get_standalone (GeditCommandLine *command_line);
+gboolean		 gedit_command_line_get_wait		(GeditCommandLine *command_line);
+gboolean		 gedit_command_line_get_background	(GeditCommandLine *command_line);
+gboolean		 gedit_command_line_get_standalone	(GeditCommandLine *command_line);
 
-const gchar *gedit_command_line_get_geometry (GeditCommandLine *command_line);
+const gchar		*gedit_command_line_get_geometry	(GeditCommandLine *command_line);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-commands-documents.c b/gedit/gedit-commands-documents.c
index 51c872e..c300028 100644
--- a/gedit/gedit-commands-documents.c
+++ b/gedit/gedit-commands-documents.c
@@ -43,7 +43,7 @@
 
 void
 _gedit_cmd_documents_previous_document (GtkAction   *action,
-				       GeditWindow *window)
+					GeditWindow *window)
 {
 	GtkNotebook *notebook;
 
@@ -55,7 +55,7 @@ _gedit_cmd_documents_previous_document (GtkAction   *action,
 
 void
 _gedit_cmd_documents_next_document (GtkAction   *action,
-				   GeditWindow *window)
+				    GeditWindow *window)
 {
 	GtkNotebook *notebook;
 
@@ -67,7 +67,7 @@ _gedit_cmd_documents_next_document (GtkAction   *action,
 
 void
 _gedit_cmd_documents_move_to_new_window (GtkAction   *action,
-					GeditWindow *window)
+					 GeditWindow *window)
 {
 	GeditNotebook *old_notebook;
 	GeditTab *tab;
@@ -85,4 +85,5 @@ _gedit_cmd_documents_move_to_new_window (GtkAction   *action,
 
 	_gedit_window_move_tab_to_new_window (window, tab);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-commands-edit.c b/gedit/gedit-commands-edit.c
index 0eb21fa..6c5d867 100644
--- a/gedit/gedit-commands-edit.c
+++ b/gedit/gedit-commands-edit.c
@@ -44,7 +44,7 @@
 
 void
 _gedit_cmd_edit_undo (GtkAction   *action,
-		     GeditWindow *window)
+		      GeditWindow *window)
 {
 	GeditView *active_view;
 	GtkSourceBuffer *active_document;
@@ -65,7 +65,7 @@ _gedit_cmd_edit_undo (GtkAction   *action,
 
 void
 _gedit_cmd_edit_redo (GtkAction   *action,
-		     GeditWindow *window)
+		      GeditWindow *window)
 {
 	GeditView *active_view;
 	GtkSourceBuffer *active_document;
@@ -86,7 +86,7 @@ _gedit_cmd_edit_redo (GtkAction   *action,
 
 void
 _gedit_cmd_edit_cut (GtkAction   *action,
-		    GeditWindow *window)
+		     GeditWindow *window)
 {
 	GeditView *active_view;
 
@@ -102,7 +102,7 @@ _gedit_cmd_edit_cut (GtkAction   *action,
 
 void
 _gedit_cmd_edit_copy (GtkAction   *action,
-		     GeditWindow *window)
+		      GeditWindow *window)
 {
 	GeditView *active_view;
 
@@ -118,7 +118,7 @@ _gedit_cmd_edit_copy (GtkAction   *action,
 
 void
 _gedit_cmd_edit_paste (GtkAction   *action,
-		      GeditWindow *window)
+		       GeditWindow *window)
 {
 	GeditView *active_view;
 
@@ -134,7 +134,7 @@ _gedit_cmd_edit_paste (GtkAction   *action,
 
 void
 _gedit_cmd_edit_delete (GtkAction   *action,
-		       GeditWindow *window)
+			GeditWindow *window)
 {
 	GeditView *active_view;
 
@@ -150,7 +150,7 @@ _gedit_cmd_edit_delete (GtkAction   *action,
 
 void
 _gedit_cmd_edit_select_all (GtkAction   *action,
-			   GeditWindow *window)
+			    GeditWindow *window)
 {
 	GeditView *active_view;
 
@@ -166,10 +166,11 @@ _gedit_cmd_edit_select_all (GtkAction   *action,
 
 void
 _gedit_cmd_edit_preferences (GtkAction   *action,
-			    GeditWindow *window)
+			     GeditWindow *window)
 {
 	gedit_debug (DEBUG_COMMANDS);
 
 	gedit_show_preferences_dialog (window);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index 788b441..cd92a9d 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -73,7 +73,8 @@ _gedit_cmd_file_new (GtkAction   *action,
 }
 
 static GeditTab *
-get_tab_from_file (GList *docs, GFile *file)
+get_tab_from_file (GList *docs,
+		   GFile *file)
 {
 	GeditTab *tab = NULL;
 
@@ -104,7 +105,8 @@ get_tab_from_file (GList *docs, GFile *file)
 }
 
 static gboolean
-is_duplicated_file (GSList *files, GFile *file)
+is_duplicated_file (GSList *files,
+		    GFile  *file)
 {
 	while (files != NULL)
 	{
@@ -486,7 +488,8 @@ _gedit_cmd_file_open (GtkAction   *action,
 }
 
 /* File saving */
-static void file_save_as (GeditTab *tab, GeditWindow *window);
+static void file_save_as (GeditTab    *tab,
+			  GeditWindow *window);
 
 static gboolean
 is_read_only (GFile *location)
@@ -520,7 +523,8 @@ is_read_only (GFile *location)
 /* FIXME: modify this dialog to be similar to the one provided by gtk+ for
  * already existing files - Paolo (Oct. 11, 2005) */
 static gboolean
-replace_read_only_file (GtkWindow *parent, GFile *file)
+replace_read_only_file (GtkWindow *parent,
+			GFile     *file)
 {
 	GtkWidget *dialog;
 	gint ret;
@@ -954,7 +958,7 @@ file_save (GeditTab    *tab,
 
 void
 _gedit_cmd_file_save (GtkAction   *action,
-		     GeditWindow *window)
+		      GeditWindow *window)
 {
 	GeditTab *tab;
 
@@ -969,7 +973,7 @@ _gedit_cmd_file_save (GtkAction   *action,
 
 void
 _gedit_cmd_file_save_as (GtkAction   *action,
-			GeditWindow *window)
+			 GeditWindow *window)
 {
 	GeditTab *tab;
 
@@ -1123,7 +1127,7 @@ gedit_commands_save_all_documents (GeditWindow *window)
 
 void
 _gedit_cmd_file_save_all (GtkAction   *action,
-			 GeditWindow *window)
+			  GeditWindow *window)
 {
 	gedit_commands_save_all_documents (window);
 }
@@ -1311,7 +1315,7 @@ revert_dialog (GeditWindow   *window,
 
 void
 _gedit_cmd_file_revert (GtkAction   *action,
-		       GeditWindow *window)
+		        GeditWindow *window)
 {
 	GeditTab       *tab;
 	GeditDocument  *doc;
@@ -1685,7 +1689,9 @@ close_confirmation_dialog_response_handler (GeditCloseConfirmationDialog *dlg,
 					return;
 				}
 				else
+				{
 					g_return_if_reached ();
+				}
 			}
 			else
 			{
@@ -1728,6 +1734,7 @@ close_confirmation_dialog_response_handler (GeditCloseConfirmationDialog *dlg,
 			}
 
 			break;
+
 		default: /* Do not close */
 
 			/* Reset is_quitting flag */
@@ -1761,10 +1768,9 @@ tab_can_close (GeditTab  *tab,
 	{
 		GtkWidget     *dlg;
 
-		dlg = gedit_close_confirmation_dialog_new_single (
-						window,
-						doc,
-						FALSE);
+		dlg = gedit_close_confirmation_dialog_new_single (window,
+								  doc,
+								  FALSE);
 
 		g_signal_connect (dlg,
 				  "response",
@@ -1812,7 +1818,7 @@ _gedit_cmd_file_close_tab (GeditTab    *tab,
 
 void
 _gedit_cmd_file_close (GtkAction   *action,
-		      GeditWindow *window)
+		       GeditWindow *window)
 {
 	GeditTab *active_tab;
 
@@ -1905,7 +1911,7 @@ file_close_all (GeditWindow *window,
 
 void
 _gedit_cmd_file_close_all (GtkAction   *action,
-			  GeditWindow *window)
+			   GeditWindow *window)
 {
 	gedit_debug (DEBUG_COMMANDS);
 
@@ -1969,4 +1975,5 @@ _gedit_cmd_file_quit (GtkAction   *action,
 
 	file_close_all (window, TRUE);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-commands-help.c b/gedit/gedit-commands-help.c
index 2c71f87..97cc25a 100644
--- a/gedit/gedit-commands-help.c
+++ b/gedit/gedit-commands-help.c
@@ -116,4 +116,5 @@ _gedit_cmd_help_about (GtkAction   *action,
 	if (logo)
 		g_object_unref (logo);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-commands-search.c b/gedit/gedit-commands-search.c
index 20b77b6..02d1bad 100644
--- a/gedit/gedit-commands-search.c
+++ b/gedit/gedit-commands-search.c
@@ -81,19 +81,19 @@ static void
 last_search_data_store_position (GeditSearchDialog *dlg)
 {
 	LastSearchData *data;
-	
+
 	data = g_object_get_data (G_OBJECT (dlg), GEDIT_LAST_SEARCH_DATA_KEY);
-	
+
 	if (data == NULL)
 	{
 		data = g_slice_new (LastSearchData);
-		
+
 		g_object_set_data_full (G_OBJECT (dlg),
 					GEDIT_LAST_SEARCH_DATA_KEY,
 					data,
 					(GDestroyNotify) last_search_data_free);
 	}
-	
+
 	gtk_window_get_position (GTK_WINDOW (dlg),
 				 &data->x,
 				 &data->y);
@@ -113,16 +113,17 @@ text_found (GeditWindow *window,
 					     	        occurrences),
 					       occurrences);
 	}
+	else if (occurrences == 1)
+	{
+		gedit_statusbar_flash_message (GEDIT_STATUSBAR (window->priv->statusbar),
+					       window->priv->generic_message_cid,
+					       _("Found and replaced one occurrence"));
+	}
 	else
 	{
-		if (occurrences == 1)
-			gedit_statusbar_flash_message (GEDIT_STATUSBAR (window->priv->statusbar),
-						       window->priv->generic_message_cid,
-						       _("Found and replaced one occurrence"));
-		else
-			gedit_statusbar_flash_message (GEDIT_STATUSBAR (window->priv->statusbar),
-						       window->priv->generic_message_cid,
-						       " ");
+		gedit_statusbar_flash_message (GEDIT_STATUSBAR (window->priv->statusbar),
+					       window->priv->generic_message_cid,
+					       " ");
 	}
 }
 
@@ -184,17 +185,21 @@ run_search (GeditView   *view,
 	if (!found && wrap_around)
 	{
 		if (!search_backwards)
+		{
 			found = gedit_document_search_forward (doc,
 							       NULL,
 							       NULL, /* FIXME: set the end_inter */
 							       &match_start,
 							       &match_end);
+		}
 		else
+		{
 			found = gedit_document_search_backward (doc,
 							        NULL, /* FIXME: set the start_inter */
 							        NULL, 
 							        &match_start,
 							        &match_end);
+		}
 	}
 	
 	if (found)
@@ -477,7 +482,8 @@ search_dialog_destroyed (GeditWindow       *window,
 }
 
 static GtkWidget *
-create_dialog (GeditWindow *window, gboolean show_replace)
+create_dialog (GeditWindow *window,
+	       gboolean     show_replace)
 {
 	GtkWidget *dialog;
 
@@ -530,8 +536,10 @@ _gedit_cmd_search_find (GtkAction   *action,
 		
 		/* turn the dialog into a find dialog if needed */
 		if (gedit_search_dialog_get_show_replace (GEDIT_SEARCH_DIALOG (search_dialog)))
+		{
 			gedit_search_dialog_set_show_replace (GEDIT_SEARCH_DIALOG (search_dialog),
 							      FALSE);
+		}
 	}
 
 	doc = gedit_window_get_active_document (window);
@@ -585,8 +593,10 @@ _gedit_cmd_search_replace (GtkAction   *action,
 		
 		/* turn the dialog into a find dialog if needed */
 		if (!gedit_search_dialog_get_show_replace (GEDIT_SEARCH_DIALOG (replace_dialog)))
+		{
 			gedit_search_dialog_set_show_replace (GEDIT_SEARCH_DIALOG (replace_dialog),
 							      TRUE);
+		}
 	}
 
 	doc = gedit_window_get_active_document (window);
@@ -714,4 +724,5 @@ _gedit_cmd_search_incremental_search (GtkAction   *action,
 			       GDK_k,
 			       GDK_CONTROL_MASK);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-commands-view.c b/gedit/gedit-commands-view.c
index ef9d40e..c8ab3c6 100644
--- a/gedit/gedit-commands-view.c
+++ b/gedit/gedit-commands-view.c
@@ -44,7 +44,7 @@
 
 void
 _gedit_cmd_view_show_toolbar (GtkAction   *action,
-			     GeditWindow *window)
+			      GeditWindow *window)
 {
 	gboolean visible;
 
@@ -60,7 +60,7 @@ _gedit_cmd_view_show_toolbar (GtkAction   *action,
 
 void
 _gedit_cmd_view_show_statusbar (GtkAction   *action,
-			       GeditWindow *window)
+			        GeditWindow *window)
 {
 	gboolean visible;
 
@@ -76,7 +76,7 @@ _gedit_cmd_view_show_statusbar (GtkAction   *action,
 
 void
 _gedit_cmd_view_show_side_pane (GtkAction   *action,
-			       GeditWindow *window)
+			        GeditWindow *window)
 {
 	gboolean visible;
 	GeditPanel *panel;
@@ -100,7 +100,7 @@ _gedit_cmd_view_show_side_pane (GtkAction   *action,
 
 void
 _gedit_cmd_view_show_bottom_pane (GtkAction   *action,
-				 GeditWindow *window)
+				  GeditWindow *window)
 {
 	gboolean visible;
 	GeditPanel *panel;
@@ -123,7 +123,7 @@ _gedit_cmd_view_show_bottom_pane (GtkAction   *action,
 }
 
 void
-_gedit_cmd_view_toggle_fullscreen_mode (GtkAction *action,
+_gedit_cmd_view_toggle_fullscreen_mode (GtkAction   *action,
 					GeditWindow *window)
 {
 	gedit_debug (DEBUG_COMMANDS);
@@ -135,7 +135,7 @@ _gedit_cmd_view_toggle_fullscreen_mode (GtkAction *action,
 }
 
 void
-_gedit_cmd_view_leave_fullscreen_mode (GtkAction *action,
+_gedit_cmd_view_leave_fullscreen_mode (GtkAction   *action,
 				       GeditWindow *window)
 {
 	GtkAction *view_action;
@@ -148,8 +148,9 @@ _gedit_cmd_view_leave_fullscreen_mode (GtkAction *action,
 	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (view_action),
 				      FALSE);
 	_gedit_window_unfullscreen (window);
-	g_signal_handlers_unblock_by_func
-		(view_action, G_CALLBACK (_gedit_cmd_view_toggle_fullscreen_mode),
-		 window);
+	g_signal_handlers_unblock_by_func (view_action,
+					   G_CALLBACK (_gedit_cmd_view_toggle_fullscreen_mode),
+					   window);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-dbus.c b/gedit/gedit-dbus.c
index 78a654f..cb2970d 100644
--- a/gedit/gedit-dbus.c
+++ b/gedit/gedit-dbus.c
@@ -189,7 +189,7 @@ gedit_dbus_class_init (GeditDBusClass *klass)
 
 	object_class->dispose = gedit_dbus_dispose;
 
-	g_type_class_add_private (object_class, sizeof(GeditDBusPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditDBusPrivate));
 }
 
 static void
@@ -359,7 +359,8 @@ compose_open_parameters (GeditDBus *dbus)
 	if (encoding)
 	{
 		g_variant_builder_add (&options,
-		                       "{sv}", "encoding",
+		                       "{sv}",
+		                       "encoding",
 		                       g_variant_new_string (gedit_encoding_get_charset (encoding)));
 	}
 
@@ -951,8 +952,8 @@ wait_handler_dbus (GObject  *object,
 	                               NULL);
 	g_object_unref (conn);
 
-	if (data->window && object != G_OBJECT (data->window) && data->close_window &&
-	    is_empty_window (data->window, FALSE))
+	if (data->window && object != G_OBJECT (data->window) &&
+	    data->close_window && is_empty_window (data->window, FALSE))
 	{
 		/* Close the window */
 		gtk_widget_destroy (GTK_WIDGET (data->window));
@@ -1644,18 +1645,18 @@ gedit_dbus_run (GeditDBus *dbus)
 		case GEDIT_DBUS_RESULT_PROCEED:
 			/* could not initialize dbus, gonna be standalone */
 			return GEDIT_DBUS_RESULT_PROCEED;
-		break;
+			break;
 		case GEDIT_DBUS_RESULT_FAILED:
 			/* there is already a gedit process */
 			return handle_slave (dbus);
-		break;
+			break;
 		case GEDIT_DBUS_RESULT_SUCCESS:
 			/* we are the main gedit process */
 			return handle_master (dbus);
-		break;
+			break;
 		default:
 			g_assert_not_reached ();
-		break;
+			break;
 	}
 }
 
diff --git a/gedit/gedit-dbus.h b/gedit/gedit-dbus.h
index 9246d5f..e39ee2a 100644
--- a/gedit/gedit-dbus.h
+++ b/gedit/gedit-dbus.h
@@ -47,20 +47,22 @@ typedef enum
 	GEDIT_DBUS_RESULT_PROCEED_SERVICE
 } GeditDBusResult;
 
-struct _GeditDBus {
+struct _GeditDBus
+{
 	GObject parent;
 
 	GeditDBusPrivate *priv;
 };
 
-struct _GeditDBusClass {
+struct _GeditDBusClass
+{
 	GObjectClass parent_class;
 };
 
-GType gedit_dbus_get_type (void) G_GNUC_CONST;
-GeditDBus *gedit_dbus_new (void);
+GType		 gedit_dbus_get_type	(void) G_GNUC_CONST;
+GeditDBus	*gedit_dbus_new		(void);
 
-GeditDBusResult gedit_dbus_run (GeditDBus *bus);
+GeditDBusResult	 gedit_dbus_run		(GeditDBus *bus);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-debug.c b/gedit/gedit-debug.c
index 7eb2446..4a875b9 100644
--- a/gedit/gedit-debug.c
+++ b/gedit/gedit-debug.c
@@ -157,4 +157,5 @@ void gedit_debug (GeditDebugSection  section,
 		fflush (stdout);
 	}
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-dirs.c b/gedit/gedit-dirs.c
index 2ad7902..c3aae39 100644
--- a/gedit/gedit-dirs.c
+++ b/gedit/gedit-dirs.c
@@ -318,4 +318,5 @@ gedit_dirs_get_ui_file (const gchar *file)
 	
 	return ui_file;
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-dirs.h b/gedit/gedit-dirs.h
index 211daa8..ba79cee 100644
--- a/gedit/gedit-dirs.h
+++ b/gedit/gedit-dirs.h
@@ -52,4 +52,5 @@ gchar		*gedit_dirs_get_ui_file			(const gchar *file);
 G_END_DECLS
 
 #endif /* __GEDIT_DIRS_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-document-input-stream.c b/gedit/gedit-document-input-stream.c
index 3e24e37..673c8ee 100644
--- a/gedit/gedit-document-input-stream.c
+++ b/gedit/gedit-document-input-stream.c
@@ -197,8 +197,8 @@ get_new_line_size (GeditDocumentInputStream *stream)
  * Returns: a new #GInputStream to read @buffer
  */
 GInputStream *
-gedit_document_input_stream_new (GtkTextBuffer           *buffer,
-				 GeditDocumentNewlineType type)
+gedit_document_input_stream_new (GtkTextBuffer            *buffer,
+				 GeditDocumentNewlineType  type)
 {
 	GeditDocumentInputStream *stream;
 
@@ -477,4 +477,5 @@ gedit_document_input_stream_close (GInputStream  *stream,
 
 	return TRUE;
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-document-input-stream.h b/gedit/gedit-document-input-stream.h
index 4e5d5a2..44c2805 100644
--- a/gedit/gedit-document-input-stream.h
+++ b/gedit/gedit-document-input-stream.h
@@ -54,16 +54,17 @@ struct _GeditDocumentInputStreamClass
 	GInputStreamClass parent_class;
 };
 
-GType				 gedit_document_input_stream_get_type		(void) G_GNUC_CONST;
+GType			 gedit_document_input_stream_get_type		(void) G_GNUC_CONST;
 
-GInputStream			*gedit_document_input_stream_new		(GtkTextBuffer           *buffer,
-										 GeditDocumentNewlineType type);
+GInputStream		*gedit_document_input_stream_new		(GtkTextBuffer           *buffer,
+									 GeditDocumentNewlineType type);
 
-gsize				 gedit_document_input_stream_get_total_size	(GeditDocumentInputStream *stream);
+gsize			 gedit_document_input_stream_get_total_size	(GeditDocumentInputStream *stream);
 
-gsize				 gedit_document_input_stream_tell		(GeditDocumentInputStream *stream);
+gsize			 gedit_document_input_stream_tell		(GeditDocumentInputStream *stream);
 
 G_END_DECLS
 
 #endif /* __GEDIT_DOCUMENT_INPUT_STREAM_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-document-loader.c b/gedit/gedit-document-loader.c
index 65a1223..d5fa28a 100644
--- a/gedit/gedit-document-loader.c
+++ b/gedit/gedit-document-loader.c
@@ -388,7 +388,7 @@ async_data_new (GeditDocumentLoader *loader)
 	async->loader = loader;
 	async->cancellable = g_object_ref (loader->priv->cancellable);
 	async->tried_mount = FALSE;
-	
+
 	return async;
 }
 
@@ -450,7 +450,8 @@ get_metadata_encoding (GeditDocumentLoader *loader)
 }
 
 static void
-loader_load_completed_or_failed (GeditDocumentLoader *loader, AsyncData *async)
+loader_load_completed_or_failed (GeditDocumentLoader *loader,
+				 AsyncData           *async)
 {
 	gedit_document_loader_loading (loader,
 				       TRUE,
@@ -461,7 +462,8 @@ loader_load_completed_or_failed (GeditDocumentLoader *loader, AsyncData *async)
 }
 
 static void
-async_failed (AsyncData *async, GError *error)
+async_failed (AsyncData *async,
+	      GError    *error)
 {
 	g_propagate_error (&async->loader->priv->error, error);
 	loader_load_completed_or_failed (async->loader, async);
@@ -469,8 +471,8 @@ async_failed (AsyncData *async, GError *error)
 
 static void
 close_input_stream_ready_cb (GInputStream *stream,
-			     GAsyncResult  *res,
-			     AsyncData     *async)
+			     GAsyncResult *res,
+			     AsyncData    *async)
 {
 	GError *error = NULL;
 
@@ -508,11 +510,13 @@ static void
 write_complete (AsyncData *async)
 {
 	if (async->loader->priv->stream)
+	{
 		g_input_stream_close_async (G_INPUT_STREAM (async->loader->priv->stream),
 					    G_PRIORITY_HIGH,
 					    async->cancellable,
 					    (GAsyncReadyCallback)close_input_stream_ready_cb,
 					    async);
+	}
 }
 
 /* prototype, because they call each other... isn't C lovely */
diff --git a/gedit/gedit-document-loader.h b/gedit/gedit-document-loader.h
index cd2da0d..54350c3 100644
--- a/gedit/gedit-document-loader.h
+++ b/gedit/gedit-document-loader.h
@@ -110,7 +110,8 @@ const GeditEncoding	*gedit_document_loader_get_encoding	(GeditDocumentLoader *lo
 
 GeditDocumentNewlineType gedit_document_loader_get_newline_type (GeditDocumentLoader *loader);
 
-GeditDocumentCompressionType gedit_document_loader_get_compression_type (GeditDocumentLoader *loader);
+GeditDocumentCompressionType gedit_document_loader_get_compression_type
+								(GeditDocumentLoader *loader);
 
 goffset			 gedit_document_loader_get_bytes_read	(GeditDocumentLoader *loader);
 
@@ -121,4 +122,5 @@ GFileInfo		*gedit_document_loader_get_info		(GeditDocumentLoader *loader);
 G_END_DECLS
 
 #endif  /* __GEDIT_DOCUMENT_LOADER_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-document-output-stream.c b/gedit/gedit-document-output-stream.c
index 1953542..2dbd05d 100644
--- a/gedit/gedit-document-output-stream.c
+++ b/gedit/gedit-document-output-stream.c
@@ -60,15 +60,15 @@ enum
 
 G_DEFINE_TYPE (GeditDocumentOutputStream, gedit_document_output_stream, G_TYPE_OUTPUT_STREAM)
 
-static gssize	gedit_document_output_stream_write (GOutputStream            *stream,
-						    const void               *buffer,
-						    gsize                     count,
-						    GCancellable             *cancellable,
-						    GError                  **error);
+static gssize	gedit_document_output_stream_write (GOutputStream    *stream,
+						    const void       *buffer,
+						    gsize             count,
+						    GCancellable     *cancellable,
+						    GError          **error);
 
-static gboolean	gedit_document_output_stream_close (GOutputStream     *stream,
-						    GCancellable      *cancellable,
-						    GError           **error);
+static gboolean	gedit_document_output_stream_close (GOutputStream    *stream,
+						    GCancellable     *cancellable,
+						    GError          **error);
 
 static void
 gedit_document_output_stream_set_property (GObject      *object,
@@ -389,4 +389,5 @@ gedit_document_output_stream_close (GOutputStream     *stream,
 
 	return TRUE;
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-document-output-stream.h b/gedit/gedit-document-output-stream.h
index cf3c18d..cc03079 100644
--- a/gedit/gedit-document-output-stream.h
+++ b/gedit/gedit-document-output-stream.h
@@ -62,4 +62,5 @@ GeditDocumentNewlineType gedit_document_output_stream_detect_newline_type (Gedit
 G_END_DECLS
 
 #endif /* __GEDIT_DOCUMENT_OUTPUT_STREAM_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-document-saver.c b/gedit/gedit-document-saver.c
index fb62d7d..13b317d 100644
--- a/gedit/gedit-document-saver.c
+++ b/gedit/gedit-document-saver.c
@@ -86,7 +86,7 @@ typedef struct
 							  GEDIT_TYPE_DOCUMENT_SAVER, \
 							  GeditDocumentSaverPrivate))
 
-static void check_modified_async (AsyncData          *async);
+static void check_modified_async (AsyncData *async);
 
 struct _GeditDocumentSaverPrivate
 {
@@ -998,10 +998,14 @@ gedit_document_saver_save (GeditDocumentSaver *saver,
 
 	/* never keep backup of autosaves */
 	if ((saver->priv->flags & GEDIT_DOCUMENT_SAVE_PRESERVE_BACKUP) != 0)
+	{
 		saver->priv->keep_backup = FALSE;
+	}
 	else
+	{
 		saver->priv->keep_backup = g_settings_get_boolean (saver->priv->editor_settings,
 								   GEDIT_SETTINGS_CREATE_BACKUP_COPY);
+	}
 
 	saver->priv->old_mtime = *old_mtime;
 
@@ -1081,4 +1085,5 @@ gedit_document_saver_get_info (GeditDocumentSaver *saver)
 
 	return saver->priv->info;
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-document-saver.h b/gedit/gedit-document-saver.h
index ba8f2e6..978d8ad 100644
--- a/gedit/gedit-document-saver.h
+++ b/gedit/gedit-document-saver.h
@@ -89,9 +89,9 @@ GeditDocumentSaver 	*gedit_document_saver_new 		(GeditDocument                *d
 								 GeditDocumentCompressionType  compression_type,
 								 GeditDocumentSaveFlags        flags);
 
-void			 gedit_document_saver_saving		(GeditDocumentSaver *saver,
-								 gboolean            completed,
-								 GError             *error);
+void			 gedit_document_saver_saving		(GeditDocumentSaver  *saver,
+								 gboolean             completed,
+								 GError              *error);
 void			 gedit_document_saver_save		(GeditDocumentSaver  *saver,
 								 GTimeVal            *old_mtime);
 
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index b8fabac..90cbb21 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -292,12 +292,17 @@ gedit_document_dispose (GObject *object)
 					    gtk_text_iter_get_offset (&iter));
 
 		if (language == NULL)
+		{
 			gedit_document_set_metadata (doc, GEDIT_METADATA_ATTRIBUTE_POSITION,
 						     position, NULL);
+		}
 		else
+		{
 			gedit_document_set_metadata (doc, GEDIT_METADATA_ATTRIBUTE_POSITION,
 						     position, GEDIT_METADATA_ATTRIBUTE_LANGUAGE,
 						     language, NULL);
+		}
+
 		g_free (position);
 	}
 
@@ -455,9 +460,11 @@ gedit_document_mark_set (GtkTextBuffer     *buffer,
 	GeditDocument *doc = GEDIT_DOCUMENT (buffer);
 
 	if (GTK_TEXT_BUFFER_CLASS (gedit_document_parent_class)->mark_set)
+	{
 		GTK_TEXT_BUFFER_CLASS (gedit_document_parent_class)->mark_set (buffer,
 									       iter,
 									       mark);
+	}
 
 	if (mark == gtk_text_buffer_get_insert (buffer))
 	{
@@ -749,8 +756,10 @@ set_language (GeditDocument     *doc,
 							syntax_hl);
 	}
 	else
-		gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (doc), 
-				 FALSE);
+	{
+		gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (doc),
+							FALSE);
+	}
 
 	if (set_by_user)
 	{
@@ -1065,7 +1074,9 @@ set_content_type_no_guess (GeditDocument *doc,
 
 	if (doc->priv->content_type != NULL && content_type != NULL &&
 	    (0 == strcmp (doc->priv->content_type, content_type)))
+	{
 		return;
+	}
 
 	g_free (doc->priv->content_type);
 
@@ -1145,13 +1156,17 @@ set_location (GeditDocument *doc,
 
 	g_return_if_fail ((location == NULL) || gedit_utils_is_valid_location (location));
 
-	if (location != NULL)
+	if (doc->priv->location == location)
+		return;
+
+	if (doc->priv->location != NULL)
 	{
-		if (doc->priv->location == location)
-			return;
+		g_object_unref (doc->priv->location);
+		doc->priv->location = NULL;
+	}
 
-		if (doc->priv->location != NULL)
-			g_object_unref (doc->priv->location);
+	if (location != NULL)
+	{
 		doc->priv->location = g_file_dup (location);
 
 		if (doc->priv->untitled_number > 0)
@@ -1195,10 +1210,14 @@ gedit_document_get_uri_for_display (GeditDocument *doc)
 	g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), g_strdup (""));
 
 	if (doc->priv->location == NULL)
+	{
 		return g_strdup_printf (_("Unsaved Document %d"),
 					doc->priv->untitled_number);
+	}
 	else
+	{
 		return gedit_utils_uri_for_display (doc->priv->location);
+	}
 }
 
 /* Never returns NULL */
@@ -1208,12 +1227,18 @@ gedit_document_get_short_name_for_display (GeditDocument *doc)
 	g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), g_strdup (""));
 
 	if (doc->priv->short_name != NULL)
+	{
 		return g_strdup (doc->priv->short_name);
+	}
 	else if (doc->priv->location == NULL)
+	{
 		return g_strdup_printf (_("Unsaved Document %d"),
 					doc->priv->untitled_number);
+	}
 	else
+	{
 		return gedit_utils_basename_for_display (doc->priv->location);
+	}
 }
 
 void
@@ -1380,15 +1405,19 @@ document_loader_loaded (GeditDocumentLoader *loader,
 		if (info)
 		{
 			if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE))
+			{
 				content_type = g_file_info_get_attribute_string (info,
 										 G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
+			}
 
 			if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED))
 				g_file_info_get_modification_time (info, &mtime);
 
 			if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
+			{
 				read_only = !g_file_info_get_attribute_boolean (info,
 										G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
+			}
 		}
 
 		doc->priv->mtime = mtime;
@@ -1501,8 +1530,10 @@ document_loader_loading (GeditDocumentLoader *loader,
 		info = gedit_document_loader_get_info (loader);
 
 		if (info && g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_SIZE))
+		{
 			size = g_file_info_get_attribute_uint64 (info,
 								 G_FILE_ATTRIBUTE_STANDARD_SIZE);
+		}
 
 		read = gedit_document_loader_get_bytes_read (loader);
 
@@ -2036,7 +2067,9 @@ gedit_document_search_forward (GeditDocument     *doc,
 		return FALSE;
 	}
 	else
+	{
 		gedit_debug_message (DEBUG_DOCUMENT, "doc->priv->search_text == \"%s\"\n", doc->priv->search_text);
+	}
 				      
 	if (start == NULL)
 		gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (doc), &iter);
@@ -2068,7 +2101,9 @@ gedit_document_search_forward (GeditDocument     *doc,
 				iter = m_end;
 		}
 		else
+		{
 			break;
+		}
 	}
 	
 	if (found && (match_start != NULL))
@@ -2105,7 +2140,9 @@ gedit_document_search_backward (GeditDocument     *doc,
 		return FALSE;
 	}
 	else
+	{
 		gedit_debug_message (DEBUG_DOCUMENT, "doc->priv->search_text == \"%s\"\n", doc->priv->search_text);
+	}
 				      
 	if (end == NULL)
 		gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (doc), &iter);
@@ -2137,7 +2174,9 @@ gedit_document_search_backward (GeditDocument     *doc,
 				iter = m_start;
 		}
 		else
+		{
 			break;
+		}
 	}
 	
 	if (found && (match_start != NULL))
@@ -2244,7 +2283,7 @@ gedit_document_replace_all (GeditDocument       *doc,
 						replace_text_len);
 
 			iter = m_start;
-		}		
+		}
 
 	} while (found);
 
@@ -2335,8 +2374,7 @@ get_search_match_colors (GeditDocument *doc,
 
 	if (*foreground_set)
 	{
-		if (fg == NULL ||
-		    !gdk_color_parse (fg, foreground))
+		if (fg == NULL || !gdk_color_parse (fg, foreground))
 		{
 			*foreground_set = FALSE;
 		}
@@ -2453,11 +2491,15 @@ search_region (GeditDocument *doc,
 
 	if (gtk_text_iter_has_tag (start, doc->priv->found_tag) &&
 	    !gtk_text_iter_begins_tag (start, doc->priv->found_tag))
+	{
 		gtk_text_iter_backward_to_tag_toggle (start, doc->priv->found_tag);
+	}
 
 	if (gtk_text_iter_has_tag (end, doc->priv->found_tag) &&
 	    !gtk_text_iter_ends_tag (end, doc->priv->found_tag))
+	{
 		gtk_text_iter_forward_to_tag_toggle (end, doc->priv->found_tag);
+	}
 
 	/*
 	g_print ("[%u (%u), %u (%u)]\n", gtk_text_iter_get_line (start), gtk_text_iter_get_offset (start),
@@ -2512,7 +2554,7 @@ search_region (GeditDocument *doc,
 						   doc->priv->found_tag,
 						   &m_start,
 						   &m_end);
-		}		
+		}
 
 	} while (found);
 }
@@ -2736,10 +2778,14 @@ _gedit_document_create_mount_operation (GeditDocument *doc)
 	g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL);
 	
 	if (doc->priv->mount_operation_factory == NULL)
+	{
 		return g_mount_operation_new ();
+	}
 	else
-		return doc->priv->mount_operation_factory (doc, 
+	{
+		return doc->priv->mount_operation_factory (doc,
 						           doc->priv->mount_operation_userdata);
+	}
 }
 
 #ifndef ENABLE_GVFS_METADATA
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index 4d24e2d..6d31a46 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -255,9 +255,9 @@ gboolean	 gedit_document_get_deleted	(GeditDocument       *doc);
 gboolean	 gedit_document_goto_line 	(GeditDocument       *doc, 
 						 gint                 line);
 
-gboolean	 gedit_document_goto_line_offset(GeditDocument *doc,
-						 gint           line,
-						 gint           line_offset);
+gboolean	 gedit_document_goto_line_offset(GeditDocument       *doc,
+						 gint                 line,
+						 gint                 line_offset);
 
 void		 gedit_document_set_search_text	(GeditDocument       *doc,
 						 const gchar         *text,
@@ -302,16 +302,16 @@ gboolean	 gedit_document_get_enable_search_highlighting
 						(GeditDocument       *doc);
 
 GeditDocumentNewlineType
-		 gedit_document_get_newline_type (GeditDocument *doc);
+		 gedit_document_get_newline_type (GeditDocument      *doc);
 
 GeditDocumentCompressionType
-		 gedit_document_get_compression_type (GeditDocument *doc);
+		 gedit_document_get_compression_type (GeditDocument  *doc);
 
-gchar		*gedit_document_get_metadata	(GeditDocument *doc,
-						 const gchar   *key);
+gchar		*gedit_document_get_metadata	(GeditDocument       *doc,
+						 const gchar         *key);
 
-void		 gedit_document_set_metadata	(GeditDocument *doc,
-						 const gchar   *first_key,
+void		 gedit_document_set_metadata	(GeditDocument       *doc,
+						 const gchar         *first_key,
 						 ...);
 
 /* 
@@ -358,4 +358,5 @@ GMountOperation
 G_END_DECLS
 
 #endif /* __GEDIT_DOCUMENT_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index cfd9c2b..4fc7d4f 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -124,7 +124,9 @@ tab_get_name (GeditTab *tab)
 }
 
 static void
-get_iter_from_tab (GeditDocumentsPanel *panel, GeditTab *tab, GtkTreeIter *iter)
+get_iter_from_tab (GeditDocumentsPanel *panel,
+		   GeditTab            *tab,
+		   GtkTreeIter         *iter)
 {
 	gint num;
 	GtkWidget *nb;
@@ -838,4 +840,5 @@ gedit_documents_panel_new (GeditWindow *window)
 					 "window", window,
 					 NULL));
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-documents-panel.h b/gedit/gedit-documents-panel.h
index 7836d48..3c7e13e 100644
--- a/gedit/gedit-documents-panel.h
+++ b/gedit/gedit-documents-panel.h
@@ -83,4 +83,5 @@ GtkWidget	*gedit_documents_panel_new 	(GeditWindow *window);
 G_END_DECLS
 
 #endif  /* __GEDIT_DOCUMENTS_PANEL_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-encodings-combo-box.c b/gedit/gedit-encodings-combo-box.c
index 995bbe8..23156f4 100644
--- a/gedit/gedit-encodings-combo-box.c
+++ b/gedit/gedit-encodings-combo-box.c
@@ -237,7 +237,9 @@ add_or_remove (GeditEncodingsComboBox *menu,
 }
 
 static gboolean
-separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
+separator_func (GtkTreeModel *model,
+		GtkTreeIter  *iter,
+		gpointer      data)
 {
 	gchar *str;
 	gboolean ret;
@@ -290,10 +292,14 @@ update_menu (GeditEncodingsComboBox *menu)
 	}
 
 	if (current_encoding != utf8_encoding)
+	{
 		str = gedit_encoding_to_string (utf8_encoding);
+	}
 	else
+	{
 		str = g_strdup_printf (_("Current Locale (%s)"),
 				       gedit_encoding_get_charset (utf8_encoding));
+	}
 
 	gtk_list_store_append (store, &iter);
 	gtk_list_store_set (store, &iter,
@@ -473,4 +479,5 @@ gedit_encodings_combo_box_set_selected_encoding (GeditEncodingsComboBox *menu,
 		b = gtk_tree_model_iter_next (model, &iter);
 	}
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-encodings-combo-box.h b/gedit/gedit-encodings-combo-box.h
index 8d9cafa..4defe1f 100644
--- a/gedit/gedit-encodings-combo-box.h
+++ b/gedit/gedit-encodings-combo-box.h
@@ -62,18 +62,17 @@ struct _GeditEncodingsComboBoxClass
 	GtkComboBoxClass		 parent_class;
 };
 
-GType		     gedit_encodings_combo_box_get_type		(void) G_GNUC_CONST;
+GType		     gedit_encodings_combo_box_get_type			(void) G_GNUC_CONST;
 
 /* Constructor */
 GtkWidget 	    *gedit_encodings_combo_box_new 			(gboolean save_mode);
 
 const GeditEncoding *gedit_encodings_combo_box_get_selected_encoding	(GeditEncodingsComboBox *menu);
 void		     gedit_encodings_combo_box_set_selected_encoding	(GeditEncodingsComboBox *menu,
-									 const GeditEncoding      *encoding);
+									 const GeditEncoding    *encoding);
 
 G_END_DECLS
 
 #endif /* __GEDIT_ENCODINGS_COMBO_BOX_H__ */
 
-
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-encodings.h b/gedit/gedit-encodings.h
index 14c3d16..3af0615 100644
--- a/gedit/gedit-encodings.h
+++ b/gedit/gedit-encodings.h
@@ -40,7 +40,7 @@ typedef struct _GeditEncoding GeditEncoding;
 
 #define GEDIT_TYPE_ENCODING     (gedit_encoding_get_type ())
 
-GType              	 gedit_encoding_get_type (void) G_GNUC_CONST;
+GType              	 gedit_encoding_get_type	 (void) G_GNUC_CONST;
 
 const GeditEncoding	*gedit_encoding_get_from_charset (const gchar         *charset);
 const GeditEncoding	*gedit_encoding_get_from_index	 (gint                 index);
@@ -58,9 +58,10 @@ GeditEncoding		*gedit_encoding_copy		 (const GeditEncoding *enc);
 void               	 gedit_encoding_free		 (GeditEncoding       *enc);
 
 GSList			*_gedit_encoding_strv_to_list    (const gchar * const *enc_str);
-gchar		       **_gedit_encoding_list_to_strv	 (const GSList *enc);
+gchar		       **_gedit_encoding_list_to_strv	 (const GSList        *enc);
 
 G_END_DECLS
 
 #endif  /* __GEDIT_ENCODINGS_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-fifo.h b/gedit/gedit-fifo.h
index e3f7ff4..926179a 100644
--- a/gedit/gedit-fifo.h
+++ b/gedit/gedit-fifo.h
@@ -36,44 +36,46 @@ G_BEGIN_DECLS
 #define GEDIT_IS_FIFO_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_FIFO))
 #define GEDIT_FIFO_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_FIFO, GeditFifoClass))
 
-typedef struct _GeditFifo			GeditFifo;
+typedef struct _GeditFifo		GeditFifo;
 typedef struct _GeditFifoClass		GeditFifoClass;
 typedef struct _GeditFifoPrivate	GeditFifoPrivate;
 
-struct _GeditFifo {
+struct _GeditFifo
+{
 	GObject parent;
 	
 	GeditFifoPrivate *priv;
 };
 
-struct _GeditFifoClass {
+struct _GeditFifoClass
+{
 	GObjectClass parent_class;
 };
 
-GType gedit_fifo_get_type (void) G_GNUC_CONST;
+GType		 gedit_fifo_get_type		(void) G_GNUC_CONST;
 
-GeditFifo *gedit_fifo_new (GFile *file);
-GFile *gedit_fifo_get_file (GeditFifo *fifo);
+GeditFifo	*gedit_fifo_new			(GFile               *file);
+GFile		*gedit_fifo_get_file		(GeditFifo           *fifo);
 
-void gedit_fifo_open_read_async (GeditFifo           *fifo,
-                                 gint                 io_priority,
-                                 GCancellable        *cancellable,
-                                 GAsyncReadyCallback  callback,
-                                 gpointer             user_data);
+void		 gedit_fifo_open_read_async	(GeditFifo           *fifo,
+						 gint                 io_priority,
+						 GCancellable        *cancellable,
+						 GAsyncReadyCallback  callback,
+						 gpointer             user_data);
 
-void gedit_fifo_open_write_async (GeditFifo           *fifo,
-                                  gint                 io_priority,
-                                  GCancellable        *cancellable,
-                                  GAsyncReadyCallback  callback,
-                                  gpointer             user_data);
+void		 gedit_fifo_open_write_async	(GeditFifo           *fifo,
+						 gint                 io_priority,
+						 GCancellable        *cancellable,
+						 GAsyncReadyCallback  callback,
+						 gpointer             user_data);
 
-GOutputStream *gedit_fifo_open_write_finish (GeditFifo     *fifo,
-                                             GAsyncResult  *result,
-                                             GError       **error);
+GOutputStream	*gedit_fifo_open_write_finish	(GeditFifo           *fifo,
+						 GAsyncResult        *result,
+						 GError             **error);
 
-GInputStream *gedit_fifo_open_read_finish (GeditFifo     *fifo,
-                                           GAsyncResult  *result,
-                                           GError       **error);
+GInputStream	*gedit_fifo_open_read_finish	(GeditFifo           *fifo,
+						 GAsyncResult        *result,
+						 GError             **error);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-file-chooser-dialog.c b/gedit/gedit-file-chooser-dialog.c
index 9cbacfe..632ed11 100644
--- a/gedit/gedit-file-chooser-dialog.c
+++ b/gedit/gedit-file-chooser-dialog.c
@@ -87,7 +87,7 @@ gedit_file_chooser_dialog_class_init (GeditFileChooserDialogClass *klass)
 
 	object_class->dispose = gedit_file_chooser_dialog_dispose;
 
-	g_type_class_add_private (object_class, sizeof(GeditFileChooserDialogPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditFileChooserDialogPrivate));
 }
 
 static void
@@ -405,9 +405,11 @@ gedit_file_chooser_dialog_new_valist (const gchar          *title,
 			  NULL);
 
 	if (encoding != NULL)
+	{
 		gedit_encodings_combo_box_set_selected_encoding (
 				GEDIT_ENCODINGS_COMBO_BOX (GEDIT_FILE_CHOOSER_DIALOG (result)->priv->option_menu),
 				encoding);
+	}
 
 	active_filter = g_settings_get_int (GEDIT_FILE_CHOOSER_DIALOG (result)->priv->filter_settings,
 					    GEDIT_SETTINGS_ACTIVE_FILE_FILTER);
@@ -458,7 +460,9 @@ gedit_file_chooser_dialog_new_valist (const gchar          *title,
 		    (response_id == GTK_RESPONSE_ACCEPT) ||
 		    (response_id == GTK_RESPONSE_YES) ||
 		    (response_id == GTK_RESPONSE_APPLY))
+		{
 			gtk_dialog_set_default_response (GTK_DIALOG (result), response_id);
+		}
 
 		button_text = va_arg (varargs, const gchar *);
 	}
@@ -553,8 +557,8 @@ set_enum_combo (GtkComboBox *combo,
 }
 
 void
-gedit_file_chooser_dialog_set_newline_type (GeditFileChooserDialog  *dialog,
-					    GeditDocumentNewlineType newline_type)
+gedit_file_chooser_dialog_set_newline_type (GeditFileChooserDialog   *dialog,
+					    GeditDocumentNewlineType  newline_type)
 {
 	g_return_if_fail (GEDIT_IS_FILE_CHOOSER_DIALOG (dialog));
 	g_return_if_fail (gtk_file_chooser_get_action (GTK_FILE_CHOOSER (dialog)) == GTK_FILE_CHOOSER_ACTION_SAVE);
diff --git a/gedit/gedit-file-chooser-dialog.h b/gedit/gedit-file-chooser-dialog.h
index c249673..400569f 100644
--- a/gedit/gedit-file-chooser-dialog.h
+++ b/gedit/gedit-file-chooser-dialog.h
@@ -46,10 +46,9 @@ G_BEGIN_DECLS
 #define GEDIT_IS_FILE_CHOOSER_DIALOG_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_FILE_CHOOSER_DIALOG))
 #define GEDIT_FILE_CHOOSER_DIALOG_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_FILE_CHOOSER_DIALOG, GeditFileChooserDialogClass))
 
-typedef struct _GeditFileChooserDialog      GeditFileChooserDialog;
-typedef struct _GeditFileChooserDialogClass GeditFileChooserDialogClass;
-
-typedef struct _GeditFileChooserDialogPrivate GeditFileChooserDialogPrivate;
+typedef struct _GeditFileChooserDialog		GeditFileChooserDialog;
+typedef struct _GeditFileChooserDialogClass	GeditFileChooserDialogClass;
+typedef struct _GeditFileChooserDialogPrivate	GeditFileChooserDialogPrivate;
 
 struct _GeditFileChooserDialogClass
 {
@@ -63,28 +62,29 @@ struct _GeditFileChooserDialog
 	GeditFileChooserDialogPrivate *priv;
 };
 
-GType		 gedit_file_chooser_dialog_get_type	(void) G_GNUC_CONST;
+GType		 gedit_file_chooser_dialog_get_type		(void) G_GNUC_CONST;
 
-GtkWidget	*gedit_file_chooser_dialog_new		(const gchar            *title,
-							 GtkWindow              *parent,
-							 GtkFileChooserAction    action,
-							 const GeditEncoding    *encoding,
-							 const gchar            *first_button_text,
-							 ...);
+GtkWidget	*gedit_file_chooser_dialog_new			(const gchar              *title,
+								 GtkWindow                *parent,
+								 GtkFileChooserAction      action,
+								 const GeditEncoding      *encoding,
+								 const gchar              *first_button_text,
+								 ...);
 
-void		 gedit_file_chooser_dialog_set_encoding (GeditFileChooserDialog *dialog,
-							 const GeditEncoding    *encoding);
+void		 gedit_file_chooser_dialog_set_encoding		(GeditFileChooserDialog   *dialog,
+								 const GeditEncoding      *encoding);
 
 const GeditEncoding
-		*gedit_file_chooser_dialog_get_encoding (GeditFileChooserDialog *dialog);
+		*gedit_file_chooser_dialog_get_encoding		(GeditFileChooserDialog   *dialog);
 
-void		 gedit_file_chooser_dialog_set_newline_type (GeditFileChooserDialog  *dialog,
-							     GeditDocumentNewlineType newline_type);
+void		 gedit_file_chooser_dialog_set_newline_type	(GeditFileChooserDialog   *dialog,
+								 GeditDocumentNewlineType  newline_type);
 
 GeditDocumentNewlineType
-		 gedit_file_chooser_dialog_get_newline_type (GeditFileChooserDialog *dialog);
+		 gedit_file_chooser_dialog_get_newline_type	(GeditFileChooserDialog   *dialog);
 
 G_END_DECLS
 
 #endif /* __GEDIT_FILE_CHOOSER_DIALOG_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-history-entry.c b/gedit/gedit-history-entry.c
index 9accc46..c07285b 100644
--- a/gedit/gedit-history-entry.c
+++ b/gedit/gedit-history-entry.c
@@ -76,16 +76,17 @@ gedit_history_entry_set_property (GObject      *object,
 
 	entry = GEDIT_HISTORY_ENTRY (object);
 
-	switch (prop_id) {
-	case PROP_HISTORY_ID:
-		entry->priv->history_id = g_value_dup_string (value);
-		break;
-	case PROP_HISTORY_LENGTH:
-		gedit_history_entry_set_history_length (entry,
-						     g_value_get_uint (value));
-		break;
-	default:
-		break;
+	switch (prop_id)
+	{
+		case PROP_HISTORY_ID:
+			entry->priv->history_id = g_value_dup_string (value);
+			break;
+		case PROP_HISTORY_LENGTH:
+			gedit_history_entry_set_history_length (entry,
+								g_value_get_uint (value));
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
 	}
 }
 
@@ -101,15 +102,16 @@ gedit_history_entry_get_property (GObject    *object,
 
 	priv = GEDIT_HISTORY_ENTRY (object)->priv;
 
-	switch (prop_id) {
-	case PROP_HISTORY_ID:
-		g_value_set_string (value, priv->history_id);
-		break;
-	case PROP_HISTORY_LENGTH:
-		g_value_set_uint (value, priv->history_length);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
+	switch (prop_id)
+	{
+		case PROP_HISTORY_ID:
+			g_value_set_string (value, priv->history_id);
+			break;
+		case PROP_HISTORY_LENGTH:
+			g_value_set_uint (value, priv->history_length);
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
 	}
 }
 
@@ -173,7 +175,7 @@ gedit_history_entry_class_init (GeditHistoryEntryClass *klass)
 
 	/* TODO: Add enable-completion property */
 
-	g_type_class_add_private (object_class, sizeof(GeditHistoryEntryPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditHistoryEntryPrivate));
 }
 
 static GtkListStore *
@@ -292,7 +294,7 @@ clamp_list_store (GtkListStore *store,
 
 	if (gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path))
 	{
-		while (1)
+		while (TRUE)
 		{
 			if (!gtk_list_store_remove (store, &iter))
 				break;
@@ -541,7 +543,7 @@ gedit_history_entry_new (const gchar *history_id,
 
 	gedit_history_entry_set_enable_completion (GEDIT_HISTORY_ENTRY (ret),
 						   enable_completion);
-						   
+
 	return ret;
 }
 
@@ -593,18 +595,23 @@ gedit_history_entry_set_escape_func (GeditHistoryEntry           *entry,
 	g_return_if_fail (cells->data != NULL && cells->next == NULL);
 
 	if (escape_func != NULL)
+	{
 		gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (entry),
 						    GTK_CELL_RENDERER (cells->data),
 						    (GtkCellLayoutDataFunc) escape_cell_data_func,
 						    escape_func,
 						    NULL);
+	}
 	else
+	{
 		gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (entry),
 						    GTK_CELL_RENDERER (cells->data),
 						    NULL,
 						    NULL,
 						    NULL);
+	}
 
 	g_list_free (cells);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-history-entry.h b/gedit/gedit-history-entry.h
index df69b27..8c38225 100644
--- a/gedit/gedit-history-entry.h
+++ b/gedit/gedit-history-entry.h
@@ -58,7 +58,7 @@ struct _GeditHistoryEntry
 	GeditHistoryEntryPrivate *priv;
 };
 
-GType		 gedit_history_entry_get_type	(void) G_GNUC_CONST;
+GType		 gedit_history_entry_get_type		(void) G_GNUC_CONST;
 
 GtkWidget	*gedit_history_entry_new		(const gchar       *history_id,
 							 gboolean           enable_completion);
@@ -94,4 +94,5 @@ void		gedit_history_entry_set_escape_func	(GeditHistoryEntry *entry,
 G_END_DECLS
 
 #endif /* __GEDIT_HISTORY_ENTRY_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-io-error-message-area.c b/gedit/gedit-io-error-message-area.c
index 3d04395..65d6bef 100644
--- a/gedit/gedit-io-error-message-area.c
+++ b/gedit/gedit-io-error-message-area.c
@@ -63,15 +63,19 @@ is_recoverable_error (const GError *error)
 
 	if (error->domain == G_IO_ERROR)
 	{
-		switch (error->code) {
-		case G_IO_ERROR_PERMISSION_DENIED:
-		case G_IO_ERROR_NOT_FOUND:
-		case G_IO_ERROR_HOST_NOT_FOUND:
-		case G_IO_ERROR_TIMED_OUT:
-		case G_IO_ERROR_NOT_MOUNTABLE_FILE:
-		case G_IO_ERROR_NOT_MOUNTED:
-		case G_IO_ERROR_BUSY:
-			is_recoverable = TRUE;
+		switch (error->code)
+		{
+			case G_IO_ERROR_PERMISSION_DENIED:
+			case G_IO_ERROR_NOT_FOUND:
+			case G_IO_ERROR_HOST_NOT_FOUND:
+			case G_IO_ERROR_TIMED_OUT:
+			case G_IO_ERROR_NOT_MOUNTABLE_FILE:
+			case G_IO_ERROR_NOT_MOUNTED:
+			case G_IO_ERROR_BUSY:
+				is_recoverable = TRUE;
+				break;
+			default:
+				break;
 		}
 	}
 
@@ -220,127 +224,128 @@ parse_gio_error (gint          code,
 
 	switch (code)
 	{
-	case G_IO_ERROR_NOT_FOUND:
-	case G_IO_ERROR_NOT_DIRECTORY:
-		*error_message = g_strdup_printf (_("Could not find the file %s."),
-						  uri_for_display);
-		*message_details = g_strdup (_("Please check that you typed the "
-				      	       "location correctly and try again."));
-		break;
-	case G_IO_ERROR_NOT_SUPPORTED:
-		{
-			gchar *scheme_string = NULL;
-			gchar *scheme_markup;
-
-			if (location)
+		case G_IO_ERROR_NOT_FOUND:
+		case G_IO_ERROR_NOT_DIRECTORY:
+			*error_message = g_strdup_printf (_("Could not find the file %s."),
+							  uri_for_display);
+			*message_details = g_strdup (_("Please check that you typed the "
+					      	       "location correctly and try again."));
+			break;
+
+		case G_IO_ERROR_NOT_SUPPORTED:
 			{
-				scheme_string = g_file_get_uri_scheme (location);
-			}
+				gchar *scheme_string = NULL;
+				gchar *scheme_markup;
 
-			if ((scheme_string != NULL) && g_utf8_validate (scheme_string, -1, NULL))
-			{
-				scheme_markup = g_markup_printf_escaped ("<i>%s:</i>", scheme_string);
+				if (location)
+				{
+					scheme_string = g_file_get_uri_scheme (location);
+				}
 
-				/* Translators: %s is a URI scheme (like for example http:, ftp:, etc.) */
-				*message_details = g_strdup_printf (_("gedit cannot handle %s locations."),
-								   scheme_markup);
-				g_free (scheme_markup);
-			}
-			else
-			{
-				*message_details = g_strdup (_("gedit cannot handle this location."));
-			}	
+				if ((scheme_string != NULL) && g_utf8_validate (scheme_string, -1, NULL))
+				{
+					scheme_markup = g_markup_printf_escaped ("<i>%s:</i>", scheme_string);
 
-			g_free (scheme_string);
-		}
-		break;
+					/* Translators: %s is a URI scheme (like for example http:, ftp:, etc.) */
+					*message_details = g_strdup_printf (_("gedit cannot handle %s locations."),
+									   scheme_markup);
+					g_free (scheme_markup);
+				}
+				else
+				{
+					*message_details = g_strdup (_("gedit cannot handle this location."));
+				}	
 
-	case G_IO_ERROR_NOT_MOUNTABLE_FILE:
-		*message_details = g_strdup (_("The location of the file cannot be mounted."));
-		break;
+				g_free (scheme_string);
+			}
+			break;
+
+		case G_IO_ERROR_NOT_MOUNTABLE_FILE:
+			*message_details = g_strdup (_("The location of the file cannot be mounted."));
+			break;
 	
-	case G_IO_ERROR_NOT_MOUNTED:
-		*message_details = g_strdup( _("The location of the file cannot be accessed because it is not mounted."));
+		case G_IO_ERROR_NOT_MOUNTED:
+			*message_details = g_strdup( _("The location of the file cannot be accessed because it is not mounted."));
 
-		break;	
-	case G_IO_ERROR_IS_DIRECTORY:
-		*error_message = g_strdup_printf (_("%s is a directory."),
-						 uri_for_display);
-		*message_details = g_strdup (_("Please check that you typed the "
-					      "location correctly and try again."));
-		break;
+			break;	
+		case G_IO_ERROR_IS_DIRECTORY:
+			*error_message = g_strdup_printf (_("%s is a directory."),
+							 uri_for_display);
+			*message_details = g_strdup (_("Please check that you typed the "
+						      "location correctly and try again."));
+			break;
 		
-	case G_IO_ERROR_INVALID_FILENAME:
-		*error_message = g_strdup_printf (_("%s is not a valid location."),
-						 uri_for_display);
-		*message_details = g_strdup (_("Please check that you typed the "
-					      "location correctly and try again."));
-		break;
+		case G_IO_ERROR_INVALID_FILENAME:
+			*error_message = g_strdup_printf (_("%s is not a valid location."),
+							 uri_for_display);
+			*message_details = g_strdup (_("Please check that you typed the "
+						      "location correctly and try again."));
+			break;
 		
-	case G_IO_ERROR_HOST_NOT_FOUND:
-		/* This case can be hit for user-typed strings like "foo" due to
-		 * the code that guesses web addresses when there's no initial "/".
-		 * But this case is also hit for legitimate web addresses when
-		 * the proxy is set up wrong.
-		 */
-		{
-			gchar *hn = NULL;
-			gchar *uri = NULL;
-
-			if (location)
+		case G_IO_ERROR_HOST_NOT_FOUND:
+			/* This case can be hit for user-typed strings like "foo" due to
+			 * the code that guesses web addresses when there's no initial "/".
+			 * But this case is also hit for legitimate web addresses when
+			 * the proxy is set up wrong.
+			 */
 			{
-				uri = g_file_get_uri (location);
-			}
+				gchar *hn = NULL;
+				gchar *uri = NULL;
 
-			if (uri && gedit_utils_decode_uri (uri, NULL, NULL, &hn, NULL, NULL))
-			{
-				if (hn != NULL)
+				if (location)
 				{
-					gchar *host_markup;
-					gchar *host_name;
-
-					host_name = gedit_utils_make_valid_utf8 (hn);
-					g_free (hn);
-
-					host_markup = g_markup_printf_escaped ("<i>%s</i>", host_name);
-					g_free (host_name);
-
-					/* Translators: %s is a host name */
-					*message_details = g_strdup_printf (
-						_("Host %s could not be found. "
-						"Please check that your proxy settings "
-						"are correct and try again."),
-						host_markup);
+					uri = g_file_get_uri (location);
+				}
 
-					g_free (host_markup);
+				if (uri && gedit_utils_decode_uri (uri, NULL, NULL, &hn, NULL, NULL))
+				{
+					if (hn != NULL)
+					{
+						gchar *host_markup;
+						gchar *host_name;
+
+						host_name = gedit_utils_make_valid_utf8 (hn);
+						g_free (hn);
+
+						host_markup = g_markup_printf_escaped ("<i>%s</i>", host_name);
+						g_free (host_name);
+
+						/* Translators: %s is a host name */
+						*message_details = g_strdup_printf (
+							_("Host %s could not be found. "
+							"Please check that your proxy settings "
+							"are correct and try again."),
+							host_markup);
+
+						g_free (host_markup);
+					}
 				}
-			}
 
-			g_free (uri);
+				g_free (uri);
 			
-			if (!*message_details)
-			{
-				/* use the same string as INVALID_HOST */
-				*message_details = g_strdup_printf (
-					_("Hostname was invalid. "
-					  "Please check that you typed the location "
-					  "correctly and try again."));
+				if (!*message_details)
+				{
+					/* use the same string as INVALID_HOST */
+					*message_details = g_strdup_printf (
+						_("Hostname was invalid. "
+						  "Please check that you typed the location "
+						  "correctly and try again."));
+				}
 			}
-		}
-		break;
+			break;
 
-	case G_IO_ERROR_NOT_REGULAR_FILE:
-		*message_details = g_strdup_printf (_("%s is not a regular file."),
-						   uri_for_display);
-		break;
+		case G_IO_ERROR_NOT_REGULAR_FILE:
+			*message_details = g_strdup_printf (_("%s is not a regular file."),
+							   uri_for_display);
+			break;
 
-	case G_IO_ERROR_TIMED_OUT:
-		*message_details = g_strdup (_("Connection timed out. Please try again."));
-		break;
+		case G_IO_ERROR_TIMED_OUT:
+			*message_details = g_strdup (_("Connection timed out. Please try again."));
+			break;
 
-	default:
-		ret = FALSE;
-		break;
+		default:
+			ret = FALSE;
+			break;
 	}
 
 	return ret;
@@ -357,13 +362,13 @@ parse_gedit_error (gint          code,
 
 	switch (code)
 	{
-	case GEDIT_DOCUMENT_ERROR_TOO_BIG:
-		*message_details = g_strdup (_("The file is too big."));
-		break;
+		case GEDIT_DOCUMENT_ERROR_TOO_BIG:
+			*message_details = g_strdup (_("The file is too big."));
+			break;
 
-	default:
-		ret = FALSE;
-		break;
+		default:
+			ret = FALSE;
+			break;
 	}
 
 	return ret;
@@ -426,8 +431,8 @@ gedit_unrecoverable_reverting_error_message_area_new (GFile        *location,
 	 * though the dialog uses wrapped text, if the URI doesn't contain
 	 * white space then the text-wrapping code is too stupid to wrap it.
 	 */
-	temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri, 
-								MAX_URI_IN_DIALOG_LENGTH);								
+	temp_uri_for_display = gedit_utils_str_middle_truncate (full_formatted_uri,
+								MAX_URI_IN_DIALOG_LENGTH);
 	g_free (full_formatted_uri);
 
 	uri_for_display = g_markup_printf_escaped ("<i>%s</i>", temp_uri_for_display);
@@ -461,7 +466,8 @@ gedit_unrecoverable_reverting_error_message_area_new (GFile        *location,
 }
 
 static void
-create_combo_box (GtkWidget *message_area, GtkWidget *vbox)
+create_combo_box (GtkWidget *message_area,
+		  GtkWidget *vbox)
 {
 	GtkWidget *hbox;
 	GtkWidget *label;
@@ -725,10 +731,9 @@ gedit_io_loading_error_message_area_new (GFile               *location,
 }
 
 GtkWidget *
-gedit_conversion_error_while_saving_message_area_new (
-						GFile               *location,
-						const GeditEncoding *encoding,
-						const GError        *error)
+gedit_conversion_error_while_saving_message_area_new (GFile               *location,
+						      const GeditEncoding *encoding,
+						      const GError        *error)
 {
 	gchar *error_message = NULL;
 	gchar *message_details = NULL;
@@ -897,9 +902,8 @@ gedit_file_already_open_warning_message_area_new (GFile *location)
 }
 
 GtkWidget *
-gedit_externally_modified_saving_error_message_area_new (
-						GFile        *location,
-						const GError *error)
+gedit_externally_modified_saving_error_message_area_new (GFile        *location,
+							 const GError *error)
 {
 	GtkWidget *message_area;
 	GtkWidget *hbox_content;
@@ -1079,13 +1083,17 @@ gedit_no_backup_saving_error_message_area_new (GFile        *location,
 						     GEDIT_SETTINGS_CREATE_BACKUP_COPY);
 	g_object_unref (editor_settings);
 
-	// FIXME: review this messages
+	/* FIXME: review this messages */
 	if (create_backup_copy)
+	{
 		primary_text = g_strdup_printf (_("Could not create a backup file while saving %s"),
 						uri_for_display);
+	}
 	else
+	{
 		primary_text = g_strdup_printf (_("Could not create a temporary backup file while saving %s"),
 						uri_for_display);
+	}
 
 	g_free (uri_for_display);
 
@@ -1244,8 +1252,8 @@ gedit_unrecoverable_saving_error_message_area_new (GFile        *location,
 }
 
 GtkWidget *
-gedit_externally_modified_message_area_new (GFile   *location,
-					    gboolean document_modified)
+gedit_externally_modified_message_area_new (GFile    *location,
+					    gboolean  document_modified)
 {
 	gchar *full_formatted_uri;
 	gchar *uri_for_display;
@@ -1269,9 +1277,10 @@ gedit_externally_modified_message_area_new (GFile   *location,
 	uri_for_display = g_markup_printf_escaped ("<i>%s</i>", temp_uri_for_display);
 	g_free (temp_uri_for_display);
 
-	// FIXME: review this message, it's not clear since for the user the "modification"
-	// could be interpreted as the changes he made in the document. beside "reading" is
-	// not accurate (since last load/save)
+	/* FIXME: review this message, it's not clear since for the user the "modification"
+	 * could be interpreted as the changes he made in the document. beside "reading" is
+	 * not accurate (since last load/save)
+	 */
 	primary_text = g_strdup_printf (_("The file %s changed on disk."),
 					uri_for_display);
 	g_free (uri_for_display);
diff --git a/gedit/gedit-io-error-message-area.h b/gedit/gedit-io-error-message-area.h
index 469a13b..dcf0bc5 100644
--- a/gedit/gedit-io-error-message-area.h
+++ b/gedit/gedit-io-error-message-area.h
@@ -66,4 +66,5 @@ GtkWidget	*gedit_externally_modified_message_area_new		 (GFile               *lo
 G_END_DECLS
 
 #endif  /* __GEDIT_IO_ERROR_MESSAGE_AREA_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-message-area.c b/gedit/gedit-message-area.c
index 2047b62..6a1be92 100644
--- a/gedit/gedit-message-area.c
+++ b/gedit/gedit-message-area.c
@@ -171,7 +171,7 @@ gedit_message_area_class_init (GeditMessageAreaClass *klass)
 
 	klass->close = gedit_message_area_close;
 
-	g_type_class_add_private (object_class, sizeof(GeditMessageAreaPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditMessageAreaPrivate));
 
 	signals[RESPONSE] = g_signal_new ("response",
 					  G_OBJECT_CLASS_TYPE (klass),
@@ -276,7 +276,8 @@ get_response_for_widget (GeditMessageArea *message_area,
 }
 
 static void
-action_widget_activated (GtkWidget *widget, GeditMessageArea *message_area)
+action_widget_activated (GtkWidget        *widget,
+			 GeditMessageArea *message_area)
 {
 	gint response_id;
 
@@ -319,20 +320,26 @@ gedit_message_area_add_action_widget (GeditMessageArea *message_area,
 						FALSE);
 	}
 	else
+	{
 		g_warning ("Only 'activatable' widgets can be packed into the action area of a GeditMessageArea");
+	}
 
 	if (response_id != GTK_RESPONSE_HELP)
+	{
 		gtk_box_pack_start (GTK_BOX (message_area->priv->action_area),
 				    child,
 				    FALSE,
 				    FALSE,
 				    0);
+	}
 	else
+	{
 		gtk_box_pack_end (GTK_BOX (message_area->priv->action_area),
 				    child,
 				    FALSE,
 				    FALSE,
 				    0);
+	}
 }
 
 /**
diff --git a/gedit/gedit-message-area.h b/gedit/gedit-message-area.h
index 6e03236..d24e0be 100644
--- a/gedit/gedit-message-area.h
+++ b/gedit/gedit-message-area.h
@@ -127,4 +127,5 @@ void		 gedit_message_area_response           	(GeditMessageArea *message_area,
 G_END_DECLS
 
 #endif  /* __GEDIT_MESSAGE_AREA_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-message-bus.c b/gedit/gedit-message-bus.c
index a9e8e60..5c44d3a 100644
--- a/gedit/gedit-message-bus.c
+++ b/gedit/gedit-message-bus.c
@@ -30,7 +30,7 @@
  * GeditMessageCallback:
  * @bus: the #GeditMessageBus on which the message was sent
  * @message: the #GeditMessage which was sent
- * @userdata: the supplied user data when connecting the callback
+ * @user_data: the supplied user data when connecting the callback
  *
  * Callback signature used for connecting callback functions to be called
  * when a message is received (see gedit_message_bus_connect()).
@@ -80,7 +80,7 @@
  * static void
  * example_method_cb (GeditMessageBus *bus,
  *                    GeditMessage    *message,
- *                    gpointer         userdata)
+ *                    gpointer         user_data)
  * {
  * 	gchar *arg1 = NULL;
  *	
@@ -132,7 +132,7 @@ typedef struct
 
 	GDestroyNotify destroy_data;
 	GeditMessageCallback callback;
-	gpointer userdata;
+	gpointer user_data;
 } Listener;
 
 typedef struct
@@ -174,7 +174,7 @@ static void
 listener_free (Listener *listener)
 {
 	if (listener->destroy_data)
-		listener->destroy_data (listener->userdata);
+		listener->destroy_data (listener->user_data);
 
 	g_free (listener);
 }
@@ -286,7 +286,7 @@ gedit_message_bus_class_init (GeditMessageBusClass *klass)
 			      1,
 			      GEDIT_TYPE_MESSAGE_TYPE);
 
-	g_type_class_add_private (object_class, sizeof(GeditMessageBusPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditMessageBusPrivate));
 }
 
 static Message *
@@ -332,7 +332,7 @@ static guint
 add_listener (GeditMessageBus      *bus,
 	      Message		   *message,
 	      GeditMessageCallback  callback,
-	      gpointer		    userdata,
+	      gpointer		    user_data,
 	      GDestroyNotify        destroy_data)
 {
 	Listener *listener;
@@ -341,7 +341,7 @@ add_listener (GeditMessageBus      *bus,
 	listener = g_new (Listener, 1);
 	listener->id = ++bus->priv->next_id;
 	listener->callback = callback;
-	listener->userdata = userdata;
+	listener->user_data = user_data;
 	listener->blocked = FALSE;
 	listener->destroy_data = destroy_data;
 
@@ -412,7 +412,7 @@ dispatch_message_real (GeditMessageBus *bus,
 		Listener *listener = (Listener *)item->data;
 		
 		if (!listener->blocked)
-			listener->callback (bus, message, listener->userdata);
+			listener->callback (bus, message, listener->user_data);
 	}
 }
 
@@ -490,7 +490,7 @@ process_by_match (GeditMessageBus      *bus,
 	          const gchar          *object_path,
 	          const gchar          *method,
 	          GeditMessageCallback  callback,
-	          gpointer              userdata,
+	          gpointer              user_data,
 	          MatchCallback         processor)
 {
 	Message *message;
@@ -509,7 +509,7 @@ process_by_match (GeditMessageBus      *bus,
 		Listener *listener = (Listener *)item->data;
 		
 		if (listener->callback == callback && 
-		    listener->userdata == userdata)
+		    listener->user_data == user_data)
 		{
 			processor (bus, message, item);
 			return;
@@ -779,9 +779,9 @@ gedit_message_bus_unregister_all (GeditMessageBus *bus,
  *
  */
 gboolean
-gedit_message_bus_is_registered (GeditMessageBus	*bus,
-				 const gchar	*object_path,
-				 const gchar	*method)
+gedit_message_bus_is_registered (GeditMessageBus  *bus,
+				 const gchar	  *object_path,
+				 const gchar      *method)
 {
 	gchar *identifier;
 	gboolean ret;
@@ -800,7 +800,7 @@ gedit_message_bus_is_registered (GeditMessageBus	*bus,
 typedef struct
 {
 	GeditMessageBusForeach func;
-	gpointer userdata;
+	gpointer user_data;
 } ForeachInfo;
 
 static void
@@ -809,7 +809,7 @@ foreach_type (const gchar      *key,
 	      ForeachInfo      *info)
 {
 	gedit_message_type_ref (message_type);
-	info->func (message_type, info->userdata);
+	info->func (message_type, info->user_data);
 	gedit_message_type_unref (message_type);
 }
 
@@ -817,7 +817,7 @@ foreach_type (const gchar      *key,
  * gedit_message_bus_foreach:
  * @bus: the #GeditMessagebus
  * @func: the callback function
- * @userdata: the user data to supply to the callback function
+ * @user_data: the user data to supply to the callback function
  *
  * Calls @func for each message type registered on the bus
  *
@@ -825,9 +825,9 @@ foreach_type (const gchar      *key,
 void 
 gedit_message_bus_foreach (GeditMessageBus        *bus,
 			   GeditMessageBusForeach  func,
-			   gpointer		   userdata)
+			   gpointer		   user_data)
 {
-	ForeachInfo info = {func, userdata};
+	ForeachInfo info = {func, user_data};
 	
 	g_return_if_fail (GEDIT_IS_MESSAGE_BUS (bus));
 	g_return_if_fail (func != NULL);
@@ -841,8 +841,8 @@ gedit_message_bus_foreach (GeditMessageBus        *bus,
  * @object_path: the object path
  * @method: the method
  * @callback: function to be called when message @method at @object_path is sent
- * @userdata: userdata to use for the callback
- * @destroy_data: function to evoke with @userdata as argument when @userdata
+ * @user_data: user_data to use for the callback
+ * @destroy_data: function to evoke with @user_data as argument when @user_data
  *                needs to be freed
  *
  * Connect a callback handler to be evoked when message @method at @object_path
@@ -856,7 +856,7 @@ gedit_message_bus_connect (GeditMessageBus	*bus,
 		           const gchar		*object_path,
 		           const gchar		*method,
 		           GeditMessageCallback  callback,
-		           gpointer		 userdata,
+		           gpointer		 user_data,
 		           GDestroyNotify	 destroy_data)
 {
 	Message *message;
@@ -869,7 +869,7 @@ gedit_message_bus_connect (GeditMessageBus	*bus,
 	/* lookup the message and create if it does not exist yet */
 	message = lookup_message (bus, object_path, method, TRUE);
 	
-	return add_listener (bus, message, callback, userdata, destroy_data);
+	return add_listener (bus, message, callback, user_data, destroy_data);
 }
 
 /**
@@ -895,10 +895,10 @@ gedit_message_bus_disconnect (GeditMessageBus *bus,
  * @object_path: the object path
  * @method: the method
  * @callback: the connected callback
- * @userdata: the userdata with which the callback was connected
+ * @user_data: the user_data with which the callback was connected
  *
  * Disconnects a previously connected message callback by matching the 
- * provided callback function and userdata. See also 
+ * provided callback function and user_data. See also 
  * gedit_message_bus_disconnect().
  *
  */
@@ -907,11 +907,11 @@ gedit_message_bus_disconnect_by_func (GeditMessageBus      *bus,
 				      const gchar	   *object_path,
 				      const gchar	   *method,
 				      GeditMessageCallback  callback,
-				      gpointer		    userdata)
+				      gpointer		    user_data)
 {
 	g_return_if_fail (GEDIT_IS_MESSAGE_BUS (bus));
 	
-	process_by_match (bus, object_path, method, callback, userdata, remove_listener);
+	process_by_match (bus, object_path, method, callback, user_data, remove_listener);
 }
 
 /**
@@ -938,9 +938,9 @@ gedit_message_bus_block (GeditMessageBus *bus,
  * @object_path: the object path
  * @method: the method
  * @callback: the callback to block
- * @userdata: the userdata with which the callback was connected
+ * @user_data: the user_data with which the callback was connected
  *
- * Blocks evoking the callback that matches provided @callback and @userdata.
+ * Blocks evoking the callback that matches provided @callback and @user_data.
  * Unblock the callback using gedit_message_unblock_by_func().
  *
  */
@@ -949,11 +949,11 @@ gedit_message_bus_block_by_func (GeditMessageBus      *bus,
 				 const gchar	      *object_path,
 				 const gchar	      *method,
 				 GeditMessageCallback  callback,
-				 gpointer	       userdata)
+				 gpointer	       user_data)
 {
 	g_return_if_fail (GEDIT_IS_MESSAGE_BUS (bus));
 	
-	process_by_match (bus, object_path, method, callback, userdata, block_listener);
+	process_by_match (bus, object_path, method, callback, user_data, block_listener);
 }
 
 /**
@@ -979,9 +979,9 @@ gedit_message_bus_unblock (GeditMessageBus *bus,
  * @object_path: the object path
  * @method: the method
  * @callback: the callback to block
- * @userdata: the userdata with which the callback was connected
+ * @user_data: the user_data with which the callback was connected
  *
- * Unblocks the callback that matches provided @callback and @userdata.
+ * Unblocks the callback that matches provided @callback and @user_data.
  *
  */
 void
@@ -989,11 +989,11 @@ gedit_message_bus_unblock_by_func (GeditMessageBus      *bus,
 				   const gchar	        *object_path,
 				   const gchar	        *method,
 				   GeditMessageCallback  callback,
-				   gpointer	         userdata)
+				   gpointer	         user_data)
 {
 	g_return_if_fail (GEDIT_IS_MESSAGE_BUS (bus));
 	
-	process_by_match (bus, object_path, method, callback, userdata, unblock_listener);
+	process_by_match (bus, object_path, method, callback, user_data, unblock_listener);
 }
 
 static gboolean
@@ -1022,10 +1022,12 @@ send_message_real (GeditMessageBus *bus,
 						   g_object_ref (message));
 
 	if (bus->priv->idle_id == 0)
+	{
 		bus->priv->idle_id = g_idle_add_full (G_PRIORITY_HIGH,
 						      (GSourceFunc)idle_dispatch,
 						      bus,
 						      NULL);
+	}
 }
 
 /**
diff --git a/gedit/gedit-message-bus.h b/gedit/gedit-message-bus.h
index cd7ca27..e41f407 100644
--- a/gedit/gedit-message-bus.h
+++ b/gedit/gedit-message-bus.h
@@ -41,13 +41,15 @@ typedef struct _GeditMessageBus		GeditMessageBus;
 typedef struct _GeditMessageBusClass	GeditMessageBusClass;
 typedef struct _GeditMessageBusPrivate	GeditMessageBusPrivate;
 
-struct _GeditMessageBus {
+struct _GeditMessageBus
+{
 	GObject parent;
 	
 	GeditMessageBusPrivate *priv;
 };
 
-struct _GeditMessageBusClass {
+struct _GeditMessageBusClass
+{
 	GObjectClass parent_class;
 	
 	void (*dispatch)		(GeditMessageBus  *bus,
@@ -58,91 +60,91 @@ struct _GeditMessageBusClass {
 					 GeditMessageType *message_type);
 };
 
-typedef void (* GeditMessageCallback) 	(GeditMessageBus *bus,
-					 GeditMessage	 *message,
-					 gpointer	  userdata);
+typedef void (* GeditMessageCallback) 	(GeditMessageBus  *bus,
+					 GeditMessage	  *message,
+					 gpointer	   user_data);
 
 typedef void (* GeditMessageBusForeach) (GeditMessageType *message_type,
-					 gpointer	   userdata);
+					 gpointer	   user_data);
 
-GType gedit_message_bus_get_type (void) G_GNUC_CONST;
+GType			 gedit_message_bus_get_type		(void) G_GNUC_CONST;
 
-GeditMessageBus *gedit_message_bus_get_default	(void);
-GeditMessageBus *gedit_message_bus_new		(void);
+GeditMessageBus		*gedit_message_bus_get_default		(void);
+GeditMessageBus		*gedit_message_bus_new			(void);
 
 /* registering messages */
-GeditMessageType *gedit_message_bus_lookup	(GeditMessageBus 	*bus,
-						 const gchar		*object_path,
-						 const gchar		*method);
-GeditMessageType *gedit_message_bus_register	(GeditMessageBus		*bus,
-					   	 const gchar 		*object_path,
-					  	 const gchar		*method,
-					  	 guint		 	 num_optional,
-					  	 ...) G_GNUC_NULL_TERMINATED;
+GeditMessageType	*gedit_message_bus_lookup		(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method);
+GeditMessageType	*gedit_message_bus_register		(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method,
+								 guint                   num_optional,
+								 ...) G_GNUC_NULL_TERMINATED;
 
-void gedit_message_bus_unregister	  (GeditMessageBus	*bus,
-					   GeditMessageType	*message_type);
+void			 gedit_message_bus_unregister		(GeditMessageBus        *bus,
+								 GeditMessageType       *message_type);
 
-void gedit_message_bus_unregister_all	  (GeditMessageBus	*bus,
-					   const gchar		*object_path);
+void			 gedit_message_bus_unregister_all	(GeditMessageBus        *bus,
+								 const gchar            *object_path);
 
-gboolean gedit_message_bus_is_registered  (GeditMessageBus	*bus,
-					   const gchar		*object_path,
-					   const gchar		*method);
+gboolean		 gedit_message_bus_is_registered	(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method);
 
-void gedit_message_bus_foreach		  (GeditMessageBus        *bus,
-					   GeditMessageBusForeach  func,
-					   gpointer		   userdata);
+void			 gedit_message_bus_foreach		(GeditMessageBus        *bus,
+								 GeditMessageBusForeach  func,
+								 gpointer                user_data);
 
 
 /* connecting to message events */		   
-guint gedit_message_bus_connect	 	  (GeditMessageBus	*bus, 
-					   const gchar		*object_path,
-					   const gchar		*method,
-					   GeditMessageCallback	 callback,
-					   gpointer		 userdata,
-					   GDestroyNotify        destroy_data);
-
-void gedit_message_bus_disconnect	  (GeditMessageBus	*bus,
-					   guint		 id);
-
-void gedit_message_bus_disconnect_by_func (GeditMessageBus	*bus,
-					   const gchar		*object_path,
-					   const gchar		*method,
-					   GeditMessageCallback	 callback,
-					   gpointer		 userdata);
+guint			 gedit_message_bus_connect		(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method,
+								 GeditMessageCallback    callback,
+								 gpointer                user_data,
+								 GDestroyNotify          destroy_data);
+
+void			 gedit_message_bus_disconnect		(GeditMessageBus        *bus,
+								 guint                   id);
+
+void			 gedit_message_bus_disconnect_by_func	(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method,
+								 GeditMessageCallback    callback,
+								 gpointer                user_data);
 
 /* blocking message event callbacks */
-void gedit_message_bus_block		  (GeditMessageBus	*bus,
-					   guint		 id);
-void gedit_message_bus_block_by_func	  (GeditMessageBus	*bus,
-					   const gchar		*object_path,
-					   const gchar		*method,
-					   GeditMessageCallback	 callback,
-					   gpointer		 userdata);
-
-void gedit_message_bus_unblock		  (GeditMessageBus	*bus,
-					   guint		 id);
-void gedit_message_bus_unblock_by_func	  (GeditMessageBus	*bus,
-					   const gchar		*object_path,
-					   const gchar		*method,
-					   GeditMessageCallback	 callback,
-					   gpointer		 userdata);
+void			 gedit_message_bus_block		(GeditMessageBus        *bus,
+								 guint                   id);
+void			 gedit_message_bus_block_by_func	(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method,
+								 GeditMessageCallback    callback,
+								 gpointer                user_data);
+
+void			 gedit_message_bus_unblock		(GeditMessageBus        *bus,
+								 guint                   id);
+void			 gedit_message_bus_unblock_by_func	(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method,
+								 GeditMessageCallback    callback,
+								 gpointer                user_data);
 
 /* sending messages */
-void gedit_message_bus_send_message	  (GeditMessageBus	*bus,
-					   GeditMessage		*message);
-void gedit_message_bus_send_message_sync  (GeditMessageBus	*bus,
-					   GeditMessage		*message);
+void			 gedit_message_bus_send_message		(GeditMessageBus        *bus,
+								 GeditMessage           *message);
+void			 gedit_message_bus_send_message_sync	(GeditMessageBus        *bus,
+								 GeditMessage           *message);
 					  
-void gedit_message_bus_send		  (GeditMessageBus	*bus,
-					   const gchar		*object_path,
-					   const gchar		*method,
-					   ...) G_GNUC_NULL_TERMINATED;
-GeditMessage *gedit_message_bus_send_sync (GeditMessageBus	*bus,
-					   const gchar		*object_path,
-					   const gchar		*method,
-					   ...) G_GNUC_NULL_TERMINATED;
+void			 gedit_message_bus_send			(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method,
+								 ...) G_GNUC_NULL_TERMINATED;
+GeditMessage		*gedit_message_bus_send_sync		(GeditMessageBus        *bus,
+								 const gchar            *object_path,
+								 const gchar            *method,
+								 ...) G_GNUC_NULL_TERMINATED;
 
 G_END_DECLS
 
diff --git a/gedit/gedit-message-type.c b/gedit/gedit-message-type.c
index 45e9716..9797696 100644
--- a/gedit/gedit-message-type.c
+++ b/gedit/gedit-message-type.c
@@ -75,7 +75,7 @@ struct _GeditMessageType
 	guint num_arguments;
 	guint num_required;
 	
-	GHashTable *arguments; // mapping of key -> ArgumentInfo
+	GHashTable *arguments; /* mapping of key -> ArgumentInfo */
 };
 
 /**
@@ -254,7 +254,7 @@ gedit_message_type_is_supported (GType type)
  * @var_args: key/gtype pair variable argument list
  *
  * Create a new #GeditMessageType for @method at @object_path. Argument names
- * and values are supplied by the NULL terminated variable argument list.
+ * and values are supplied by the %NULL terminated variable argument list.
  * The last @num_optional provided arguments are considered optional.
  *
  * Return value: the newly constructed #GeditMessageType
@@ -272,11 +272,11 @@ gedit_message_type_new_valist (const gchar *object_path,
 	g_return_val_if_fail (method != NULL, NULL);
 	g_return_val_if_fail (gedit_message_type_is_valid_object_path (object_path), NULL);
 
-	message_type = g_new0(GeditMessageType, 1);
+	message_type = g_new0 (GeditMessageType, 1);
 	
 	message_type->ref_count = 1;
-	message_type->object_path = g_strdup(object_path);
-	message_type->method = g_strdup(method);
+	message_type->object_path = g_strdup (object_path);
+	message_type->method = g_strdup (method);
 	message_type->num_arguments = 0;
 	message_type->arguments = g_hash_table_new_full (g_str_hash,
 							 g_str_equal,
@@ -295,7 +295,7 @@ gedit_message_type_new_valist (const gchar *object_path,
  * @...: key/gtype pair variable argument list
  *
  * Create a new #GeditMessageType for @method at @object_path. Argument names
- * and values are supplied by the NULL terminated variable argument list.
+ * and values are supplied by the %NULL terminated variable argument list.
  * The last @num_optional provided arguments are considered optional.
  *
  * Return value: the newly constructed #GeditMessageType
@@ -309,10 +309,10 @@ gedit_message_type_new (const gchar *object_path,
 {
 	GeditMessageType *message_type;
 	va_list var_args;
-	
-	va_start(var_args, num_optional);
+
+	va_start (var_args, num_optional);
 	message_type = gedit_message_type_new_valist (object_path, method, num_optional, var_args);
-	va_end(var_args);
+	va_end (var_args);
 	
 	return message_type;
 }
@@ -323,7 +323,7 @@ gedit_message_type_new (const gchar *object_path,
  * @num_optional: number of optional arguments
  * @...: key/gtype pair variable argument list
  *
- * Sets argument names/types supplied by the NULL terminated variable
+ * Sets argument names/types supplied by the %NULL terminated variable
  * argument list. The last @num_optional provided arguments are considered
  * optional.
  *
@@ -334,7 +334,7 @@ gedit_message_type_set (GeditMessageType *message_type,
 			...)
 {
 	va_list va_args;
-	
+
 	va_start (va_args, num_optional);
 	gedit_message_type_set_valist (message_type, num_optional, va_args);
 	va_end (va_args);
@@ -346,7 +346,7 @@ gedit_message_type_set (GeditMessageType *message_type,
  * @num_optional: number of optional arguments
  * @var_args: key/gtype pair variable argument list
  *
- * Sets argument names/types supplied by the NULL terminated variable
+ * Sets argument names/types supplied by the %NULL terminated variable
  * argument list @var_args. The last @num_optional provided arguments are 
  * considered optional.
  *
@@ -400,7 +400,7 @@ gedit_message_type_set_valist (GeditMessageType *message_type,
 	
 	message_type->num_required += added;
 
-	// set required for last num_optional arguments
+	/* set required for last num_optional arguments */
 	for (i = 0; i < num_optional; ++i)
 	{
 		if (optional[i])
@@ -416,7 +416,7 @@ gedit_message_type_set_valist (GeditMessageType *message_type,
 /**
  * gedit_message_type_instantiate_valist:
  * @message_type: the #GeditMessageType
- * @va_args: NULL terminated variable list of key/value pairs
+ * @va_args: %NULL terminated variable list of key/value pairs
  *
  * Instantiate a new message from the message type with specific values
  * for the message arguments.
@@ -441,7 +441,7 @@ gedit_message_type_instantiate_valist (GeditMessageType *message_type,
 /**
  * gedit_message_type_instantiate:
  * @message_type: the #GeditMessageType
- * @...: NULL terminated variable list of key/value pairs
+ * @...: %NULL terminated variable list of key/value pairs
  *
  * Instantiate a new message from the message type with specific values
  * for the message arguments.
@@ -455,7 +455,7 @@ gedit_message_type_instantiate (GeditMessageType *message_type,
 {
 	GeditMessage *message;
 	va_list va_args;
-	
+
 	va_start (va_args, message_type);
 	message = gedit_message_type_instantiate_valist (message_type, va_args);
 	va_end (va_args);
diff --git a/gedit/gedit-message-type.h b/gedit/gedit-message-type.h
index 234ea84..bc4a937 100644
--- a/gedit/gedit-message-type.h
+++ b/gedit/gedit-message-type.h
@@ -40,47 +40,47 @@ typedef void (*GeditMessageTypeForeach)		(const gchar *key,
 
 typedef struct _GeditMessageType			GeditMessageType;
 
-GType gedit_message_type_get_type 		 (void) G_GNUC_CONST;
-
-gboolean gedit_message_type_is_supported 	 (GType type);
-gchar *gedit_message_type_identifier		 (const gchar *object_path,
-						  const gchar *method);
-gboolean gedit_message_type_is_valid_object_path (const gchar *object_path);
-
-GeditMessageType *gedit_message_type_new	 (const gchar *object_path, 
-						  const gchar *method,
-						  guint	      num_optional,
-						  ...) G_GNUC_NULL_TERMINATED;
-GeditMessageType *gedit_message_type_new_valist	 (const gchar *object_path,
-						  const gchar *method,
-						  guint	      num_optional,
-						  va_list      va_args);
-
-void gedit_message_type_set			 (GeditMessageType *message_type,
-						  guint		   num_optional,
-						  ...) G_GNUC_NULL_TERMINATED;
-void gedit_message_type_set_valist		 (GeditMessageType *message_type,
-						  guint		   num_optional,
-						  va_list	           va_args);
-
-GeditMessageType *gedit_message_type_ref 	 (GeditMessageType *message_type);
-void gedit_message_type_unref			 (GeditMessageType *message_type);
-
-
-GeditMessage *gedit_message_type_instantiate_valist (GeditMessageType *message_type,
-				       		     va_list	      va_args);
-GeditMessage *gedit_message_type_instantiate 	 (GeditMessageType *message_type,
-				       		  ...) G_GNUC_NULL_TERMINATED;
-
-const gchar *gedit_message_type_get_object_path	 (GeditMessageType *message_type);
-const gchar *gedit_message_type_get_method	 (GeditMessageType *message_type);
-
-GType gedit_message_type_lookup			 (GeditMessageType *message_type,
-						  const gchar      *key);
+GType			 gedit_message_type_get_type 			(void) G_GNUC_CONST;
+
+gboolean		 gedit_message_type_is_supported		(GType             type);
+gchar			*gedit_message_type_identifier			(const gchar      *object_path,
+									 const gchar      *method);
+gboolean		 gedit_message_type_is_valid_object_path	(const gchar      *object_path);
+
+GeditMessageType	*gedit_message_type_new				(const gchar      *object_path,
+									 const gchar      *method,
+									 guint	           num_optional,
+									 ...) G_GNUC_NULL_TERMINATED;
+GeditMessageType	*gedit_message_type_new_valist			(const gchar      *object_path,
+									 const gchar      *method,
+									 guint             num_optional,
+									 va_list           va_args);
+
+void			 gedit_message_type_set				(GeditMessageType *message_type,
+									 guint             num_optional,
+									 ...) G_GNUC_NULL_TERMINATED;
+void			 gedit_message_type_set_valist			(GeditMessageType *message_type,
+									 guint             num_optional,
+									 va_list           va_args);
+
+GeditMessageType	*gedit_message_type_ref				(GeditMessageType *message_type);
+void			 gedit_message_type_unref			(GeditMessageType *message_type);
+
+
+GeditMessage		*gedit_message_type_instantiate_valist		(GeditMessageType *message_type,
+									 va_list           va_args);
+GeditMessage		*gedit_message_type_instantiate			(GeditMessageType *message_type,
+									 ...) G_GNUC_NULL_TERMINATED;
+
+const gchar		*gedit_message_type_get_object_path		(GeditMessageType *message_type);
+const gchar		*gedit_message_type_get_method			(GeditMessageType *message_type);
+
+GType			 gedit_message_type_lookup			(GeditMessageType *message_type,
+									 const gchar      *key);
 						 
-void gedit_message_type_foreach 		 (GeditMessageType 	  *message_type,
-						  GeditMessageTypeForeach  func,
-						  gpointer	   	   user_data);
+void			 gedit_message_type_foreach			(GeditMessageType *message_type,
+									 GeditMessageTypeForeach   func,
+									 gpointer          user_data);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-message.c b/gedit/gedit-message.c
index 5d16ae2..39dd53f 100644
--- a/gedit/gedit-message.c
+++ b/gedit/gedit-message.c
@@ -189,7 +189,7 @@ gedit_message_class_init (GeditMessageClass *klass)
 					 		     G_PARAM_CONSTRUCT_ONLY |
 					 		     G_PARAM_STATIC_STRINGS));
 
-	g_type_class_add_private (object_class, sizeof(GeditMessagePrivate));
+	g_type_class_add_private (object_class, sizeof (GeditMessagePrivate));
 }
 
 static void
@@ -264,7 +264,7 @@ const gchar *
 gedit_message_get_method (GeditMessage *message)
 {
 	g_return_val_if_fail (GEDIT_IS_MESSAGE (message), NULL);
-	
+
 	return gedit_message_type_get_method (message->priv->type);
 }
 
@@ -281,7 +281,7 @@ const gchar *
 gedit_message_get_object_path (GeditMessage *message)
 {
 	g_return_val_if_fail (GEDIT_IS_MESSAGE (message), NULL);
-	
+
 	return gedit_message_type_get_object_path (message->priv->type);
 }
 
@@ -556,7 +556,7 @@ gedit_message_has_key (GeditMessage *message,
 		       const gchar  *key)
 {
 	g_return_val_if_fail (GEDIT_IS_MESSAGE (message), FALSE);
-	
+
 	return value_lookup (message, key, FALSE) != NULL;
 }
 
@@ -608,7 +608,7 @@ gedit_message_validate (GeditMessage *message)
 
 		message->priv->valid = info.valid;
 	}
-	
+
 	return message->priv->valid;
 }
 
diff --git a/gedit/gedit-message.h b/gedit/gedit-message.h
index f5ac740..e00e59d 100644
--- a/gedit/gedit-message.h
+++ b/gedit/gedit-message.h
@@ -40,51 +40,52 @@ typedef struct _GeditMessage		GeditMessage;
 typedef struct _GeditMessageClass	GeditMessageClass;
 typedef struct _GeditMessagePrivate	GeditMessagePrivate;
 
-struct _GeditMessage {
+struct _GeditMessage
+{
 	GObject parent;
 	
 	GeditMessagePrivate *priv;
 };
 
-struct _GeditMessageClass {
+struct _GeditMessageClass
+{
 	GObjectClass parent_class;
 };
 
-GType gedit_message_get_type (void) G_GNUC_CONST;
+GType		 gedit_message_get_type			(void) G_GNUC_CONST;
 
-struct _GeditMessageType gedit_message_get_message_type (GeditMessage *message);
+struct _GeditMessageType gedit_message_get_message_type (GeditMessage  *message);
 
-void gedit_message_get			(GeditMessage	 *message,
-					 ...) G_GNUC_NULL_TERMINATED;
-void gedit_message_get_valist		(GeditMessage	 *message,
-					 va_list 	  var_args);
-void gedit_message_get_value		(GeditMessage	 *message,
-					 const gchar	 *key,
-					 GValue		 *value);
+void		 gedit_message_get			(GeditMessage  *message,
+							 ...) G_GNUC_NULL_TERMINATED;
+void		 gedit_message_get_valist		(GeditMessage  *message,
+							 va_list        var_args);
+void		 gedit_message_get_value		(GeditMessage  *message,
+							 const gchar   *key,
+							 GValue        *value);
 
-void gedit_message_set			(GeditMessage	 *message,
-					 ...) G_GNUC_NULL_TERMINATED;
-void gedit_message_set_valist		(GeditMessage	 *message,
-					 va_list	  	  var_args);
-void gedit_message_set_value		(GeditMessage	 *message,
-					 const gchar 	 *key,
-					 GValue		 *value);
-void gedit_message_set_valuesv		(GeditMessage	 *message,
-					 const gchar	**keys,
-					 GValue		 *values,
-					 gint		  n_values);
+void		 gedit_message_set			(GeditMessage  *message,
+							 ...) G_GNUC_NULL_TERMINATED;
+void		 gedit_message_set_valist		(GeditMessage  *message,
+							 va_list        var_args);
+void		 gedit_message_set_value		(GeditMessage  *message,
+							 const gchar   *key,
+							 GValue        *value);
+void		 gedit_message_set_valuesv		(GeditMessage  *message,
+							 const gchar  **keys,
+							 GValue        *values,
+							 gint           n_values);
 
-const gchar *gedit_message_get_object_path (GeditMessage	*message);
-const gchar *gedit_message_get_method	(GeditMessage	 *message);
+const gchar	*gedit_message_get_object_path		(GeditMessage  *message);
+const gchar	*gedit_message_get_method		(GeditMessage  *message);
 
-gboolean gedit_message_has_key		(GeditMessage	 *message,
-					 const gchar     *key);
+gboolean	 gedit_message_has_key			(GeditMessage  *message,
+							 const gchar   *key);
 
-GType gedit_message_get_key_type 	(GeditMessage    *message,
-			    		 const gchar     *key);
-
-gboolean gedit_message_validate		(GeditMessage	 *message);
+GType		 gedit_message_get_key_type 		(GeditMessage  *message,
+							 const gchar   *key);
 
+gboolean	 gedit_message_validate			(GeditMessage  *message);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-metadata-manager.c b/gedit/gedit-metadata-manager.c
index 01a4be3..a6e1be8 100644
--- a/gedit/gedit-metadata-manager.c
+++ b/gedit/gedit-metadata-manager.c
@@ -197,9 +197,11 @@ parseItem (xmlDocPtr doc, xmlNodePtr cur)
 			value = xmlGetProp (cur, (const xmlChar *)"value");
 
 			if ((key != NULL) && (value != NULL))
+			{
 				g_hash_table_insert (item->values,
 						     g_strdup ((gchar *)key), 
 						     g_strdup ((gchar *)value));
+			}
 
 			if (key != NULL)
 				xmlFree (key);
@@ -388,17 +390,24 @@ gedit_metadata_manager_set (GFile       *location,
 	}
 	
 	if (item->values == NULL)
+	{
 		 item->values = g_hash_table_new_full (g_str_hash, 
 				 		       g_str_equal, 
 						       g_free, 
 						       g_free);
+	}
+	
 	if (value != NULL)
+	{
 		g_hash_table_insert (item->values,
 				     g_strdup (key),
 				     g_strdup (value));
+	}
 	else
+	{
 		g_hash_table_remove (item->values,
 				     key);
+	}
 
 	item->atime = time (NULL);
 
diff --git a/gedit/gedit-metadata-manager.h b/gedit/gedit-metadata-manager.h
index 7995a1c..b055c55 100644
--- a/gedit/gedit-metadata-manager.h
+++ b/gedit/gedit-metadata-manager.h
@@ -48,4 +48,5 @@ void		 gedit_metadata_manager_set		(GFile       *location,
 G_END_DECLS
 
 #endif /* __GEDIT_METADATA_MANAGER_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-notebook.c b/gedit/gedit-notebook.c
index 9613b24..ee2412d 100644
--- a/gedit/gedit-notebook.c
+++ b/gedit/gedit-notebook.c
@@ -77,8 +77,8 @@ G_DEFINE_TYPE(GeditNotebook, gedit_notebook, GTK_TYPE_NOTEBOOK)
 
 static void gedit_notebook_finalize (GObject *object);
 
-static gboolean gedit_notebook_change_current_page (GtkNotebook *notebook,
-						    gint         offset);
+static gboolean gedit_notebook_change_current_page (GtkNotebook   *notebook,
+						    gint           offset);
 
 static void move_current_tab_to_another_notebook  (GeditNotebook  *src,
 						   GeditNotebook  *dest,
@@ -187,11 +187,12 @@ gedit_notebook_class_init (GeditNotebookClass *klass)
 			      1,
 			      GEDIT_TYPE_TAB);
 
-	g_type_class_add_private (object_class, sizeof(GeditNotebookPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditNotebookPrivate));
 }
 
 static GeditNotebook *
-find_notebook_at_pointer (gint abs_x, gint abs_y)
+find_notebook_at_pointer (gint abs_x,
+			  gint abs_y)
 {
 	GdkWindow *win_at_pointer;
 	GdkWindow *toplevel_win;
diff --git a/gedit/gedit-notebook.h b/gedit/gedit-notebook.h
index c08aa08..cf17d1f 100644
--- a/gedit/gedit-notebook.h
+++ b/gedit/gedit-notebook.h
@@ -81,16 +81,15 @@ struct _GeditNotebookClass
         GtkNotebookClass parent_class;
 
 	/* Signals */
-	void	 (* tab_added)      (GeditNotebook *notebook,
-				     GeditTab      *tab);
-	void	 (* tab_removed)    (GeditNotebook *notebook,
-				     GeditTab      *tab);
-	void	 (* tab_detached)   (GeditNotebook *notebook,
-				     GeditTab      *tab);
-	void	 (* tabs_reordered) (GeditNotebook *notebook);
-	void	 (* tab_close_request)
-				    (GeditNotebook *notebook,
-				     GeditTab      *tab);
+	void	 (* tab_added)		(GeditNotebook *notebook,
+					 GeditTab      *tab);
+	void	 (* tab_removed)	(GeditNotebook *notebook,
+					 GeditTab      *tab);
+	void	 (* tab_detached)	(GeditNotebook *notebook,
+					 GeditTab      *tab);
+	void	 (* tabs_reordered)	(GeditNotebook *notebook);
+	void	 (* tab_close_request)	(GeditNotebook *notebook,
+					 GeditTab      *tab);
 };
 
 /*
@@ -141,4 +140,5 @@ gboolean	gedit_notebook_get_tab_drag_and_drop_enabled
 G_END_DECLS
 
 #endif /* GEDIT_NOTEBOOK_H */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-object-module.c b/gedit/gedit-object-module.c
index 2d30a89..a9d3532 100644
--- a/gedit/gedit-object-module.c
+++ b/gedit/gedit-object-module.c
@@ -187,7 +187,8 @@ gedit_object_module_get_property (GObject    *object,
 			g_value_set_boolean (value, module->priv->resident);
 			break;
 		default:
-			g_return_if_reached ();
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+			break;
 	}
 }
 
@@ -216,7 +217,8 @@ gedit_object_module_set_property (GObject      *object,
 			module->priv->resident = g_value_get_boolean (value);
 			break;
 		default:
-			g_return_if_reached ();
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+			break;
 	}
 }
 
@@ -341,4 +343,5 @@ gedit_object_module_get_object_type (GeditObjectModule *module)
 	
 	return module->priv->type;
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-object-module.h b/gedit/gedit-object-module.h
index b4aaef6..f8b6fb3 100644
--- a/gedit/gedit-object-module.h
+++ b/gedit/gedit-object-module.h
@@ -75,10 +75,10 @@ struct _GeditObjectModuleClass
 
 GType		 gedit_object_module_get_type			(void) G_GNUC_CONST;
 
-GeditObjectModule *gedit_object_module_new			(const gchar *module_name,
-								 const gchar *path,
-								 const gchar *type_registration,
-								 gboolean     resident);
+GeditObjectModule *gedit_object_module_new			(const gchar       *module_name,
+								 const gchar       *path,
+								 const gchar       *type_registration,
+								 gboolean           resident);
 
 GObject		*gedit_object_module_new_object			(GeditObjectModule *module, 
 								 const gchar	   *first_property_name,
@@ -92,4 +92,5 @@ const gchar 	*gedit_object_module_get_type_registration 	(GeditObjectModule *mod
 G_END_DECLS
 
 #endif
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-panel.c b/gedit/gedit-panel.c
index 84fa92b..51a1ff1 100644
--- a/gedit/gedit-panel.c
+++ b/gedit/gedit-panel.c
@@ -266,74 +266,74 @@ set_gtk_image_from_gtk_image (GtkImage *image,
 {
 	switch (gtk_image_get_storage_type (source))
 	{
-	case GTK_IMAGE_EMPTY:
-		gtk_image_clear (image);
-		break;
-	case GTK_IMAGE_PIXMAP:
-		{
-			GdkPixmap *pm;
-			GdkBitmap *bm;
-
-			gtk_image_get_pixmap (source, &pm, &bm);
-			gtk_image_set_from_pixmap (image, pm, bm);
-		}
-		break;
-	case GTK_IMAGE_IMAGE:
-		{
-			GdkImage *i;
-			GdkBitmap *bm;
-
-			gtk_image_get_image (source, &i, &bm);
-			gtk_image_set_from_image (image, i, bm);
-		}
-		break;
-	case GTK_IMAGE_PIXBUF:
-		{
-			GdkPixbuf *pb;
-
-			pb = gtk_image_get_pixbuf (source);
-			gtk_image_set_from_pixbuf (image, pb);
-		}
-		break;
-	case GTK_IMAGE_STOCK:
-		{
-			gchar *s_id;
-			GtkIconSize s;
-
-			gtk_image_get_stock (source, &s_id, &s);
-			gtk_image_set_from_stock (image, s_id, s);
-		}
-		break;
-	case GTK_IMAGE_ICON_SET:
-		{
-			GtkIconSet *is;
-			GtkIconSize s;
-
-			gtk_image_get_icon_set (source, &is, &s);
-			gtk_image_set_from_icon_set (image, is, s);
-		}
-		break;
-	case GTK_IMAGE_ANIMATION:
-		{
-			GdkPixbufAnimation *a;
+		case GTK_IMAGE_EMPTY:
+			gtk_image_clear (image);
+			break;
+		case GTK_IMAGE_PIXMAP:
+			{
+				GdkPixmap *pm;
+				GdkBitmap *bm;
+
+				gtk_image_get_pixmap (source, &pm, &bm);
+				gtk_image_set_from_pixmap (image, pm, bm);
+			}
+			break;
+		case GTK_IMAGE_IMAGE:
+			{
+				GdkImage *i;
+				GdkBitmap *bm;
+
+				gtk_image_get_image (source, &i, &bm);
+				gtk_image_set_from_image (image, i, bm);
+			}
+			break;
+		case GTK_IMAGE_PIXBUF:
+			{
+				GdkPixbuf *pb;
 
-			a = gtk_image_get_animation (source);
-			gtk_image_set_from_animation (image, a);
-		}
-		break;
-	case GTK_IMAGE_ICON_NAME:
-		{
-			const gchar *n;
-			GtkIconSize s;
+				pb = gtk_image_get_pixbuf (source);
+				gtk_image_set_from_pixbuf (image, pb);
+			}
+			break;
+		case GTK_IMAGE_STOCK:
+			{
+				gchar *s_id;
+				GtkIconSize s;
+
+				gtk_image_get_stock (source, &s_id, &s);
+				gtk_image_set_from_stock (image, s_id, s);
+			}
+			break;
+		case GTK_IMAGE_ICON_SET:
+			{
+				GtkIconSet *is;
+				GtkIconSize s;
+
+				gtk_image_get_icon_set (source, &is, &s);
+				gtk_image_set_from_icon_set (image, is, s);
+			}
+			break;
+		case GTK_IMAGE_ANIMATION:
+			{
+				GdkPixbufAnimation *a;
 
-			gtk_image_get_icon_name (source, &n, &s);
-			gtk_image_set_from_icon_name (image, n, s);
-		}
-		break;
-	default:
-		gtk_image_set_from_stock (image,
-					  GTK_STOCK_FILE,
-					  GTK_ICON_SIZE_MENU);
+				a = gtk_image_get_animation (source);
+				gtk_image_set_from_animation (image, a);
+			}
+			break;
+		case GTK_IMAGE_ICON_NAME:
+			{
+				const gchar *n;
+				GtkIconSize s;
+
+				gtk_image_get_icon_name (source, &n, &s);
+				gtk_image_set_from_icon_name (image, n, s);
+			}
+			break;
+		default:
+			gtk_image_set_from_stock (image,
+						  GTK_STOCK_FILE,
+						  GTK_ICON_SIZE_MENU);
 	}
 }
 
@@ -598,7 +598,9 @@ gedit_panel_constructor (GType type,
 GtkWidget *
 gedit_panel_new (GtkOrientation orientation)
 {
-	return GTK_WIDGET (g_object_new (GEDIT_TYPE_PANEL, "orientation", orientation, NULL));
+	return GTK_WIDGET (g_object_new (GEDIT_TYPE_PANEL,
+					 "orientation", orientation,
+					 NULL));
 }
 
 static GtkWidget *
@@ -985,4 +987,5 @@ _gedit_panel_set_active_item_by_id (GeditPanel *panel,
 		}
 	}
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-panel.h b/gedit/gedit-panel.h
index 133ea81..2cb9716 100644
--- a/gedit/gedit-panel.h
+++ b/gedit/gedit-panel.h
@@ -105,18 +105,18 @@ gboolean	 gedit_panel_add_item_with_stock_icon	(GeditPanel     *panel,
 						      	 const gchar    *display_name,
 						      	 const gchar    *stock_id);
 
-gboolean	 gedit_panel_remove_item	(GeditPanel     *panel,
-					  	 GtkWidget      *item);
+gboolean	 gedit_panel_remove_item		(GeditPanel     *panel,
+					  		 GtkWidget      *item);
 
-gboolean	 gedit_panel_activate_item 	(GeditPanel     *panel,
-					    	 GtkWidget      *item);
+gboolean	 gedit_panel_activate_item 		(GeditPanel     *panel,
+					    		 GtkWidget      *item);
 
-gboolean	 gedit_panel_item_is_active 	(GeditPanel     *panel,
-					    	 GtkWidget      *item);
+gboolean	 gedit_panel_item_is_active 		(GeditPanel     *panel,
+					    		 GtkWidget      *item);
 
-GtkOrientation	 gedit_panel_get_orientation	(GeditPanel	*panel);
+GtkOrientation	 gedit_panel_get_orientation		(GeditPanel	*panel);
 
-gint		 gedit_panel_get_n_items	(GeditPanel	*panel);
+gint		 gedit_panel_get_n_items		(GeditPanel	*panel);
 
 
 /*
@@ -130,4 +130,5 @@ void		 _gedit_panel_set_active_item_by_id	(GeditPanel	*panel,
 G_END_DECLS
 
 #endif  /* __GEDIT_PANEL_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-plugin-info.c b/gedit/gedit-plugin-info.c
index 3a8dd65..b7f0ac4 100644
--- a/gedit/gedit-plugin-info.c
+++ b/gedit/gedit-plugin-info.c
@@ -358,9 +358,13 @@ gedit_plugin_info_get_icon_name (GeditPluginInfo *info)
 	if (info->icon_name != NULL && 
 	    gtk_icon_theme_has_icon (gtk_icon_theme_get_default (),
 				     info->icon_name))
+	{
 		return info->icon_name;
+	}
 	else
+	{
 		return "gedit-plugin";
+	}
 }
 
 const gchar **
@@ -394,4 +398,5 @@ gedit_plugin_info_get_version (GeditPluginInfo *info)
 
 	return info->version;
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-plugin-loader.h b/gedit/gedit-plugin-loader.h
index e72bd73..4e0c4b2 100644
--- a/gedit/gedit-plugin-loader.h
+++ b/gedit/gedit-plugin-loader.h
@@ -49,7 +49,7 @@ struct _GeditPluginLoaderInterface {
 	void 	     (*unload)		(GeditPluginLoader 	*loader,
 					 GeditPluginInfo       	*info);
 
-	void         (*garbage_collect) 	(GeditPluginLoader	*loader);
+	void         (*garbage_collect)	(GeditPluginLoader	*loader);
 };
 
 GType gedit_plugin_loader_get_type (void);
@@ -104,4 +104,5 @@ register_gedit_plugin_loader (GTypeModule *type_module)				\
 G_END_DECLS
 
 #endif /* __GEDIT_PLUGIN_LOADER_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-plugin-manager.c b/gedit/gedit-plugin-manager.c
index 29cadaa..abb6d1d 100644
--- a/gedit/gedit-plugin-manager.c
+++ b/gedit/gedit-plugin-manager.c
@@ -72,9 +72,11 @@ struct _GeditPluginManagerPrivate
 
 G_DEFINE_TYPE(GeditPluginManager, gedit_plugin_manager, GTK_TYPE_VBOX)
 
-static GeditPluginInfo *plugin_manager_get_selected_plugin (GeditPluginManager *pm); 
-static void plugin_manager_toggle_active (GeditPluginManager *pm, GtkTreeIter *iter, GtkTreeModel *model);
-static void gedit_plugin_manager_finalize (GObject *object);
+static GeditPluginInfo	*plugin_manager_get_selected_plugin	(GeditPluginManager *pm); 
+static void		 plugin_manager_toggle_active		(GeditPluginManager *pm,
+								 GtkTreeIter        *iter,
+								 GtkTreeModel       *model);
+static void		 gedit_plugin_manager_finalize		(GObject            *object);
 
 static void 
 gedit_plugin_manager_class_init (GeditPluginManagerClass *klass)
@@ -335,7 +337,8 @@ plugin_manager_set_active (GeditPluginManager *pm,
 	if (active)
 	{
 		/* activate the plugin */
-		if (!gedit_plugins_engine_activate_plugin (pm->priv->engine, info)) {
+		if (!gedit_plugins_engine_activate_plugin (pm->priv->engine, info))
+		{
 			gedit_debug_message (DEBUG_PLUGINS, "Could not activate %s.\n", 
 					     gedit_plugin_info_get_name (info));
 
@@ -345,7 +348,8 @@ plugin_manager_set_active (GeditPluginManager *pm,
 	else
 	{
 		/* deactivate the plugin */
-		if (!gedit_plugins_engine_deactivate_plugin (pm->priv->engine, info)) {
+		if (!gedit_plugins_engine_deactivate_plugin (pm->priv->engine, info))
+		{
 			gedit_debug_message (DEBUG_PLUGINS, "Could not deactivate %s.\n", 
 					     gedit_plugin_info_get_name (info));
 
@@ -411,10 +415,10 @@ plugin_manager_set_active_all (GeditPluginManager *pm,
 
 	gtk_tree_model_get_iter_first (model, &iter);
 
-	do {
+	do
+	{
 		plugin_manager_set_active (pm, &iter, model, active);
-	}
-	while (gtk_tree_model_iter_next (model, &iter));
+	} while (gtk_tree_model_iter_next (model, &iter));
 }
 
 /* Callback used as the interactive search comparison function */
@@ -765,8 +769,7 @@ plugin_toggled_cb (GeditPluginsEngine *engine,
 			GeditPluginInfo *tinfo;
 			gtk_tree_model_get (model, &iter, INFO_COLUMN, &tinfo, -1);
 			info_found = info == tinfo;
-		}
-		while (!info_found && gtk_tree_model_iter_next (model, &iter));
+		} while (!info_found && gtk_tree_model_iter_next (model, &iter));
 	}
 
 	if (!info_found)
@@ -887,4 +890,5 @@ GtkWidget *gedit_plugin_manager_new (void)
 {
 	return g_object_new (GEDIT_TYPE_PLUGIN_MANAGER,0);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-plugin-manager.h b/gedit/gedit-plugin-manager.h
index 8fffab0..00963b2 100644
--- a/gedit/gedit-plugin-manager.h
+++ b/gedit/gedit-plugin-manager.h
@@ -81,4 +81,5 @@ GtkWidget	*gedit_plugin_manager_new		(void);
 G_END_DECLS
 
 #endif  /* __GEDIT_PLUGIN_MANAGER_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-plugin.c b/gedit/gedit-plugin.c
index 940679e..d27896c 100644
--- a/gedit/gedit-plugin.c
+++ b/gedit/gedit-plugin.c
@@ -56,7 +56,8 @@ struct _GeditPluginPrivate
 G_DEFINE_TYPE(GeditPlugin, gedit_plugin, G_TYPE_OBJECT)
 
 static void
-dummy (GeditPlugin *plugin, GeditWindow *window)
+dummy (GeditPlugin *plugin,
+       GeditWindow *window)
 {
 	/* Empty */
 }
@@ -89,7 +90,8 @@ gedit_plugin_get_property (GObject    *object,
 			g_value_take_string (value, gedit_plugin_get_data_dir (GEDIT_PLUGIN (object)));
 			break;
 		default:
-			g_return_if_reached ();
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+			break;
 	}
 }
 
@@ -110,7 +112,8 @@ gedit_plugin_set_property (GObject      *object,
 			priv->data_dir_name = g_value_dup_string (value);
 			break;
 		default:
-			g_return_if_reached ();
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+			break;
 	}
 }
 
@@ -332,4 +335,5 @@ gedit_plugin_create_configure_dialog (GeditPlugin *plugin)
 	
 	return GEDIT_PLUGIN_GET_CLASS (plugin)->create_configure_dialog (plugin);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-plugin.h b/gedit/gedit-plugin.h
index 2590b38..87f06d3 100644
--- a/gedit/gedit-plugin.h
+++ b/gedit/gedit-plugin.h
@@ -238,4 +238,5 @@ object_name##_register_type (GTypeModule *type_module)				\
 G_END_DECLS
 
 #endif  /* __GEDIT_PLUGIN_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-plugins-engine.c b/gedit/gedit-plugins-engine.c
index e2560c7..ac3d15e 100644
--- a/gedit/gedit-plugins-engine.c
+++ b/gedit/gedit-plugins-engine.c
@@ -83,10 +83,10 @@ struct _GeditPluginsEnginePrivate
 
 GeditPluginsEngine *default_engine = NULL;
 
-static void	gedit_plugins_engine_activate_plugin_real (GeditPluginsEngine *engine,
-							   GeditPluginInfo    *info);
-static void	gedit_plugins_engine_deactivate_plugin_real (GeditPluginsEngine *engine,
-							     GeditPluginInfo    *info);
+static void	gedit_plugins_engine_activate_plugin_real	(GeditPluginsEngine *engine,
+								 GeditPluginInfo    *info);
+static void	gedit_plugins_engine_deactivate_plugin_real	(GeditPluginsEngine *engine,
+								 GeditPluginInfo    *info);
 
 typedef gboolean (*LoadDirCallback)(GeditPluginsEngine *engine, const gchar *filename, gpointer userdata);
 
@@ -466,7 +466,8 @@ ensure_loader (LoaderInfo *info)
 }
 
 static GeditPluginLoader *
-get_plugin_loader (GeditPluginsEngine *engine, GeditPluginInfo *info)
+get_plugin_loader (GeditPluginsEngine *engine,
+		   GeditPluginInfo    *info)
 {
 	const gchar *loader_id;
 	LoaderInfo *loader_info;
@@ -530,7 +531,7 @@ gedit_plugins_engine_get_plugin_list (GeditPluginsEngine *engine)
 
 static gint
 compare_plugin_info_and_name (GeditPluginInfo *info,
-			      const gchar *module_name)
+			      const gchar     *module_name)
 {
 	return strcmp (gedit_plugin_info_get_module_name (info), module_name);
 }
@@ -611,7 +612,7 @@ load_plugin (GeditPluginsEngine *engine,
 
 static void
 gedit_plugins_engine_activate_plugin_real (GeditPluginsEngine *engine,
-					   GeditPluginInfo *info)
+					   GeditPluginInfo    *info)
 {
 	const GList *wins;
 
@@ -663,7 +664,7 @@ call_plugin_deactivate (GeditPlugin *plugin,
 
 static void
 gedit_plugins_engine_deactivate_plugin_real (GeditPluginsEngine *engine,
-					     GeditPluginInfo *info)
+					     GeditPluginInfo    *info)
 {
 	const GList *wins;
 	GeditPluginLoader *loader;
@@ -711,7 +712,7 @@ gedit_plugins_engine_deactivate_plugin (GeditPluginsEngine *engine,
 
 void
 gedit_plugins_engine_activate_plugins (GeditPluginsEngine *engine,
-					GeditWindow        *window)
+					GeditWindow       *window)
 {
 	GSList *active_plugins = NULL;
 	GList *pl;
@@ -736,16 +737,22 @@ gedit_plugins_engine_activate_plugins (GeditPluginsEngine *engine,
 		    g_slist_find_custom (active_plugins,
 					 gedit_plugin_info_get_module_name (info),
 					 (GCompareFunc)strcmp) == NULL)
+		{
 			continue;
+		}
 		
 		/* If plugin is not active, don't try to activate/load it */
 		if (!engine->priv->activate_from_prefs && 
 		    !gedit_plugin_info_is_active (info))
+		{
 			continue;
+		}
 
 		if (load_plugin (engine, info))
+		{
 			gedit_plugin_activate (info->plugin,
 					       window);
+		}
 	}
 	
 	if (engine->priv->activate_from_prefs)
@@ -763,7 +770,7 @@ gedit_plugins_engine_activate_plugins (GeditPluginsEngine *engine,
 
 void
 gedit_plugins_engine_deactivate_plugins (GeditPluginsEngine *engine,
-					  GeditWindow        *window)
+					  GeditWindow       *window)
 {
 	GList *pl;
 	
@@ -789,7 +796,7 @@ gedit_plugins_engine_deactivate_plugins (GeditPluginsEngine *engine,
 
 void
 gedit_plugins_engine_update_plugins_ui (GeditPluginsEngine *engine,
-					 GeditWindow        *window)
+					 GeditWindow       *window)
 {
 	GList *pl;
 
@@ -883,4 +890,5 @@ gedit_plugins_engine_rescan_plugins (GeditPluginsEngine *engine)
 	
 	load_all_plugins (engine);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-plugins-engine.h b/gedit/gedit-plugins-engine.h
index d9dd9fc..0ebb7f2 100644
--- a/gedit/gedit-plugins-engine.h
+++ b/gedit/gedit-plugins-engine.h
@@ -71,38 +71,39 @@ GType			 gedit_plugins_engine_get_type		(void) G_GNUC_CONST;
 
 GeditPluginsEngine	*gedit_plugins_engine_get_default	(void);
 
-void		 gedit_plugins_engine_garbage_collect	(GeditPluginsEngine *engine);
+void			 gedit_plugins_engine_garbage_collect	(GeditPluginsEngine *engine);
 
-const GList	*gedit_plugins_engine_get_plugin_list 	(GeditPluginsEngine *engine);
+const GList		*gedit_plugins_engine_get_plugin_list 	(GeditPluginsEngine *engine);
 
-GeditPluginInfo	*gedit_plugins_engine_get_plugin_info	(GeditPluginsEngine *engine,
-							 const gchar        *name);
+GeditPluginInfo		*gedit_plugins_engine_get_plugin_info	(GeditPluginsEngine *engine,
+								 const gchar        *name);
 
 /* plugin load and unloading (overall, for all windows) */
-gboolean 	 gedit_plugins_engine_activate_plugin 	(GeditPluginsEngine *engine,
-							 GeditPluginInfo    *info);
-gboolean 	 gedit_plugins_engine_deactivate_plugin	(GeditPluginsEngine *engine,
-							 GeditPluginInfo    *info);
+gboolean 		 gedit_plugins_engine_activate_plugin 	(GeditPluginsEngine *engine,
+								 GeditPluginInfo    *info);
+gboolean 		 gedit_plugins_engine_deactivate_plugin	(GeditPluginsEngine *engine,
+								 GeditPluginInfo    *info);
 
-void	 	 gedit_plugins_engine_configure_plugin	(GeditPluginsEngine *engine,
-							 GeditPluginInfo    *info,
-							 GtkWindow          *parent);
+void	 		 gedit_plugins_engine_configure_plugin	(GeditPluginsEngine *engine,
+								 GeditPluginInfo    *info,
+								 GtkWindow          *parent);
 
 /* plugin activation/deactivation per window, private to GeditWindow */
-void 		 gedit_plugins_engine_activate_plugins   (GeditPluginsEngine *engine,
-							  GeditWindow        *window);
-void 		 gedit_plugins_engine_deactivate_plugins (GeditPluginsEngine *engine,
-							  GeditWindow        *window);
-void		 gedit_plugins_engine_update_plugins_ui  (GeditPluginsEngine *engine,
-							  GeditWindow        *window);
+void 			 gedit_plugins_engine_activate_plugins	(GeditPluginsEngine *engine,
+								  GeditWindow        *window);
+void 			 gedit_plugins_engine_deactivate_plugins
+								(GeditPluginsEngine *engine,
+								  GeditWindow        *window);
+void			 gedit_plugins_engine_update_plugins_ui	(GeditPluginsEngine *engine,
+								  GeditWindow        *window);
 
 /* private for gconf notification */
-void		 gedit_plugins_engine_active_plugins_changed
-							(GeditPluginsEngine *engine);
+void		 gedit_plugins_engine_active_plugins_changed	(GeditPluginsEngine *engine);
 
-void		 gedit_plugins_engine_rescan_plugins	(GeditPluginsEngine *engine);
+void		 gedit_plugins_engine_rescan_plugins		(GeditPluginsEngine *engine);
 
 G_END_DECLS
 
 #endif  /* __GEDIT_PLUGINS_ENGINE_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-print-job.c b/gedit/gedit-print-job.c
index 5c7178d..b7e2fd3 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -893,4 +893,5 @@ gedit_print_job_get_page_setup (GeditPrintJob *job)
 
 	return gtk_print_operation_get_default_page_setup (job->priv->operation);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-print-job.h b/gedit/gedit-print-job.h
index e60d3dc..338d753 100644
--- a/gedit/gedit-print-job.h
+++ b/gedit/gedit-print-job.h
@@ -90,15 +90,15 @@ struct _GeditPrintJobClass
 	GObjectClass parent_class;
 
         /* Signals */
-	void (* printing) (GeditPrintJob       *job,
-	                   GeditPrintJobStatus  status);
+	void (* printing)	(GeditPrintJob       *job,
+				 GeditPrintJobStatus  status);
 
-	void (* show_preview) (GeditPrintJob   *job,
-	                       GtkWidget       *preview);
+	void (* show_preview)	(GeditPrintJob       *job,
+				 GtkWidget           *preview);
 
-        void (*done)      (GeditPrintJob       *job,
-		           GeditPrintJobResult  result,
-                           const GError        *error);
+        void (*done)		(GeditPrintJob       *job,
+        			 GeditPrintJobResult  result,
+        			 const GError        *error);
 };
 
 /*
@@ -131,4 +131,5 @@ GtkPageSetup		*gedit_print_job_get_page_setup		(GeditPrintJob            *job);
 G_END_DECLS
 
 #endif /* __GEDIT_PRINT_JOB_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-print-preview.c b/gedit/gedit-print-preview.c
index 3d78fbb..743001b 100644
--- a/gedit/gedit-print-preview.c
+++ b/gedit/gedit-print-preview.c
@@ -93,7 +93,7 @@ gedit_print_preview_get_property (GObject    *object,
 				  GValue     *value,
 				  GParamSpec *pspec)
 {
-	//GeditPrintPreview *preview = GEDIT_PRINT_PREVIEW (object);
+	/* GeditPrintPreview *preview = GEDIT_PRINT_PREVIEW (object); */
 	
 	switch (prop_id)
 	{
@@ -109,7 +109,7 @@ gedit_print_preview_set_property (GObject      *object,
 				  const GValue *value,
 				  GParamSpec   *pspec)
 {
-	//GeditPrintPreview *preview = GEDIT_PRINT_PREVIEW (object);
+	/* GeditPrintPreview *preview = GEDIT_PRINT_PREVIEW (object); */
 	
 	switch (prop_id)
 	{
@@ -122,7 +122,7 @@ gedit_print_preview_set_property (GObject      *object,
 static void
 gedit_print_preview_finalize (GObject *object)
 {
-	//GeditPrintPreview *preview = GEDIT_PRINT_PREVIEW (object);
+	/* GeditPrintPreview *preview = GEDIT_PRINT_PREVIEW (object); */
 
 	G_OBJECT_CLASS (gedit_print_preview_parent_class)->finalize (object);
 }
@@ -152,7 +152,7 @@ gedit_print_preview_class_init (GeditPrintPreviewClass *klass)
 
 	widget_class->grab_focus = gedit_print_preview_grab_focus;
 
-	g_type_class_add_private (object_class, sizeof(GeditPrintPreviewPrivate));	
+	g_type_class_add_private (object_class, sizeof (GeditPrintPreviewPrivate));	
 }
 
 static void
@@ -315,7 +315,8 @@ zoom_out (GeditPrintPreview *preview)
 }
 
 static void
-goto_page (GeditPrintPreview *preview, gint page)
+goto_page (GeditPrintPreview *preview,
+	   gint               page)
 {
 	gchar c[32];
 
@@ -444,31 +445,35 @@ page_entry_focus_out (GtkWidget         *widget,
 }
 
 static void
-on_1x1_clicked (GtkMenuItem *i, GeditPrintPreview *preview)
+on_1x1_clicked (GtkMenuItem       *i,
+		GeditPrintPreview *preview)
 {
 	set_rows_and_cols (preview, 1, 1);
 }
 
 static void
-on_1x2_clicked (GtkMenuItem *i, GeditPrintPreview *preview)
+on_1x2_clicked (GtkMenuItem       *i,
+		GeditPrintPreview *preview)
 {
 	set_rows_and_cols (preview, 1, 2);
 }
 
 static void
-on_2x1_clicked (GtkMenuItem *i, GeditPrintPreview *preview)
+on_2x1_clicked (GtkMenuItem       *i,
+		GeditPrintPreview *preview)
 {
 	set_rows_and_cols (preview, 2, 1);
 }
 
 static void
-on_2x2_clicked (GtkMenuItem *i, GeditPrintPreview *preview)
+on_2x2_clicked (GtkMenuItem       *i,
+		GeditPrintPreview *preview)
 {
 	set_rows_and_cols (preview, 2, 2);
 }
 
 static void
-multi_button_clicked (GtkWidget	 *button,
+multi_button_clicked (GtkWidget	        *button,
 		      GeditPrintPreview *preview)
 {
 	GtkWidget *m, *i;
@@ -811,118 +816,119 @@ preview_layout_key_press (GtkWidget         *widget,
 	hstep = 10;
 	vstep = 10;
 
-	switch (event->keyval) {
-	case '1':
-		set_zoom_fit_to_size (preview);
-		break;
-	case '+':
-	case '=':
-	case GDK_KP_Add:
-		zoom_in (preview);
-		break;
-	case '-':
-	case '_':
-	case GDK_KP_Subtract:
-		zoom_out (preview);
-		break;
-	case GDK_KP_Right:
-	case GDK_Right:
-		if (event->state & GDK_SHIFT_MASK)
-			x = hupper - hpage;
-		else
-			x = MIN (hupper - hpage, x + hstep);
-		domove = TRUE;
-		break;
-	case GDK_KP_Left:
-	case GDK_Left:
-		if (event->state & GDK_SHIFT_MASK)
-			x = hlower;
-		else
-			x = MAX (hlower, x - hstep);
-		domove = TRUE;
-		break;
-	case GDK_KP_Up:
-	case GDK_Up:
-		if (event->state & GDK_SHIFT_MASK)
-			goto page_up;
-		y = MAX (vlower, y - vstep);
-		domove = TRUE;
-		break;
-	case GDK_KP_Down:
-	case GDK_Down:
-		if (event->state & GDK_SHIFT_MASK)
-			goto page_down;
-		y = MIN (vupper - vpage, y + vstep);
-		domove = TRUE;
-		break;
-	case GDK_KP_Page_Up:
-	case GDK_Page_Up:
-	case GDK_Delete:
-	case GDK_KP_Delete:
-	case GDK_BackSpace:
-	page_up:
-		if (y <= vlower)
-		{
-			if (preview->priv->cur_page > 0)
+	switch (event->keyval)
+	{
+		case '1':
+			set_zoom_fit_to_size (preview);
+			break;
+		case '+':
+		case '=':
+		case GDK_KP_Add:
+			zoom_in (preview);
+			break;
+		case '-':
+		case '_':
+		case GDK_KP_Subtract:
+			zoom_out (preview);
+			break;
+		case GDK_KP_Right:
+		case GDK_Right:
+			if (event->state & GDK_SHIFT_MASK)
+				x = hupper - hpage;
+			else
+				x = MIN (hupper - hpage, x + hstep);
+			domove = TRUE;
+			break;
+		case GDK_KP_Left:
+		case GDK_Left:
+			if (event->state & GDK_SHIFT_MASK)
+				x = hlower;
+			else
+				x = MAX (hlower, x - hstep);
+			domove = TRUE;
+			break;
+		case GDK_KP_Up:
+		case GDK_Up:
+			if (event->state & GDK_SHIFT_MASK)
+				goto page_up;
+			y = MAX (vlower, y - vstep);
+			domove = TRUE;
+			break;
+		case GDK_KP_Down:
+		case GDK_Down:
+			if (event->state & GDK_SHIFT_MASK)
+				goto page_down;
+			y = MIN (vupper - vpage, y + vstep);
+			domove = TRUE;
+			break;
+		case GDK_KP_Page_Up:
+		case GDK_Page_Up:
+		case GDK_Delete:
+		case GDK_KP_Delete:
+		case GDK_BackSpace:
+		page_up:
+			if (y <= vlower)
 			{
-				goto_page (preview, preview->priv->cur_page - 1);
-				y = (vupper - vpage);
+				if (preview->priv->cur_page > 0)
+				{
+					goto_page (preview, preview->priv->cur_page - 1);
+					y = (vupper - vpage);
+				}
 			}
-		}
-		else
-		{
-			y = vlower;
-		}
-		domove = TRUE;
-		break;
-	case GDK_KP_Page_Down:
-	case GDK_Page_Down:
-	case ' ':
-	page_down:
-		if (y >= (vupper - vpage))
-		{
-			if (preview->priv->cur_page < preview->priv->n_pages - 1)
+			else
 			{
-				goto_page (preview, preview->priv->cur_page + 1);
 				y = vlower;
 			}
-		}
-		else
-		{
-			y = (vupper - vpage);
-		}
-		domove = TRUE;
-		break;
-	case GDK_KP_Home:
-	case GDK_Home:
-		goto_page (preview, 0);
-		y = 0;
-		domove = TRUE;
-		break;
-	case GDK_KP_End:
-	case GDK_End:
-		goto_page (preview, preview->priv->n_pages - 1);
-		y = 0;
-		domove = TRUE;
-		break;
-	case GDK_Escape:
-		gtk_widget_destroy (GTK_WIDGET (preview));
-		break;
-	case 'c':
-		if (event->state & GDK_MOD1_MASK)
-		{
+			domove = TRUE;
+			break;
+		case GDK_KP_Page_Down:
+		case GDK_Page_Down:
+		case ' ':
+		page_down:
+			if (y >= (vupper - vpage))
+			{
+				if (preview->priv->cur_page < preview->priv->n_pages - 1)
+				{
+					goto_page (preview, preview->priv->cur_page + 1);
+					y = vlower;
+				}
+			}
+			else
+			{
+				y = (vupper - vpage);
+			}
+			domove = TRUE;
+			break;
+		case GDK_KP_Home:
+		case GDK_Home:
+			goto_page (preview, 0);
+			y = 0;
+			domove = TRUE;
+			break;
+		case GDK_KP_End:
+		case GDK_End:
+			goto_page (preview, preview->priv->n_pages - 1);
+			y = 0;
+			domove = TRUE;
+			break;
+		case GDK_Escape:
 			gtk_widget_destroy (GTK_WIDGET (preview));
-		}
-		break;
-	case 'p':
-		if (event->state & GDK_MOD1_MASK)
-		{
-			gtk_widget_grab_focus (preview->priv->page_entry);
-		}
-		break;
-	default:
-		/* by default do not stop the default handler */
-		ret = FALSE;
+			break;
+		case 'c':
+			if (event->state & GDK_MOD1_MASK)
+			{
+				gtk_widget_destroy (GTK_WIDGET (preview));
+			}
+			break;
+		case 'p':
+			if (event->state & GDK_MOD1_MASK)
+			{
+				gtk_widget_grab_focus (preview->priv->page_entry);
+			}
+			break;
+		default:
+			/* by default do not stop the default handler */
+			ret = FALSE;
 	}
 
 	if (domove)
@@ -946,7 +952,7 @@ create_preview_layout (GeditPrintPreview *preview)
 	priv = preview->priv;
 
 	priv->layout = gtk_layout_new (NULL, NULL);
-//	gtk_widget_set_double_buffered (priv->layout, FALSE);
+	/* gtk_widget_set_double_buffered (priv->layout, FALSE); */
 
 	atko = gtk_widget_get_accessible (GTK_WIDGET (priv->layout));
 	atk_object_set_name (atko, _("Page Preview"));
@@ -1002,7 +1008,7 @@ gedit_print_preview_init (GeditPrintPreview *preview)
 	create_bar (preview);
 	create_preview_layout (preview);
 
-	// FIXME
+	/* FIXME */
 	priv->cur_page = 0;
 	priv->paper_w = 0;
 	priv->paper_h = 0;
@@ -1182,7 +1188,7 @@ set_n_pages (GeditPrintPreview *preview,
 
 	preview->priv->n_pages = n_pages;
 
-	// FIXME: count the visible pages
+	/* FIXME: count the visible pages */
 
 	str =  g_strdup_printf ("%d", n_pages);
 	gtk_label_set_markup (GTK_LABEL (preview->priv->last), str);
diff --git a/gedit/gedit-print-preview.h b/gedit/gedit-print-preview.h
index 0cb8060..ed5d000 100644
--- a/gedit/gedit-print-preview.h
+++ b/gedit/gedit-print-preview.h
@@ -49,6 +49,7 @@ typedef struct _GeditPrintPreviewClass   GeditPrintPreviewClass;
 struct _GeditPrintPreview
 {
 	GtkVBox parent;
+
 	GeditPrintPreviewPrivate *priv;
 };
 
@@ -69,4 +70,5 @@ GtkWidget	*gedit_print_preview_new	(GtkPrintOperation		*op,
 G_END_DECLS
 
 #endif /* __GEDIT_PRINT_PREVIEW_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-progress-message-area.c b/gedit/gedit-progress-message-area.c
index b0b7216..090ca06 100644
--- a/gedit/gedit-progress-message-area.c
+++ b/gedit/gedit-progress-message-area.c
@@ -91,13 +91,13 @@ gedit_progress_message_area_set_property (GObject      *object,
 
 	switch (prop_id)
 	{
-	case PROP_HAS_CANCEL_BUTTON:
-		gedit_progress_message_area_set_has_cancel_button (area,
-								   g_value_get_boolean (value));
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
+		case PROP_HAS_CANCEL_BUTTON:
+			gedit_progress_message_area_set_has_cancel_button (area,
+									   g_value_get_boolean (value));
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+			break;
 	}
 }
 
@@ -113,9 +113,9 @@ gedit_progress_message_area_get_property (GObject      *object,
 
 	switch (prop_id)
 	{
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+			break;
 	}
 }
 
@@ -137,7 +137,7 @@ gedit_progress_message_area_class_init (GeditProgressMessageAreaClass *klass)
 							       G_PARAM_CONSTRUCT_ONLY |
 							       G_PARAM_STATIC_STRINGS));
 
-	g_type_class_add_private (gobject_class, sizeof(GeditProgressMessageAreaPrivate));
+	g_type_class_add_private (gobject_class, sizeof (GeditProgressMessageAreaPrivate));
 }
 
 static void
@@ -259,4 +259,5 @@ gedit_progress_message_area_pulse (GeditProgressMessageArea *area)
 
 	gtk_progress_bar_pulse (GTK_PROGRESS_BAR (area->priv->progress));
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-progress-message-area.h b/gedit/gedit-progress-message-area.h
index 17c3df9..597a820 100644
--- a/gedit/gedit-progress-message-area.h
+++ b/gedit/gedit-progress-message-area.h
@@ -110,4 +110,5 @@ void		 gedit_progress_message_area_pulse		(GeditProgressMessageArea *area);
 G_END_DECLS
 
 #endif  /* __GEDIT_PROGRESS_MESSAGE_AREA_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-session.c b/gedit/gedit-session.c
index 96b8b72..9bc1294 100644
--- a/gedit/gedit-session.c
+++ b/gedit/gedit-session.c
@@ -267,8 +267,10 @@ close_confirmation_dialog_response_handler (GeditCloseConfirmationDialog *dlg,
 		default:
 			/* disconnect window_state_changed where needed */
 			for (l = window_dirty_list; l != NULL; l = l->next)
+			{
 				g_signal_handlers_disconnect_by_func (window,
 						window_state_change, NULL);
+			}
 			g_slist_free (window_dirty_list);
 			window_dirty_list = NULL;
 
@@ -342,7 +344,8 @@ ask_next_confirmation (void)
 
 /* quit_requested handler for the master client */
 static void
-client_quit_requested_cb (EggSMClient *client, gpointer data)
+client_quit_requested_cb (EggSMClient *client,
+			  gpointer     data)
 {
 	GeditApp *app;
 	const GList *l;
@@ -380,7 +383,8 @@ client_quit_requested_cb (EggSMClient *client, gpointer data)
 
 /* quit handler for the master client */
 static void
-client_quit_cb (EggSMClient *client, gpointer data)
+client_quit_cb (EggSMClient *client,
+		gpointer     data)
 {
 #if 0
 	gedit_debug (DEBUG_SESSION);
@@ -420,7 +424,7 @@ gedit_session_init (void)
 	gedit_debug (DEBUG_SESSION);
 	
 	if (master_client)
-	  return;
+		return;
 
 	master_client = egg_sm_client_get ();
 	g_signal_connect (master_client,
@@ -464,7 +468,8 @@ gedit_session_is_restored (void)
 }
 
 static void
-parse_window (GKeyFile *state_file, const char *group_name)
+parse_window (GKeyFile  *state_file,
+	     const char *group_name)
 {
 	GeditWindow *window;
 	gchar *role, *active_document, **documents;
@@ -558,8 +563,10 @@ parse_window (GKeyFile *state_file, const char *group_name)
 			GFile *location;
 
 			if (active_document != NULL)
+			{
 				jump_to = strcmp (active_document,
 						  documents[i]) == 0;
+			}
 
 			gedit_debug_message (DEBUG_SESSION,
 					     "URI: %s (%s)",
@@ -619,4 +626,5 @@ gedit_session_load (void)
 
 	return TRUE;
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-session.h b/gedit/gedit-session.h
index f84a2fd..e602b3c 100644
--- a/gedit/gedit-session.h
+++ b/gedit/gedit-session.h
@@ -45,4 +45,5 @@ gboolean 	gedit_session_load 		(void);
 G_END_DECLS
 
 #endif /* __GEDIT_SESSION_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-settings.c b/gedit/gedit-settings.c
index 8ff1eb4..841cb98 100644
--- a/gedit/gedit-settings.c
+++ b/gedit/gedit-settings.c
@@ -116,21 +116,29 @@ on_lockdown_changed (GSettings   *settings,
 	app = gedit_app_get_default ();
 	
 	if (strcmp (key, GEDIT_SETTINGS_LOCKDOWN_COMMAND_LINE) == 0)
+	{
 		_gedit_app_set_lockdown_bit (app, 
 					     GEDIT_LOCKDOWN_COMMAND_LINE,
 					     locked);
+	}
 	else if (strcmp (key, GEDIT_SETTINGS_LOCKDOWN_PRINTING) == 0)
+	{
 		_gedit_app_set_lockdown_bit (app, 
 					     GEDIT_LOCKDOWN_PRINTING,
 					     locked);
+	}
 	else if (strcmp (key, GEDIT_SETTINGS_LOCKDOWN_PRINT_SETUP) == 0)
+	{
 		_gedit_app_set_lockdown_bit (app, 
 					     GEDIT_LOCKDOWN_PRINT_SETUP,
 					     locked);
+	}
 	else if (strcmp (key, GEDIT_SETTINGS_LOCKDOWN_SAVE_TO_DISK) == 0)
+	{
 		_gedit_app_set_lockdown_bit (app, 
 					     GEDIT_LOCKDOWN_SAVE_TO_DISK,
 					     locked);
+	}
 }
 
 static void
@@ -913,7 +921,9 @@ gedit_settings_get_toolbar_style (GeditSettings *gs)
 	else
 	{
 		if (strcmp (str, "GEDIT_TOOLBAR_ICONS_AND_TEXT") == 0)
+		{
 			res = GEDIT_TOOLBAR_ICONS_AND_TEXT;
+		}
 		else 
 		{
 			if (strcmp (str, "GEDIT_TOOLBAR_ICONS_BOTH_HORIZ") == 0)
@@ -991,7 +1001,9 @@ gedit_settings_get_wrap_mode (GSettings   *settings,
 	g_return_val_if_fail (str != NULL, GTK_WRAP_WORD);
 
 	if (strcmp (str, "GTK_WRAP_NONE") == 0)
+	{
 		res = GTK_WRAP_NONE;
+	}
 	else
 	{
 		if (strcmp (str, "GTK_WRAP_CHAR") == 0)
diff --git a/gedit/gedit-settings.h b/gedit/gedit-settings.h
index e8fe912..75c945b 100644
--- a/gedit/gedit-settings.h
+++ b/gedit/gedit-settings.h
@@ -75,19 +75,19 @@ GtkSourceSmartHomeEndType gedit_settings_get_smart_home_end		(GeditSettings *gs)
 GeditToolbarSetting	 gedit_settings_get_toolbar_style		(GeditSettings *gs);
 
 /* Utility functions */
-GSList			*gedit_settings_get_list			(GSettings   *settings,
-									 const gchar *key);
+GSList			*gedit_settings_get_list			(GSettings     *settings,
+									 const gchar   *key);
 
-void			 gedit_settings_set_list			(GSettings    *settings,
-									 const gchar  *key,
-									 const GSList *list);
+void			 gedit_settings_set_list			(GSettings     *settings,
+									 const gchar   *key,
+									 const GSList  *list);
 
-GtkWrapMode		 gedit_settings_get_wrap_mode			(GSettings    *settings,
-									 const gchar  *key);
+GtkWrapMode		 gedit_settings_get_wrap_mode			(GSettings     *settings,
+									 const gchar   *key);
 
-void			 gedit_settings_set_wrap_mode			(GSettings    *settings,
-									 const gchar  *key,
-									 GtkWrapMode   mode);
+void			 gedit_settings_set_wrap_mode			(GSettings     *settings,
+									 const gchar   *key,
+									 GtkWrapMode    mode);
 
 /* key constants */
 #define GEDIT_SETTINGS_USE_DEFAULT_FONT			"use-default-font"
@@ -139,3 +139,5 @@ void			 gedit_settings_set_wrap_mode			(GSettings    *settings,
 G_END_DECLS
 
 #endif /* __GEDIT_SETTINGS_H__ */
+
+/* ex:ts=8:noet: */
diff --git a/gedit/gedit-smart-charset-converter.c b/gedit/gedit-smart-charset-converter.c
index e563d14..341dd50 100644
--- a/gedit/gedit-smart-charset-converter.c
+++ b/gedit/gedit-smart-charset-converter.c
@@ -213,7 +213,9 @@ guess_encoding (GeditSmartCharsetConverter *smart,
 
 	if (smart->priv->encodings != NULL &&
 	    smart->priv->encodings->next == NULL)
+	{
 		smart->priv->use_first = TRUE;
+	}
 
 	/* We just check the first block */
 	while (TRUE)
@@ -290,15 +292,15 @@ guess_encoding (GeditSmartCharsetConverter *smart,
 }
 
 static GConverterResult
-gedit_smart_charset_converter_convert (GConverter *converter,
-				       const void *inbuf,
-				       gsize       inbuf_size,
-				       void       *outbuf,
-				       gsize       outbuf_size,
-				       GConverterFlags flags,
-				       gsize      *bytes_read,
-				       gsize      *bytes_written,
-				       GError    **error)
+gedit_smart_charset_converter_convert (GConverter      *converter,
+				       const void      *inbuf,
+				       gsize            inbuf_size,
+				       void            *outbuf,
+				       gsize             outbuf_size,
+				       GConverterFlags   flags,
+				       gsize            *bytes_read,
+				       gsize            *bytes_written,
+				       GError          **error)
 {
 	GeditSmartCharsetConverter *smart = GEDIT_SMART_CHARSET_CONVERTER (converter);
 
diff --git a/gedit/gedit-smart-charset-converter.h b/gedit/gedit-smart-charset-converter.h
index 46f3f33..11023b4 100644
--- a/gedit/gedit-smart-charset-converter.h
+++ b/gedit/gedit-smart-charset-converter.h
@@ -64,4 +64,5 @@ guint				 gedit_smart_charset_converter_get_num_fallbacks(GeditSmartCharsetConve
 G_END_DECLS
 
 #endif /* __GEDIT_SMART_CHARSET_CONVERTER_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-spinner.h b/gedit/gedit-spinner.h
index ee621a1..8c2910e 100644
--- a/gedit/gedit-spinner.h
+++ b/gedit/gedit-spinner.h
@@ -93,4 +93,5 @@ void		gedit_spinner_set_size	(GeditSpinner *spinner,
 G_END_DECLS
 
 #endif /* __GEDIT_SPINNER_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-status-combo-box.c b/gedit/gedit-status-combo-box.c
index c7e8585..c0ea571 100644
--- a/gedit/gedit-status-combo-box.c
+++ b/gedit/gedit-status-combo-box.c
@@ -156,7 +156,7 @@ gedit_status_combo_box_class_init (GeditStatusComboBoxClass *klass)
 		"}\n"
 		"widget \"*.gedit-status-combo-button\" style \"gedit-status-combo-button-style\"");
 
-	g_type_class_add_private (object_class, sizeof(GeditStatusComboBoxPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditStatusComboBoxPrivate));
 }
 
 static void
diff --git a/gedit/gedit-status-combo-box.h b/gedit/gedit-status-combo-box.h
index 9f48b29..6e825f2 100644
--- a/gedit/gedit-status-combo-box.h
+++ b/gedit/gedit-status-combo-box.h
@@ -39,13 +39,15 @@ typedef struct _GeditStatusComboBox		GeditStatusComboBox;
 typedef struct _GeditStatusComboBoxClass	GeditStatusComboBoxClass;
 typedef struct _GeditStatusComboBoxPrivate	GeditStatusComboBoxPrivate;
 
-struct _GeditStatusComboBox {
+struct _GeditStatusComboBox
+{
 	GtkEventBox parent;
 	
 	GeditStatusComboBoxPrivate *priv;
 };
 
-struct _GeditStatusComboBoxClass {
+struct _GeditStatusComboBoxClass
+{
 	GtkEventBoxClass parent_class;
 	
 	void (*changed) (GeditStatusComboBox *combo,
@@ -80,4 +82,5 @@ GtkLabel *gedit_status_combo_box_get_item_label		(GeditStatusComboBox	*combo);
 G_END_DECLS
 
 #endif /* __GEDIT_STATUS_COMBO_BOX_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-statusbar.h b/gedit/gedit-statusbar.h
index 9ad0e07..984887a 100644
--- a/gedit/gedit-statusbar.h
+++ b/gedit/gedit-statusbar.h
@@ -97,4 +97,5 @@ void		_gedit_statusbar_set_has_resize_grip	(GeditStatusbar   *statusbar,
 G_END_DECLS
 
 #endif
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-style-scheme-manager.c b/gedit/gedit-style-scheme-manager.c
index 8c66965..299b116 100644
--- a/gedit/gedit-style-scheme-manager.c
+++ b/gedit/gedit-style-scheme-manager.c
@@ -85,7 +85,8 @@ gedit_get_style_scheme_manager (void)
 }
 
 static gint
-schemes_compare (gconstpointer a, gconstpointer b)
+schemes_compare (gconstpointer a,
+		 gconstpointer b)
 {
 	GtkSourceStyleScheme *scheme_a = (GtkSourceStyleScheme *)a;
 	GtkSourceStyleScheme *scheme_b = (GtkSourceStyleScheme *)b;
@@ -361,4 +362,5 @@ _gedit_style_scheme_manager_uninstall_scheme (GtkSourceStyleSchemeManager *manag
 	
 	return TRUE;	
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-style-scheme-manager.h b/gedit/gedit-style-scheme-manager.h
index 6207b08..05403b9 100644
--- a/gedit/gedit-style-scheme-manager.h
+++ b/gedit/gedit-style-scheme-manager.h
@@ -54,4 +54,5 @@ gboolean	 _gedit_style_scheme_manager_uninstall_scheme
 G_END_DECLS
 
 #endif /* __GEDIT_STYLE_SCHEME_MANAGER_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-tab-label.c b/gedit/gedit-tab-label.c
index 01a61e4..544533b 100644
--- a/gedit/gedit-tab-label.c
+++ b/gedit/gedit-tab-label.c
@@ -119,7 +119,8 @@ close_button_clicked_cb (GtkWidget     *widget,
 }
 
 static void
-sync_tip (GeditTab *tab, GeditTabLabel *tab_label)
+sync_tip (GeditTab *tab,
+	  GeditTabLabel *tab_label)
 {
 	gchar *str;
 
@@ -131,7 +132,9 @@ sync_tip (GeditTab *tab, GeditTabLabel *tab_label)
 }
 
 static void
-sync_name (GeditTab *tab, GParamSpec *pspec, GeditTabLabel *tab_label)
+sync_name (GeditTab      *tab,
+	   GParamSpec    *pspec,
+	   GeditTabLabel *tab_label)
 {
 	gchar *str;
 
@@ -147,7 +150,9 @@ sync_name (GeditTab *tab, GParamSpec *pspec, GeditTabLabel *tab_label)
 }
 
 static void
-sync_state (GeditTab *tab, GParamSpec *pspec, GeditTabLabel *tab_label)
+sync_state (GeditTab      *tab,
+	    GParamSpec    *pspec,
+	    GeditTabLabel *tab_label)
 {
 	GeditTabState  state;
 
@@ -255,7 +260,7 @@ gedit_tab_label_class_init (GeditTabLabelClass *klass)
 							      G_PARAM_READWRITE |
 							      G_PARAM_CONSTRUCT_ONLY));
 
-	g_type_class_add_private (object_class, sizeof(GeditTabLabelPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditTabLabelPrivate));
 }
 
 static void
@@ -369,4 +374,5 @@ gedit_tab_label_new (GeditTab *tab)
 
 	return GTK_WIDGET (tab_label);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-tab-label.h b/gedit/gedit-tab-label.h
index 39a94a8..544db23 100644
--- a/gedit/gedit-tab-label.h
+++ b/gedit/gedit-tab-label.h
@@ -40,28 +40,31 @@ typedef struct _GeditTabLabel		GeditTabLabel;
 typedef struct _GeditTabLabelClass	GeditTabLabelClass;
 typedef struct _GeditTabLabelPrivate	GeditTabLabelPrivate;
 
-struct _GeditTabLabel {
+struct _GeditTabLabel
+{
 	GtkHBox parent;
 	
 	GeditTabLabelPrivate *priv;
 };
 
-struct _GeditTabLabelClass {
+struct _GeditTabLabelClass
+{
 	GtkHBoxClass parent_class;
 
 	void (* close_clicked)  (GeditTabLabel *tab_label);
 };
 
-GType		 gedit_tab_label_get_type (void) G_GNUC_CONST;
+GType		 gedit_tab_label_get_type			(void) G_GNUC_CONST;
 
-GtkWidget 	*gedit_tab_label_new (GeditTab *tab);
+GtkWidget 	*gedit_tab_label_new				(GeditTab *tab);
 
-GeditTab	*gedit_tab_label_get_tab (GeditTabLabel *tab_label);
+GeditTab	*gedit_tab_label_get_tab			(GeditTabLabel *tab_label);
 
-void		gedit_tab_label_set_close_button_sensitive (GeditTabLabel *tab_label,
-							    gboolean       sensitive);
+void		 gedit_tab_label_set_close_button_sensitive	(GeditTabLabel *tab_label,
+								 gboolean       sensitive);
 
 G_END_DECLS
 
 #endif /* __GEDIT_TAB_LABEL_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index d32329a..95d9946 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1535,7 +1535,7 @@ view_focused_in (GtkWidget     *widget,
 
 static GMountOperation *
 tab_mount_operation_factory (GeditDocument *doc,
-			     gpointer userdata)
+			     gpointer       userdata)
 {
 	GeditTab *tab = GEDIT_TAB (userdata);
 	GtkWidget *window;
@@ -1585,7 +1585,7 @@ gedit_tab_init (GeditTab *tab)
 	tab->priv->auto_save = (tab->priv->auto_save != FALSE);
 
 	tab->priv->auto_save_interval = auto_save_interval;
-	/*FIXME
+	/* FIXME
 	if (tab->priv->auto_save_interval <= 0)
 		tab->priv->auto_save_interval = GPM_DEFAULT_AUTO_SAVE_INTERVAL;*/
 
@@ -2466,7 +2466,7 @@ done_printing_cb (GeditPrintJob       *job,
 		set_message_area (tab, NULL); /* destroy the message area */
 	}
 
-	// TODO: check status and error
+	/* TODO: check status and error */
 
 	if (result ==  GEDIT_PRINT_JOB_RESULT_OK)
 	{
@@ -2525,7 +2525,7 @@ show_preview_cb (GeditPrintJob       *job,
 		 GeditPrintPreview   *preview,
 		 GeditTab            *tab)
 {
-//	g_return_if_fail (tab->priv->state == GEDIT_TAB_STATE_PRINT_PREVIEWING);
+	/* g_return_if_fail (tab->priv->state == GEDIT_TAB_STATE_PRINT_PREVIEWING); */
 	g_return_if_fail (tab->priv->print_preview == NULL);
 
 	set_message_area (tab, NULL); /* destroy the message area */
@@ -2619,13 +2619,17 @@ show_printing_message_area (GeditTab *tab, gboolean preview)
 	GtkWidget *area;
 
 	if (preview)
+	{
 		area = gedit_progress_message_area_new (GTK_STOCK_PRINT_PREVIEW,
 							"",
 							TRUE);
+	}
 	else
+	{
 		area = gedit_progress_message_area_new (GTK_STOCK_PRINT,
 							"",
 							TRUE);
+	}
 
 	g_signal_connect (area,
 			  "response",
@@ -2733,7 +2737,7 @@ gedit_tab_print_or_print_preview (GeditTab                *tab,
 				     GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tab))),
 				     &error);
 
-	// TODO: manage res in the correct way
+	/* TODO: manage res in the correct way */
 	if (res == GTK_PRINT_OPERATION_RESULT_ERROR)
 	{
 		/* FIXME: go in error state */
@@ -2745,7 +2749,7 @@ gedit_tab_print_or_print_preview (GeditTab                *tab,
 }
 
 void 
-_gedit_tab_print (GeditTab     *tab)
+_gedit_tab_print (GeditTab *tab)
 {
 	g_return_if_fail (GEDIT_IS_TAB (tab));
 
@@ -2762,7 +2766,7 @@ _gedit_tab_print (GeditTab     *tab)
 }
 
 void
-_gedit_tab_print_preview (GeditTab     *tab)
+_gedit_tab_print_preview (GeditTab *tab)
 {
 	g_return_if_fail (GEDIT_IS_TAB (tab));
 
@@ -2794,7 +2798,9 @@ _gedit_tab_can_close (GeditTab *tab)
 	    (ts == GEDIT_TAB_STATE_LOADING_ERROR) ||
 	    (ts == GEDIT_TAB_STATE_REVERTING)     ||
 	    (ts == GEDIT_TAB_STATE_REVERTING_ERROR)) /* CHECK: I'm not sure this is the right behavior for REVERTING ERROR */
+	{
 		return TRUE;
+	}
 
 	/* Do not close tab with saving errors */
 	if (ts == GEDIT_TAB_STATE_SAVING_ERROR)
@@ -2961,4 +2967,5 @@ gedit_tab_set_info_bar (GeditTab  *tab,
 	/* FIXME: this can cause problems with the tab state machine */
 	set_message_area (tab, info_bar);
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-tab.h b/gedit/gedit-tab.h
index bf64425..ec00729 100644
--- a/gedit/gedit-tab.h
+++ b/gedit/gedit-tab.h
@@ -179,4 +179,5 @@ void		 _gedit_tab_page_setup		(GeditTab            *tab);
 G_END_DECLS
 
 #endif  /* __GEDIT_TAB_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c
index 880021e..0c30b7a 100644
--- a/gedit/gedit-utils.c
+++ b/gedit/gedit-utils.c
@@ -75,7 +75,9 @@ gedit_utils_location_has_file_scheme (GFile *location)
 }
 
 static void
-widget_get_origin (GtkWidget *widget, gint *x, gint *y)
+widget_get_origin (GtkWidget *widget,
+		   gint      *x,
+		   gint      *y)
 
 {
 	GdkWindow *window;
@@ -218,7 +220,10 @@ gedit_dialog_add_button (GtkDialog   *dialog,
  * n: len of the string in bytes
  */
 gboolean 
-g_utf8_caselessnmatch (const char *s1, const char *s2, gssize n1, gssize n2)
+g_utf8_caselessnmatch (const char *s1,
+		       const char *s2,
+		       gssize      n1,
+		       gssize      n2)
 {
 	gchar *casefold;
 	gchar *normalized_s1;
@@ -264,7 +269,7 @@ finally_2:
  * for a specified gtk widget.
  */
 void
-gedit_utils_set_atk_name_description (GtkWidget *widget, 
+gedit_utils_set_atk_name_description (GtkWidget   *widget, 
 				      const gchar *name,
 				      const gchar *description)
 {
@@ -275,10 +280,10 @@ gedit_utils_set_atk_name_description (GtkWidget *widget,
 	if (!(GTK_IS_ACCESSIBLE (aobj)))
 		return;
 
-	if(name)
+	if (name)
 		atk_object_set_name (aobj, name);
 
-	if(description)
+	if (description)
 		atk_object_set_description (aobj, description);
 }
 
@@ -290,9 +295,9 @@ gedit_utils_set_atk_name_description (GtkWidget *widget,
  * between 2 specified widgets.
  */
 void
-gedit_utils_set_atk_relation (GtkWidget *obj1, 
-			      GtkWidget *obj2, 
-			      AtkRelationType rel_type )
+gedit_utils_set_atk_relation (GtkWidget       *obj1, 
+			      GtkWidget       *obj2, 
+			      AtkRelationType  rel_type)
 {
 	AtkObject *atk_obj1, *atk_obj2;
 	AtkRelationSet *relation_set;
@@ -421,21 +426,21 @@ gedit_utils_unescape_search_text (const gchar *text)
 			{
 				case 'n':
 					str = g_string_append (str, "\n");
-				break;
+					break;
 				case 'r':
 					str = g_string_append (str, "\r");
-				break;
+					break;
 				case 't':
 					str = g_string_append (str, "\t");
-				break;
+					break;
 				case '\\':
 					str = g_string_append (str, "\\");
 					drop_prev = TRUE;
-				break;
+					break;
 				default:
 					str = g_string_append (str, "\\");
 					str = g_string_append_len (str, cur, next - cur);
-				break;
+					break;
 			}
 		} 
 		else if (*cur != '\\') 
@@ -508,7 +513,7 @@ gedit_warning (GtkWindow *parent, const gchar *format, ...)
  * Doubles underscore to avoid spurious menu accels.
  */
 gchar * 
-gedit_utils_escape_underscores (const gchar* text,
+gedit_utils_escape_underscores (const gchar *text,
 				gssize       length)
 {
 	GString *str;
@@ -551,7 +556,7 @@ gedit_utils_escape_underscores (const gchar* text,
 static gchar *
 gedit_utils_str_truncate (const gchar *string,
 			  guint        truncate_length,
-			  gboolean middle)
+			  gboolean     middle)
 {
 	GString     *truncated;
 	guint        length;
@@ -572,14 +577,16 @@ gedit_utils_str_truncate (const gchar *string,
 	 * side)
 	 */
 	delimiter_length = g_utf8_strlen (delimiter, -1);
-	if (truncate_length < (delimiter_length + 2)) {
+	if (truncate_length < (delimiter_length + 2))
+	{
 		return g_strdup (string);
 	}
 
 	n_chars = g_utf8_strlen (string, length);
 
 	/* Make sure the string is not already small enough. */
-	if (n_chars <= truncate_length) {
+	if (n_chars <= truncate_length)
+	{
 		return g_strdup (string);
 	}
 
@@ -633,12 +640,14 @@ gedit_utils_make_valid_utf8 (const char *name)
 	remaining_bytes = strlen (name);
 
 	while (remaining_bytes != 0) {
-		if (g_utf8_validate (remainder, remaining_bytes, &invalid)) {
+		if (g_utf8_validate (remainder, remaining_bytes, &invalid))
+		{
 			break;
 		}
 		valid_bytes = invalid - remainder;
 
-		if (string == NULL) {
+		if (string == NULL)
+		{
 			string = g_string_sized_new (remaining_bytes);
 		}
 		g_string_append_len (string, remainder, valid_bytes);
@@ -649,7 +658,8 @@ gedit_utils_make_valid_utf8 (const char *name)
 		remainder = invalid + 1;
 	}
 
-	if (string == NULL) {
+	if (string == NULL)
+	{
 		return g_strdup (name);
 	}
 
@@ -986,11 +996,13 @@ has_valid_scheme (const gchar *uri)
 
 	p = uri;
 
-	if (!is_valid_scheme_character (*p)) {
+	if (!is_valid_scheme_character (*p))
+	{
 		return FALSE;
 	}
 
-	do {
+	do
+	{
 		p++;
 	} while (is_valid_scheme_character (*p));
 
@@ -1312,10 +1324,14 @@ gedit_utils_basename_for_display (GFile *location)
 		gchar *hn_utf8;
 
 		if  (hn != NULL)
+		{
 			hn_utf8 = gedit_utils_make_valid_utf8 (hn);
+		}
 		else
+		{
 			/* we should never get here */
 			hn_utf8 = g_strdup ("?");
+		}
 
 		/* Translators: '/ on <remote-share>' */
 		name = g_strdup_printf (_("/ on %s"), hn_utf8);
@@ -1458,7 +1474,9 @@ gedit_utils_decode_uri (const gchar *uri,
 		      c == '+' ||
 		      c == '-' ||
 		      c == '.'))
+		{
 			return FALSE;
+		}
 	}
 	
 	if (scheme)
@@ -1467,7 +1485,9 @@ gedit_utils_decode_uri (const gchar *uri,
 		out = *scheme;
 	
 		for (in = uri; in < p - 1; in++)
+		{
 			*out++ = g_ascii_tolower (*in);
+		}
 			
 		*out = '\0';
 	}
@@ -1513,7 +1533,9 @@ gedit_utils_decode_uri (const gchar *uri,
 			host_start = userinfo_end + 1;
 		}
 		else
+		{
 			host_start = authority_start;
+		}
 
 		port_start = memchr (host_start, ':', authority_end - host_start);
 
@@ -1525,7 +1547,9 @@ gedit_utils_decode_uri (const gchar *uri,
 				*port = g_strndup (port_start, authority_end - port_start);
 		}
 		else
+		{
 			host_end = authority_end;
+		}
 
 		if (host)
 			*host = g_strndup (host_start, host_end - host_start);
diff --git a/gedit/gedit-utils.h b/gedit/gedit-utils.h
index 4602595..8ea105e 100644
--- a/gedit/gedit-utils.h
+++ b/gedit/gedit-utils.h
@@ -50,107 +50,107 @@ G_BEGIN_DECLS
 
 enum { GEDIT_ALL_WORKSPACES = 0xffffffff };
 
-gboolean	 gedit_utils_location_has_file_scheme	(GFile       *location);
+gboolean	 gedit_utils_location_has_file_scheme	(GFile            *location);
 
-void		 gedit_utils_menu_position_under_widget (GtkMenu  *menu,
-							 gint     *x,
-							 gint     *y,
-							 gboolean *push_in,
-							 gpointer  user_data);
+void		 gedit_utils_menu_position_under_widget (GtkMenu          *menu,
+							 gint             *x,
+							 gint             *y,
+							 gboolean         *push_in,
+							 gpointer          user_data);
 
 void		 gedit_utils_menu_position_under_tree_view
-							(GtkMenu  *menu,
-							 gint     *x,
-							 gint     *y,
-							 gboolean *push_in,
-							 gpointer  user_data);
+							(GtkMenu          *menu,
+							 gint             *x,
+							 gint             *y,
+							 gboolean         *push_in,
+							 gpointer          user_data);
 
-gchar		*gedit_gdk_color_to_string		(GdkColor color);
+gchar		*gedit_gdk_color_to_string		(GdkColor          color);
 
-GtkWidget	*gedit_gtk_button_new_with_stock_icon	(const gchar *label,
-							 const gchar *stock_id);
+GtkWidget	*gedit_gtk_button_new_with_stock_icon	(const gchar      *label,
+							 const gchar      *stock_id);
 
-GtkWidget	*gedit_dialog_add_button		(GtkDialog   *dialog,
-							 const gchar *text,
-							 const gchar *stock_id, 
-							 gint         response_id);
+GtkWidget	*gedit_dialog_add_button		(GtkDialog        *dialog,
+							 const gchar      *text,
+							 const gchar      *stock_id, 
+							 gint              response_id);
 
-gchar		*gedit_utils_escape_underscores		(const gchar *text,
-							 gssize       length);
+gchar		*gedit_utils_escape_underscores		(const gchar      *text,
+							 gssize            length);
 
-gchar		*gedit_utils_str_middle_truncate	(const gchar *string, 
-							 guint        truncate_length);
+gchar		*gedit_utils_str_middle_truncate	(const gchar      *string, 
+							 guint             truncate_length);
 
-gchar		*gedit_utils_str_end_truncate		(const gchar *string,
-							 guint        truncate_length);
+gchar		*gedit_utils_str_end_truncate		(const gchar      *string,
+							 guint             truncate_length);
 
-gboolean	 g_utf8_caselessnmatch			(const char *s1,
-							 const char *s2,
-							 gssize n1,
-							 gssize n2);
+gboolean	 g_utf8_caselessnmatch			(const char       *s1,
+							 const char       *s2,
+							 gssize            n1,
+							 gssize            n2);
 
-void		 gedit_utils_set_atk_name_description	(GtkWidget  *widget,
-							 const gchar *name,
-							 const gchar *description);
+void		 gedit_utils_set_atk_name_description	(GtkWidget        *widget,
+							 const gchar      *name,
+							 const gchar      *description);
 
-void		 gedit_utils_set_atk_relation		(GtkWidget       *obj1,
-							 GtkWidget       *obj2,
-							 AtkRelationType  rel_type);
+void		 gedit_utils_set_atk_relation		(GtkWidget        *obj1,
+							 GtkWidget        *obj2,
+							 AtkRelationType   rel_type);
 
-gboolean	 gedit_utils_location_exists		(GFile       *location);
+gboolean	 gedit_utils_location_exists		(GFile            *location);
 
-gchar		*gedit_utils_escape_search_text		(const gchar *text);
+gchar		*gedit_utils_escape_search_text		(const gchar      *text);
 
-gchar		*gedit_utils_unescape_search_text	(const gchar *text);
+gchar		*gedit_utils_unescape_search_text	(const gchar      *text);
 
-void		 gedit_warning				(GtkWindow  *parent,
-							 const gchar *format,
+void		 gedit_warning				(GtkWindow        *parent,
+							 const gchar      *format,
 							 ...) G_GNUC_PRINTF(2, 3);
 
-gchar		*gedit_utils_make_valid_utf8		(const char *name);
+gchar		*gedit_utils_make_valid_utf8		(const char       *name);
 
 /* Note that this function replace home dir with ~ */
-gchar		*gedit_utils_uri_get_dirname		(const char *uri);
+gchar		*gedit_utils_uri_get_dirname		(const char       *uri);
 
 gchar		*gedit_utils_location_get_dirname_for_display
-							(GFile *location);
+							(GFile            *location);
 
-gchar		*gedit_utils_replace_home_dir_with_tilde (const gchar *uri);
+gchar		*gedit_utils_replace_home_dir_with_tilde(const gchar      *uri);
 
-guint		 gedit_utils_get_current_workspace	(GdkScreen *screen);
+guint		 gedit_utils_get_current_workspace	(GdkScreen        *screen);
 
-guint		 gedit_utils_get_window_workspace	(GtkWindow *gtkwindow);
+guint		 gedit_utils_get_window_workspace	(GtkWindow        *gtkwindow);
 
-void		 gedit_utils_get_current_viewport	(GdkScreen    *screen,
-							 gint         *x,
-							 gint         *y);
+void		 gedit_utils_get_current_viewport	(GdkScreen        *screen,
+							 gint             *x,
+							 gint             *y);
 
-void		 gedit_utils_activate_url		(GtkAboutDialog *about,
-							 const gchar    *url,
-							 gpointer        data);
+void		 gedit_utils_activate_url		(GtkAboutDialog   *about,
+							 const gchar      *url,
+							 gpointer          data);
 
-gboolean	 gedit_utils_is_valid_location		(GFile *location);
+gboolean	 gedit_utils_is_valid_location		(GFile            *location);
 
-gboolean	 gedit_utils_get_ui_objects		(const gchar  *filename,
-                                                         gchar       **root_objects,
-							 GtkWidget   **error_widget,
-							 const gchar  *object_name,
+gboolean	 gedit_utils_get_ui_objects		(const gchar      *filename,
+                                                         gchar           **root_objects,
+							 GtkWidget       **error_widget,
+							 const gchar      *object_name,
 							 ...) G_GNUC_NULL_TERMINATED;
 
-gboolean         gedit_utils_file_has_parent            (GFile *gfile);
+gboolean         gedit_utils_file_has_parent            (GFile            *gfile);
 
 /* Return NULL if str is not a valid URI and/or filename */
 gchar		*gedit_utils_make_canonical_uri_from_shell_arg
-							(const gchar *str);
+							(const gchar      *str);
 		
-gchar		*gedit_utils_uri_for_display 	        (GFile       *location);
-gchar           *gedit_utils_basename_for_display	(GFile       *location);
-gboolean	 gedit_utils_decode_uri 		(const gchar *uri,
-							 gchar **scheme,
-							 gchar **user,
-							 gchar **port,
-							 gchar **host,
-							 gchar **path);
+gchar		*gedit_utils_uri_for_display 	        (GFile            *location);
+gchar           *gedit_utils_basename_for_display	(GFile            *location);
+gboolean	 gedit_utils_decode_uri 		(const gchar      *uri,
+							 gchar           **scheme,
+							 gchar           **user,
+							 gchar           **port,
+							 gchar           **host,
+							 gchar           **path);
 
 
 /* Turns data from a drop into a list of well formatted uris */
@@ -159,7 +159,8 @@ gchar 	       **gedit_utils_drop_get_uris		(GtkSelectionData *selection_data);
 gboolean	 gedit_utils_can_read_from_stdin	(void);
 
 GeditDocumentCompressionType
-		 gedit_utils_get_compression_type_from_content_type (const gchar *content_type);
+		 gedit_utils_get_compression_type_from_content_type
+		 					(const gchar      *content_type);
 
 G_END_DECLS
 
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index c2d4f6e..4e0c6be 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -142,9 +142,9 @@ static void 	search_highlight_updated_cb	(GeditDocument    *doc,
 						 GtkTextIter      *end,
 						 GeditView        *view);
 
-static void	gedit_view_delete_from_cursor 	(GtkTextView     *text_view,
-						 GtkDeleteType    type,
-						 gint             count);
+static void	gedit_view_delete_from_cursor 	(GtkTextView      *text_view,
+						 GtkDeleteType     type,
+						 gint              count);
 
 G_DEFINE_TYPE(GeditView, gedit_view, GTK_TYPE_SOURCE_VIEW)
 
@@ -890,17 +890,21 @@ run_search (GeditView        *view,
 		if (!found && wrap_around)
 		{
 			if (!search_backward)
+			{
 				found = gedit_document_search_forward (doc,
 								       NULL,
 								       NULL, /* FIXME: set the end_inter */
 								       &match_start,
 								       &match_end);
+			}
 			else
+			{
 				found = gedit_document_search_backward (doc,
 								        NULL, /* FIXME: set the start_inter */
 								        NULL, 
 								        &match_start,
 								        &match_end);
+			}
 		}
 	}
 	else
@@ -918,13 +922,10 @@ run_search (GeditView        *view,
 		gtk_text_buffer_move_mark_by_name (GTK_TEXT_BUFFER (doc),
 					"selection_bound", &match_end);
 	}
-	else
+	else if (typing)
 	{
-		if (typing)
-		{
-			gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (doc),
-						      &view->priv->start_search_iter);
-		}
+		gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (doc),
+					      &view->priv->start_search_iter);
 	}
 						      
 	if (found || (*entry_text == '\0'))
@@ -1350,7 +1351,8 @@ search_entry_insert_text (GtkEditable *editable,
 
 			c = g_utf8_get_char (p);
 
-			if (!g_unichar_isdigit (c)) {
+			if (!g_unichar_isdigit (c))
+			{
 				g_signal_stop_emission_by_name (editable, "insert_text");
 				gtk_widget_error_bell (view->priv->search_entry);
 				break;
@@ -1491,12 +1493,16 @@ ensure_search_window (GeditView *view)
 	if (view->priv->search_window != NULL)
 	{
 		if (gtk_window_get_group (GTK_WINDOW (toplevel)))
+		{
 			gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (toplevel)),
 						     GTK_WINDOW (view->priv->search_window));
+		}
 		else if (gtk_window_get_group (GTK_WINDOW (view->priv->search_window)))
+		{
 			gtk_window_group_remove_window (gtk_window_get_group (GTK_WINDOW (view->priv->search_window)),
 							GTK_WINDOW (view->priv->search_window));
-					 		
+		}
+
 		customize_for_search_mode (view);
 		
 		return;
@@ -1505,8 +1511,10 @@ ensure_search_window (GeditView *view)
 	view->priv->search_window = gtk_window_new (GTK_WINDOW_POPUP);
 
 	if (gtk_window_get_group (GTK_WINDOW (toplevel)))
+	{
 		gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (toplevel)),
 					     GTK_WINDOW (view->priv->search_window));
+	}
 					     
 	gtk_window_set_modal (GTK_WINDOW (view->priv->search_window), TRUE);
 	
@@ -1785,11 +1793,15 @@ search_init (GtkWidget *entry,
 			gedit_view_scroll_to_cursor (view);
 
 			if (!moved || !moved_offset)
+			{
 				set_entry_background (view->priv->search_entry,
 						      GEDIT_SEARCH_ENTRY_NOT_FOUND);
+			}
 			else
+			{
 				set_entry_background (view->priv->search_entry,
 						      GEDIT_SEARCH_ENTRY_NORMAL);
+			}
 		}
 	}
 }
@@ -1801,7 +1813,9 @@ start_interactive_search_real (GeditView *view)
 	
 	if ((view->priv->search_window != NULL) &&
 	    gtk_widget_get_visible (view->priv->search_window))
+	{
 		return TRUE;
+	}
 
 	if (!gtk_widget_has_focus (GTK_WIDGET (view)))
 		return FALSE;
@@ -1809,11 +1823,15 @@ start_interactive_search_real (GeditView *view)
 	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
 
 	if (view->priv->search_mode == SEARCH)
+	{
 		gtk_text_buffer_get_selection_bounds (buffer, &view->priv->start_search_iter, NULL);
+	}
 	else
+	{
 		gtk_text_buffer_get_iter_at_mark (buffer,
 						  &view->priv->start_search_iter,
 						  gtk_text_buffer_get_insert (buffer));
+	}
 
 	ensure_search_window (view);
 
@@ -1972,7 +1990,12 @@ gedit_view_drag_data_received (GtkWidget        *widget,
 	}
 	else
 	{
-		GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_data_received (widget, context, x, y, selection_data, info, timestamp);
+		GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_data_received (widget,
+										context,
+										x, y,
+										selection_data,
+										info,
+										timestamp);
 	}
 }
 
@@ -1997,7 +2020,10 @@ gedit_view_drag_drop (GtkWidget      *widget,
 	else
 	{
 		/* Chain up */
-		result = GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_drop (widget, context, x, y, timestamp);
+		result = GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_drop (widget,
+										context,
+										x, y,
+										timestamp);
 	}
 
 	return result;
@@ -2137,8 +2163,10 @@ delete_line (GtkTextView *text_view,
 			 * is at the beginning of the line */
 			count = 0;
 		}
-		else	
+		else
+		{
 			count = 1;
+		}
 	}
 	
 	gtk_text_iter_set_line_offset (&start, 0);
@@ -2172,7 +2200,9 @@ delete_line (GtkTextView *text_view,
 				gtk_text_iter_forward_to_line_end (&start);
 		}
 		else
+		{
 			gtk_text_iter_forward_line (&end);
+		}
 	}
 
 	if (!gtk_text_iter_equal (&start, &end))
@@ -2219,4 +2249,5 @@ gedit_view_delete_from_cursor (GtkTextView   *text_view,
 			break;
 	}
 }
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-view.h b/gedit/gedit-view.h
index 36c38f3..c05779c 100644
--- a/gedit/gedit-view.h
+++ b/gedit/gedit-view.h
@@ -106,4 +106,5 @@ void 		 gedit_view_set_font		(GeditView       *view,
 G_END_DECLS
 
 #endif /* __GEDIT_VIEW_H__ */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 33b01d5..fbb22db 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -99,7 +99,7 @@ enum
 G_DEFINE_TYPE(GeditWindow, gedit_window, GTK_TYPE_WINDOW)
 
 static void	recent_manager_changed	(GtkRecentManager *manager,
-					 GeditWindow *window);
+					 GeditWindow      *window);
 
 static void
 gedit_window_get_property (GObject    *object,
@@ -129,25 +129,33 @@ save_panes_state (GeditWindow *window)
 	gedit_debug (DEBUG_WINDOW);
 
 	if (window->priv->side_panel_size > 0)
+	{
 		g_settings_set_int (window->priv->window_settings,
 				    GEDIT_SETTINGS_SIDE_PANEL_SIZE,
 				    window->priv->side_panel_size);
+	}
 
 	pane_page = _gedit_panel_get_active_item_id (GEDIT_PANEL (window->priv->side_panel));
 	if (pane_page != 0)
+	{
 		g_settings_set_int (window->priv->window_settings,
 				    GEDIT_SETTINGS_SIDE_PANEL_ACTIVE_PAGE,
 				    pane_page);
+	}
 
 	if (window->priv->bottom_panel_size > 0)
+	{
 		g_settings_set_int (window->priv->window_settings,
 				    GEDIT_SETTINGS_BOTTOM_PANEL_SIZE,
 				    window->priv->bottom_panel_size);
+	}
 
 	pane_page = _gedit_panel_get_active_item_id (GEDIT_PANEL (window->priv->bottom_panel));
 	if (pane_page != 0)
+	{
 		g_settings_set_int (window->priv->window_settings,
 				    GEDIT_SETTINGS_BOTTOM_PANEL_ACTIVE_PAGE, pane_page);
+	}
 }
 
 #ifdef OS_OSX
@@ -190,6 +198,7 @@ gedit_window_focus_in_event (GtkWidget     *widget,
                              GdkEventFocus *event)
 {
 	add_mac_root_menu (GEDIT_WINDOW (widget));
+
 	return GTK_WIDGET_CLASS (gedit_window_parent_class)->focus_in_event (widget, event);
 }
 
@@ -198,6 +207,7 @@ gedit_window_focus_out_event (GtkWidget     *widget,
                               GdkEventFocus *event)
 {
 	remove_mac_root_menu (GEDIT_WINDOW (widget));
+
 	return GTK_WIDGET_CLASS (gedit_window_parent_class)->focus_out_event (widget, event);
 }
 #endif
@@ -512,7 +522,7 @@ gedit_window_class_init (GeditWindowClass *klass)
 							     G_PARAM_READABLE |
 							     G_PARAM_STATIC_STRINGS));
 
-	g_type_class_add_private (object_class, sizeof(GeditWindowPrivate));
+	g_type_class_add_private (object_class, sizeof (GeditWindowPrivate));
 }
 
 static void
@@ -559,9 +569,9 @@ connect_proxy_cb (GtkUIManager *manager,
 
 static void
 disconnect_proxy_cb (GtkUIManager *manager,
-                     GtkAction *action,
-                     GtkWidget *proxy,
-                     GeditWindow *window)
+                     GtkAction    *action,
+                     GtkWidget    *proxy,
+                     GeditWindow  *window)
 {
 	if (GTK_IS_MENU_ITEM (proxy))
 	{
@@ -604,6 +614,10 @@ apply_toolbar_style (GeditWindow *window,
 					GTK_TOOLBAR (toolbar),
 					GTK_TOOLBAR_BOTH_HORIZ);
 			break;
+
+		default:
+			g_assert_not_reached ();
+			break;
 	}
 }
 
@@ -1355,8 +1369,10 @@ update_recent_files_menu (GeditWindow *window)
 	g_return_if_fail (p->recents_action_group != NULL);
 
 	if (p->recents_menu_ui_id != 0)
+	{
 		gtk_ui_manager_remove_ui (p->manager,
 					  p->recents_menu_ui_id);
+	}
 
 	actions = gtk_action_group_list_actions (p->recents_action_group);
 	for (l = actions; l != NULL; l = l->next)
@@ -1414,13 +1430,18 @@ update_recent_files_menu (GeditWindow *window)
 		display_name = gtk_recent_info_get_display_name (info);
 		escaped = gedit_utils_escape_underscores (display_name, -1);
 		if (i >= 10)
+		{
 			label = g_strdup_printf ("%d.  %s",
 						 i, 
 						 escaped);
+		}
 		else
+		{
 			label = g_strdup_printf ("_%d.  %s",
 						 i, 
 						 escaped);
+		}
+
 		g_free (escaped);
 
 		/* gtk_recent_info_get_uri_display (info) is buggy and
@@ -1474,7 +1495,8 @@ update_recent_files_menu (GeditWindow *window)
 }
 
 static void
-set_non_homogeneus (GtkWidget *widget, gpointer data)
+set_non_homogeneus (GtkWidget *widget,
+		    gpointer   data)
 {
 	gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (widget), FALSE);
 }
@@ -1500,7 +1522,7 @@ toolbar_visibility_changed (GtkWidget   *toolbar,
 
 static GtkWidget *
 setup_toolbar_open_button (GeditWindow *window,
-			   GtkWidget *toolbar)
+			   GtkWidget   *toolbar)
 {
 	GtkRecentManager *recent_manager;
 	GtkRecentFilter *filter;
@@ -1806,8 +1828,10 @@ update_documents_list_menu (GeditWindow *window)
 	g_return_if_fail (p->documents_list_action_group != NULL);
 
 	if (p->documents_list_menu_ui_id != 0)
+	{
 		gtk_ui_manager_remove_ui (p->manager,
 					  p->documents_list_menu_ui_id);
+	}
 
 	actions = gtk_action_group_list_actions (p->documents_list_action_group);
 	for (l = actions; l != NULL; l = l->next)
@@ -1903,10 +1927,14 @@ set_statusbar_style (GeditWindow *window,
 	gboolean visible;
 
 	if (origin == NULL)
+	{
 		visible = g_settings_get_boolean (window->priv->ui_settings,
 						  GEDIT_SETTINGS_STATUSBAR_VISIBLE);
+	}
 	else
+	{
 		visible = gtk_widget_get_visible (origin->priv->statusbar);
+	}
 
 	if (visible)
 		gtk_widget_show (window->priv->statusbar);
@@ -2362,24 +2390,32 @@ set_title (GeditWindow *window)
 	if (gedit_document_get_readonly (doc)) 
 	{
 		if (dirname != NULL)
+		{
 			title = g_strdup_printf ("%s [%s] (%s) - gedit", 
 						 name, 
 						 _("Read-Only"), 
 						 dirname);
+		}
 		else
+		{
 			title = g_strdup_printf ("%s [%s] - gedit", 
 						 name, 
 						 _("Read-Only"));
+		}
 	} 
 	else 
 	{
 		if (dirname != NULL)
+		{
 			title = g_strdup_printf ("%s (%s) - gedit", 
 						 name, 
 						 dirname);
+		}
 		else
+		{
 			title = g_strdup_printf ("%s - gedit", 
 						 name);
+		}
 	}
 
 	gedit_app_set_window_title (gedit_app_get_default (), window, title);
@@ -2683,23 +2719,37 @@ set_sensitivity_according_to_window_state (GeditWindow *window)
 		 * when in SAVING_SESSION state */
 
 		if (gtk_action_group_get_sensitive (window->priv->action_group))
+		{
 			gtk_action_group_set_sensitive (window->priv->action_group,
 							FALSE);
+		}
+		
 		if (gtk_action_group_get_sensitive (window->priv->quit_action_group))
+		{
 			gtk_action_group_set_sensitive (window->priv->quit_action_group,
 							FALSE);
+		}
+		
 		if (gtk_action_group_get_sensitive (window->priv->close_action_group))
+		{
 			gtk_action_group_set_sensitive (window->priv->close_action_group,
 							FALSE);
+		}
 	}
 	else
 	{
 		if (!gtk_action_group_get_sensitive (window->priv->action_group))
+		{
 			gtk_action_group_set_sensitive (window->priv->action_group,
 							window->priv->num_tabs > 0);
+		}
+		
 		if (!gtk_action_group_get_sensitive (window->priv->quit_action_group))
+		{
 			gtk_action_group_set_sensitive (window->priv->quit_action_group,
 							window->priv->num_tabs > 0);
+		}
+		
 		if (!gtk_action_group_get_sensitive (window->priv->close_action_group))
 		{
 #ifdef OS_OSX
@@ -3097,11 +3147,15 @@ show_hide_fullscreen_toolbar (GeditWindow *window,
 						 &fs_rect);
 
 		if (show)
+		{
 			gtk_window_move (GTK_WINDOW (window->priv->fullscreen_controls),
 				 fs_rect.x, fs_rect.y);
+		}
 		else
+		{
 			gtk_window_move (GTK_WINDOW (window->priv->fullscreen_controls),
 					 fs_rect.x, fs_rect.y - height + 1);
+		}
 	}
 
 }
@@ -3532,13 +3586,10 @@ notebook_tab_removed (GeditNotebook *notebook,
 		update_documents_list_menu (window);
 		update_next_prev_doc_sensitivity_per_window (window);
 	}
-	else
+	else if (window->priv->num_tabs == 0)
 	{
-		if (window->priv->num_tabs == 0)
-		{
-			update_documents_list_menu (window);
-			update_next_prev_doc_sensitivity_per_window (window);
-		}
+		update_documents_list_menu (window);
+		update_next_prev_doc_sensitivity_per_window (window);
 	}
 
 	update_sensitivity_according_to_open_tabs (window);
@@ -3599,12 +3650,12 @@ show_notebook_popup_menu (GtkNotebook    *notebook,
 			  GdkEventButton *event)
 {
 	GtkWidget *menu;
-//	GtkAction *action;
+	/* GtkAction *action; */
 
 	menu = gtk_ui_manager_get_widget (window->priv->manager, "/NotebookPopup");
 	g_return_val_if_fail (menu != NULL, FALSE);
 
-// CHECK do we need this?
+	/* CHECK do we need this? */
 #if 0
 	/* allow extensions to sync when showing the popup */
 	action = gtk_action_group_get_action (window->priv->action_group,
@@ -3750,8 +3801,10 @@ side_panel_visibility_changed (GtkWidget   *side_panel,
 
 	/* focus the document */
 	if (!visible && window->priv->active_tab != NULL)
+	{
 		gtk_widget_grab_focus (GTK_WIDGET (
 				gedit_tab_get_view (GEDIT_TAB (window->priv->active_tab))));
+	}
 }
 
 static void
@@ -3806,8 +3859,10 @@ bottom_panel_visibility_changed (GeditPanel  *bottom_panel,
 
 	/* focus the document */
 	if (!visible && window->priv->active_tab != NULL)
+	{
 		gtk_widget_grab_focus (GTK_WIDGET (
 				gedit_tab_get_view (GEDIT_TAB (window->priv->active_tab))));
+	}
 }
 
 static void
@@ -4391,7 +4446,8 @@ gedit_window_get_active_tab (GeditWindow *window)
 }
 
 static void
-add_document (GeditTab *tab, GList **res)
+add_document (GeditTab  *tab,
+	      GList    **res)
 {
 	GeditDocument *doc;
 	
@@ -4426,7 +4482,8 @@ gedit_window_get_documents (GeditWindow *window)
 }
 
 static void
-add_view (GeditTab *tab, GList **res)
+add_view (GeditTab  *tab,
+	  GList    **res)
 {
 	GeditView *view;
 	
diff --git a/gedit/gedit-window.h b/gedit/gedit-window.h
index 84d056b..01e6341 100644
--- a/gedit/gedit-window.h
+++ b/gedit/gedit-window.h
@@ -201,4 +201,5 @@ void		 _gedit_window_get_default_size		(gint                *width,
 G_END_DECLS
 
 #endif  /* __GEDIT_WINDOW_H__  */
+
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit.c b/gedit/gedit.c
index 8b4eb7b..57a13c4 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -64,7 +64,7 @@
 
 static gboolean
 gedit_main_load_from_stdin (GeditWindow *window,
-                            gboolean jump_to)
+                            gboolean     jump_to)
 {
 #ifdef G_OS_UNIX
 	GInputStream *stream;
diff --git a/gedit/gseal-gtk-compat.h b/gedit/gseal-gtk-compat.h
index 1900f29..8fd6a80 100644
--- a/gedit/gseal-gtk-compat.h
+++ b/gedit/gseal-gtk-compat.h
@@ -25,24 +25,26 @@ G_BEGIN_DECLS
 
 #if !GTK_CHECK_VERSION (2, 22, 0)
 #define gtk_text_view_reset_im_context(view) \
-	if (GTK_TEXT_VIEW (view)->need_im_reset) \
-	{ \
-		GTK_TEXT_VIEW (view)->need_im_reset = FALSE; \
-		gtk_im_context_reset (GTK_TEXT_VIEW (view)->im_context); \
-	}
+	G_STMT_BEGIN \
+		if (GTK_TEXT_VIEW (view)->need_im_reset) \
+		{ \
+			GTK_TEXT_VIEW (view)->need_im_reset = FALSE; \
+			gtk_im_context_reset (GTK_TEXT_VIEW (view)->im_context); \
+		} \
+	G_STMT_END
 #endif /* GTK < 2.22.0 */
 
 #if !GTK_CHECK_VERSION (2, 20, 0)
-#define gtk_widget_get_realized(widget)                         GTK_WIDGET_REALIZED(widget)
-#define gtk_widget_get_mapped(widget)                           GTK_WIDGET_MAPPED(widget)
+#define gtk_widget_get_realized(widget)                         (GTK_WIDGET_REALIZED (widget))
+#define gtk_widget_get_mapped(widget)                           (GTK_WIDGET_MAPPED (widget))
 #endif /* GTK < 2.20.0 */
 
 #if !GTK_CHECK_VERSION (2, 18, 0)
 #define gtk_cell_renderer_get_alignment(cell, xalign, yalign)   g_object_get (cell, "xalign", xalign, "yalign", yalign, NULL);
 #define gtk_cell_renderer_get_padding(cell, xpad, ypad)         g_object_get (cell, "xpad", xpad, "ypad", ypad, NULL);
 #define gtk_cell_renderer_set_padding(cell, xpad, ypad)         g_object_set (cell, "xpad", xpad, "ypad", ypad, NULL);
-#define gtk_widget_get_allocation(widget, alloc)                (*(alloc)=(widget)->allocation)
-#define gtk_widget_set_allocation(widget, alloc)                ((widget)->allocation=*(alloc))
+#define gtk_widget_get_allocation(widget, alloc)                (*(alloc) = (widget)->allocation)
+#define gtk_widget_set_allocation(widget, alloc)                ((widget)->allocation = *(alloc))
 #define gtk_widget_get_app_paintable(widget)                    (GTK_WIDGET_APP_PAINTABLE (widget))
 #define gtk_widget_set_can_default(widget, can_default)         ((can_default) ? (GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT)) : (GTK_WIDGET_UNSET_FLAGS (w, GTK_CAN_DEFAULT)))
 #define gtk_widget_set_can_focus(widget, can_focus)             ((can_focus) ? (GTK_WIDGET_SET_FLAGS (w, GTK_CAN_FOCUS)) : (GTK_WIDGET_UNSET_FLAGS (w, GTK_CAN_FOCUS)))
@@ -52,11 +54,12 @@ G_BEGIN_DECLS
 #define gtk_widget_get_has_window(widget)                       (!GTK_WIDGET_NO_WINDOW (widget))
 #define gtk_widget_get_state(widget)                            ((widget)->state)
 #define gtk_widget_get_visible(widget)                          (GTK_WIDGET_VISIBLE (widget))
-#define gtk_widget_set_window(widget, _window)                  ((widget)->window=_window)
+#define gtk_widget_set_window(widget, _window)                  ((widget)->window = _window)
 #endif /* GTK+ < 2.18.0 */
 
 
 G_END_DECLS
 
 #endif /* GSEAL_GTK_COMPAT_H */
+
 /* ex:ts=8:noet: */



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