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_inviteContacts = "invite_contacts"; // List of contacts in muc invite
|
||||
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
|
||||
static const String s_actionShowCallsList = "showCallsList";
|
||||
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));
|
||||
p.addParam(np);
|
||||
bool ok = Client::self()->updateTableRows(s_fileProgressList,&p,false,w);
|
||||
if (ok)
|
||||
Client::self()->setSelect(s_fileProgressCont,s_pageList,w);
|
||||
np->takeData();
|
||||
if (setVisible)
|
||||
Client::self()->setVisible(s_wndFileTransfer,true);
|
||||
|
@ -2912,8 +2917,10 @@ static bool dropFileTransferItem(const String& id)
|
|||
// Close window if empty
|
||||
NamedList items("");
|
||||
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);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,39 +32,100 @@
|
|||
<number>6</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>
|
||||
<widget class="QStackedWidget" name="file_progress_container" >
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="styleSheet" >
|
||||
<string>QFrame#frame_file_progress {
|
||||
<widget class="QWidget" name="page_empty_list" >
|
||||
<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;
|
||||
}
|
||||
</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>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>No transfer in progress</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_list" >
|
||||
<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="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>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
Loading…
Reference in New Issue