Пример #1
0
    def __init__(self, frame):

        IconNotebook.__init__(self, frame, frame.search_notebook, "search")
        self.notebook.connect("switch-page", self.on_switch_search_page)

        self.modes = {
            "global": _("_Global"),
            "buddies": _("_Buddies"),
            "rooms": _("_Rooms"),
            "user": _("_User")
        }

        mode_menu = PopupMenu(frame)
        mode_menu.add_items(
            ("O" + self.modes["global"], "win.searchmode", "global"),
            ("O" + self.modes["buddies"], "win.searchmode", "buddies"),
            ("O" + self.modes["rooms"], "win.searchmode", "rooms"),
            ("O" + self.modes["user"], "win.searchmode", "user"))
        mode_menu.update_model()
        frame.SearchMode.set_menu_model(mode_menu.model)
        frame.SearchModeLabel.set_label(self.modes["global"])

        if Gtk.get_major_version() == 4:
            frame.SearchMode.get_first_child().get_style_context().add_class(
                "arrow-button")

        CompletionEntry(frame.RoomSearchEntry,
                        frame.RoomSearchCombo.get_model())
        CompletionEntry(frame.SearchEntry, frame.SearchCombo.get_model())

        self.wish_list = WishList(frame, self)
        self.populate_search_history()
        self.update_visuals()
Пример #2
0
    def __init__(self, frame):

        self.frame = frame

        IconNotebook.__init__(
            self,
            self.frame.images,
            angle=config.sections["ui"]["labelprivate"],
            tabclosers=config.sections["ui"]["tabclosers"],
            show_hilite_image=config.sections["notifications"]
            ["notification_tab_icons"],
            reorderable=config.sections["ui"]["tab_reorderable"],
            show_status_image=config.sections["ui"]["tab_status_icons"],
            notebookraw=self.frame.PrivatechatNotebookRaw)

        self.popup_enable()

        self.connected = True
        self.users = {}
        self.completion_list = []
        self.private_message_queue = {}

        self.notebook.connect("switch-page", self.on_switch_chat)

        # Clear list of previously open chats if we don't want to restore them
        if not config.sections["privatechat"]["store"]:
            config.sections["privatechat"]["users"].clear()
Пример #3
0
    def __init__(self, frame):

        self.frame = frame
        self.pages = {}

        IconNotebook.__init__(
            self,
            self.frame.images,
            tabclosers=config.sections["ui"]["tabclosers"],
            show_hilite_image=config.sections["notifications"]
            ["notification_tab_icons"],
            show_status_image=config.sections["ui"]["tab_status_icons"],
            notebookraw=self.frame.UserBrowseNotebookRaw)
Пример #4
0
    def __init__(self, frame):

        IconNotebook.__init__(self, frame, frame.private_notebook, "private")
        self.notebook.connect("switch-page", self.on_switch_chat)

        self.completion = ChatCompletion()
        self.history = ChatHistory(frame)
        self.command_help = UserInterface("ui/popovers/privatechatcommands.ui")

        if Gtk.get_major_version() == 4:
            # Scroll to the focused widget
            self.command_help.container.get_child().set_scroll_to_focus(True)

        self.update_visuals()
Пример #5
0
    def __init__(self, frame):

        self.frame = frame
        self.users = {}

        IconNotebook.__init__(
            self,
            self.frame.images,
            tabclosers=config.sections["ui"]["tabclosers"],
            show_hilite_image=config.sections["notifications"]
            ["notification_tab_icons"],
            show_status_image=config.sections["ui"]["tab_status_icons"],
            notebookraw=self.frame.PrivatechatNotebookRaw)

        self.notebook.connect("switch-page", self.on_switch_chat)
Пример #6
0
    def __init__(self, frame):

        self.frame = frame

        self.searches = {}
        self.usersearches = {}

        IconNotebook.__init__(
            self,
            self.frame.images,
            tabclosers=config.sections["ui"]["tabclosers"],
            show_hilite_image=config.sections["notifications"]
            ["notification_tab_icons"],
            notebookraw=self.frame.SearchNotebookRaw)

        self.load_config()

        self.wish_list = WishList(frame, self)

        self.update_visuals()
