From b04473ff020faf2c00f0a356c616cd78996b13eb Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <salimma@fedoraproject.org>
Date: Sat, 16 Mar 2013 20:31:15 +0700
Subject: [PATCH] Replace the deprecated Gedit.App.get_default (removed from
Gedit 3.7.x), with Application.get_default
---
gtk_util.vala | 3 ++-
valencia.vala | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gtk_util.vala b/gtk_util.vala
index e57f47e..0318802 100644
--- a/gtk_util.vala
+++ b/gtk_util.vala
@@ -521,7 +521,8 @@ string? document_filename(Gedit.Document document) {
Gedit.Tab? find_tab(string filename, out Gedit.Window window) {
File location = File.new_for_path(filename);
- foreach (Gedit.Window w in Gedit.App.get_default().get_windows()) {
+ foreach (Gtk.Window gtk_w in ((Gedit.App)Application.get_default()).get_windows()) {
+ Gedit.Window w = (Gedit.Window)gtk_w;
Gedit.Tab tab = w.get_tab_from_location(location);
if (tab != null) {
window = w;
diff --git a/valencia.vala b/valencia.vala
index 4356c8c..2a05513 100644
--- a/valencia.vala
+++ b/valencia.vala
@@ -738,7 +738,7 @@ public class Instance : Peas.ExtensionBase, Gedit.WindowActivatable {
}
void on_build() {
- foreach (Gedit.Document d in Gedit.App.get_default().get_documents())
+ foreach (Gedit.Document d in ((Gedit.App)Application.get_default()).get_documents())
if (!d.is_untitled() && d.get_modified()) {
++saving;
Signal.connect(d, "saved", (Callback) saved_callback, this);
@@ -916,7 +916,7 @@ public class Instance : Peas.ExtensionBase, Gedit.WindowActivatable {
public void reparse_modified_documents(string filename) {
Program program = Program.find_containing(filename, true);
- foreach (Gedit.Document document in Gedit.App.get_default().get_documents()) {
+ foreach (Gedit.Document document in ((Gedit.App)Application.get_default()).get_documents()) {
assert(documents_modified_state.has_key(document));
bool previously_modified = documents_modified_state.get(document);
bool currently_modified = document.get_modified();
--
1.8.1.4