self.create_status_label.setMinimumHeight(font_metrics.height()+2*(font_metrics.height()+font_metrics.leading()))# reserve space for 3 lines
self.create_status_label.setMinimumHeight(font_metrics.height()+2*(font_metrics.height()+font_metrics.leading()))# reserve space for 3 lines
font_metrics=self.email_note_label.fontMetrics()
self.email_note_label.setMinimumWidth(font_metrics.width(u'The E-mail address is used when sending voicemail'))# hack to make text justification look nice everywhere
self.email_note_label.setMinimumWidth(font_metrics.width(u'The E-mail address is used when sending voicemail'))# hack to make text justification look nice everywhere
self.username_editor.regexp=re.compile('^\w(?<=[^0_])[\w.-]{4,31}(?<=[^_.-])$',re.IGNORECASE)# in order to enable unicode characters add re.UNICODE to flags
self.username_editor.regexp=re.compile('^\w(?<=[^0_])[\w.-]{4,31}(?<=[^_.-])$',re.IGNORECASE)# in order to enable unicode characters add re.UNICODE to flags
self.show()# without this, showFullScreen below doesn't work properly
self.show()# without this, showFullScreen below doesn't work properly
self.detach_button.active=False
self.mute_button.active=True
self.hold_button.active=True
self.close_button.active=True
self.showFullScreen()
self.fullscreen_button.hide()# it seems the leave event after the button is pressed doesn't register and starting the idle timer here doesn't work well either -Dan
self.fullscreen_button.hide()# it seems the leave event after the button is pressed doesn't register and starting the idle timer here doesn't work well either -Dan
self.fullscreen_button.show()
else:
ifnotself.detach_button.isChecked():
self.setGeometry(self.geometryHint(self.parent_widget))# force a geometry change before reparenting, else we will get a change from (-1, -1) to the parent geometry hint
self.setParent(self.parent_widget)# this is probably because since it unmaps when it's reparented, the geometry change won't appear from fullscreen
self.setGeometry(self.geometryHint())# to the new size, since we changed the geometry after returning from fullscreen, while invisible
self.setGeometry(self.geometryHint(self.parent_widget))# force a geometry change before re-parenting, else we will get a change from (-1, -1) to the parent geometry hint
self.setParent(self.parent_widget)# this is probably because since it unmaps when it's re-parented, the geometry change won't appear from fullscreen
self.setGeometry(self.geometryHint())# to the new size, since we changed the geometry after returning from fullscreen, while invisible
self.mute_button.active=False
self.hold_button.active=False
self.close_button.active=False
...
...
@@ -1335,7 +1337,7 @@ class VideoWidget(VideoSurface, ui_class):
self.detach_button.hide()# it seems the leave event after the button is pressed doesn't register and starting the idle timer here doesn't work well either -Dan
self.detach_button.hide()# it seems the leave event after the button is pressed doesn't register and starting the idle timer here doesn't work well either -Dan
self.detach_button.show()
self.mute_button.active=True
self.hold_button.active=True
...
...
@@ -1431,6 +1433,7 @@ class NoSessionsLabel(QLabel):
self._update_widgets_for_session()# clean this up -Dan (too many functions called in 3 different places: on selection changed, here and on notifications handlers)
self._update_widgets_for_session()# clean this up -Dan (too many functions called in 3 different places: on selection changed, here and on notifications handlers)
# choose another one to select (a chat only or ended session if available, else one with audio but keep audio on hold? or select nothing and display the dummy tab?)
self.tab_widget.setCurrentWidget(self.selected_session.chat_widget)# why do we switch the tab here, but do everything else in the selected_session property setter? -Dan
session_manager.create_session(contact,contact_uri,[StreamDescription('audio')],account=account)# TODO: memorize media type and use it? -Saul (not sure about history in/out -Dan)
session_manager.create_session(contact,contact_uri,[StreamDescription('audio')],account=account)# TODO: memorize media type and use it? -Saul (not sure about history in/out -Dan)
def_AH_SystemTrayShowWindow(self,checked):
self.show()
...
...
@@ -585,7 +587,7 @@ class MainWindow(base_class, ui_class):
self.audio_output_device_button.setItemData(1,Separator)# prevent the separator from being selected (must have different itemData than the None device)
self.audio_output_device_button.setItemData(1,Separator)# prevent the separator from being selected (must have different itemData than the None device)
@@ -2347,7 +2349,7 @@ class AudioSessionModel(QAbstractListModel):
self.sessions.insert(1,source)
self.endMoveRows()
conference=ClientConference()
target.client_conference=conference# must add them to the conference in the same order they are in the list (target is first, source is last)
target.client_conference=conference# must add them to the conference in the same order they are in the list (target is first, source is last)
source.client_conference=conference
session_list.scrollToTop()
forsessioninsource.client_conference.sessions:
...
...
@@ -2364,12 +2366,12 @@ class AudioSessionModel(QAbstractListModel):
iflen(dragged.client_conference.sessions)==2:
dragged.client_conference=None
sibling.client_conference=None
## eventually only move past the last conference to minimize movement. see how this feels during usage. (or sort them alphabetically with conferences at the top) -Dan
#for position, session in enumerate(self.sessions):
# # maybe only move past the last conference to minimize movement. see how this feels during usage. (or sort them alphabetically with conferences at the top) -Dan
#for position, session in enumerate(self.sessions):
# if session not in (dragged, sibling) and session.client_conference is None:
# move_point = position
# break
#else:
#else:
# move_point = len(self.sessions)
move_point=len(self.sessions)
dragged_row=self.sessions.index(dragged)
...
...
@@ -2462,7 +2464,7 @@ class AudioSessionModel(QAbstractListModel):
@@ -2474,7 +2476,7 @@ class AudioSessionModel(QAbstractListModel):
self.endInsertRows()
session_list.openPersistentEditor(self.index(1))
conference=ClientConference()
sibling.client_conference=conference# must add them to the conference in the same order they are in the list (sibling first, new session last)
sibling.client_conference=conference# must add them to the conference in the same order they are in the list (sibling first, new session last)
session.client_conference=conference
ifsibling.active:
conference.unhold()
...
...
@@ -2747,7 +2749,7 @@ class AudioSessionListView(QListView):
else:
self.setCurrentIndex(self.model().index(-1))
self.context_menu.hide()
#print "-- audio selection changed %s -> %s (ignore=%s)" % ([x.row() for x in deselected.indexes()], [x.row() for x in selected.indexes()], self.ignore_selection_changes)
#print "-- audio selection changed %s -> %s (ignore=%s)" % ([x.row() for x in deselected.indexes()], [x.row() for x in selected.indexes()], self.ignore_selection_changes)
ifself.ignore_selection_changes:
return
notification_center=NotificationCenter()
...
...
@@ -2911,14 +2913,14 @@ class AudioSessionListView(QListView):
ifnotification.data.active_sessionisNone:
selection=selection_model.selection()
# check the code in this if branch if it's needed -Dan
#selected_blink_session = selection[0].topLeft().data(Qt.UserRole).blink_session if selection else None
#if notification.data.previous_active_session is selected_blink_session:
#selected_blink_session = selection[0].topLeft().data(Qt.UserRole).blink_session if selection else None
#if notification.data.previous_active_session is selected_blink_session:
# print "-- audio session list updating selection to None None"
@@ -2983,9 +2985,9 @@ class ChatSessionWidget(base_class, ui_class):
self.palettes.standard=self.palette()
self.palettes.alternate=self.palette()
self.palettes.selected=self.palette()
self.palettes.standard.setColor(QPalette.Window,self.palettes.standard.color(QPalette.Base))# We modify the palettes because only the Oxygen theme honors the BackgroundRole if set
self.palettes.alternate.setColor(QPalette.Window,self.palettes.standard.color(QPalette.AlternateBase))# AlternateBase set to #f0f4ff or #e0e9ff by designer
self.palettes.standard.setColor(QPalette.Window,self.palettes.standard.color(QPalette.Base))# We modify the palettes because only the Oxygen theme honors the BackgroundRole if set
self.palettes.alternate.setColor(QPalette.Window,self.palettes.standard.color(QPalette.AlternateBase))# AlternateBase set to #f0f4ff or #e0e9ff by designer
@@ -4221,9 +4232,9 @@ class FileTransferItemWidget(base_class, ui_class):
self.palettes.standard=self.palette()
self.palettes.alternate=self.palette()
self.palettes.selected=self.palette()
self.palettes.standard.setColor(QPalette.Window,self.palettes.standard.color(QPalette.Base))# We modify the palettes because only the Oxygen theme honors the BackgroundRole if set
self.palettes.alternate.setColor(QPalette.Window,self.palettes.standard.color(QPalette.AlternateBase))# AlternateBase set to #f0f4ff or #e0e9ff by designer
self.palettes.standard.setColor(QPalette.Window,self.palettes.standard.color(QPalette.Base))# We modify the palettes because only the Oxygen theme honors the BackgroundRole if set
self.palettes.alternate.setColor(QPalette.Window,self.palettes.standard.color(QPalette.AlternateBase))# AlternateBase set to #f0f4ff or #e0e9ff by designer
@@ -140,7 +141,7 @@ class GraphWidget(QWidget, ColorHelperMixin):
option=QStyleOption()
option.initFrom(self)
contents_rect=self.style().subElementRect(QStyle.SE_FrameContents,option,self)orself.contentsRect()# the SE_FrameContents rect is Null unless the stylesheet defines decorations
contents_rect=self.style().subElementRect(QStyle.SE_FrameContents,option,self)orself.contentsRect()# the SE_FrameContents rect is Null unless the stylesheet defines decorations