[gedit] Kill gedit-language-manager and use directly gtksourcelanguagemanager
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Kill gedit-language-manager and use directly gtksourcelanguagemanager
- Date: Sun, 29 Jul 2012 14:25:28 +0000 (UTC)
commit eeee52c18d5621bbbd0251f69a7325607fa38cb5
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun Jul 29 16:25:06 2012 +0200
Kill gedit-language-manager and use directly gtksourcelanguagemanager
gedit/Makefile.am | 2 -
gedit/gedit-document.c | 5 +--
gedit/gedit-file-chooser-dialog.c | 4 +-
gedit/gedit-language-manager.c | 51 -----------------------------------
gedit/gedit-language-manager.h | 44 ------------------------------
gedit/gedit-window.c | 8 +++---
plugins/modelines/modeline-parser.c | 4 +-
7 files changed, 10 insertions(+), 108 deletions(-)
---
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index 066357b..875e69f 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -118,7 +118,6 @@ NOINST_H_FILES = \
gedit-floating-slider.h \
gedit-history-entry.h \
gedit-io-error-info-bar.h \
- gedit-language-manager.h \
gedit-multi-notebook.h \
gedit-notebook.h \
gedit-notebook-popup-menu.h \
@@ -205,7 +204,6 @@ libgedit_c_files = \
gedit-floating-slider.c \
gedit-history-entry.c \
gedit-io-error-info-bar.c \
- gedit-language-manager.c \
gedit-message-bus.c \
gedit-message.c \
gedit-multi-notebook.c \
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 5057e53..853ee58 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -44,7 +44,6 @@
#include "gedit-document.h"
#include "gedit-debug.h"
#include "gedit-utils.h"
-#include "gedit-language-manager.h"
#include "gedit-document-loader.h"
#include "gedit-document-saver.h"
#include "gedit-marshal.h"
@@ -878,7 +877,7 @@ guess_language (GeditDocument *doc,
if (strcmp (data, "_NORMAL_") != 0)
{
language = gtk_source_language_manager_get_language (
- gedit_get_language_manager (),
+ gtk_source_language_manager_get_default (),
data);
}
@@ -902,7 +901,7 @@ guess_language (GeditDocument *doc,
}
language = gtk_source_language_manager_guess_language (
- gedit_get_language_manager (),
+ gtk_source_language_manager_get_default (),
basename,
content_type);
diff --git a/gedit/gedit-file-chooser-dialog.c b/gedit/gedit-file-chooser-dialog.c
index ba1170a..561a7b9 100644
--- a/gedit/gedit-file-chooser-dialog.c
+++ b/gedit/gedit-file-chooser-dialog.c
@@ -39,10 +39,10 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <gtksourceview/gtksourcelanguagemanager.h>
#include "gedit-file-chooser-dialog.h"
#include "gedit-encodings-combo-box.h"
-#include "gedit-language-manager.h"
#include "gedit-debug.h"
#include "gedit-enum-types.h"
#include "gedit-settings.h"
@@ -290,7 +290,7 @@ all_text_files_filter (const GtkFileFilterInfo *filter_info,
GtkSourceLanguageManager *lm;
const gchar * const *languages;
- lm = gedit_get_language_manager ();
+ lm = gtk_source_language_manager_get_default ();
languages = gtk_source_language_manager_get_language_ids (lm);
while ((languages != NULL) && (*languages != NULL))
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 9ccb8b4..6deae63 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -38,6 +38,7 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
+#include <gtksourceview/gtksourcelanguagemanager.h>
#include <libpeas/peas-extension-set.h>
#include "gedit-ui.h"
@@ -51,7 +52,6 @@
#include "gedit-utils.h"
#include "gedit-commands.h"
#include "gedit-debug.h"
-#include "gedit-language-manager.h"
#include "gedit-panel.h"
#include "gedit-documents-panel.h"
#include "gedit-plugins-engine.h"
@@ -857,7 +857,7 @@ language_toggled (GtkToggleAction *action,
else
{
lang = gtk_source_language_manager_get_language (
- gedit_get_language_manager (),
+ gtk_source_language_manager_get_default (),
lang_id);
if (lang == NULL)
{
@@ -1014,7 +1014,7 @@ get_languages_sorted_by_section (GeditWindow *window)
gint i;
GSList *languages = NULL;
- lm = gedit_get_language_manager ();
+ lm = gtk_source_language_manager_get_default ();
ids = gtk_source_language_manager_get_language_ids (lm);
for (i = 0; ids[i] != NULL; i++)
@@ -2097,7 +2097,7 @@ fill_language_combo (GeditWindow *window)
GTK_MENU_ITEM (menu_item),
name);
- lm = gedit_get_language_manager ();
+ lm = gtk_source_language_manager_get_default ();
ids = gtk_source_language_manager_get_language_ids (lm);
for (i = 0; ids[i] != NULL; i++)
diff --git a/plugins/modelines/modeline-parser.c b/plugins/modelines/modeline-parser.c
index b34cfb2..24b0a60 100644
--- a/plugins/modelines/modeline-parser.c
+++ b/plugins/modelines/modeline-parser.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include <gedit/gedit-language-manager.h>
+#include <gtksourceview/gtksourcelanguagemanager.h>
#include <gedit/gedit-debug.h>
#include <gedit/gedit-document.h>
#include <gedit/gedit-settings.h>
@@ -761,7 +761,7 @@ modeline_parser_apply_modeline (GtkSourceView *view)
GtkSourceLanguageManager *manager;
GtkSourceLanguage *language;
- manager = gedit_get_language_manager ();
+ manager = gtk_source_language_manager_get_default ();
language = gtk_source_language_manager_get_language
(manager, options.language_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]