Posted event codes and task bar icons

This commit is contained in:
Manuel Cortez 2018-03-14 13:34:56 -06:00
parent b1c5ddbca8
commit 010c0011aa
4 changed files with 9 additions and 7 deletions

View File

@ -610,7 +610,7 @@ class baseBufferController(bufferController):
# fix this: # fix this:
original_date = arrow.get(self.session.db[self.name][self.buffer.list.get_selected()]["created_at"], "ddd MMM D H:m:s Z YYYY", locale="en") original_date = arrow.get(self.session.db[self.name][self.buffer.list.get_selected()]["created_at"], "ddd MMM D H:m:s Z YYYY", locale="en")
ts = original_date.humanize(locale=languageHandler.getLanguage()) ts = original_date.humanize(locale=languageHandler.getLanguage())
self.buffer.list.list.SetStringItem(self.buffer.list.get_selected(), 2, ts) self.buffer.list.list.SetItem(self.buffer.list.get_selected(), 2, ts)
if self.session.settings['sound']['indicate_audio'] and utils.is_audio(tweet): if self.session.settings['sound']['indicate_audio'] and utils.is_audio(tweet):
self.session.sound.play("audio.ogg") self.session.sound.play("audio.ogg")
if self.session.settings['sound']['indicate_geo'] and utils.is_geocoded(tweet): if self.session.settings['sound']['indicate_geo'] and utils.is_geocoded(tweet):

View File

@ -37,9 +37,9 @@ class list(object):
if self.system == "Windows": if self.system == "Windows":
if reversed == False: items = self.list.GetItemCount() if reversed == False: items = self.list.GetItemCount()
else: items = 0 else: items = 0
self.list.InsertStringItem(items, item[0]) self.list.InsertItem(items, str(item[0]))
for i in xrange(1, len(self.columns)): for i in range(1, len(self.columns)):
self.list.SetStringItem(items, i, item[i]) self.list.SetItem(items, i, str(item[i]))
else: else:
self.list.Append(" ".join(item)) self.list.Append(" ".join(item))

View File

@ -1,4 +1,5 @@
import wx import wx
import wx.adv
import paths import paths
import languageHandler import languageHandler
import sys import sys
@ -52,8 +53,8 @@ NOTEBOOK_PAGE_CHANGED = wx.EVT_TREEBOOK_PAGE_CHANGED
RADIOBUTTON = wx.EVT_RADIOBUTTON RADIOBUTTON = wx.EVT_RADIOBUTTON
# Taskbar mouse clicks. # Taskbar mouse clicks.
TASKBAR_RIGHT_CLICK = wx.EVT_TASKBAR_RIGHT_DOWN TASKBAR_RIGHT_CLICK = wx.adv.EVT_TASKBAR_RIGHT_DOWN
TASKBAR_LEFT_CLICK = wx.EVT_TASKBAR_LEFT_DOWN TASKBAR_LEFT_CLICK = wx.adv.EVT_TASKBAR_LEFT_DOWN
def exit_application(): def exit_application():
""" Closes the current window cleanly. """ """ Closes the current window cleanly. """

View File

@ -19,11 +19,12 @@
############################################################ ############################################################
import wx import wx
import wx.adv
import application import application
import paths import paths
import os import os
class SysTrayIcon(wx.TaskBarIcon): class SysTrayIcon(wx.adv.TaskBarIcon):
def __init__(self): def __init__(self):
super(SysTrayIcon, self).__init__() super(SysTrayIcon, self).__init__()