Skip to content

Commit b082569

Browse files
author
SkyzohKey
committed
refactor(settings-view): remove useless section about ToxMe. Ricin won't support them as they are insecure and centralized, which fucks the points of Tox.
1 parent a791906 commit b082569

2 files changed

Lines changed: 1 addition & 255 deletions

File tree

res/ui/settings-view.ui

Lines changed: 0 additions & 233 deletions
Original file line numberDiff line numberDiff line change
@@ -262,239 +262,6 @@
262262
<property name="position">2</property>
263263
</packing>
264264
</child>
265-
<child>
266-
<object class="GtkBox" id="box4">
267-
<property name="can_focus">False</property>
268-
<property name="orientation">vertical</property>
269-
<property name="spacing">5</property>
270-
<child>
271-
<object class="GtkBox" id="box_tox_alias">
272-
<property name="visible">True</property>
273-
<property name="can_focus">False</property>
274-
<property name="spacing">10</property>
275-
<property name="homogeneous">True</property>
276-
<child>
277-
<object class="GtkLabel" id="label_header_tox_alias">
278-
<property name="visible">True</property>
279-
<property name="can_focus">False</property>
280-
<property name="halign">start</property>
281-
<property name="label" translatable="yes">&lt;b&gt;Your Tox alias:&lt;/b&gt;</property>
282-
<property name="use_markup">True</property>
283-
</object>
284-
<packing>
285-
<property name="expand">False</property>
286-
<property name="fill">True</property>
287-
<property name="position">0</property>
288-
</packing>
289-
</child>
290-
<child>
291-
<object class="GtkLabel" id="label_toxme_alias">
292-
<property name="visible">True</property>
293-
<property name="can_focus">False</property>
294-
</object>
295-
<packing>
296-
<property name="expand">False</property>
297-
<property name="fill">True</property>
298-
<property name="position">1</property>
299-
</packing>
300-
</child>
301-
<child>
302-
<object class="GtkButton" id="button_toxme_copy">
303-
<property name="label" translatable="yes">Copy</property>
304-
<property name="visible">True</property>
305-
<property name="can_focus">True</property>
306-
<property name="receives_default">True</property>
307-
<signal name="clicked" handler="copy_toxme_alias" swapped="no"/>
308-
<style>
309-
<class name="button-dark"/>
310-
</style>
311-
</object>
312-
<packing>
313-
<property name="expand">False</property>
314-
<property name="fill">True</property>
315-
<property name="position">2</property>
316-
</packing>
317-
</child>
318-
</object>
319-
<packing>
320-
<property name="expand">False</property>
321-
<property name="fill">True</property>
322-
<property name="position">0</property>
323-
</packing>
324-
</child>
325-
<child>
326-
<object class="GtkGrid" id="grid1">
327-
<property name="visible">True</property>
328-
<property name="can_focus">False</property>
329-
<property name="row_spacing">5</property>
330-
<property name="column_spacing">10</property>
331-
<property name="column_homogeneous">True</property>
332-
<child>
333-
<object class="GtkLabel" id="label1">
334-
<property name="visible">True</property>
335-
<property name="can_focus">False</property>
336-
<property name="label" translatable="yes">Username</property>
337-
</object>
338-
<packing>
339-
<property name="left_attach">0</property>
340-
<property name="top_attach">0</property>
341-
</packing>
342-
</child>
343-
<child>
344-
<object class="GtkLabel" id="label2">
345-
<property name="visible">True</property>
346-
<property name="can_focus">False</property>
347-
<property name="label" translatable="yes">Biography</property>
348-
</object>
349-
<packing>
350-
<property name="left_attach">0</property>
351-
<property name="top_attach">1</property>
352-
</packing>
353-
</child>
354-
<child>
355-
<object class="GtkLabel" id="label3">
356-
<property name="visible">True</property>
357-
<property name="can_focus">False</property>
358-
<property name="label" translatable="yes">ToxMe server</property>
359-
</object>
360-
<packing>
361-
<property name="left_attach">0</property>
362-
<property name="top_attach">2</property>
363-
</packing>
364-
</child>
365-
<child>
366-
<object class="GtkEntry" id="entry1">
367-
<property name="visible">True</property>
368-
<property name="can_focus">True</property>
369-
<style>
370-
<class name="entry-inverted"/>
371-
</style>
372-
</object>
373-
<packing>
374-
<property name="left_attach">1</property>
375-
<property name="top_attach">0</property>
376-
</packing>
377-
</child>
378-
<child>
379-
<object class="GtkEntry" id="entry2">
380-
<property name="visible">True</property>
381-
<property name="can_focus">True</property>
382-
<style>
383-
<class name="entry-inverted"/>
384-
</style>
385-
</object>
386-
<packing>
387-
<property name="left_attach">1</property>
388-
<property name="top_attach">1</property>
389-
</packing>
390-
</child>
391-
<child>
392-
<object class="GtkComboBoxText" id="combobox_toxme_servers">
393-
<property name="width_request">250</property>
394-
<property name="visible">True</property>
395-
<property name="can_focus">False</property>
396-
<property name="opacity">0.9882352941176471</property>
397-
<property name="active">0</property>
398-
<property name="button_sensitivity">on</property>
399-
<style>
400-
<class name="button-dark"/>
401-
<class name="button-inverted"/>
402-
<class name="entry-inverted"/>
403-
</style>
404-
</object>
405-
<packing>
406-
<property name="left_attach">1</property>
407-
<property name="top_attach">2</property>
408-
</packing>
409-
</child>
410-
</object>
411-
<packing>
412-
<property name="expand">False</property>
413-
<property name="fill">True</property>
414-
<property name="position">1</property>
415-
</packing>
416-
</child>
417-
<child>
418-
<object class="GtkBox" id="box6">
419-
<property name="visible">True</property>
420-
<property name="can_focus">False</property>
421-
<property name="spacing">5</property>
422-
<property name="homogeneous">True</property>
423-
<child>
424-
<object class="GtkButton" id="button_toxme_register">
425-
<property name="label" translatable="yes">New Tox alias</property>
426-
<property name="visible">True</property>
427-
<property name="can_focus">True</property>
428-
<property name="receives_default">True</property>
429-
<style>
430-
<class name="button-dark"/>
431-
</style>
432-
</object>
433-
<packing>
434-
<property name="expand">False</property>
435-
<property name="fill">True</property>
436-
<property name="position">0</property>
437-
</packing>
438-
</child>
439-
<child>
440-
<object class="GtkButton" id="button_toxme_update">
441-
<property name="label" translatable="yes">Update record</property>
442-
<property name="visible">True</property>
443-
<property name="can_focus">True</property>
444-
<property name="receives_default">True</property>
445-
<property name="image_position">top</property>
446-
<style>
447-
<class name="button-dark"/>
448-
</style>
449-
</object>
450-
<packing>
451-
<property name="expand">False</property>
452-
<property name="fill">True</property>
453-
<property name="position">1</property>
454-
</packing>
455-
</child>
456-
<child>
457-
<object class="GtkButton" id="button_toxme_delete">
458-
<property name="label" translatable="yes">Request deletion</property>
459-
<property name="visible">True</property>
460-
<property name="can_focus">True</property>
461-
<property name="receives_default">True</property>
462-
<style>
463-
<class name="button-dark"/>
464-
</style>
465-
</object>
466-
<packing>
467-
<property name="expand">False</property>
468-
<property name="fill">True</property>
469-
<property name="position">2</property>
470-
</packing>
471-
</child>
472-
</object>
473-
<packing>
474-
<property name="expand">False</property>
475-
<property name="fill">True</property>
476-
<property name="position">2</property>
477-
</packing>
478-
</child>
479-
<child>
480-
<object class="GtkSeparator" id="separator13">
481-
<property name="visible">True</property>
482-
<property name="can_focus">False</property>
483-
<property name="margin_top">5</property>
484-
</object>
485-
<packing>
486-
<property name="expand">False</property>
487-
<property name="fill">True</property>
488-
<property name="position">3</property>
489-
</packing>
490-
</child>
491-
</object>
492-
<packing>
493-
<property name="expand">False</property>
494-
<property name="fill">True</property>
495-
<property name="position">3</property>
496-
</packing>
497-
</child>
498265
<child>
499266
<object class="GtkBox" id="box22">
500267
<property name="visible">True</property>

