Commit 8826d997 authored by Matthew Zeng's avatar Matthew Zeng
Browse files

Minor fixes, use const EAF_DBUS_NAME whenever possible

parent df02daff
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import os
class AppBuffer(Buffer):
    def __init__(self, buffer_id, url, arguments):
        Buffer.__init__(self, buffer_id, url, arguments, True, QColor(0, 0, 0, 255))

        self.add_widget(CameraWidget(QColor(0, 0, 0, 255)))

    def all_views_hide(self):
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ from PyQt5.QtWidgets import QGraphicsScene
from PyQt5.QtCore import Qt, QEvent
from PyQt5.QtGui import QKeyEvent
from PyQt5.QtWidgets import QApplication

import abc

qt_key_dict = {
+1 −0
Original line number Diff line number Diff line
@@ -269,6 +269,7 @@ by `dired-find-alternate-file'. Otherwise they will be opened normally with `dir
  (frame-parameter frame 'window-id))

(defun eaf-start-process ()
  "Start EAF process if it haven't started yet"
  (interactive)
  (if (process-live-p eaf-process)
      (message "EAF process has started.")
+11 −11
Original line number Diff line number Diff line
@@ -253,35 +253,35 @@ class EAF(dbus.service.Object):
    def focus_emacs_buffer(self, message):
        pass

    @dbus.service.signal("com.lazycat.eaf")
    @dbus.service.signal(EAF_DBUS_NAME)
    def start_finish(self):
        pass

    @dbus.service.signal("com.lazycat.eaf")
    @dbus.service.signal(EAF_DBUS_NAME)
    def update_buffer_title(self, buffer_id, title):
        pass

    @dbus.service.signal("com.lazycat.eaf")
    @dbus.service.signal(EAF_DBUS_NAME)
    def open_buffer_url(self, url):
        pass

    @dbus.service.signal("com.lazycat.eaf")
    @dbus.service.signal(EAF_DBUS_NAME)
    def translate_text(self, text):
        pass

    @dbus.service.signal("com.lazycat.eaf")
    @dbus.service.signal(EAF_DBUS_NAME)
    def input_message(self, buffer_id, message, callback_type):
        pass

    @dbus.service.signal("com.lazycat.eaf")
    @dbus.service.signal(EAF_DBUS_NAME)
    def create_new_browser_buffer(self, buffer_id):
        pass

    @dbus.service.signal("com.lazycat.eaf")
    @dbus.service.signal(EAF_DBUS_NAME)
    def request_kill_buffer(self, buffer_id):
        pass

    @dbus.service.signal("com.lazycat.eaf")
    @dbus.service.signal(EAF_DBUS_NAME)
    def message_to_emacs(self, message):
        pass

@@ -337,11 +337,11 @@ class EAF(dbus.service.Object):
                    if buf.url in session_dict[buf.module_path]:
                        buf.restore_session_data(session_dict[buf.module_path][buf.url])

                        print("Restore session: ", buf.buffer_id, buf.module_path, self.session_file_path)
                        print("Restored session: ", buf.buffer_id, buf.module_path, self.session_file_path)
                    else:
                        print("No session data about %s, no need restore session." % (buf.url))
                        print("No session data about %s, no need to restore session." % (buf.url))
                else:
                    print("No data in session file, no need restore session.")
                    print("No data present in session file, no need to restore session.")
        else:
            print("Not found %s, no need restore session." % (self.session_file_path))