mirror of
https://github.com/Snigdha-OS/snigdhaos-blackbox.git
synced 2025-09-21 20:15:02 +02:00
removed extralines
This commit is contained in:

committed by
GitHub

parent
b1f0a8a269
commit
c1234a93e9
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/python
|
#!/bin/python
|
||||||
|
|
||||||
from socket import TIPC_ADDR_NAME
|
from socket import TIPC_ADDR_NAME
|
||||||
from urllib.parse import scheme_chars
|
from urllib.parse import scheme_chars
|
||||||
import Functions as fn
|
import Functions as fn
|
||||||
|
|
||||||
|
|
||||||
class AppFrameGUI:
|
class AppFrameGUI:
|
||||||
def build_ui_frame(self, Gtk, vbox_stack, category, packages_list):
|
def build_ui_frame(self, Gtk, vbox_stack, category, packages_list):
|
||||||
try:
|
try:
|
||||||
@@ -51,23 +51,16 @@ class AppFrameGUI:
|
|||||||
"""
|
"""
|
||||||
Store a list of unique sub-categories
|
Store a list of unique sub-categories
|
||||||
e.g.
|
e.g.
|
||||||
|
category --> applications
|
||||||
category --> applications
|
|
||||||
sub category --> Accessories
|
sub category --> Accessories
|
||||||
sub category --> Conky
|
sub category --> Conky
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
sub_catlabels = []
|
sub_catlabels = []
|
||||||
|
|
||||||
# store unique subcategory names into a dictionary
|
# store unique subcategory names into a dictionary
|
||||||
|
|
||||||
for package in packages_list:
|
for package in packages_list:
|
||||||
subcats[package.subcategory] = package
|
subcats[package.subcategory] = package
|
||||||
|
|
||||||
# we now iterate across the dictionary keys
|
# we now iterate across the dictionary keys
|
||||||
# each Stack has an associated subcategory
|
# each Stack has an associated subcategory
|
||||||
|
|
||||||
for subcat in subcats.keys():
|
for subcat in subcats.keys():
|
||||||
vbox_stacks.append(
|
vbox_stacks.append(
|
||||||
Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
|
Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
|
||||||
@@ -77,7 +70,6 @@ class AppFrameGUI:
|
|||||||
|
|
||||||
vbox_stacknames.append(subcat)
|
vbox_stacknames.append(subcat)
|
||||||
# iterate across a list of packages
|
# iterate across a list of packages
|
||||||
|
|
||||||
for package in packages_list:
|
for package in packages_list:
|
||||||
if package.subcategory == subcat:
|
if package.subcategory == subcat:
|
||||||
page = vbox_stacks.pop()
|
page = vbox_stacks.pop()
|
||||||
@@ -100,7 +92,6 @@ class AppFrameGUI:
|
|||||||
page.pack_start(lbl_padding_page1, False, False, 0)
|
page.pack_start(lbl_padding_page1, False, False, 0)
|
||||||
|
|
||||||
grid = Gtk.Grid()
|
grid = Gtk.Grid()
|
||||||
|
|
||||||
grid.insert_row(index)
|
grid.insert_row(index)
|
||||||
|
|
||||||
lbl_sep1 = Gtk.Label(xalign=0, yalign=0)
|
lbl_sep1 = Gtk.Label(xalign=0, yalign=0)
|
||||||
@@ -123,7 +114,6 @@ class AppFrameGUI:
|
|||||||
|
|
||||||
Changing the switch using set_active(bool), and using the signal notify::active
|
Changing the switch using set_active(bool), and using the signal notify::active
|
||||||
caused a never-ending loop which would call app_toggle.
|
caused a never-ending loop which would call app_toggle.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
switch.set_state(fn.query_pkg(package.name))
|
switch.set_state(fn.query_pkg(package.name))
|
||||||
switch.connect(
|
switch.connect(
|
||||||
@@ -133,7 +123,6 @@ class AppFrameGUI:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# add switch widget to grid
|
# add switch widget to grid
|
||||||
|
|
||||||
# attach_next_to(child, sibling, side, width, height)
|
# attach_next_to(child, sibling, side, width, height)
|
||||||
|
|
||||||
grid.attach_next_to(
|
grid.attach_next_to(
|
||||||
@@ -141,7 +130,6 @@ class AppFrameGUI:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# add space seperator next to switch
|
# add space seperator next to switch
|
||||||
|
|
||||||
lbl_sep_switch = Gtk.Label(xalign=0, yalign=0)
|
lbl_sep_switch = Gtk.Label(xalign=0, yalign=0)
|
||||||
lbl_sep_switch.set_text(sep_text)
|
lbl_sep_switch.set_text(sep_text)
|
||||||
|
|
||||||
@@ -150,7 +138,6 @@ class AppFrameGUI:
|
|||||||
)
|
)
|
||||||
|
|
||||||
###### switch widget ends ######
|
###### switch widget ends ######
|
||||||
|
|
||||||
###### pkg name label widget starts ######
|
###### pkg name label widget starts ######
|
||||||
|
|
||||||
lbl_sep_package1 = Gtk.Label(xalign=0, yalign=0)
|
lbl_sep_package1 = Gtk.Label(xalign=0, yalign=0)
|
||||||
|
Reference in New Issue
Block a user