[gedit/wip/loader-saver: 11/15] window: use GtkSourceEncoding



commit de7aaac0727b0bcb20b4bf5da40ed638ba65fae3
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Jun 12 17:50:05 2014 +0200

    window: use GtkSourceEncoding

 gedit/gedit-window.c |   32 +++++++++++++++-----------------
 gedit/gedit-window.h |   31 +++++++++++++++----------------
 2 files changed, 30 insertions(+), 33 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 55e930f..5620121 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -27,8 +27,6 @@
 #include <string.h>
 
 #include <glib/gi18n.h>
-#include <gio/gio.h>
-#include <gtksourceview/gtksource.h>
 #include <libpeas/peas-extension-set.h>
 
 #include "gedit-window.h"
@@ -3168,7 +3166,7 @@ gedit_window_create_tab (GeditWindow *window,
  * gedit_window_create_tab_from_location:
  * @window: a #GeditWindow
  * @location: the location of the document
- * @encoding: (allow-none): a #GeditEncoding, or %NULL
+ * @encoding: (allow-none): a #GtkSourceEncoding, or %NULL
  * @line_pos: the line position to visualize
  * @column_pos: the column position to visualize
  * @create: %TRUE to create a new document in case @uri does exist
@@ -3182,13 +3180,13 @@ gedit_window_create_tab (GeditWindow *window,
  * Returns: (transfer none): a new #GeditTab
  */
 GeditTab *
-gedit_window_create_tab_from_location (GeditWindow         *window,
-                                      GFile               *location,
-                                      const GeditEncoding *encoding,
-                                      gint                 line_pos,
-                                      gint                 column_pos,
-                                      gboolean             create,
-                                      gboolean             jump_to)
+gedit_window_create_tab_from_location (GeditWindow             *window,
+                                      GFile                   *location,
+                                      const GtkSourceEncoding *encoding,
+                                      gint                     line_pos,
+                                      gint                     column_pos,
+                                      gboolean                 create,
+                                      gboolean                 jump_to)
 {
        GtkWidget *notebook;
        GtkWidget *tab;
@@ -3212,7 +3210,7 @@ gedit_window_create_tab_from_location (GeditWindow         *window,
  * gedit_window_create_tab_from_stream:
  * @window: a #GeditWindow
  * @stream: a #GInputStream
- * @encoding: (allow-none): a #GeditEncoding, or %NULL
+ * @encoding: (allow-none): a #GtkSourceEncoding, or %NULL
  * @line_pos: the line position to visualize
  * @column_pos: the column position to visualize
  * @jump_to: %TRUE to set the new #GeditTab as active
@@ -3220,12 +3218,12 @@ gedit_window_create_tab_from_location (GeditWindow         *window,
  * Returns: (transfer none): a new #GeditTab
  */
 GeditTab *
-gedit_window_create_tab_from_stream (GeditWindow         *window,
-                                     GInputStream        *stream,
-                                     const GeditEncoding *encoding,
-                                     gint                 line_pos,
-                                     gint                 column_pos,
-                                     gboolean             jump_to)
+gedit_window_create_tab_from_stream (GeditWindow             *window,
+                                    GInputStream            *stream,
+                                    const GtkSourceEncoding *encoding,
+                                    gint                     line_pos,
+                                    gint                     column_pos,
+                                    gboolean                 jump_to)
 {
        GtkWidget *notebook;
        GtkWidget *tab;
diff --git a/gedit/gedit-window.h b/gedit/gedit-window.h
index 1ea86da..2df2222 100644
--- a/gedit/gedit-window.h
+++ b/gedit/gedit-window.h
@@ -21,8 +21,7 @@
 #ifndef __GEDIT_WINDOW_H__
 #define __GEDIT_WINDOW_H__
 
-#include <gio/gio.h>
-#include <gtk/gtk.h>
+#include <gtksourceview/gtksource.h>
 
 #include <gedit/gedit-tab.h>
 #include <gedit/gedit-message-bus.h>
@@ -79,20 +78,20 @@ GType                gedit_window_get_type                  (void) G_GNUC_CONST;
 GeditTab       *gedit_window_create_tab                (GeditWindow         *window,
                                                         gboolean             jump_to);
 
-GeditTab       *gedit_window_create_tab_from_location  (GeditWindow         *window,
-                                                        GFile               *location,
-                                                        const GeditEncoding *encoding,
-                                                        gint                 line_pos,
-                                                        gint                 column_pos,
-                                                        gboolean             create,
-                                                        gboolean             jump_to);
-
-GeditTab       *gedit_window_create_tab_from_stream    (GeditWindow         *window,
-                                                        GInputStream        *stream,
-                                                        const GeditEncoding *encoding,
-                                                        gint                 line_pos,
-                                                        gint                 column_pos,
-                                                        gboolean             jump_to);
+GeditTab       *gedit_window_create_tab_from_location  (GeditWindow             *window,
+                                                        GFile                   *location,
+                                                        const GtkSourceEncoding *encoding,
+                                                        gint                     line_pos,
+                                                        gint                     column_pos,
+                                                        gboolean                 create,
+                                                        gboolean                 jump_to);
+
+GeditTab       *gedit_window_create_tab_from_stream    (GeditWindow             *window,
+                                                        GInputStream            *stream,
+                                                        const GtkSourceEncoding *encoding,
+                                                        gint                     line_pos,
+                                                        gint                     column_pos,
+                                                        gboolean                 jump_to);
 
 void            gedit_window_close_tab                 (GeditWindow         *window,
                                                         GeditTab            *tab);


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