[gnome-latex: 170/205] Clean-up #include's



commit d3ca065b3117c47df0a9dc62295a17e6604019c7
Author: Sébastien Wilmet <sebastien wilmet gmail com>
Date:   Mon Jan 18 16:01:06 2010 +0100

    Clean-up #include's
    
    For gettext, locale.h and libintl.h are included in main.h.
    <gtksourceview/gtksourceview.h> is also included in main.h.

 src/callbacks.c           | 2 --
 src/cb_latex.c            | 3 +--
 src/external_commands.c   | 3 ---
 src/file_browser.c        | 5 +----
 src/latex_output_filter.c | 4 +---
 src/main.c                | 5 -----
 src/main.h                | 7 +++++++
 src/prefs.c               | 4 +---
 src/symbols.c             | 5 +----
 src/templates.c           | 5 +----
 src/ui.c                  | 3 ---
 11 files changed, 13 insertions(+), 33 deletions(-)
---
diff --git a/src/callbacks.c b/src/callbacks.c
index 2b653b7..667684b 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -20,8 +20,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <locale.h>
-#include <libintl.h>
 #include <gtk/gtk.h>
 #include <glib.h>
 #include <glib/gstdio.h>
diff --git a/src/cb_latex.c b/src/cb_latex.c
index b0e3ee9..a7409fe 100644
--- a/src/cb_latex.c
+++ b/src/cb_latex.c
@@ -1,7 +1,7 @@
 /*
  * This file is part of LaTeXila.
  *
- * Copyright © 2009 Sébastien Wilmet
+ * Copyright © 2009, 2010 Sébastien Wilmet
  *
  * LaTeXila is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <gtk/gtk.h>
-#include <gtksourceview/gtksourceview.h>
 
 #include "main.h"
 #include "config.h"
diff --git a/src/external_commands.c b/src/external_commands.c
index cb45887..c855451 100644
--- a/src/external_commands.c
+++ b/src/external_commands.c
@@ -25,12 +25,9 @@
 #include <unistd.h> // for dup2
 #include <sys/types.h>
 #include <signal.h> // for kill
-#include <locale.h>
-#include <libintl.h>
 #include <gtk/gtk.h>
 #include <glib.h>
 #include <glib/gstdio.h>
-#include <gtksourceview/gtksourceview.h>
 
 #include "main.h"
 #include "config.h"
diff --git a/src/file_browser.c b/src/file_browser.c
index f111acb..b773f84 100644
--- a/src/file_browser.c
+++ b/src/file_browser.c
@@ -1,7 +1,7 @@
 /*
  * This file is part of LaTeXila.
  *
- * Copyright © 2009 Sébastien Wilmet
+ * Copyright © 2009, 2010 Sébastien Wilmet
  *
  * LaTeXila is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,11 +19,8 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <locale.h>
-#include <libintl.h>
 #include <string.h> // for strcmp
 #include <gtk/gtk.h>
-#include <gtksourceview/gtksourceview.h>
 
 #include "main.h"
 #include "config.h"
diff --git a/src/latex_output_filter.c b/src/latex_output_filter.c
index a329a6c..778343f 100644
--- a/src/latex_output_filter.c
+++ b/src/latex_output_filter.c
@@ -21,10 +21,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h> // for isspace()
-#include <locale.h>
-#include <libintl.h>
 #include <gtk/gtk.h>
-#include <gtksourceview/gtksourceview.h>
 
 #include "main.h"
 #include "print.h"
@@ -841,6 +838,7 @@ print_msg (void)
 
        print_log_add (latexila.action_log.text_view, str, msg.message_type == TYPE_ERROR);
        flush_queue ();
+       g_free (str);
        
        msg.line = NO_LINE;
        msg.message_type = TYPE_OTHER;
diff --git a/src/main.c b/src/main.c
index 6b5dd46..c657b9d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -19,12 +19,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <locale.h>
-#include <libintl.h>
 #include <gtk/gtk.h>
-#include <gtksourceview/gtksourceview.h>
-#include <gtksourceview/gtksourcelanguage.h>
-#include <gtksourceview/gtksourcelanguagemanager.h>
 
 #include "main.h"
 #include "config.h"
diff --git a/src/main.h b/src/main.h
index 75b969b..5c30ff1 100644
--- a/src/main.h
+++ b/src/main.h
@@ -20,6 +20,9 @@
 #ifndef MAIN_H
 #define MAIN_H
 
+#include <locale.h>
+#include <libintl.h>
+#include <gtksourceview/gtksourceview.h>
 #include "config.h"
 
 // if Native Language Support is enabled
@@ -109,6 +112,8 @@ typedef struct
        gint                                    side_pane_page;
 } preferences_t;
 
+// actions from the menu or the toolbars
+// so we can change the sensitivity of these actions
 typedef struct
 {
        GtkAction *undo;
@@ -125,6 +130,7 @@ typedef struct
        GtkAction *stop_execution;
 } actions_t;
 
+// Go to line, Find and Replace are under the source view
 typedef struct
 {
        GtkWidget       *go_to_line;
@@ -139,6 +145,7 @@ typedef struct
        GtkWidget       *replace_button;
 } under_source_view_t;
 
+// main structure containing all the others
 typedef struct
 {
        GList                           *all_docs;
diff --git a/src/prefs.c b/src/prefs.c
index 6e889ce..171f777 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -19,14 +19,12 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <locale.h>
-#include <libintl.h>
+#include <string.h>
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourceview.h>
 #include <gtksourceview/gtksourcestylescheme.h>
 #include <gtksourceview/gtksourcestyleschememanager.h>
 #include <sys/stat.h> // for S_IRWXU
-#include <string.h>
 
 #include "main.h"
 #include "prefs.h"
diff --git a/src/symbols.c b/src/symbols.c
index c649632..21370dd 100644
--- a/src/symbols.c
+++ b/src/symbols.c
@@ -1,7 +1,7 @@
 /*
  * This file is part of LaTeXila.
  *
- * Copyright © 2009 Sébastien Wilmet
+ * Copyright © 2009, 2010 Sébastien Wilmet
  *
  * LaTeXila is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,10 +19,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <locale.h>
-#include <libintl.h>
 #include <gtk/gtk.h>
-#include <gtksourceview/gtksourceview.h>
 
 #include "main.h"
 #include "config.h"
diff --git a/src/templates.c b/src/templates.c
index a3dee65..6060fe1 100644
--- a/src/templates.c
+++ b/src/templates.c
@@ -1,7 +1,7 @@
 /*
  * This file is part of LaTeXila.
  *
- * Copyright © 2009 Sébastien Wilmet
+ * Copyright © 2009, 2010 Sébastien Wilmet
  *
  * LaTeXila is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,10 +19,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <locale.h>
-#include <libintl.h>
 #include <gtk/gtk.h>
-#include <gtksourceview/gtksourceview.h>
 #include <sys/stat.h> // for S_IRWXU
 #include <glib/gstdio.h> // for g_remove()
 
diff --git a/src/ui.c b/src/ui.c
index 77b551a..1c3c221 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -19,10 +19,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <locale.h>
-#include <libintl.h>
 #include <gtk/gtk.h>
-#include <gtksourceview/gtksourceview.h>
 
 #include "main.h"
 #include "config.h"


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