[gedit/wip/loader-saver: 11/30] file-chooser-dialog: use GtkSourceEncoding



commit db8f748fd18ef3e54cca17df76e0cbeb3b43ac38
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Jun 12 18:20:08 2014 +0200

    file-chooser-dialog: use GtkSourceEncoding

 gedit/gedit-file-chooser-dialog.c |   30 ++++++++++++++----------------
 gedit/gedit-file-chooser-dialog.h |    9 ++++-----
 2 files changed, 18 insertions(+), 21 deletions(-)
---
diff --git a/gedit/gedit-file-chooser-dialog.c b/gedit/gedit-file-chooser-dialog.c
index d6e9b20..5f25fcf 100644
--- a/gedit/gedit-file-chooser-dialog.c
+++ b/gedit/gedit-file-chooser-dialog.c
@@ -28,8 +28,6 @@
 #include <string.h>
 
 #include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include <gtksourceview/gtksource.h>
 
 #include "gedit-file-chooser-dialog.h"
 #include "gedit-encodings-combo-box.h"
@@ -350,12 +348,12 @@ gedit_file_chooser_dialog_init (GeditFileChooserDialog *dialog)
 }
 
 static GtkWidget *
-gedit_file_chooser_dialog_new_valist (const gchar          *title,
-                                     GtkWindow            *parent,
-                                     GtkFileChooserAction  action,
-                                     const GeditEncoding  *encoding,
-                                     const gchar          *first_button_text,
-                                     va_list               varargs)
+gedit_file_chooser_dialog_new_valist (const gchar             *title,
+                                     GtkWindow               *parent,
+                                     GtkFileChooserAction     action,
+                                     const GtkSourceEncoding *encoding,
+                                     const gchar             *first_button_text,
+                                     va_list                  varargs)
 {
        GtkWidget *result;
        const char *button_text = first_button_text;
@@ -461,11 +459,11 @@ gedit_file_chooser_dialog_new_valist (const gchar          *title,
  * Return value: a new #GeditFileChooserDialog
  */
 GtkWidget *
-gedit_file_chooser_dialog_new (const gchar          *title,
-                              GtkWindow            *parent,
-                              GtkFileChooserAction  action,
-                              const GeditEncoding  *encoding,
-                              const gchar          *first_button_text,
+gedit_file_chooser_dialog_new (const gchar             *title,
+                              GtkWindow               *parent,
+                              GtkFileChooserAction     action,
+                              const GtkSourceEncoding *encoding,
+                              const gchar             *first_button_text,
                               ...)
 {
        GtkWidget *result;
@@ -481,8 +479,8 @@ gedit_file_chooser_dialog_new (const gchar          *title,
 }
 
 void
-gedit_file_chooser_dialog_set_encoding (GeditFileChooserDialog *dialog,
-                                       const GeditEncoding    *encoding)
+gedit_file_chooser_dialog_set_encoding (GeditFileChooserDialog  *dialog,
+                                       const GtkSourceEncoding *encoding)
 {
        g_return_if_fail (GEDIT_IS_FILE_CHOOSER_DIALOG (dialog));
        g_return_if_fail (GEDIT_IS_ENCODINGS_COMBO_BOX (dialog->priv->option_menu));
@@ -492,7 +490,7 @@ gedit_file_chooser_dialog_set_encoding (GeditFileChooserDialog *dialog,
                                encoding);
 }
 
-const GeditEncoding *
+const GtkSourceEncoding *
 gedit_file_chooser_dialog_get_encoding (GeditFileChooserDialog *dialog)
 {
        g_return_val_if_fail (GEDIT_IS_FILE_CHOOSER_DIALOG (dialog), NULL);
diff --git a/gedit/gedit-file-chooser-dialog.h b/gedit/gedit-file-chooser-dialog.h
index 82d3abc..d9dd875 100644
--- a/gedit/gedit-file-chooser-dialog.h
+++ b/gedit/gedit-file-chooser-dialog.h
@@ -21,9 +21,8 @@
 #ifndef __GEDIT_FILE_CHOOSER_DIALOG_H__
 #define __GEDIT_FILE_CHOOSER_DIALOG_H__
 
-#include <gtk/gtk.h>
+#include <gtksourceview/gtksource.h>
 
-#include <gedit/gedit-encodings.h>
 #include <gedit/gedit-enum-types.h>
 #include <gedit/gedit-document.h>
 
@@ -57,14 +56,14 @@ 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 GtkSourceEncoding  *encoding,
                                                                 const gchar              *first_button_text,
                                                                 ...);
 
 void            gedit_file_chooser_dialog_set_encoding         (GeditFileChooserDialog   *dialog,
-                                                                const GeditEncoding      *encoding);
+                                                                const GtkSourceEncoding  *encoding);
 
-const GeditEncoding
+const GtkSourceEncoding
                *gedit_file_chooser_dialog_get_encoding         (GeditFileChooserDialog   *dialog);
 
 void            gedit_file_chooser_dialog_set_newline_type     (GeditFileChooserDialog   *dialog,


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