@@ -94,7 +94,7 @@ def __init__(self, *args, **kwargs):
94
94
self .chat_block = Gtk .Box (
95
95
orientation = Gtk .Orientation .VERTICAL , hexpand = True , css_classes = ["view" ]
96
96
)
97
- self .chat_header = Adw .HeaderBar (css_classes = ["flat" , "view" ])
97
+ self .chat_header = Adw .HeaderBar (css_classes = ["flat" , "view" ], show_start_title_buttons = False , show_end_title_buttons = True )
98
98
self .chat_header .set_title_widget (
99
99
Gtk .Label (label = _ ("Chat" ), css_classes = ["title" ])
100
100
)
@@ -140,7 +140,7 @@ def __init__(self, *args, **kwargs):
140
140
orientation = Gtk .Orientation .VERTICAL , hexpand = True
141
141
)
142
142
self .chat_panel_header = Adw .HeaderBar (
143
- css_classes = ["flat" ], show_end_title_buttons = False
143
+ css_classes = ["flat" ], show_end_title_buttons = False , show_start_title_buttons = True
144
144
)
145
145
self .chat_panel_header .set_title_widget (
146
146
Gtk .Label (label = _ ("History" ), css_classes = ["title" ])
@@ -176,7 +176,7 @@ def __init__(self, *args, **kwargs):
176
176
orientation = Gtk .Orientation .VERTICAL , css_classes = ["background" , "view" ]
177
177
)
178
178
self .explorer_panel .set_size_request (420 , - 1 )
179
- self .explorer_panel_header = Adw .HeaderBar (css_classes = ["flat" ])
179
+ self .explorer_panel_header = Adw .HeaderBar (css_classes = ["flat" ], show_start_title_buttons = False )
180
180
self .explorer_panel .append (self .explorer_panel_header )
181
181
self .folder_blocks_panel = Gtk .Box (orientation = Gtk .Orientation .VERTICAL )
182
182
self .explorer_panel .append (self .folder_blocks_panel )
@@ -1426,18 +1426,14 @@ def update_folder(self, *a):
1426
1426
1427
1427
flow_box = Gtk .FlowBox (vexpand = True )
1428
1428
flow_box .set_valign (Gtk .Align .START )
1429
-
1430
- if os .path .normpath (self .main_path ) == "~" :
1429
+ if os .path .normpath (self .main_path ) == "~" or os .path .normpath (self .main_path ) == os .path .expanduser ("~" ):
1431
1430
os .chdir (os .path .expanduser ("~" ))
1432
- path = "./.var/app/io.github.qwersyk.Newelle/Newelle"
1433
- if not os .path .exists (path ):
1434
- os .makedirs (path )
1431
+ fname = "/" .join (self .controller .newelle_dir .split ("/" )[3 :])
1435
1432
button = Gtk .Button (css_classes = ["flat" ])
1436
- button .set_name (".var/app/io.github.qwersyk.Newelle/Newelle" )
1433
+ button .set_name (fname )
1437
1434
button .connect ("clicked" , self .open_folder )
1438
-
1439
1435
icon = File (
1440
- self .main_path , ".var/app/io.github.qwersyk.Newelle/Newelle"
1436
+ self .main_path , fname
1441
1437
)
1442
1438
icon .set_css_classes (["large" ])
1443
1439
icon .set_valign (Gtk .Align .END )
@@ -1547,9 +1543,11 @@ def handle_main_block_change(self, *data):
1547
1543
not self .main_program_block .get_reveal_flap ()
1548
1544
)
1549
1545
self .left_panel_back_button .set_visible (True )
1546
+ self .chat_header .set_show_start_title_buttons (True )
1550
1547
else :
1551
1548
self .chat_panel_header .set_show_end_title_buttons (False )
1552
1549
self .left_panel_back_button .set_visible (False )
1550
+ self .chat_header .set_show_start_title_buttons (False )
1553
1551
1554
1552
# Chat management
1555
1553
def continue_message (self , button ):
@@ -2496,7 +2494,7 @@ def apply_sync():
2496
2494
elif code_language == "latex" :
2497
2495
try :
2498
2496
box .append (
2499
- DisplayLatex (chunk .text , 100 , self .controller .cache_dir )
2497
+ DisplayLatex (chunk .text , 16 , self .controller .cache_dir )
2500
2498
)
2501
2499
except Exception as e :
2502
2500
print (e )
@@ -2535,7 +2533,7 @@ def apply_sync():
2535
2533
elif chunk .type == "latex" or chunk .type == "latex_inline" :
2536
2534
try :
2537
2535
box .append (
2538
- DisplayLatex (chunk .text , 100 , self .controller .cache_dir )
2536
+ DisplayLatex (chunk .text , 16 , self .controller .cache_dir )
2539
2537
)
2540
2538
except Exception :
2541
2539
print (chunk .text )
0 commit comments