[gnome-contacts] Get rid of some deprecation warnings



commit 51de2b085bc85bad08fa8a513eb2eb1a39ef6562
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Tue Jul 18 11:40:36 2017 +0200

    Get rid of some deprecation warnings

 src/contacts-address-map.vala |    4 ++--
 src/contacts-app.vala         |    9 +++------
 src/contacts-utils.vala       |    3 +--
 src/contacts-view.vala        |    2 --
 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;


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