src/SettingsView.vala

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ class Ricin.SettingsView : Gtk.Box {
66

77
// General settings tab.
88
[GtkChild] Gtk.Label label_tox_id;
9-
[GtkChild] Gtk.Label label_toxme_alias;
10-
[GtkChild] Gtk.ComboBoxText combobox_toxme_servers;
119
[GtkChild] Gtk.ComboBoxText combobox_languages;
1210
[GtkChild] Gtk.Label label_default_save_path;
1311
[GtkChild] Gtk.Entry entry_default_save_path;
@@ -90,16 +88,11 @@ class Ricin.SettingsView : Gtk.Box {
9088
this.combobox_languages.append_text ("Russian");
9189
this.combobox_languages.append_text ("Polish");
9290

93-
this.combobox_toxme_servers.append_text (@"Ricin.im ($default_str)");
94-
this.combobox_toxme_servers.append_text (@"ToxMe.io ($stable_str)");
95-
this.combobox_toxme_servers.append_text (@"uTox.org ($stable_str)");
96-
9791
this.combobox_selected_theme.append_text (_("Dark theme") + @" ($default_str)");
9892
this.combobox_selected_theme.append_text (_("White theme"));
9993
this.combobox_selected_theme.append_text (_("Clearer theme"));
10094

101-
this.combobox_languages.active = 0;
102-
this.combobox_toxme_servers.active = 0;
95+
this.combobox_languages.active = 0;
10396

10497
this.handle.notify["encrypted"].connect (this.reset_profile_buttons);
10598
this.reset_profile_buttons ();
@@ -377,20 +370,6 @@ class Ricin.SettingsView : Gtk.Box {
377370
this.label_tox_id.label = this.handle.id; // Update the ToxID
378371
}
379372

380-
/**
381-
* ToxMe registration section.
382-
**/
383-
[GtkCallback]
384-
private void copy_toxme_alias () {
385-
string toxme_alias = this.label_toxme_alias.label;
386-
387-
Gtk.Clipboard
388-
.get (Gdk.SELECTION_CLIPBOARD)
389-
.set_text (toxme_alias, -1);
390-
391-
debug (@"ToxMe alias: $toxme_alias");
392-
}
393-
394373
/**
395374
* Select default save path section.
396375
**/

0 commit comments

Comments
 (0)