generated from itdominator/Python-With-Gtk-Template
Partial revert of event sys calls
This commit is contained in:
parent
08a3623c9b
commit
2cdb7e7321
|
@ -40,10 +40,16 @@ class TopButtonBox(Gtk.ButtonBox):
|
||||||
self.folder_choser_lbl = Gtk.Label(label = "Workspace Folder: ")
|
self.folder_choser_lbl = Gtk.Label(label = "Workspace Folder: ")
|
||||||
self.workspace_choser_btn = WorkspaceFolderChoserButton()
|
self.workspace_choser_btn = WorkspaceFolderChoserButton()
|
||||||
|
|
||||||
self.add(self.message_id_lbl)
|
|
||||||
box.add(self.folder_choser_lbl)
|
box.add(self.folder_choser_lbl)
|
||||||
box.add(self.workspace_choser_btn)
|
box.add(self.workspace_choser_btn)
|
||||||
|
self.add(self.message_id_lbl)
|
||||||
self.add(box)
|
self.add(box)
|
||||||
|
|
||||||
def update_message_id_lbl(self, id: int):
|
def update_message_id_lbl(self, id: int):
|
||||||
self.message_id_lbl.set_label(f"Message ID: {id}")
|
self.message_id_lbl.set_label(f"Message ID: {id}")
|
||||||
|
|
||||||
|
def get_workspace_path(self):
|
||||||
|
return self.workspace_choser_btn.get_workspace_path()
|
||||||
|
|
||||||
|
def get_workspace_uri(self):
|
||||||
|
return self.workspace_choser_btn.get_workspace_uri()
|
||||||
|
|
|
@ -42,7 +42,6 @@ class LogList(Gtk.ListBox):
|
||||||
def scroll_down(self, widget):
|
def scroll_down(self, widget):
|
||||||
GLib.idle_add(self.scroll_down)
|
GLib.idle_add(self.scroll_down)
|
||||||
|
|
||||||
|
|
||||||
self.connect("row-activated", tggl_row_view)
|
self.connect("row-activated", tggl_row_view)
|
||||||
self.connect("size-allocate", scroll_down)
|
self.connect("size-allocate", scroll_down)
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class LSPMessageBox(Gtk.Box):
|
||||||
ctx = self.get_style_context()
|
ctx = self.get_style_context()
|
||||||
ctx.add_class("lsp-message-box")
|
ctx.add_class("lsp-message-box")
|
||||||
|
|
||||||
self.set_orientation(Gtk.Orientation.VERTICAL)
|
self.set_orientation( Gtk.Orientation.VERTICAL )
|
||||||
self.set_hexpand(True)
|
self.set_hexpand(True)
|
||||||
self.set_vexpand(True)
|
self.set_vexpand(True)
|
||||||
|
|
||||||
|
@ -66,24 +66,24 @@ class LSPMessageBox(Gtk.Box):
|
||||||
def _load_widgets(self):
|
def _load_widgets(self):
|
||||||
scrolled_win = Gtk.ScrolledWindow()
|
scrolled_win = Gtk.ScrolledWindow()
|
||||||
self.lsp_msg_src_vw = LspMessageSourceView()
|
self.lsp_msg_src_vw = LspMessageSourceView()
|
||||||
top_buttons = TopButtonBox()
|
self.top_buttons = TopButtonBox()
|
||||||
bottom_buttons = BottomButtonBox()
|
bottom_buttons = BottomButtonBox()
|
||||||
|
|
||||||
scrolled_win.show_all()
|
scrolled_win.show_all()
|
||||||
|
|
||||||
scrolled_win.add(self.lsp_msg_src_vw)
|
scrolled_win.add(self.lsp_msg_src_vw)
|
||||||
self.add(top_buttons)
|
self.add(self.top_buttons)
|
||||||
self.add(scrolled_win)
|
self.add(scrolled_win)
|
||||||
self.add(bottom_buttons)
|
self.add(bottom_buttons)
|
||||||
|
|
||||||
def update_message_id_label(self):
|
def update_message_id_label(self):
|
||||||
event_system.emit("update-message-id-lbl", (self._message_id,))
|
self.top_buttons.update_message_id_lbl(self._message_id)
|
||||||
|
|
||||||
def send_initialize_message(self):
|
def send_initialize_message(self):
|
||||||
parent = self.get_parent()
|
parent = self.get_parent()
|
||||||
init_ops = parent.init_ops_src_vw.get_text_str()
|
init_ops = parent.init_ops_src_vw.get_text_str()
|
||||||
workspace_file = event_system.emit_and_await("get-workspace-path")
|
workspace_file = self.top_buttons.get_workspace_path()
|
||||||
workspace_uri = event_system.emit_and_await("get-workspace-uri")
|
workspace_uri = self.top_buttons.get_workspace_uri()
|
||||||
folder_name = os.path.basename(workspace_file)
|
folder_name = os.path.basename(workspace_file)
|
||||||
|
|
||||||
self._lsp_init_ops["processId"] = settings_manager.get_app_pid()
|
self._lsp_init_ops["processId"] = settings_manager.get_app_pid()
|
||||||
|
|
Loading…
Reference in New Issue