mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-17 13:56:47 +00:00
Fix segfault in torrent_proxy_settings()
The torrent name column is resizable again
This commit is contained in:
parent
34fe76780e
commit
554baccc4a
@ -1313,7 +1313,7 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args)
|
|||||||
libtorrent::proxy_settings::proxy_type proxytype;
|
libtorrent::proxy_settings::proxy_type proxytype;
|
||||||
bool peerproxy, webseedproxy, trackerproxy, dhtproxy;
|
bool peerproxy, webseedproxy, trackerproxy, dhtproxy;
|
||||||
|
|
||||||
PyArg_ParseTuple(args, "sssii", &server, &login, &pasw, &portnum, &proxytype, &peerproxy, &webseedproxy, &trackerproxy, &dhtproxy);
|
PyArg_ParseTuple(args, "sssiibbbb", &server, &login, &pasw, &portnum, &proxytype, &peerproxy, &webseedproxy, &trackerproxy, &dhtproxy);
|
||||||
|
|
||||||
M_proxy_settings->type = proxytype;
|
M_proxy_settings->type = proxytype;
|
||||||
M_proxy_settings->username = login;
|
M_proxy_settings->username = login;
|
||||||
@ -1321,20 +1321,20 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args)
|
|||||||
M_proxy_settings->hostname = server;
|
M_proxy_settings->hostname = server;
|
||||||
M_proxy_settings->port = portnum;
|
M_proxy_settings->port = portnum;
|
||||||
|
|
||||||
if (peerproxy){
|
if (peerproxy) {
|
||||||
M_ses->set_peer_proxy(*M_proxy_settings);
|
M_ses->set_peer_proxy(*M_proxy_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webseedproxy){
|
if (webseedproxy) {
|
||||||
M_ses->set_web_seed_proxy(*M_proxy_settings);
|
M_ses->set_web_seed_proxy(*M_proxy_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trackerproxy){
|
if (trackerproxy) {
|
||||||
M_ses->set_tracker_proxy(*M_proxy_settings);
|
M_ses->set_tracker_proxy(*M_proxy_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dhtproxy){
|
if (dhtproxy) {
|
||||||
M_ses->set_dht_proxy(*M_proxy_settings);
|
M_ses->set_dht_proxy(*M_proxy_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
Py_INCREF(Py_None); return Py_None;
|
Py_INCREF(Py_None); return Py_None;
|
||||||
|
@ -105,6 +105,9 @@ def add_toggle_column(view, header, cid, toggled_signal=None):
|
|||||||
|
|
||||||
def add_texticon_column(view, header, icon_col, text_col):
|
def add_texticon_column(view, header, icon_col, text_col):
|
||||||
column = gtk.TreeViewColumn(header)
|
column = gtk.TreeViewColumn(header)
|
||||||
|
column.set_clickable(True)
|
||||||
|
column.set_resizable(True)
|
||||||
|
column.set_expand(False)
|
||||||
render = gtk.CellRendererPixbuf()
|
render = gtk.CellRendererPixbuf()
|
||||||
column.pack_start(render, expand=False)
|
column.pack_start(render, expand=False)
|
||||||
column.add_attribute(render, 'pixbuf', icon_col)
|
column.add_attribute(render, 'pixbuf', icon_col)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user