Browse Source

Added an option to hide tab name

Fixes #666
v0.5.8
Ramiro Saenz 8 years ago
parent
commit
af6df9a89d
  1. 4
      app/model/Service.js
  2. 4
      app/ux/WebView.js
  3. 20
      app/view/add/Add.js
  4. 4
      app/view/add/AddController.js

4
app/model/Service.js

@ -37,6 +37,10 @@ Ext.define('Rambox.model.Service', {
name: 'muted' name: 'muted'
,type: 'boolean' ,type: 'boolean'
,defaultValue: false ,defaultValue: false
},{
name: 'tabname'
,type: 'boolean'
,defaultValue: true
},{ },{
name: 'statusbar' name: 'statusbar'
,type: 'boolean' ,type: 'boolean'

4
app/ux/WebView.js

@ -38,7 +38,7 @@ Ext.define('Rambox.ux.WebView',{
Ext.apply(me, { Ext.apply(me, {
items: me.webViewConstructor() items: me.webViewConstructor()
,title: me.record.get('name') ,title: me.record.get('tabname') ? me.record.get('name') : ''
,icon: me.record.get('type') === 'custom' ? (me.record.get('logo') === '' ? 'resources/icons/custom.png' : me.record.get('logo')) : 'resources/icons/'+me.record.get('logo') ,icon: me.record.get('type') === 'custom' ? (me.record.get('logo') === '' ? 'resources/icons/custom.png' : me.record.get('logo')) : 'resources/icons/'+me.record.get('logo')
,src: me.record.get('url') ,src: me.record.get('url')
,type: me.record.get('type') ,type: me.record.get('type')
@ -173,7 +173,7 @@ Ext.define('Rambox.ux.WebView',{
} }
}]; }];
if ( Ext.getStore('ServicesList').getById(me.record.get('type')).get('allow_popups') ) cfg.autoEl.allowpopups = 'on'; if ( Ext.getStore('ServicesList').getById(me.record.get('type')).get('allow_popups') ) cfg[0].autoEl.allowpopups = 'on';
} }
return cfg; return cfg;

20
app/view/add/Add.js

@ -156,17 +156,25 @@ Ext.define('Rambox.view.add.Add',{
} }
,{ ,{
xtype: 'checkbox' xtype: 'checkbox'
,boxLabel: 'Show notifications' ,boxLabel: 'Mute all sounds'
,name: 'notifications' ,name: 'muted'
,checked: me.edit ? me.record.get('notifications') : true ,checked: me.edit ? me.record.get('muted') : false
,uncheckedValue: false ,uncheckedValue: false
,inputValue: true ,inputValue: true
} }
,{ ,{
xtype: 'checkbox' xtype: 'checkbox'
,boxLabel: 'Mute all sounds' ,boxLabel: 'Show service name in Tab'
,name: 'muted' ,name: 'tabname'
,checked: me.edit ? me.record.get('muted') : false ,checked: me.edit ? me.record.get('tabname') : true
,uncheckedValue: false
,inputValue: true
}
,{
xtype: 'checkbox'
,boxLabel: 'Show notifications'
,name: 'notifications'
,checked: me.edit ? me.record.get('notifications') : true
,uncheckedValue: false ,uncheckedValue: false
,inputValue: true ,inputValue: true
} }

4
app/view/add/AddController.js

@ -35,6 +35,7 @@ Ext.define('Rambox.view.add.AddController', {
,notifications: formValues.notifications ,notifications: formValues.notifications
,muted: formValues.muted ,muted: formValues.muted
,statusbar: formValues.statusbar ,statusbar: formValues.statusbar
,tabname: formValues.tabname
,displayTabUnreadCounter: formValues.displayTabUnreadCounter ,displayTabUnreadCounter: formValues.displayTabUnreadCounter
,includeInGlobalUnreadCounter: formValues.includeInGlobalUnreadCounter ,includeInGlobalUnreadCounter: formValues.includeInGlobalUnreadCounter
,trust: formValues.trust ,trust: formValues.trust
@ -44,7 +45,7 @@ Ext.define('Rambox.view.add.AddController', {
var view = Ext.getCmp('tab_'+win.record.get('id')); var view = Ext.getCmp('tab_'+win.record.get('id'));
// Change the title of the Tab // Change the title of the Tab
view.setTitle(formValues.serviceName); view.setTitle( formValues.tabname ? formValues.serviceName : '' );
// Change sound of the Tab // Change sound of the Tab
view.setAudioMuted(formValues.muted); view.setAudioMuted(formValues.muted);
// Change statusbar of the Tab // Change statusbar of the Tab
@ -88,6 +89,7 @@ Ext.define('Rambox.view.add.AddController', {
,align: formValues.align ,align: formValues.align
,notifications: formValues.notifications ,notifications: formValues.notifications
,muted: formValues.muted ,muted: formValues.muted
,tabname: formValues.tabname
,statusbar: formValues.statusbar ,statusbar: formValues.statusbar
,displayTabUnreadCounter: formValues.displayTabUnreadCounter ,displayTabUnreadCounter: formValues.displayTabUnreadCounter
,includeInGlobalUnreadCounter: formValues.includeInGlobalUnreadCounter ,includeInGlobalUnreadCounter: formValues.includeInGlobalUnreadCounter

Loading…
Cancel
Save