Beispiel #1
0
    def on_drag_data_received(self, widget, context, x, y, selection, info, time):
        text, image_file = DnDSelection.parse(info, selection, True)

        if text or image_file:
            updatewindow = UpdateWindow(self)

            if text:
                updatewindow.text_buffer.set_text(text)
            else:
                updatewindow.set_upload_media(image_file)
Beispiel #2
0
    def on_drag_data_received(self, widget, context, x, y, selection, info,
                              time):
        text, image_file = DnDSelection.parse(info, selection, True)

        if text or image_file:
            updatewindow = UpdateWindow(self)

            if text:
                updatewindow.text_buffer.set_text(text)
            else:
                updatewindow.set_upload_media(image_file)
Beispiel #3
0
    def on_drag_drop(self, widget, context, x, y, time, *args):
        if self.dnd.text or self.dnd.file:
            account = widget.api.account
            updatewindow = UpdateWindow(self.scrolled_window.liststore,
                                        source=account.source,
                                        account=account.user_name)

            if self.dnd.text:
                updatewindow.text_buffer.set_text(self.dnd.text)
            elif self.dnd.file:
                updatewindow.set_upload_media(self.dnd.file)

            self.dnd.clear()
Beispiel #4
0
    def on_drag_drop(self, widget, context, x, y, time, *args):
        if self.dnd.text or self.dnd.file:
            account = widget.api.account
            updatewindow = UpdateWindow(self.scrolled_window.liststore, 
                                        source=account.source, 
                                        account=account.user_name)

            if self.dnd.text:
                updatewindow.text_buffer.set_text(self.dnd.text)
            elif self.dnd.file:
                updatewindow.set_upload_media(self.dnd.file)

            self.dnd.clear()