Arka plan bildirimleri ve ilerleme takibi#46
Closed
umutKaracelebi wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
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-eventhandler 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 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 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 on lines
+4899
to
+4900
| pass | ||
|
|
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.