changeset 351105e31243 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=351105e31243
description: use shutil.move instead of os.rename to move files. Fixes #6770
diffstat:
src/common/check_paths.py | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diffs (56 lines):
diff -r 375d3d2a65dc -r 351105e31243 src/common/check_paths.py
--- a/src/common/check_paths.py Sat Mar 05 09:40:01 2011 +0100
+++ b/src/common/check_paths.py Sun Jan 23 11:31:29 2011 +0100
@@ -24,6 +24,7 @@
##
import os
+import shutil
import sys
import stat
@@ -248,13 +249,11 @@
if not os.path.exists(src):
continue
print 'moving %s to %s' % (src, dst)
- os.renames(src, dst)
+ shutil.move(src, dst)
gajim.logger.init_vars()
gajim.logger.attach_cache_database()
def check_and_possibly_create_paths():
- check_and_possibly_move_config()
-
LOG_DB_PATH = logger.LOG_DB_PATH
LOG_DB_FOLDER, LOG_DB_FILE = os.path.split(LOG_DB_PATH)
@@ -310,6 +309,15 @@
print _('Gajim will now exit')
sys.exit()
+ if not os.path.exists(CACHE_DB_FOLDER):
+ create_path(CACHE_DB_FOLDER)
+ elif os.path.isfile(CACHE_DB_FOLDER):
+ print _('%s is a file but it should be a directory') % CACHE_DB_FOLDER
+ print _('Gajim will now exit')
+ sys.exit()
+
+ check_and_possibly_move_config()
+
if not os.path.exists(LOG_DB_PATH):
create_log_db()
gajim.logger.init_vars()
@@ -318,13 +326,6 @@
print _('Gajim will now exit')
sys.exit()
- if not os.path.exists(CACHE_DB_FOLDER):
- create_path(CACHE_DB_FOLDER)
- elif os.path.isfile(CACHE_DB_FOLDER):
- print _('%s is a file but it should be a directory') % CACHE_DB_FOLDER
- print _('Gajim will now exit')
- sys.exit()
-
if not os.path.exists(CACHE_DB_PATH):
create_cache_db()
gajim.logger.attach_cache_database()
changeset 7dafaee10ac0 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=7dafaee10ac0
description: don't scroll in groupchat when window doesn't have focus. Fixes #6100
diffstat:
src/conversation_textview.py | 8 +++++---
src/groupchat_control.py | 3 ++-
2 files changed, 7 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r f8e3bf91879e -r 7dafaee10ac0 src/conversation_textview.py
--- a/src/conversation_textview.py Tue Nov 30 23:36:57 2010 +0100
+++ b/src/conversation_textview.py Fri Dec 17 12:09:56 2010 +0100
@@ -522,7 +522,7 @@
del self.xep0184_marks[id_]
del self.xep0184_shown[id_]
- def show_focus_out_line(self):
+ def show_focus_out_line(self, scroll=True):
if not self.allow_focus_out_line:
# if room did not receive focus-in from the last time we added
# --- line then do not readd
@@ -581,8 +581,10 @@
buffer_.end_user_action()
- # scroll to the end (via idle in case the scrollbar has appeared)
- gobject.idle_add(self.scroll_to_end)
+ if scroll:
+ # scroll to the end (via idle in case the scrollbar has
+ # appeared)
+ gobject.idle_add(self.scroll_to_end)
def show_xep0184_warning_tooltip(self):
pointer = self.tv.get_pointer()
diff -r f8e3bf91879e -r 7dafaee10ac0 src/groupchat_control.py
--- a/src/groupchat_control.py Tue Nov 30 23:36:57 2010 +0100
+++ b/src/groupchat_control.py Fri Dec 17 12:09:56 2010 +0100
@@ -1041,7 +1041,8 @@
# we have full focus (we are reading it!)
return
- self.conv_textview.show_focus_out_line()
+ at_the_end = self.conv_textview.at_the_end()
+ self.conv_textview.show_focus_out_line(scroll=at_the_end)
def needs_visual_notification(self, text):
"""