set home folder as default folder for fchooser and set nice title on fchooser

This commit is contained in:
Nikos Kouremenos 2006-02-10 16:12:16 +00:00
parent 04c5d6bfae
commit 3d21947e2a
4 changed files with 11 additions and 8 deletions

View File

@ -65,6 +65,7 @@ else: # Unices
VCARDPATH = os.path.expanduser('~/.gajim/vcards')
AVATAR_PATH = os.path.expanduser('~/.gajim/avatars')
HOME_DIR = os.path.expanduser('~')
TMP = tempfile.gettempdir()
try:

View File

@ -914,8 +914,7 @@ class PreferencesWindow:
if last_sounds_dir and os.path.isdir('last_sounds_dir'):
dialog.set_current_folder(last_sounds_dir)
else:
home_dir = os.path.expanduser('~')
dialog.set_current_folder(home_dir)
dialog.set_current_folder(gajim.HOME_DIR)
filter = gtk.FileFilter()
filter.set_name(_('All files'))
@ -2176,8 +2175,7 @@ class ManageEmoticonsWindow:
if last_emoticons_dir and os.path.isdir('last_emoticons_dir'):
dialog.set_current_folder(last_emoticons_dir)
else:
home_dir = os.path.expanduser('~')
dialog.set_current_folder(home_dir)
dialog.set_current_folder(gajim.HOME_DIR)
filter = gtk.FileFilter()
filter.set_name(_('All files'))
filter.add_pattern('*')

View File

@ -257,8 +257,7 @@ _('Connection with peer cannot be established.'))
if last_send_dir and os.path.isdir(last_send_dir):
dialog.set_current_folder(last_send_dir)
else:
home_dir = os.path.expanduser('~')
dialog.set_current_folder(home_dir)
dialog.set_current_folder(gajim.HOME_DIR)
file_props = {}
while True:
response = dialog.run()
@ -351,8 +350,7 @@ _('Connection with peer cannot be established.'))
if last_save_dir and os.path.isdir(last_save_dir):
dialog.set_current_folder(last_save_dir)
else:
home_dir = os.path.expanduser('~')
dialog.set_current_folder(home_dir)
dialog.set_current_folder(gajim.HOME_DIR)
while True:
response = dialog.run()
if response == gtk.RESPONSE_OK:

View File

@ -28,6 +28,7 @@ import exceptions
import dialogs
from common.logger import LOG_DB_PATH, constants
from common import gajim
from common import i18n
_ = i18n._
gtk.glade.bindtextdomain(i18n.APP, i18n.DIR)
@ -350,7 +351,12 @@ class HistoryManager:
def on_export_menuitem_activate(self, widget):
xml = gtk.glade.XML('history_manager.glade', 'filechooserdialog', i18n.APP)
xml.signal_autoconnect(self)
dlg = xml.get_widget('filechooserdialog')
dlg.set_title(_('Exporting History Logs...'))
dlg.set_current_folder(gajim.HOME_DIR)
if gtk.pygtk_version > (2, 8, 0):
dlg.props.do_overwrite_confirmation = True
response = dlg.run()
if response == gtk.RESPONSE_OK: # user want us to export ;)