refactor(modules/notification): consolidate Gtk importMove the Gtk import from gi.repository into the top‑level imports to simplify code and avoid duplicated imports.

Details
- New Features: - Enhancements:
- Bug Fixes:
This commit is contained in:
sankalp committed 2026-04-10 00:10:50 +05:45
1 parent adb87456c7
commit 27c5ee2e36
1 file changed
+1 -3
+1 -3
View File
@@ -6,7 +6,7 @@ from fabric.notifications import (
NotificationAction, NotificationAction,
NotificationCloseReason, NotificationCloseReason,
) )
from fabric.utils import Gdk, GdkPixbuf, GLib, logger, os from fabric.utils import Gdk, GdkPixbuf, GLib, logger, os, Gtk
from fabric.widgets.box import Box from fabric.widgets.box import Box
from fabric.widgets.button import Button from fabric.widgets.button import Button
from fabric.widgets.centerbox import CenterBox from fabric.widgets.centerbox import CenterBox
@@ -832,8 +832,6 @@ class NotificationRevealer(SlideRevealer):
if style_context: if style_context:
# Use CSS provider for smooth transforms # Use CSS provider for smooth transforms
if not hasattr(self, "_css_provider") or not self._css_provider: if not hasattr(self, "_css_provider") or not self._css_provider:
from gi.repository import Gtk
self._css_provider = Gtk.CssProvider() self._css_provider = Gtk.CssProvider()
style_context.add_provider( style_context.add_provider(
self._css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION self._css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION