Display a message in the file transfer window when there are no current transfers.
git-svn-id: http://voip.null.ro/svn/yate@5009 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
5a26f41d57
commit
8cc60fba89
|
@ -316,6 +316,9 @@ static const String s_accProviders = "acc_providers"; // List of providers
|
||||||
static const String s_accWizProviders = "accwiz_providers"; // List of providers in account wizard
|
static const String s_accWizProviders = "accwiz_providers"; // List of providers in account wizard
|
||||||
static const String s_inviteContacts = "invite_contacts"; // List of contacts in muc invite
|
static const String s_inviteContacts = "invite_contacts"; // List of contacts in muc invite
|
||||||
static const String s_fileProgressList = "fileprogresslist"; // List of file transfers
|
static const String s_fileProgressList = "fileprogresslist"; // List of file transfers
|
||||||
|
static const String s_pageEmpty = "page_empty_list"; // An empty stacked widget page
|
||||||
|
static const String s_pageList = "page_list"; // A page for list in a stacked widget
|
||||||
|
static const String s_fileProgressCont = "file_progress_container"; // File progress window stacked widget
|
||||||
// Actions
|
// Actions
|
||||||
static const String s_actionShowCallsList = "showCallsList";
|
static const String s_actionShowCallsList = "showCallsList";
|
||||||
static const String s_actionShowNotification = "showNotification";
|
static const String s_actionShowNotification = "showNotification";
|
||||||
|
@ -2877,6 +2880,8 @@ static bool updateFileTransferItem(bool addNew, const String& id, NamedList& par
|
||||||
NamedPointer* np = new NamedPointer(id,¶ms,String::boolText(addNew));
|
NamedPointer* np = new NamedPointer(id,¶ms,String::boolText(addNew));
|
||||||
p.addParam(np);
|
p.addParam(np);
|
||||||
bool ok = Client::self()->updateTableRows(s_fileProgressList,&p,false,w);
|
bool ok = Client::self()->updateTableRows(s_fileProgressList,&p,false,w);
|
||||||
|
if (ok)
|
||||||
|
Client::self()->setSelect(s_fileProgressCont,s_pageList,w);
|
||||||
np->takeData();
|
np->takeData();
|
||||||
if (setVisible)
|
if (setVisible)
|
||||||
Client::self()->setVisible(s_wndFileTransfer,true);
|
Client::self()->setVisible(s_wndFileTransfer,true);
|
||||||
|
@ -2912,8 +2917,10 @@ static bool dropFileTransferItem(const String& id)
|
||||||
// Close window if empty
|
// Close window if empty
|
||||||
NamedList items("");
|
NamedList items("");
|
||||||
Client::self()->getOptions(s_fileProgressList,&items,w);
|
Client::self()->getOptions(s_fileProgressList,&items,w);
|
||||||
if (!items.getParam(0))
|
if (!items.getParam(0)) {
|
||||||
|
Client::self()->setSelect(s_fileProgressCont,s_pageEmpty,w);
|
||||||
Client::self()->setVisible(s_wndFileTransfer,false);
|
Client::self()->setVisible(s_wndFileTransfer,false);
|
||||||
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,39 +32,100 @@
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame_file_progress" >
|
<widget class="QStackedWidget" name="file_progress_container" >
|
||||||
<property name="sizePolicy" >
|
<property name="currentIndex" >
|
||||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
<number>0</number>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet" >
|
<widget class="QWidget" name="page_empty_list" >
|
||||||
<string>QFrame#frame_file_progress {
|
<layout class="QVBoxLayout" >
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_no_file_progress" >
|
||||||
|
<property name="styleSheet" >
|
||||||
|
<string>QLabel {
|
||||||
border: 1px solid #717fa0;
|
border: 1px solid #717fa0;
|
||||||
}
|
}
|
||||||
</string>
|
</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="_yate_uiwidget" stdset="0" >
|
<property name="text" >
|
||||||
<bool>true</bool>
|
<string>No transfer in progress</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="_yate_uiwidget_name" stdset="0" >
|
<property name="alignment" >
|
||||||
<string>fileprogresslist</string>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="_yate_uiwidget_class" stdset="0" >
|
</widget>
|
||||||
<string>ContactList</string>
|
</item>
|
||||||
</property>
|
</layout>
|
||||||
<property name="_yate_uiwidget_params" stdset="0" >
|
</widget>
|
||||||
<stringlist>
|
<widget class="QWidget" name="page_list" >
|
||||||
<string>property:_yate_flatlist=true</string>
|
<layout class="QVBoxLayout" >
|
||||||
<string>property:itemsExpandable=false</string>
|
<property name="spacing" >
|
||||||
<string>property:autoExpand=false</string>
|
<number>0</number>
|
||||||
<string>property:styleSheet=QTreeWidget {border-image: none;font-size: 11px;background:white;border: 0px solid #97acbc;border-radius:2px;}</string>
|
</property>
|
||||||
<string>property:_yate_itemui=contact:fileprogress_item.ui</string>
|
<property name="leftMargin" >
|
||||||
<string>property:_yate_itemstyle=contact:QWidget#${name}{background:white;}</string>
|
<number>0</number>
|
||||||
<string>property:_yate_itemselectedstyle=contact:QWidget#${name}{background:lightblue;}</string>
|
</property>
|
||||||
</stringlist>
|
<property name="topMargin" >
|
||||||
</property>
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_file_progress" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet" >
|
||||||
|
<string>QFrame#frame_file_progress {
|
||||||
|
border: 1px solid #717fa0;
|
||||||
|
}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="_yate_uiwidget" stdset="0" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="_yate_uiwidget_name" stdset="0" >
|
||||||
|
<string>fileprogresslist</string>
|
||||||
|
</property>
|
||||||
|
<property name="_yate_uiwidget_class" stdset="0" >
|
||||||
|
<string>ContactList</string>
|
||||||
|
</property>
|
||||||
|
<property name="_yate_uiwidget_params" stdset="0" >
|
||||||
|
<stringlist>
|
||||||
|
<string>property:_yate_flatlist=true</string>
|
||||||
|
<string>property:itemsExpandable=false</string>
|
||||||
|
<string>property:autoExpand=false</string>
|
||||||
|
<string>property:styleSheet=QTreeWidget {border-image: none;font-size: 11px;background:white;border: 0px solid #97acbc;border-radius:2px;}</string>
|
||||||
|
<string>property:_yate_itemui=contact:fileprogress_item.ui</string>
|
||||||
|
<string>property:_yate_itemstyle=contact:QWidget#${name}{background:white;}</string>
|
||||||
|
<string>property:_yate_itemselectedstyle=contact:QWidget#${name}{background:lightblue;}</string>
|
||||||
|
</stringlist>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
Loading…
Reference in New Issue