Merge branch 'next-gen' of https://github.com/manuelcortez/TWBlue into next-gen

This commit is contained in:
Manuel Cortez 2015-05-03 14:17:10 -05:00
commit 5b6cae0a61
3 changed files with 10 additions and 21 deletions

View File

@ -148,12 +148,6 @@ class Controller(object):
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.delete, self.view.delete) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.delete, self.view.delete)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.follow, menuitem=self.view.follow) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.follow, menuitem=self.view.follow)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.send_dm, self.view.dm) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.send_dm, self.view.dm)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.unfollow, menuitem=self.view.unfollow)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.mute, menuitem=self.view.mute)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.unmute, menuitem=self.view.unmute)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.report, menuitem=self.view.report)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.block, menuitem=self.view.block)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.unblock, menuitem=self.view.unblock)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.get_more_items, menuitem=self.view.load_previous_items) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.get_more_items, menuitem=self.view.load_previous_items)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.clear_buffer, menuitem=self.view.clear) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.clear_buffer, menuitem=self.view.clear)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.remove_buffer, self.view.deleteTl) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.remove_buffer, self.view.deleteTl)
@ -165,7 +159,7 @@ class Controller(object):
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.user_details, menuitem=self.view.details) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.user_details, menuitem=self.view.details)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.toggle_autoread, menuitem=self.view.autoread) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.toggle_autoread, menuitem=self.view.autoread)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.toggle_buffer_mute, self.view.mute_buffer) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.toggle_buffer_mute, self.view.mute_buffer)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.open_timeline, self.view.timeline) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.new_buffer, self.view.newbuffer)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.open_favs_timeline, self.view.favs) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.open_favs_timeline, self.view.favs)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.open_conversation, menuitem=self.view.view_conversation) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.open_conversation, menuitem=self.view.view_conversation)
if widgetUtils.toolkit == "wx": if widgetUtils.toolkit == "wx":
@ -1269,3 +1263,7 @@ class Controller(object):
def __del__(self): def __del__(self):
config.app.write() config.app.write()
def new_buffer(self,*args,**kwargs):
#This is a placeholder for the unified new buffer dialog, for now just call self.open_timeline.
return self.open_timeline(*args,**kwargs)

View File

@ -81,13 +81,13 @@ class mainFrame(Gtk.Window):
# buffer menu # buffer menu
buffer = Gtk.Menu() buffer = Gtk.Menu()
self.timeline = Gtk.MenuItem(label="New buffer...") self.newbuffer = Gtk.MenuItem(label="New buffer...")
self.load_previous_items = Gtk.MenuItem(label="Load previous items") self.load_previous_items = Gtk.MenuItem(label="Load previous items")
self.mute_buffer = Gtk.MenuItem(label="Mute") self.mute_buffer = Gtk.MenuItem(label="Mute")
self.autoread = Gtk.MenuItem(label="Autoread") self.autoread = Gtk.MenuItem(label="Autoread")
self.clear = Gtk.MenuItem(label="Clear buffer") self.clear = Gtk.MenuItem(label="Clear buffer")
self.deleteTl = Gtk.MenuItem(label="Destroy") self.deleteTl = Gtk.MenuItem(label="Destroy")
self.append_to_menu(buffer, self.timeline, self.load_previous_items, self.mute_buffer, self.autoread, self.clear, self.deleteTl) self.append_to_menu(buffer, self.newbuffer, self.load_previous_items, self.mute_buffer, self.autoread, self.clear, self.deleteTl)
buffer_menu = Gtk.MenuItem(label="Buffer") buffer_menu = Gtk.MenuItem(label="Buffer")
buffer_menu.set_submenu(buffer) buffer_menu.set_submenu(buffer)
menuBar.append(buffer_menu) menuBar.append(buffer_menu)

View File

@ -37,13 +37,7 @@ class mainFrame(wx.Frame):
# User menu # User menu
user = wx.Menu() user = wx.Menu()
self.follow = user.Append(wx.NewId(), _(u"&Follow")) self.follow = user.Append(wx.NewId(), _(u"&Actions..."))
self.unfollow = user.Append(wx.NewId(), _(u"&Unfollow"))
self.mute = user.Append(wx.NewId(), _(u"&Mute"))
self.unmute = user.Append(wx.NewId(), _(u"U&nmute"))
self.report = user.Append(wx.NewId(), _(u"&Report as spam"))
self.block = user.Append(wx.NewId(), _(u"&Block"))
self.unblock = user.Append(wx.NewId(), _(u"Unb&lock"))
self.dm = user.Append(wx.NewId(), _(u"Direct me&ssage")) self.dm = user.Append(wx.NewId(), _(u"Direct me&ssage"))
self.addToList = user.Append(wx.NewId(), _(u"&Add to list")) self.addToList = user.Append(wx.NewId(), _(u"&Add to list"))
self.addToList.Enable(False) self.addToList.Enable(False)
@ -56,7 +50,7 @@ class mainFrame(wx.Frame):
# buffer menu # buffer menu
buffer = wx.Menu() buffer = wx.Menu()
self.timeline = buffer.Append(wx.NewId(), _(u"&New buffer...")) self.newbuffer = buffer.Append(wx.NewId(), _(u"&New buffer..."))
self.load_previous_items = buffer.Append(wx.NewId(), _(u"&Load previous items")) self.load_previous_items = buffer.Append(wx.NewId(), _(u"&Load previous items"))
buffer.AppendSeparator() buffer.AppendSeparator()
self.mute_buffer = buffer.AppendCheckItem(wx.NewId(), _(u"&Mute")) self.mute_buffer = buffer.AppendCheckItem(wx.NewId(), _(u"&Mute"))
@ -94,10 +88,7 @@ class mainFrame(wx.Frame):
(wx.ACCEL_CTRL, ord('Q'), self.close.GetId()), (wx.ACCEL_CTRL, ord('Q'), self.close.GetId()),
(wx.ACCEL_CTRL, ord('S'), self.follow.GetId()), (wx.ACCEL_CTRL, ord('S'), self.follow.GetId()),
(wx.ACCEL_CTRL|wx.ACCEL_SHIFT, ord('S'), self.unfollow.GetId()), (wx.ACCEL_CTRL, ord('I'), self.newbuffer.GetId()),
(wx.ACCEL_CTRL, ord('K'), self.block.GetId()),
(wx.ACCEL_CTRL|wx.ACCEL_SHIFT, ord('K'), self.report.GetId()),
(wx.ACCEL_CTRL, ord('I'), self.timeline.GetId()),
(wx.ACCEL_CTRL|wx.ACCEL_SHIFT, ord('I'), self.deleteTl.GetId()), (wx.ACCEL_CTRL|wx.ACCEL_SHIFT, ord('I'), self.deleteTl.GetId()),
(wx.ACCEL_CTRL, ord('M'), self.show_hide.GetId()), (wx.ACCEL_CTRL, ord('M'), self.show_hide.GetId()),
(wx.ACCEL_CTRL, ord('P'), self.updateProfile.GetId()), (wx.ACCEL_CTRL, ord('P'), self.updateProfile.GetId()),