summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2017-07-18 11:40:36 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2017-07-18 11:40:42 +0200
commit51de2b085bc85bad08fa8a513eb2eb1a39ef6562 (patch)
tree244c655222823d7aa80d3de5f724aafb4cedd8d4
parent4e9a0a91fa114e533395449b1f8432743316e14a (diff)
downloadgnome-contacts-51de2b085bc85bad08fa8a513eb2eb1a39ef6562.tar.gz
Get rid of some deprecation warnings
-rw-r--r--src/contacts-address-map.vala4
-rw-r--r--src/contacts-app.vala9
-rw-r--r--src/contacts-utils.vala3
-rw-r--r--src/contacts-view.vala2
4 files changed, 6 insertions, 12 deletions
diff --git a/src/contacts-address-map.vala b/src/contacts-address-map.vala
index c8a8167..f03ade1 100644
--- a/src/contacts-address-map.vala
+++ b/src/contacts-address-map.vala
@@ -1,4 +1,3 @@
-/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
/*
*
* This program is free software; you can redistribute it and/or modify
@@ -65,7 +64,8 @@ public class Contacts.AddressMap : Frame {
if (maps_info != null) {
/* Set cursor as HAND1 to indicate the map is clickable */
map.realize.connect (() => {
- map.get_window ().set_cursor (new Cursor (CursorType.HAND1));
+ var hand_cursor = new Cursor.for_display (Display.get_default (), CursorType.HAND1);
+ map.get_window ().set_cursor (hand_cursor);
});
map.button_press_event.connect(() => {
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index c5213b0..c11b6e7 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -1,4 +1,3 @@
-/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
/*
* Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
*
@@ -114,9 +113,7 @@ public class Contacts.App : Gtk.Application {
public void show_help () {
try {
- Gtk.show_uri (window.get_screen (),
- "help:gnome-help/contacts",
- Gtk.get_current_event_time ());
+ Gtk.show_uri_on_window (window, "help:gnome-help/contacts", Gtk.get_current_event_time ());
} catch (GLib.Error e1) {
warning ("Error showing help: %s", e1.message);
}
@@ -173,7 +170,7 @@ public class Contacts.App : Gtk.Application {
}
private void create_app_menu () {
- this.add_action_entries (this.action_entries, this);
+ this.add_action_entries (action_entries, this);
this.set_accels_for_action ("app.help", {"F1"});
this.set_accels_for_action ("app.new-contact", {"<Primary>n"});
@@ -297,7 +294,7 @@ public class Contacts.App : Gtk.Application {
private static string individual_id = null;
private static string email_address = null;
private static string search_terms = null;
- private static const OptionEntry[] options = {
+ private const OptionEntry[] options = {
{ "individual", 'i', 0, OptionArg.STRING, ref individual_id,
N_("Show contact with this individual id"), null },
{ "email", 'e', 0, OptionArg.STRING, ref email_address,
diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala
index 215f1ee..03a3d57 100644
--- a/src/contacts-utils.vala
+++ b/src/contacts-utils.vala
@@ -1,4 +1,3 @@
-/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
/*
* Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
*
@@ -148,7 +147,7 @@ public class Center : Bin {
public class Contacts.Utils : Object {
public static void compose_mail (string email) {
try {
- Gtk.show_uri (null, "mailto:" + Uri.escape_string (email, "@" , false), 0);
+ Gtk.show_uri_on_window (null, "mailto:" + Uri.escape_string (email, "@" , false), 0);
} catch {
}
}
diff --git a/src/contacts-view.vala b/src/contacts-view.vala
index d8d92e4..61d49ee 100644
--- a/src/contacts-view.vala
+++ b/src/contacts-view.vala
@@ -1,4 +1,3 @@
-/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
/*
* Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
*
@@ -86,7 +85,6 @@ public class Contacts.View : ListBox {
int nr_contacts_marked = 0;
string []? filter_values;
- TextDisplay text_display = TextDisplay.PRESENCE;
bool selectors_visible = false;
private Store _store;