Skip to content

Arka plan bildirimleri ve ilerleme takibi#46

Closed
umutKaracelebi wants to merge 1 commit into
pardus:masterfrom
umutKaracelebi:master
Closed

Arka plan bildirimleri ve ilerleme takibi#46
umutKaracelebi wants to merge 1 commit into
pardus:masterfrom
umutKaracelebi:master

Conversation

@umutKaracelebi
Copy link
Copy Markdown

@umutKaracelebi umutKaracelebi commented May 7, 2026

Merhaba, bu Pull Request'i yapılandırma eksiklikleri ve açıklama metninin güncellenmesi gerekliliği nedeniyle kapattım. Teknofest 2026 Pardus Hata Yakalama ve Öneri Yarışması kapsamında hazırladığım kapsamlı iyileştirmeyi içeren çalışmayı #47 numaralı kayıt ile 'Draft' statüsünde yeniden oluşturdum. Süreci ilgili kayıt üzerinden takip edebilirsiniz.

Copilot AI review requested due to automatic review settings May 7, 2026 20:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to let package operations continue when the main window is closed by hiding the window instead of quitting, and to introduce a notification flow intended to support background status/progress updates while respecting GNOME notification rate limits.

Changes:

  • Added a delete-event handler that hides the main window during in-progress operations and sends a “running in background” notification via D-Bus.
  • Introduced state intended for background/progress notification rate limiting (bg_notified, last_notified_percent).
  • Wired download/install progress parsing to call a new update_progress_notification() hook.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/MainWindow.py
Comment on lines +69 to +73

self.MainWindow = self.GtkBuilder.get_object("MainWindow")
if self.MainWindow:
self.MainWindow.connect("delete-event", self.on_delete_event)

Comment thread src/MainWindow.py
Comment on lines +591 to +607
if self.inprogress:
self.MainWindow.hide()
self.bg_notified = True

try:
bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
bus.call_sync(
'org.freedesktop.Notifications',
'/org/freedesktop/Notifications',
'org.freedesktop.Notifications',
'Notify',
GLib.Variant('(susssasa{sv}i)', (
'Pardus Software Center',
0,
'pardus-software',
_('Pardus Software Center'),
_('İşlemler arka planda devam ediyor ({} uygulama)...').format(len(self.queue)) if len(self.queue) > 1 else _('İşlem arka planda devam ediyor...'),
Comment thread src/MainWindow.py
Comment on lines +4899 to +4900
pass

Comment thread src/MainWindow.py
Comment on lines 4909 to 4915
if "dlstatus" in line:
percent = line.split(":")[2].split(".")[0]
self.ui_queue_flowbox.get_children()[0].get_children()[0].get_children()[0].get_children()[0].get_children()[0].get_children()[3].set_fraction(int(percent) / 100)
self.ui_queue_flowbox.get_children()[0].get_children()[0].get_children()[0].get_children()[0].get_children()[0].get_children()[3].set_text("{} : {} %".format(_("Downloading"), percent))
text = "{} : {} %".format(_("Downloading"), percent)
self.ui_queue_flowbox.get_children()[0].get_children()[0].get_children()[0].get_children()[0].get_children()[0].get_children()[3].set_text(text)
self.update_progress_notification(text, percent)
self.ui_queue_flowbox.get_children()[0].get_children()[0].get_children()[0].get_children()[0].get_children()[0].get_children()[4].set_sensitive(True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants