コード例 #1
0
    def ChooseObject(self, parent_xid, what_filter=""):
        chooser_id = uuid.uuid4().hex
        if parent_xid > 0:
            parent = gtk.gdk.window_foreign_new(parent_xid)
        else:
            parent = None
        chooser = ObjectChooser(parent, what_filter)
        chooser.connect("response", self._chooser_response_cb, chooser_id)
        chooser.show()

        return chooser_id
コード例 #2
0
    def ChooseObjectWithFilter(self, parent_xid, what_filter="", filter_type=None, show_preview=False):
        chooser_id = uuid.uuid4().hex
        if parent_xid > 0:
            display = Gdk.Display.get_default()
            parent = GdkX11.X11Window.foreign_new_for_display(display, parent_xid)
        else:
            parent = None
        chooser = ObjectChooser(parent, what_filter, filter_type, show_preview)
        chooser.connect("response", self._chooser_response_cb, chooser_id)
        chooser.show()

        return chooser_id
コード例 #3
0
    def ChooseObject(self, parent_xid, what_filter=""):
        """
        This method is keep for backwards compatibility
        """
        chooser_id = uuid.uuid4().hex
        if parent_xid > 0:
            display = Gdk.Display.get_default()
            parent = GdkX11.X11Window.foreign_new_for_display(display, parent_xid)
        else:
            parent = None
        chooser = ObjectChooser(parent, what_filter)
        chooser.connect("response", self._chooser_response_cb, chooser_id)
        chooser.show()

        return chooser_id
コード例 #4
0
    def ChooseObject(self, parent_xid, what_filter=''):
        chooser_id = uuid.uuid4().hex
        if parent_xid > 0:
            parent = gtk.gdk.window_foreign_new(parent_xid)
        else:
            parent = None
        chooser = ObjectChooser(parent, what_filter)
        chooser.connect('response', self._chooser_response_cb, chooser_id)
        chooser.show()

        return chooser_id
コード例 #5
0
    def ChooseObject(self, parent_xid, what_filter=''):
        chooser_id = uuid.uuid4().hex
        if parent_xid > 0:
            display = Gdk.Display.get_default()
            parent = GdkX11.X11Window.foreign_new_for_display( \
                display, parent_xid)
        else:
            parent = None
        chooser = ObjectChooser(parent, what_filter)
        chooser.connect('response', self._chooser_response_cb, chooser_id)
        chooser.show()

        return chooser_id
コード例 #6
0
    def ChooseObject(self, parent_xid, what_filter=''):
        """
        This method is keep for backwards compatibility
        """
        chooser_id = uuid.uuid4().hex
        if parent_xid > 0:
            display = Gdk.Display.get_default()
            parent = GdkX11.X11Window.foreign_new_for_display(
                display, parent_xid)
        else:
            parent = None
        chooser = ObjectChooser(parent, what_filter)
        chooser.connect('response', self._chooser_response_cb, chooser_id)
        chooser.show()

        return chooser_id
コード例 #7
0
 def __choose_project_cb(self, tree_view, metadata_to_send):
     project_chooser = ObjectChooser(self.get_window())
     project_chooser.show_all()
     project_chooser.connect('response', self.__project_chooser_response_cb,
                             metadata_to_send)
     project_chooser._toolbar._proj_list_button_clicked_cb(None)
コード例 #8
0
ファイル: apisocket.py プロジェクト: curiousguy13/sugar
 def show_object_chooser(self, request):
     chooser = ObjectChooser(self._activity)
     chooser.connect('response', self._chooser_response_cb, request)
     chooser.show()
コード例 #9
0
ファイル: journalactivity.py プロジェクト: AbrahmAB/sugar
 def __choose_project_cb(self, tree_view, metadata_to_send):
     project_chooser = ObjectChooser(self.get_window())
     project_chooser.show_all()
     project_chooser.connect('response', self.__project_chooser_response_cb,
                             metadata_to_send)
     project_chooser._toolbar._proj_list_button_clicked_cb(None)
コード例 #10
0
 def show_image_chooser(self, parent):
     chooser = ObjectChooser(parent._activity, what_filter='Image')
     chooser.connect('response', self.chooser_response_cb)
     chooser.show()
コード例 #11
0
 def show_object_chooser(self, request):
     chooser = ObjectChooser(self._activity)
     chooser.connect('response', self._chooser_response_cb, request)
     chooser.show()