mirror of
https://github.com/pulb/mailnag.git
synced 2026-05-07 12:16:54 +02:00
Merge pull request #180 from tikank/empty-folder-fix
Fixed empty root folder name in Maildir folder list in accountdialog.py.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# accountdialog.py
|
||||
#
|
||||
# Copyright 2011 - 2017 Patrick Ulbrich <zulu99@gmx.net>
|
||||
# Copyright 2016 Timo Kankare <timo.kankare@iki.fi>
|
||||
# Copyright 2016, 2019 Timo Kankare <timo.kankare@iki.fi>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -50,6 +50,14 @@ PROVIDER_CONFIGS = [
|
||||
[ 'Yahoo', 'imap.mail.yahoo.com', '993']
|
||||
]
|
||||
|
||||
|
||||
def folder_cell_data(tree_column, cell, model, iter, *data):
|
||||
value = model[iter][1]
|
||||
if value == '':
|
||||
value = '[root folder]'
|
||||
cell.set_property('text', value)
|
||||
|
||||
|
||||
class AccountDialog:
|
||||
def __init__(self, parent, acc):
|
||||
self._acc = acc
|
||||
@@ -106,6 +114,7 @@ class AccountDialog:
|
||||
|
||||
renderer_folders_name = Gtk.CellRendererText()
|
||||
column_folders_name = Gtk.TreeViewColumn(_('Name'), renderer_folders_name, text = 1)
|
||||
column_folders_name.set_cell_data_func(renderer_folders_name, folder_cell_data)
|
||||
self._treeview_folders.append_column(column_folders_name)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user