Exemplo n.º 1
0
    def on_add_button_clicked(self, button):
        """ Fired when the Add launcher button has been clicked. """

        if not self.application_selection_dialog:
            self.application_selection_dialog = ApplicationSelectionDialog()
            self.application_selection_dialog.build_application_list()

            # Connect response signal
            self.application_selection_dialog.connect(
                "response", self.on_application_selection_dialog_response)

            # Bind sensitiveness of the parent with the visibility of the new window
            self.application_selection_dialog.bind_property(
                "visible", self.objects["main"], "sensitive",
                GObject.BindingFlags.INVERT_BOOLEAN)

        self.application_selection_dialog.show()
    def on_add_new_application_activated(self, menuitem, parameter):
        """
		Fired when the add new application item has been selected.
		"""

        if not self.application_selection_dialog:
            self.application_selection_dialog = ApplicationSelectionDialog()
            self.application_selection_dialog.build_application_list()

            # Connect response signal
            self.application_selection_dialog.connect(
                "response", self.on_application_selection_dialog_response)

            # Bind sensitiveness of the parent with the visibility of the new window
            self.application_selection_dialog.bind_property(
                "visible", self.objects.main, "sensitive",
                GObject.BindingFlags.INVERT_BOOLEAN)

        self.application_selection_dialog.show()