Skip to content

Commit 076d661

Browse files
authored
fix: Preparing hotfix release 1.5.6 fixing three issues
* fix: Always use 0 as window ID value when inhibiting suspend via D-Bus power manager (#2084, #2268, #2192) * fix: Crash in "Manage profiles" dialog when using "qt6ct" (#2128) * fix: Open online changelog if local CHANGES file is missing (#2266) Close #2084 Close #2268 Close #2192 Close #2128 Close #2266
1 parent 07de1d8 commit 076d661

File tree

6 files changed

+69
-23
lines changed

6 files changed

+69
-23
lines changed

CHANGES

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Back In Time
22

3+
Version 1.5.6 (2025-10-??)
4+
* Fixed: Always use 0 as window ID value when inhibiting suspend via D-Bus power manager (#2084, #2268, #2192)
5+
* Fixed: Crash in "Manage profiles" dialog when using "qt6ct" (#2128)
6+
* Fixed: Open online changelog if local CHANGES file is missing (#2266)
7+
38
Version 1.5.5 (2025-06-05)
49
* Fixed: Unlocking SSH keys with passphrases on new created profiles (#2164) (@davidfjoh)
510

@@ -9,7 +14,7 @@ Version 1.5.4 (2025-03-24)
914
* Changed: More clear and intense warning about EncFS deprecation and removal (#1904)
1015
* Changed: Updated desktop entry files
1116
* Changed: Move several values from config file into new introduce state file ($XDG_STATE_HOME/backintime.json)
12-
* Fix!: Smart-remove rule "Keep one snapshots per week or the last week" use calendar weeks
17+
* Changed: Smart-remove rule "Keep one snapshots per week or the last week" use calendar weeks
1318
* Fix: Exclude patterns are now case-sensitive when added (#2040)
1419
* Fix: The width of the fourth column in files view is now saved
1520
* Fix: Snapshot compare copy symlink as symlink (#1902) (Peter Sevens @sevens)

common/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2042,7 +2042,7 @@ def inhibitSuspend(app_id = sys.argv[0],
20422042
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
20432043
interface = bus.get_object(dbus_props['service'], dbus_props['objectPath'])
20442044
proxy = interface.get_dbus_method(dbus_props['methodSet'], dbus_props['interface'])
2045-
cookie = proxy(*[(app_id, dbus.UInt32(toplevel_xid), reason, dbus.UInt32(flags))[i] for i in dbus_props['arguments']])
2045+
cookie = proxy(*[(app_id, 0, reason, dbus.UInt32(flags))[i] for i in dbus_props['arguments']])
20462046
logger.debug('Inhibit Suspend started. Reason: {}'.format(reason))
20472047
return (cookie, bus, dbus_props)
20482048
except dbus.exceptions.DBusException:

qt/app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,6 +1456,12 @@ def aHref_lp(m):
14561456
return '<a href="https://bugs.launchpad.net/backintime/+bug/%(id)s">%(txt)s</a>' % {'txt': m.group(0), 'id': m.group(1)}
14571457

14581458
changelog_path = pathlib.Path(tools.docPath()) / 'CHANGES'
1459+
1460+
if not changelog_path.exists():
1461+
url = 'https://github.com/bit-team/backintime/blob/dev/CHANGES'
1462+
QDesktopServices.openUrl(QUrl(url))
1463+
return
1464+
14591465
msg = changelog_path.read_text('utf-8')
14601466
msg = re.sub(r'https?://[^) \n]*', aHref, msg)
14611467
msg = re.sub(r'(?:LP:|bug) ?#?(\d+)', aHref_lp, msg)

qt/manageprofiles/tab_general.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
QLabel,
2424
QLineEdit,
2525
QMessageBox,
26-
QStyle,
2726
QToolButton,
2827
QToolTip,
2928
QVBoxLayout,
@@ -575,14 +574,7 @@ def _cipher_combobox(self) -> combobox.BitComboBox:
575574
return combobox.BitComboBox(self, self.config.SSH_CIPHERS)
576575

577576
def _create_label_encfs_deprecation(self):
578-
# Icon
579-
icon = self.style().standardIcon(
580-
QStyle.StandardPixmap.SP_MessageBoxWarning)
581-
size = self.style().pixelMetric(
582-
QStyle.PixelMetric.PM_LargeIconSize)
583-
icon_label = QLabel(self)
584-
pixmap = icon.pixmap(size*2)
585-
icon_label.setPixmap(pixmap)
577+
icon_label = qttools.create_icon_label_warning()
586578

587579
# encfs deprecation warning (see #1734, #1735)
588580
txt = _('EncFS profile creation will be removed in the next minor '

qt/manageprofiles/tab_remove_retention.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
QHBoxLayout,
1818
QLabel,
1919
QSpinBox,
20-
QStyle,
2120
QToolTip,
2221
QWidget)
2322
from PyQt6.QtCore import Qt
@@ -173,17 +172,7 @@ def update_items_state(self, enabled):
173172
self.cbSmartRemoveRunRemoteInBackground.setVisible(enabled)
174173

175174
def _label_rule_execute_order(self) -> QWidget:
176-
# Icon
177-
icon = self.style().standardPixmap(
178-
QStyle.StandardPixmap.SP_MessageBoxInformation)
179-
icon = icon.scaled(
180-
icon.width()*2,
181-
icon.height()*2,
182-
Qt.AspectRatioMode.KeepAspectRatio)
183-
184-
icon_label = QLabel(self)
185-
icon_label.setPixmap(icon)
186-
icon_label.setFixedSize(icon.size())
175+
icon_label = qttools.create_icon_label_info(fixed_size_widget=True)
187176

188177
# Info text
189178
txt = _(

qt/qttools.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@
4545
QWidget,
4646
QFileDialog,
4747
QAbstractItemView,
48+
QLabel,
4849
QListView,
4950
QTreeView,
5051
QDialog,
5152
QApplication,
5253
QStyleFactory,
54+
QStyle,
5355
QTreeWidget,
5456
QTreeWidgetItem,
5557
QComboBox,
@@ -201,6 +203,58 @@ def update_combo_profiles(config, combo_profiles, current_profile_id):
201203
if profile_id == current_profile_id:
202204
combo_profiles.setCurrentProfileID(profile_id)
203205

206+
207+
def create_icon_label(
208+
icon_type: QStyle.StandardPixmap,
209+
icon_size: QStyle.PixelMetric = QStyle.PixelMetric.PM_LargeIconSize,
210+
fixed_size_widget: bool = False) -> QLabel:
211+
"""Return a ``QLabel`` instance containing an icon.
212+
Args:
213+
icon_type: The icon, eg. info or warning.
214+
icon_size: Size reference.
215+
fixed_size_widget: Fix label size to its icon (default: False)
216+
Returns:
217+
The QLabel
218+
"""
219+
style = QApplication.style()
220+
ico = style.standardIcon(icon_type)
221+
sz = style.pixelMetric(icon_size)
222+
223+
pixmap = ico.pixmap(sz)
224+
225+
label = QLabel()
226+
label.setPixmap(pixmap)
227+
228+
if fixed_size_widget:
229+
label.setFixedSize(pixmap.size())
230+
231+
return label
232+
233+
234+
def create_icon_label_info(
235+
icon_size: QStyle.PixelMetric = QStyle.PixelMetric.PM_LargeIconSize,
236+
fixed_size_widget: bool = False) -> QLabel:
237+
"""Return a QLabel with an info icon.
238+
See `create_icon_label` for details.
239+
"""
240+
return create_icon_label(
241+
icon_type=QStyle.StandardPixmap.SP_MessageBoxInformation,
242+
icon_size=icon_size,
243+
fixed_size_widget=fixed_size_widget)
244+
245+
246+
def create_icon_label_warning(
247+
icon_size: QStyle.PixelMetric = QStyle.PixelMetric.PM_LargeIconSize,
248+
fixed_size_widget: bool = False) -> QLabel:
249+
"""Return a QLabel with a warning icon.
250+
See `create_icon_label` for details.
251+
"""
252+
return create_icon_label(
253+
icon_type=QStyle.StandardPixmap.SP_MessageBoxWarning,
254+
icon_size=icon_size,
255+
fixed_size_widget=fixed_size_widget)
256+
257+
204258
# |---------------------|
205259
# | Misc / Uncatgorized |
206260
# |---------------------|

0 commit comments

Comments
 (0)