Пример #7
0
    def __init__(self, frame):

        self.frame = frame

        self.joinedrooms = {}
        self.autojoin = True
        self.private_rooms = config.sections["private_rooms"]["rooms"]
        self.switch_tab = True

        # Config cleanup
        for room, data in self.private_rooms.items():
            if "owner" not in data:
                self.private_rooms[room]["owner"] = None
            if "operator" in data:
                del self.private_rooms[room]["operator"]

        self.roomlist = RoomList(self.frame, self.joinedrooms,
                                 self.private_rooms)

        IconNotebook.__init__(
            self,
            self.frame.images,
            tabclosers=config.sections["ui"]["tabclosers"],
            show_hilite_image=config.sections["notifications"]
            ["notification_tab_icons"],
            notebookraw=self.frame.ChatNotebookRaw)

        self.set_tab_pos(
            self.frame.get_tab_position(config.sections["ui"]["tabrooms"]))

        self.notebook.connect("switch-page", self.on_switch_chat)
        self.notebook.connect("page-reordered", self.on_reordered_page)

        if Gtk.get_major_version() == 4:
            self.frame.ChatroomsPane.set_resize_start_child(True)
        else:
            self.frame.ChatroomsPane.child_set_property(
                self.notebook, "resize", True)

        self.update_visuals()
Пример #8
0
    def __init__(self, frame):

        self.frame = frame

        self.completion_list = []
        self.joinedrooms = {}
        self.autojoin = True
        self.private_rooms = config.sections["private_rooms"]["rooms"]
        self.switch_tab = True

        # Config cleanup
        for room, data in self.private_rooms.items():
            if "owner" not in data:
                self.private_rooms[room]["owner"] = None
            if "operator" in data:
                del self.private_rooms[room]["operator"]

        self.roomlist = RoomList(self.frame, self.joinedrooms,
                                 self.private_rooms)

        IconNotebook.__init__(
            self,
            self.frame.images,
            angle=config.sections["ui"]["labelrooms"],
            tabclosers=config.sections["ui"]["tabclosers"],
            show_hilite_image=config.sections["notifications"]
            ["notification_tab_icons"],
            reorderable=config.sections["ui"]["tab_reorderable"],
            notebookraw=self.frame.ChatNotebookRaw)

        self.popup_enable()

        self.set_tab_pos(
            self.frame.get_tab_position(config.sections["ui"]["tabrooms"]))

        self.notebook.connect("switch-page", self.on_switch_chat)
        self.notebook.connect("page-reordered", self.on_reordered_page)

        self.update_visuals()
Пример #9
0
    def __init__(self, frame, subwindow, notebookraw, tab_label, tab_name):

        self.frame = frame

        IconNotebook.__init__(
            self,
            self.frame.images,
            angle=config.sections["ui"]["labelinfo"],
            tabclosers=config.sections["ui"]["tabclosers"],
            show_hilite_image=config.sections["notifications"]
            ["notification_tab_icons"],
            reorderable=config.sections["ui"]["tab_reorderable"],
            show_status_image=config.sections["ui"]["tab_status_icons"],
            notebookraw=notebookraw)

        self.popup_enable()

        self.subwindow = subwindow

        self.users = {}
        self.tab_label = tab_label
        self.tab_name = tab_name
Пример #10
0
    def __init__(self, frame):

        IconNotebook.__init__(self, frame, frame.chatrooms_notebook,
                              "chatrooms")
        self.notebook.connect("switch-page", self.on_switch_chat)
        self.notebook.connect("page-reordered", self.on_reordered_page)

        self.autojoin_rooms = set()
        self.completion = ChatCompletion()
        self.roomlist = RoomList(frame)
        self.command_help = UserInterface("ui/popovers/chatroomcommands.ui")

        if Gtk.get_major_version() == 4:
            self.frame.ChatroomsPane.set_resize_start_child(True)

            # Scroll to the focused widget
            self.command_help.container.get_child().set_scroll_to_focus(True)
        else:
            self.frame.ChatroomsPane.child_set_property(
                self.frame.chatrooms_container, "resize", True)

        self.update_visuals()
Пример #11
0
    def __init__(self, frame):

        IconNotebook.__init__(self, frame, frame.userinfo_notebook, "userinfo")
        self.notebook.connect("switch-page", self.on_switch_info_page)
Пример #12
0
    def __init__(self, frame):

        IconNotebook.__init__(self, frame, frame.userbrowse_notebook,
                              "userbrowse")
        self.notebook.connect("switch-page", self.on_switch_browse_page)