diff --git a/com.github.Roshan_R.PyDrop.json b/com.github.Roshan_R.PyDrop.json
index adfbdd5..eccd657 100644
--- a/com.github.Roshan_R.PyDrop.json
+++ b/com.github.Roshan_R.PyDrop.json
@@ -1,7 +1,7 @@
{
"app-id" : "com.github.Roshan_R.PyDrop",
"runtime" : "org.gnome.Platform",
- "runtime-version" : "40",
+ "runtime-version" : "41",
"sdk" : "org.gnome.Sdk",
"command" : "pydrop",
"finish-args" : [
@@ -25,6 +25,60 @@
],
"modules" : [
"python3-modules.json",
+ {
+ "name": "libsass",
+ "cleanup": ["*"],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://github.com/sass/libsass/archive/3.6.4.tar.gz",
+ "sha256": "f9484d9a6df60576e791566eab2f757a97fd414fce01dd41fc0a693ea5db2889"
+ },
+ {
+ "type": "script",
+ "dest-filename": "autogen.sh",
+ "commands": [
+ "autoreconf -si"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "sassc",
+ "cleanup": ["*"],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://github.com/sass/sassc/archive/3.6.1.tar.gz",
+ "sha256": "8cee391c49a102b4464f86fc40c4ceac3a2ada52a89c4c933d8348e3e4542a60"
+ },
+ {
+ "type": "script",
+ "dest-filename": "autogen.sh",
+ "commands": [
+ "autoreconf -si"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "libadwaita",
+ "buildsystem": "meson",
+ "config-opts": [
+ "-Dgtk_doc=false",
+ "-Dtests=false",
+ "-Dexamples=false",
+ "-Dvapi=false",
+ "-Dglade_catalog=disabled"
+ ],
+ "sources": [
+ {
+ "type": "git",
+ "url": "https://gitlab.gnome.org/GNOME/libadwaita.git",
+ "branch": "main"
+ }
+ ]
+ },
{
"name" : "pydrop",
"builddir" : true,
diff --git a/data/ui/window.ui b/data/ui/window.ui
index fb69a9f..d82063a 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -1,29 +1,26 @@
-
-
-
-
+
+
True
False
PyDrop
- mouse
220
225
- dialog
-
- False
- True
- 0
-
-
- page2
- page2
-
@@ -110,24 +83,14 @@
True
False
- True
- True
- True
- gtk-dnd
80
True
- 5
-
- page0
- page0
- 1
-
@@ -135,27 +98,11 @@
False
center
center
- True
-
- page1
- page1
- 2
-
-
- True
- True
- 0
-
-
- True
- True
- 1
-
@@ -164,25 +111,18 @@
True
True
center
- right
- True
-
- False
- False
- 18
- 2
-
-
+
diff --git a/src/main.py b/src/main.py
index 22ad5cc..2d01e15 100644
--- a/src/main.py
+++ b/src/main.py
@@ -16,12 +16,12 @@
# along with this program. If not, see .
import sys
-import gi
-gi.require_version('Gtk', '3.0')
-gi.require_version('Handy', '1')
+import gi
+gi.require_version('Gtk', '4.0')
+gi.require_version('Adw', '1')
-from gi.repository import Gtk, Gio, Gdk, GLib, Handy
+from gi.repository import Gtk, Gio, Gdk, GLib, Adw
from .window import PydropWindow
@@ -30,9 +30,9 @@ def __init__(self):
super().__init__(application_id='com.github.Roshan_R.PyDrop',
flags=Gio.ApplicationFlags.FLAGS_NONE)
- css_provider = Gtk.CssProvider()
- css_provider.load_from_resource('/com/github/Roshan_R/PyDrop/css/style.css')
- Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+ #css_provider = Gtk.CssProvider()
+ #css_provider.load_from_resource('/com/github/Roshan_R/PyDrop/css/style.css')
+ #Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
self.setup_actions()
diff --git a/src/utils/tools.py b/src/utils/tools.py
index 5911ac8..e230931 100644
--- a/src/utils/tools.py
+++ b/src/utils/tools.py
@@ -4,7 +4,7 @@
from urllib.parse import unquote
import gi
-gi.require_version('Gtk', '3.0')
+gi.require_version('Gtk', '4.0')
from gi.repository import Gio , Gtk
from gi.repository.GdkPixbuf import Pixbuf, PixbufLoader
diff --git a/src/window.py b/src/window.py
index 4a5181d..f22ae02 100644
--- a/src/window.py
+++ b/src/window.py
@@ -18,8 +18,11 @@
import gi
import os
-gi.require_version('Handy', '1')
-from gi.repository import Gtk, Gdk, Gio, Handy
+gi.require_version('Adw', '1')
+gi.require_version('Gtk', '4.0')
+gi.require_version('Gdk', '4.0')
+
+from gi.repository import Gtk, Gdk, Gio, Adw
from gi.repository.GdkPixbuf import Pixbuf, PixbufLoader
from .utils import tools
@@ -29,10 +32,11 @@
@Gtk.Template(resource_path="/com/github/Roshan_R/PyDrop/ui/window.ui")
-class PydropWindow(Handy.Window):
+class PydropWindow(Adw.ApplicationWindow):
__gtype_name__ = "PydropWindow"
- Handy.init()
+ Adw.init()
+
icon = Gtk.Template.Child()
droparea = Gtk.Template.Child()
button = Gtk.Template.Child()
@@ -47,15 +51,14 @@ class PydropWindow(Handy.Window):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.setup_variables()
- self.setup_signals()
+ #self.setup_signals()
def setup_variables(self):
self.button.hide()
self.count = 0
self.link_stack = []
self.initial = 1
- self.stick()
- self.set_keep_above(True)
+
self.parser = ParseData()
# TODO : better temporary directory?