Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Back In Time

Version 1.5.6 (2025-10-??)
* Fixed: Always use 0 as window ID value when inhibiting suspend via D-Bus power manager (#2084, #2268, #2192)
* Fixed: Crash in "Manage profiles" dialog when using "qt6ct" (#2128)
* Fixed: Open online changelog if local CHANGES file is missing (#2266)

Version 1.5.5 (2025-06-05)
* Fixed: Unlocking SSH keys with passphrases on new created profiles (#2164) (@davidfjoh)

Expand All @@ -9,7 +14,7 @@ Version 1.5.4 (2025-03-24)
* Changed: More clear and intense warning about EncFS deprecation and removal (#1904)
* Changed: Updated desktop entry files
* Changed: Move several values from config file into new introduce state file ($XDG_STATE_HOME/backintime.json)
* Fix!: Smart-remove rule "Keep one snapshots per week or the last week" use calendar weeks
* Changed: Smart-remove rule "Keep one snapshots per week or the last week" use calendar weeks
* Fix: Exclude patterns are now case-sensitive when added (#2040)
* Fix: The width of the fourth column in files view is now saved
* Fix: Snapshot compare copy symlink as symlink (#1902) (Peter Sevens @sevens)
Expand Down
2 changes: 1 addition & 1 deletion common/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ def inhibitSuspend(app_id = sys.argv[0],
bus = dbus.SessionBus() # This code may hang forever (if BiT is run as root via cron job and no user is logged in). See #1592
interface = bus.get_object(dbus_props['service'], dbus_props['objectPath'])
proxy = interface.get_dbus_method(dbus_props['methodSet'], dbus_props['interface'])
cookie = proxy(*[(app_id, dbus.UInt32(toplevel_xid), reason, dbus.UInt32(flags))[i] for i in dbus_props['arguments']])
cookie = proxy(*[(app_id, 0, reason, dbus.UInt32(flags))[i] for i in dbus_props['arguments']])
logger.debug('Inhibit Suspend started. Reason: {}'.format(reason))
return (cookie, bus, dbus_props)
except dbus.exceptions.DBusException:
Expand Down
6 changes: 6 additions & 0 deletions qt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,12 @@ def aHref_lp(m):
return '<a href="https://bugs.launchpad.net/backintime/+bug/%(id)s">%(txt)s</a>' % {'txt': m.group(0), 'id': m.group(1)}

changelog_path = pathlib.Path(tools.docPath()) / 'CHANGES'

if not changelog_path.exists():
url = 'https://github.com/bit-team/backintime/blob/dev/CHANGES'
QDesktopServices.openUrl(QUrl(url))
return

msg = changelog_path.read_text('utf-8')
msg = re.sub(r'https?://[^) \n]*', aHref, msg)
msg = re.sub(r'(?:LP:|bug) ?#?(\d+)', aHref_lp, msg)
Expand Down
10 changes: 1 addition & 9 deletions qt/manageprofiles/tab_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
QLabel,
QLineEdit,
QMessageBox,
QStyle,
QToolButton,
QToolTip,
QVBoxLayout,
Expand Down Expand Up @@ -575,14 +574,7 @@ def _cipher_combobox(self) -> combobox.BitComboBox:
return combobox.BitComboBox(self, self.config.SSH_CIPHERS)

def _create_label_encfs_deprecation(self):
# Icon
icon = self.style().standardIcon(
QStyle.StandardPixmap.SP_MessageBoxWarning)
size = self.style().pixelMetric(
QStyle.PixelMetric.PM_LargeIconSize)
icon_label = QLabel(self)
pixmap = icon.pixmap(size*2)
icon_label.setPixmap(pixmap)
icon_label = qttools.create_icon_label_warning()

# encfs deprecation warning (see #1734, #1735)
txt = _('EncFS profile creation will be removed in the next minor '
Expand Down
13 changes: 1 addition & 12 deletions qt/manageprofiles/tab_remove_retention.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
QHBoxLayout,
QLabel,
QSpinBox,
QStyle,
QToolTip,
QWidget)
from PyQt6.QtCore import Qt
Expand Down Expand Up @@ -173,17 +172,7 @@ def update_items_state(self, enabled):
self.cbSmartRemoveRunRemoteInBackground.setVisible(enabled)

def _label_rule_execute_order(self) -> QWidget:
# Icon
icon = self.style().standardPixmap(
QStyle.StandardPixmap.SP_MessageBoxInformation)
icon = icon.scaled(
icon.width()*2,
icon.height()*2,
Qt.AspectRatioMode.KeepAspectRatio)

icon_label = QLabel(self)
icon_label.setPixmap(icon)
icon_label.setFixedSize(icon.size())
icon_label = qttools.create_icon_label_info(fixed_size_widget=True)

# Info text
txt = _(
Expand Down
54 changes: 54 additions & 0 deletions qt/qttools.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@
QWidget,
QFileDialog,
QAbstractItemView,
QLabel,
QListView,
QTreeView,
QDialog,
QApplication,
QStyleFactory,
QStyle,
QTreeWidget,
QTreeWidgetItem,
QComboBox,
Expand Down Expand Up @@ -201,6 +203,58 @@ def update_combo_profiles(config, combo_profiles, current_profile_id):
if profile_id == current_profile_id:
combo_profiles.setCurrentProfileID(profile_id)


def create_icon_label(
icon_type: QStyle.StandardPixmap,
icon_size: QStyle.PixelMetric = QStyle.PixelMetric.PM_LargeIconSize,
fixed_size_widget: bool = False) -> QLabel:
"""Return a ``QLabel`` instance containing an icon.
Args:
icon_type: The icon, eg. info or warning.
icon_size: Size reference.
fixed_size_widget: Fix label size to its icon (default: False)
Returns:
The QLabel
"""
style = QApplication.style()
ico = style.standardIcon(icon_type)
sz = style.pixelMetric(icon_size)

pixmap = ico.pixmap(sz)

label = QLabel()
label.setPixmap(pixmap)

if fixed_size_widget:
label.setFixedSize(pixmap.size())

return label


def create_icon_label_info(
icon_size: QStyle.PixelMetric = QStyle.PixelMetric.PM_LargeIconSize,
fixed_size_widget: bool = False) -> QLabel:
"""Return a QLabel with an info icon.
See `create_icon_label` for details.
"""
return create_icon_label(
icon_type=QStyle.StandardPixmap.SP_MessageBoxInformation,
icon_size=icon_size,
fixed_size_widget=fixed_size_widget)


def create_icon_label_warning(
icon_size: QStyle.PixelMetric = QStyle.PixelMetric.PM_LargeIconSize,
fixed_size_widget: bool = False) -> QLabel:
"""Return a QLabel with a warning icon.
See `create_icon_label` for details.
"""
return create_icon_label(
icon_type=QStyle.StandardPixmap.SP_MessageBoxWarning,
icon_size=icon_size,
fixed_size_widget=fixed_size_widget)


# |---------------------|
# | Misc / Uncatgorized |
# |---------------------|
Expand Down