diff --git a/changelog.md b/changelog.md index 4e7542b..9a17858 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,7 @@ * Added an experimental photo viewer. Will show options for see the next and previous photo if the current post contains multiple images. * Improved chats, now they should be more stable. Also you will be able to send the message by pressing enter in the text box. If you are trying to send the same message multiple times, you will be warned. * Added video management (my videos, video albums and video search). For playing videos, you will be redirected to a website in your browser. +* Added a setting that allows you to specify if you want socializer to load images when you are opening posts. It could be useful for slow connection or those who don't want images to be loaded. ## Changes in build 2016.07.08 (08/07/2016) diff --git a/src/controller/configuration.py b/src/controller/configuration.py index 95ba7a1..b1d995a 100644 --- a/src/controller/configuration.py +++ b/src/controller/configuration.py @@ -13,10 +13,14 @@ class configuration(object): self.dialog.create_general() self.dialog.set_value("general", "wall_buffer_count", self.session.settings["buffers"]["count_for_wall_buffers"]) self.dialog.set_value("general", "audio_buffers_count", self.session.settings["buffers"]["count_for_audio_buffers"]) + self.dialog.set_value("general", "video_buffers_count", self.session.settings["buffers"]["count_for_video_buffers"]) + self.dialog.set_value("general", "load_images", self.session.settings["general"]["load_images"]) self.dialog.realize() self.response = self.dialog.get_response() def save_configuration(self): self.session.settings["buffers"]["count_for_audio_buffers"] = self.dialog.get_value("general", "wall_buffer_count") self.session.settings["buffers"]["count_for_audio_buffers"] = self.dialog.get_value("general", "audio_buffers_count") + self.session.settings["buffers"]["count_for_video_buffers"] = self.dialog.get_value("general", "video_buffers_count") + self.session.settings["general"]["load_images"] = self.dialog.get_value("general", "load_images") self.session.settings.write() diff --git a/src/controller/posts.py b/src/controller/posts.py index d5601ed..3da6624 100644 --- a/src/controller/posts.py +++ b/src/controller/posts.py @@ -174,7 +174,7 @@ class postController(object): self.dialog.insert_attachments(attachments) def check_image_load(self): - if self.load_images and len(self.images) > 0: + if self.load_images and len(self.images) > 0 and self.session.settings["general"]["load_images"]: self.dialog.image.Enable(True) nav = False # Disable navigation controls in photos if len(self.images) > 1: diff --git a/src/session.defaults b/src/session.defaults index e6e53fa..e352a4c 100644 --- a/src/session.defaults +++ b/src/session.defaults @@ -4,6 +4,7 @@ password = string(default="") token = string(default="") [general] reverse_timelines = boolean(default=False) +load_images = boolean(default=True) [buffers] count_for_audio_buffers = integer(default=100) diff --git a/src/wxUI/dialogs/configuration.py b/src/wxUI/dialogs/configuration.py index e820b2c..e723556 100644 --- a/src/wxUI/dialogs/configuration.py +++ b/src/wxUI/dialogs/configuration.py @@ -20,6 +20,15 @@ class general(wx.Panel, widgetUtils.BaseDialog): box2.Add(lbl2, 0, wx.ALL, 5) box2.Add(self.audio_buffers_count, 0, wx.ALL, 5) sizer.Add(box2, 0, wx.ALL, 5) + lbl3 = wx.StaticText(self, wx.NewId(), _(u"Number of items to load in video buffers (maximun 200)")) + self.video_buffers_count = wx.SpinCtrl(self, wx.NewId()) + self.video_buffers_count.SetRange(1, 200) + box3 = wx.BoxSizer(wx.HORIZONTAL) + box3.Add(lbl3, 0, wx.ALL, 5) + box3.Add(self.video_buffers_count, 0, wx.ALL, 5) + sizer.Add(box3, 0, wx.ALL, 5) + self.load_images = wx.CheckBox(self, wx.NewId(), _(u"Load images in posts")) + sizer.Add(self.load_images, 0, wx.ALL, 5) self.SetSizer(sizer) class configurationDialog(widgetUtils.BaseDialog):