[gnome-maps/wip/mlundblad/remove-contacts: 3/11] placeBar: Remove support for showing contacts




commit 3ce481cca2bc18864337e2841388f2b1765b77a1
Author: Marcus Lundblad <ml dfupdate se>
Date:   Wed Jun 22 22:13:18 2022 +0200

    placeBar: Remove support for showing contacts

 data/ui/place-bar.ui |  8 --------
 src/placeBar.js      | 14 --------------
 2 files changed, 22 deletions(-)
---
diff --git a/data/ui/place-bar.ui b/data/ui/place-bar.ui
index 28825b11..14f187bc 100644
--- a/data/ui/place-bar.ui
+++ b/data/ui/place-bar.ui
@@ -21,14 +21,6 @@
                     <property name="orientation">horizontal</property>
                     <property name="hexpand">True</property>
                     <property name="spacing">6</property>
-                    <child>
-                      <object class="HdyAvatar" id="contactAvatar">
-                        <property name="visible">False</property>
-                        <property name="can_focus">False</property>
-                        <property name="show_initials">True</property>
-                        <property name="size">32</property>
-                      </object>
-                    </child>
                     <child>
                       <object class="GtkLabel" id="title">
                         <style>
diff --git a/src/placeBar.js b/src/placeBar.js
index 634599de..6db74564 100644
--- a/src/placeBar.js
+++ b/src/placeBar.js
@@ -26,7 +26,6 @@ import GObject from 'gi://GObject';
 import Gtk from 'gi://Gtk';
 
 import {Application} from './application.js';
-import {ContactPlace} from './contactPlace.js';
 import {PlaceButtons} from './placeButtons.js';
 import {PlaceDialog} from './placeDialog.js';
 import {PlaceFormatter} from './placeFormatter.js';
@@ -70,18 +69,6 @@ export class PlaceBar extends Gtk.Revealer {
         let formatter = new PlaceFormatter(this.place);
         this._title.label = formatter.title;
 
-        if (this.place instanceof ContactPlace) {
-            this._contactAvatar.visible = true;
-            this._contactAvatar.text = formatter.title;
-
-            this._contactAvatar.set_image_load_func(null);
-            Utils.load_icon(this.place.icon, 32, (pixbuf) => {
-                this._contactAvatar.set_image_load_func((size) => Utils.loadAvatar(pixbuf, size));
-            });
-        } else {
-            this._contactAvatar.visible = false;
-        }
-
         this._buttons.place = this.place;
 
         this._altSendToButton.visible = this.place.isCurrentLocation;
@@ -150,7 +137,6 @@ GObject.registerClass({
                         'altSendToButton',
                         'box',
                         'eventbox',
-                        'contactAvatar',
                         'title' ],
     Properties: {
         'place': GObject.ParamSpec.object('place',


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