[gnome-contacts/wip/nielsdg/cleanup-types: 2/2] Typeset: remove custom_dummmy TypeDescriptor
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/nielsdg/cleanup-types: 2/2] Typeset: remove custom_dummmy TypeDescriptor
- Date: Wed, 12 Dec 2018 20:05:57 +0000 (UTC)
commit 79e1606aaaa3fc8709a458ad849bba2501a064a6
Author: Niels De Graef <nielsdegraef gmail com>
Date: Wed Dec 12 19:07:50 2018 +0100
Typeset: remove custom_dummmy TypeDescriptor
This isn't supported (at the moment) anyway and only complicates things,
so let's get rid of it to simplify the code base a bit (we can always
reintroduce it later in a cleaner form).
src/contacts-type-combo.vala | 11 ++---------
src/contacts-typeset.vala | 9 ---------
2 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/src/contacts-type-combo.vala b/src/contacts-type-combo.vala
index d9186be..6cdeede 100644
--- a/src/contacts-type-combo.vala
+++ b/src/contacts-type-combo.vala
@@ -113,15 +113,8 @@ public class Contacts.TypeCombo : Grid {
modified = true;
TreeIter iter;
if (combo.get_active_iter (out iter)) {
- if (type_set.is_custom (iter)) {
- custom_mode = true;
- entry.show ();
- entry.grab_focus ();
- combo.hide ();
- } else {
- last_active = iter;
- this.changed ();
- }
+ last_active = iter;
+ this.changed ();
}
}
diff --git a/src/contacts-typeset.vala b/src/contacts-typeset.vala
index 00e9ff3..07ac58d 100644
--- a/src/contacts-typeset.vala
+++ b/src/contacts-typeset.vala
@@ -35,8 +35,6 @@ public class Contacts.TypeSet : Object {
public bool in_store;
}
- // Dummy TypeDescriptor to mark the "Custom..." store entry
- private static TypeDescriptor custom_dummy = new TypeDescriptor ();
// Dummy TypeDescriptor to mark the "Other..." store entry
private static TypeDescriptor other_dummy = new TypeDescriptor ();
@@ -221,7 +219,6 @@ public class Contacts.TypeSet : Object {
store.get (iter, 0, out display_name, 1, out descriptor);
assert (display_name != null); // Not separator
- assert (descriptor != custom_dummy); // Not custom...
if (descriptor == null) { // A custom label
details.parameters["type"] = "OTHER";
@@ -240,12 +237,6 @@ public class Contacts.TypeSet : Object {
details.parameters["type"] = "PREF";
}
- public bool is_custom (TreeIter iter) {
- TypeDescriptor descriptor;
- store.get (iter, 1, out descriptor);
- return descriptor == custom_dummy;
- }
-
private static TypeSet _general;
private const VcardTypeMapping[] general_data = {
// List most specific first, always in upper case
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]