Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from LuqueDaniel/1.1
Browse files Browse the repository at this point in the history
Minecraft Backup Manager 1.1 release
  • Loading branch information
LuqueDaniel committed Jan 30, 2013
2 parents fc36f3e + 7e461f2 commit 9f5ed6f
Show file tree
Hide file tree
Showing 11 changed files with 178 additions and 151 deletions.
11 changes: 10 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@
Minecraft Backup Manager - Changelog
====================================================================

- **Minecraft Backup Manager 1.1 (Stone)** - (01/30/2013)
- Rewrited New backup window for using layouts.
- Rewrited Configuration window for using layouts.
- Now "About Minecraft Backup Manager" window using QLabel.
- Removed menu bar.
- Added website url in "About Minecraft Backup Manager"
- Added button "About".
- Performance improvements.
- New header image.
- **Minecraft Backup Manager 1.0 (Dirt)** - (11/06/2012)
- First version of Minecraft Backup Manager
- First version of Minecraft Backup Manager.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ Minecraft Backup Manager
Minecraft Backup Manager is an application for managing Minecraft
backups quickly and easily.

Licensed under: GPLv3
Version: **1.1-dev** <br />
Licensed under: **GPLv3**

Download packages
--------------------------------------------------------------------
**[Download packages and executables](http://luquedaniel.github.com/Minecraft_backup/)**

Dependencies
--------------------------------------------------------------------
- **[PyQt 4](http://www.riverbankcomputing.co.uk/software/pyqt/download)**

Changelog
--------------------------------------------------------------------
See Changelog.md for more information
See **[Changelog.md](https://github.com/LuqueDaniel/Minecraft_backup/blob/master/Changelog.md)** for more information

How compile for Windows
--------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Windows/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


information = {'script': 'minecraft-backup.py',
'Version': '1.0',
'Version': '1.1',
'copyright': 'GPL3',
'name': 'Minecraft Backup Manager',
'dest_base': 'Minecraft Backup Manager',
Expand Down
9 changes: 5 additions & 4 deletions minecraft_backup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
__prj__ = 'Minecraft Backup Manager'
__author__ = 'Daniel Luque'
__mail__ = 'danielluque14@gmail.com'
__source__ = 'http://github.com/LuqueDaniel/Minecraft_backup.git'
__version__ = '1.0'
__version_name__ = 'Dirt'
__license__ = 'GPL3'
__url__ = 'http://luquedaniel.github.com/Minecraft_backup'
__source__ = 'http://github.com/LuqueDaniel/Minecraft_backup'
__version__ = '1.1'
__version_name__ = 'Stone'
__license__ = 'GPL v3'
__docu__ = """Minecraft Backup Manager is an application for managing Minecraft
backups quickly and easily."""

Expand Down
15 changes: 11 additions & 4 deletions minecraft_backup/core/backup_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,17 @@ def make_backup(self, dst, backup_name):

mkdir(dst)

copy_backup_files(GAME_PATH, dst)

self.save_backup_list(backup_name, dst)
self.emit(SIGNAL('makeend()'))
try:
self.make_backup_continue = True
copy_backup_files(GAME_PATH, dst)
except IOError:
self.make_backup_continue = False
self.emit(SIGNAL('IOdenied()'))
rmtree(dst)

if self.make_backup_continue is True:
self.save_backup_list(backup_name, dst)
self.emit(SIGNAL('makeend()'))

def save_backup_list(self, backup_name, path):
"""This function create and save backup list"""
Expand Down
62 changes: 25 additions & 37 deletions minecraft_backup/gui/dialogs/about_minebackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,53 +38,41 @@ class about_minebackup(QDialog):

def __init__(self, parent=None):
QDialog.__init__(self, parent)

self.setWindowTitle('About Minecraft Backup')
self.setMaximumSize(QSize(0, 0))

vbox = QVBoxLayout(self)

#Header
self.header = QLabel()
self.header.setPixmap(QPixmap(IMAGES['minebackup_icon_128']))

hbox = QHBoxLayout()
hbox.addWidget(self.header)

#title_label
self.label_title = QLabel('<h1>Minecraft Backup Manager</h1>', self)
self.label_title.setAlignment(Qt.AlignRight)
self.label_title.setTextFormat(Qt.RichText)

hbox.addWidget(self.label_title)
vbox.addLayout(hbox)

#label_description
self.label_description = QLabel(
"""Minecraft Backup Manager is an application for managing Minecraft
backups quickly and easily.""")

vbox.addWidget(self.label_description)

#label_version
self.label_version = QLabel('Version: %s (%s)' % (
#LAYOUTS
#Horizontal Layout
self.hbox = QHBoxLayout()
self.hbox.addWidget(self.header)
self.hbox.addWidget(self.label_title)

#Vertical Layout
self.vbox = QVBoxLayout(self)
self.vbox.addLayout(self.hbox)
#Label Docu
self.vbox.addWidget(QLabel(minecraft_backup.__docu__))
#Label version
self.vbox.addWidget(QLabel('Version: %s (%s)' % (
minecraft_backup.__version__,
minecraft_backup.__version_name__))

vbox.addWidget(self.label_version)

self.label_author = QLabel('Author: %s' % minecraft_backup.__author__)

vbox.addWidget(self.label_author)

#label_license
self.label_license = QLabel('License: %s' % (
minecraft_backup.__license__))

vbox.addWidget(self.label_license)

#label_source
self.label_source = QLabel('Source: <a href="%s">%s</a>' % (
minecraft_backup.__source__, minecraft_backup.__source__))

vbox.addWidget(self.label_source)
minecraft_backup.__version_name__)))
#Label Author
self.vbox.addWidget(QLabel('Author: %s' % minecraft_backup.__author__))
#Label License
self.vbox.addWidget(QLabel('License: %s' % (
minecraft_backup.__license__)))
#Label Website Url
self.vbox.addWidget(QLabel('Website: <a href="%s">%s</a>' % (
minecraft_backup.__url__, minecraft_backup.__url__)))
#Label Source
self.vbox.addWidget(QLabel('Source: <a href="%s">%s</a>' % (
minecraft_backup.__source__, minecraft_backup.__source__)))
48 changes: 26 additions & 22 deletions minecraft_backup/gui/dialogs/config_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# Minecraft Backu Manager
from minecraft_backup.core.configuration import load_config
from minecraft_backup.core.configuration import save_new_config
from minecraft_backup.gui.center_widget import center_widget

# PyQt4.QtGui
from PyQt4.QtGui import QDialog
Expand All @@ -30,54 +29,59 @@
from PyQt4.QtGui import QPushButton
from PyQt4.QtGui import QFileDialog
from PyQt4.QtGui import QDialogButtonBox
from PyQt4.QtGui import QVBoxLayout
from PyQt4.QtGui import QHBoxLayout

# PyQt4.QtCore
from PyQt4.QtCore import SIGNAL
from PyQt4.QtCore import QRect
from PyQt4.QtCore import QSize


class config_window(QDialog):

def __init__(self, parent=None):
QDialog.__init__(self, parent)
self.setGeometry(0, 0, 500, 400)
self.setMaximumSize(500, 400)
self.setMinimumSize(500, 400)
self.setMaximumSize(QSize(0, 0))
self.setMinimumSize(500, 0)
self.setWindowTitle('Minecraft Backup Manager - Configuration')
center_widget(self)

# STANNDARD BUTTONS
#STANNDARD BUTTONS
self.button_box = QDialogButtonBox(self)
self.button_box.setGeometry(QRect(150, 360, 341, 32))
self.button_box.setStandardButtons(QDialogButtonBox.Cancel |
QDialogButtonBox.Save)

# LABELS
self.label_save_folder = self.generate_label('Save Folder', 15, 20)

# input_save_folder
#input_save_folder
self.input_save_folder = QLineEdit(self)
self.input_save_folder.setGeometry(QRect(100, 17, 290, 25))
self.input_save_folder.setText(load_config('save_backup_folder'))
self.input_save_folder.setToolTip('Default folder save backup')

# change_save_folder
#change_save_folder
self.btn_save_folder = QPushButton('Change', self)
self.btn_save_folder.move(400, 16)

# CONNECT SIGNALS
#LAYOUTS
#Save Folder Layout
self.layout_save_folder = QHBoxLayout()
self.layout_save_folder.addWidget(QLabel('Save folder:', self))
self.layout_save_folder.addWidget(self.input_save_folder)
self.layout_save_folder.addWidget(self.btn_save_folder)

#Button Box Layout
self.layout_button_box = QHBoxLayout()
self.layout_button_box.setContentsMargins(0, 25, 0, 0)
self.layout_button_box.addWidget(self.button_box)

#Vertical Container Layout
self.Vcontainer = QVBoxLayout(self)
self.Vcontainer.addLayout(self.layout_save_folder)
self.Vcontainer.addLayout(self.layout_button_box)

#CONNECT SIGNALS
self.connect(self.btn_save_folder, SIGNAL('clicked()'),
self.change_save_folder)
self.connect(self.button_box, SIGNAL('accepted()'),
self.save_configurations)
self.connect(self.button_box, SIGNAL('rejected()'), self.close)

def generate_label(self, text, h, v):
self.label = QLabel(self)
self.label.setText(text)
self.label.adjustSize()
self.label.move(h, v)

def change_save_folder(self):
self.file_dialog = QFileDialog.getExistingDirectory(self,
'Change Default folder save backup',
Expand Down
81 changes: 49 additions & 32 deletions minecraft_backup/gui/dialogs/new_backup_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
# Minecraft Backup Manager
from minecraft_backup.core.configuration import load_config
from minecraft_backup.core.backup_manager import make_backup_thread
from minecraft_backup.gui.center_widget import center_widget
from minecraft_backup.gui.msg_box import msg_no_backup_name
from minecraft_backup.gui.msg_box import msg_name_exists
from minecraft_backup.gui.msg_box import msg_dir_exists
from minecraft_backup.gui.msg_box import msg_IO_denied
from minecraft_backup.gui.msg_box import msg_make_backup_finishied

# PyQt4.QtGui
Expand All @@ -33,9 +33,12 @@
from PyQt4.QtGui import QLineEdit
from PyQt4.QtGui import QPushButton
from PyQt4.QtGui import QFileDialog
from PyQt4.QtGui import QVBoxLayout
from PyQt4.QtGui import QHBoxLayout

# PyQt4.QtCore
from PyQt4.QtCore import QRect
from PyQt4.QtCore import Qt
from PyQt4.QtCore import QSize
from PyQt4.QtCore import SIGNAL

# os
Expand All @@ -46,51 +49,59 @@ class new_backup_window(QDialog):

def __init__(self, parent=None):
QDialog.__init__(self, parent)
self.setGeometry(QRect(0, 0, 450, 200))
self.setMaximumSize(450, 200)
self.setMinimumSize(450, 200)
self.setMaximumSize(QSize(0, 0))
self.setMinimumSize(450, 0)
self.setWindowTitle('Create a new backup')
center_widget(self)

# STANNDARD BUTTONS
self.btn_cancel = QPushButton('Cancel', self)
self.btn_cancel.setGeometry(QRect(135, 160, 80, 28))
self.btn_cancel.setAutoDefault(False)

# btn_create_backup
self.btn_create_backup = QPushButton('Create backup', self)
self.btn_create_backup.setGeometry(QRect(235, 160, 200, 28))

# LABELS
self.generate_label('Name', 15, 20)
self.generate_label('Save folder', 15, 70)

# input_backup_name
#input_backup_name
self.input_backup_name = QLineEdit(self)
self.input_backup_name.setGeometry(QRect(100, 17, 335, 25))
self.input_backup_name.text().toUtf8()
self.input_backup_name.setToolTip('Name of backup')
self.input_backup_name.setFocus()

# btn_change_save_backup
#btn_change_save_backup
self.btn_change_save_backup = QPushButton(
load_config('save_backup_folder'), self)
self.btn_change_save_backup.setGeometry(QRect(100, 64, 335, 30))
self.btn_change_save_backup.sizeHint()
self.btn_change_save_backup.setAutoDefault(False)

# CONNECT SIGNALS
#btn_cancel
self.btn_cancel = QPushButton('Cancel', self)
self.btn_cancel.setAutoDefault(False)

#btn_create_backup
self.btn_create_backup = QPushButton('Create backup', self)

#LAYOUTS
#Backup name layout
self.layout_name = QHBoxLayout()
self.layout_name.addWidget(QLabel('Name:', self))
self.layout_name.addWidget(self.input_backup_name)

#Save Backup Folder Layout
self.layout_save_folder = QHBoxLayout()
self.layout_save_folder.addWidget(QLabel('Save folder:', self))
self.layout_save_folder.addWidget(self.btn_change_save_backup,
Qt.AlignCenter)

#Standard Buttons Layout
self.layout_standard_buttons = QHBoxLayout()
self.layout_standard_buttons.setContentsMargins(90, 20, 0, 0)
self.layout_standard_buttons.addWidget(self.btn_cancel)
self.layout_standard_buttons.addWidget(self.btn_create_backup)

#Vertical Container Layout
self.Vcontainer = QVBoxLayout(self)
self.Vcontainer.addLayout(self.layout_name)
self.Vcontainer.addLayout(self.layout_save_folder)
self.Vcontainer.addLayout(self.layout_standard_buttons)

#CONNECT SIGNALS
self.connect(self.btn_change_save_backup, SIGNAL('clicked()'),
self.change_save_backup)
self.connect(self.btn_cancel, SIGNAL('clicked()'), self.close)
self.connect(self.btn_create_backup, SIGNAL('clicked()'),
self.create_backup)

def generate_label(self, text, h, v):
self.label = QLabel(self)
self.label.setText(text)
self.label.adjustSize()
self.label.move(h, v)

def change_save_backup(self):
self.file_dialog = QFileDialog.getExistingDirectory(self,
'Select folder saved for backup',
Expand All @@ -109,11 +120,17 @@ def create_backup(self):

self.make_backup = make_backup_thread()

# CONNECT SIGNALS
#--CONNECT SIGNALS--
#nameexists()
self.connect(self.make_backup, SIGNAL('nameexists()'),
lambda: msg_name_exists(self))
#direxists()
self.connect(self.make_backup, SIGNAL('direxists()'),
lambda: msg_dir_exists(self))
#IOdenied()
self.connect(self.make_backup, SIGNAL('IOdenied()'),
lambda: msg_IO_denied(self))
#makeend()
self.connect(self.make_backup, SIGNAL('makeend()'),
lambda: msg_make_backup_finishied(self))

Expand Down
Loading

0 comments on commit 9f5ed6f

Please sign in to comment.