Exemplo n.º 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
Exemplo n.º 2
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
Exemplo n.º 3
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
Exemplo n.º 4
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
Exemplo n.º 5
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
Exemplo n.º 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
Exemplo n.º 7
0
 def show_object_chooser(self, request):
     chooser = ObjectChooser(self._activity)
     chooser.connect('response', self._chooser_response_cb, request)
     chooser.show()
Exemplo n.º 8
0
 def show_image_chooser(self, parent):
     chooser = ObjectChooser(parent._activity, what_filter='Image')
     chooser.connect('response', self.chooser_response_cb)
     chooser.show()
Exemplo n.º 9
0
 def show_object_chooser(self, request):
     chooser = ObjectChooser(self._activity)
     chooser.connect('response', self._chooser_response_cb, request)
     chooser.show()