Hello community,
here is the log from the commit of package polari for openSUSE:Factory checked in at 2016-05-16 12:04:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/polari (Old)
and /work/SRC/openSUSE:Factory/.polari.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "polari"
Changes:
--------
--- /work/SRC/openSUSE:Factory/polari/polari.changes 2016-05-05 08:12:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.polari.new/polari.changes 2016-05-16 12:04:04.000000000 +0200
@@ -1,0 +2,8 @@
+Thu May 12 13:33:51 UTC 2016 - zaitor@opensuse.org
+
+- Update to version 3.20.2:
+ + Support pasting text/image content from files (bgo#766066).
+ + Enable text/image uploads via drag and drop (bgo#766068).
+ + Updated translations.
+
+-------------------------------------------------------------------
Old:
----
polari-3.20.1.tar.xz
New:
----
polari-3.20.2.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ polari.spec ++++++
--- /var/tmp/diff_new_pack.Gd5401/_old 2016-05-16 12:04:05.000000000 +0200
+++ /var/tmp/diff_new_pack.Gd5401/_new 2016-05-16 12:04:05.000000000 +0200
@@ -18,7 +18,7 @@
Name: polari
-Version: 3.20.1
+Version: 3.20.2
Release: 0
Summary: An IRC Client for GNOME
License: GPL-2.0+ and LGPL-2.1+
++++++ polari-3.20.1.tar.xz -> polari-3.20.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polari-3.20.1/NEWS new/polari-3.20.2/NEWS
--- old/polari-3.20.1/NEWS 2016-04-29 18:55:32.000000000 +0200
+++ new/polari-3.20.2/NEWS 2016-05-10 22:01:20.000000000 +0200
@@ -1,3 +1,14 @@
+3.20.2 - "Screw Maximilian"
+===========================
+* Support pasting text/image content from files [Florian; #766066]
+* Enable text/image uploads via drag and drop [Florian; #766068]
+
+Contributors:
+ Florian Müllner
+
+Translations:
+ Kjartan Maraas [nb]
+
3.20.1 - "Judy Stays"
=====================
* Update roomList header popover on name changes [Sankaranarayanan; #763178]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polari-3.20.1/configure new/polari-3.20.2/configure
--- old/polari-3.20.1/configure 2016-04-29 18:56:34.000000000 +0200
+++ new/polari-3.20.2/configure 2016-05-10 22:02:08.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for polari 3.20.1.
+# Generated by GNU Autoconf 2.69 for polari 3.20.2.
#
# Report bugs to https://bugzilla.gnome.org/enter_bug.cgi?product=polari.
#
@@ -591,8 +591,8 @@
# Identity of this package.
PACKAGE_NAME='polari'
PACKAGE_TARNAME='polari'
-PACKAGE_VERSION='3.20.1'
-PACKAGE_STRING='polari 3.20.1'
+PACKAGE_VERSION='3.20.2'
+PACKAGE_STRING='polari 3.20.2'
PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=polari'
PACKAGE_URL=''
@@ -1393,7 +1393,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures polari 3.20.1 to adapt to many kinds of systems.
+\`configure' configures polari 3.20.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1463,7 +1463,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of polari 3.20.1:";;
+ short | recursive ) echo "Configuration of polari 3.20.2:";;
esac
cat <<\_ACEOF
@@ -1595,7 +1595,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-polari configure 3.20.1
+polari configure 3.20.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1964,7 +1964,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by polari $as_me 3.20.1, which was
+It was created by polari $as_me 3.20.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2845,7 +2845,7 @@
# Define the identity of the package.
PACKAGE='polari'
- VERSION='3.20.1'
+ VERSION='3.20.2'
cat >>confdefs.h <<_ACEOF
@@ -16181,7 +16181,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by polari $as_me 3.20.1, which was
+This file was extended by polari $as_me 3.20.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16238,7 +16238,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-polari config.status 3.20.1
+polari config.status 3.20.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polari-3.20.1/configure.ac new/polari-3.20.2/configure.ac
--- old/polari-3.20.1/configure.ac 2016-04-29 18:55:32.000000000 +0200
+++ new/polari-3.20.2/configure.ac 2016-05-10 22:01:27.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([polari],[3.20.1],[https://bugzilla.gnome.org/enter_bug.cgi?product=polari],[polari])
+AC_INIT([polari],[3.20.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=polari],[polari])
AX_IS_RELEASE([git-directory])
AC_SUBST([APP_ID],[org.gnome.Polari])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polari-3.20.1/po/nb.po new/polari-3.20.2/po/nb.po
--- old/polari-3.20.1/po/nb.po 2016-04-23 01:19:31.000000000 +0200
+++ new/polari-3.20.2/po/nb.po 2016-05-10 21:56:34.000000000 +0200
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: polari 3.19.x\n"
+"Project-Id-Version: polari 3.20.x\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-01-10 20:40+0100\n"
-"PO-Revision-Date: 2016-01-10 20:41+0100\n"
+"POT-Creation-Date: 2016-05-01 15:19+0200\n"
+"PO-Revision-Date: 2016-05-01 15:24+0200\n"
"Last-Translator: Kjartan Maraas \n"
"Language-Team: Norwegian Bokmål \n"
"Language: \n"
@@ -20,13 +20,13 @@
"X-Rosetta-Export-Date: 2007-02-25 00:08+0000\n"
#: ../data/appdata/org.gnome.Polari.appdata.xml.in.h:1
-#: ../data/org.gnome.Polari.desktop.in.h:1 ../data/resources/main-window.ui.h:3
-#: ../src/roomStack.js:77
+#: ../data/org.gnome.Polari.desktop.in.h:1 ../data/resources/main-window.ui.h:1
+#: ../src/roomStack.js:94
msgid "Polari"
msgstr "Polari"
#: ../data/appdata/org.gnome.Polari.appdata.xml.in.h:2
-#: ../data/org.gnome.Polari.desktop.in.h:2 ../src/application.js:455
+#: ../data/org.gnome.Polari.desktop.in.h:2 ../src/application.js:625
msgid "An Internet Relay Chat Client for GNOME"
msgstr "En Internet Relay Chat-klient for GNOME"
@@ -56,10 +56,6 @@
msgid "IRC;Internet;Relay;Chat;"
msgstr "IRC;Internett;Relay;Chat;Prat;Lynmeldinger;"
-#: ../data/org.gnome.Polari.desktop.in.h:4
-msgid "Show connections"
-msgstr "Vis tilkoblinger"
-
#: ../data/org.gnome.Polari.gschema.xml.h:1
msgid "Saved channel list"
msgstr "Lagret kanalliste"
@@ -84,170 +80,200 @@
msgid "Window maximized state"
msgstr "Vinduets maksimeringstilstand"
+#: ../data/org.gnome.Polari.gschema.xml.h:7
+msgid "Last active channel"
+msgstr "Sist aktive kanal"
+
+#: ../data/org.gnome.Polari.gschema.xml.h:8
+msgid "Last active (selected) channel"
+msgstr "Sist aktive (valgte) kanal"
+
#: ../data/resources/connection-details.ui.h:1
-msgid "_Address"
-msgstr "_Adresse"
+msgid "_Server Address"
+msgstr "_Tjeneradresse"
#: ../data/resources/connection-details.ui.h:2
-msgid "_Description"
-msgstr "_Beskrivelse"
+msgid "Net_work Name"
+msgstr "Nett_verksnavn"
#: ../data/resources/connection-details.ui.h:3
+#: ../data/resources/join-room-dialog.ui.h:8
+msgid "optional"
+msgstr "valgfri"
+
+#: ../data/resources/connection-details.ui.h:4
+msgid "Use secure c_onnection"
+msgstr "Bruk sikker tilk_obling"
+
+#: ../data/resources/connection-details.ui.h:5
msgid "_Nickname"
msgstr "Kalle_navn"
-#: ../data/resources/connection-details.ui.h:4
+#: ../data/resources/connection-details.ui.h:6
msgid "_Real Name"
msgstr "Vi_rkelig navn"
-#: ../data/resources/connection-details.ui.h:5
-#: ../data/resources/join-room-dialog.ui.h:4
-msgid "optional"
-msgstr "valgfri"
+#: ../data/resources/connection-properties.ui.h:1
+#: ../data/resources/entry-area.ui.h:4
+#: ../data/resources/join-room-dialog.ui.h:2
+msgid "_Cancel"
+msgstr "_Avbryt"
-#. translators: This will be used in the phrase: "Open Connections in the application menu"
-#. translators: This will be used in the phrase: "Enable them by opening Connections in the application menu"
-#: ../data/resources/connection-list-dialog.ui.h:1
-#: ../data/resources/menus.ui.h:1 ../src/roomStack.js:113
-#: ../src/roomStack.js:123
-msgid "Connections"
-msgstr "Tilkoblinger"
-
-#: ../data/resources/connection-list-dialog.ui.h:2
-msgid "Use the + button to add a new connection."
-msgstr "Bruk +-knappen for å legge til en ny tilkobling."
-
-#: ../data/resources/connection-list-dialog.ui.h:3
-msgid "Add"
-msgstr "Legg til"
+#: ../data/resources/connection-properties.ui.h:2
+msgid "_Apply"
+msgstr "_Bruk"
-#: ../data/resources/connection-list-dialog.ui.h:4
-msgid "Remove"
-msgstr "Fjern"
+#: ../data/resources/entry-area.ui.h:1
+msgid "Change nickname:"
+msgstr "Endre kallenavn:"
+
+#: ../data/resources/entry-area.ui.h:2
+msgid "_Change"
+msgstr "_Endre"
+
+#: ../data/resources/entry-area.ui.h:3
+msgid "Change nickname"
+msgstr "Endre kallenavn"
+
+#: ../data/resources/entry-area.ui.h:5
+msgid "_Paste"
+msgstr "_Lim inn"
#: ../data/resources/help-overlay.ui.h:1
+msgctxt "shortcut window"
msgid "General"
msgstr "Generelt"
#: ../data/resources/help-overlay.ui.h:2
+msgctxt "shortcut window"
msgid "Join Room"
msgstr "Bli med i rom"
#: ../data/resources/help-overlay.ui.h:3
-msgid "Message User"
-msgstr "Send melding til bruker"
-
-#: ../data/resources/help-overlay.ui.h:4
+msgctxt "shortcut window"
msgid "Leave Room"
-msgstr "Forlat praterom"
+msgstr "Forlat rom"
-#: ../data/resources/help-overlay.ui.h:5
+#: ../data/resources/help-overlay.ui.h:4
+msgctxt "shortcut window"
msgid "Show Userlist"
msgstr "Vis brukerliste"
-#: ../data/resources/help-overlay.ui.h:6 ../data/resources/menus.ui.h:5
+#: ../data/resources/help-overlay.ui.h:5
+msgctxt "shortcut window"
msgid "Quit"
msgstr "Avslutt"
-#: ../data/resources/help-overlay.ui.h:7 ../data/resources/menus.ui.h:3
+#: ../data/resources/help-overlay.ui.h:6
+msgctxt "shortcut window"
msgid "Keyboard Shortcuts"
msgstr "Tastatursnarveier"
-#: ../data/resources/help-overlay.ui.h:8
+#: ../data/resources/help-overlay.ui.h:7
+msgctxt "shortcut window"
msgid "Navigation"
msgstr "Navigasjon"
-#: ../data/resources/help-overlay.ui.h:9
+#: ../data/resources/help-overlay.ui.h:8
+msgctxt "shortcut window"
msgid "Next Room"
msgstr "Neste rom"
-#: ../data/resources/help-overlay.ui.h:10
+#: ../data/resources/help-overlay.ui.h:9
+msgctxt "shortcut window"
msgid "Previous Room"
msgstr "Forrige rom"
+#: ../data/resources/help-overlay.ui.h:10
+msgctxt "shortcut window"
+msgid "Next Room with Unread Messages"
+msgstr "Neste rom med uleste meldinger"
+
#: ../data/resources/help-overlay.ui.h:11
+msgctxt "shortcut window"
+msgid "Previous Room with Unread Messages"
+msgstr "Forrige rom med uleste meldinger"
+
+#: ../data/resources/help-overlay.ui.h:12
+msgctxt "shortcut window"
msgid "First Room"
msgstr "Første rom"
-#: ../data/resources/help-overlay.ui.h:12
+#: ../data/resources/help-overlay.ui.h:13
+msgctxt "shortcut window"
msgid "Last Room"
msgstr "Siste rom"
-#: ../data/resources/help-overlay.ui.h:13
+#: ../data/resources/help-overlay.ui.h:14
+msgctxt "shortcut window"
msgid "First - Ninth Room"
msgstr "Første - niende rom"
-#: ../data/resources/join-room-dialog.ui.h:1 ../src/joinDialog.js:223
+#: ../data/resources/join-room-dialog.ui.h:1 ../src/joinDialog.js:272
msgid "Join Chat Room"
msgstr "Bli med i praterom"
-#: ../data/resources/join-room-dialog.ui.h:2
-#: ../data/resources/message-user-dialog.ui.h:1 ../src/connections.js:394
-msgid "_Cancel"
-msgstr "_Avbryt"
-
-#: ../data/resources/join-room-dialog.ui.h:3 ../src/joinDialog.js:225
+#: ../data/resources/join-room-dialog.ui.h:3
msgid "_Join"
msgstr "_Bli med"
-#: ../data/resources/join-room-dialog.ui.h:5
-msgid "_Add Connection"
-msgstr "_Legg til tilkobling"
-
-#: ../data/resources/join-room-dialog.ui.h:6
-#: ../data/resources/message-user-dialog.ui.h:3
+#: ../data/resources/join-room-dialog.ui.h:4
msgid "C_onnection"
msgstr "Tilk_obling"
-#: ../data/resources/join-room-dialog.ui.h:7
+#: ../data/resources/join-room-dialog.ui.h:5
+msgid "_Add Network"
+msgstr "_Legg til nettverk"
+
+#: ../data/resources/join-room-dialog.ui.h:6
msgid "Room _Name"
msgstr "_Navn på rom"
-#: ../data/resources/join-room-dialog.ui.h:8
+#: ../data/resources/join-room-dialog.ui.h:7
msgid "_Password"
msgstr "_Passord"
-#: ../data/resources/main-window.ui.h:1
-msgid "Join a Room"
-msgstr "Bli med i et rom"
+#: ../data/resources/join-room-dialog.ui.h:9
+msgid "_Add"
+msgstr "_Legg til"
+
+#: ../data/resources/join-room-dialog.ui.h:10
+msgid "_Custom Network"
+msgstr "_Egendefinert nettverk"
#: ../data/resources/main-window.ui.h:2
-msgid "Message a User"
-msgstr "Send melding til en bruker"
+msgid "Add rooms and networks"
+msgstr "Legg til rom og nettverk"
-#: ../data/resources/main-window.ui.h:4
-msgid "Join room"
-msgstr "Bli med i et rom"
+#: ../data/resources/menus.ui.h:1
+msgid "Keyboard Shortcuts"
+msgstr "Tastatursnarveier"
#: ../data/resources/menus.ui.h:2
-msgid "Preferences"
-msgstr "Brukervalg"
-
-#: ../data/resources/menus.ui.h:4
msgid "About"
msgstr "Om"
-#: ../data/resources/message-user-dialog.ui.h:2
-msgid "_Message"
-msgstr "_Melding"
-
-#: ../data/resources/message-user-dialog.ui.h:4
-msgid "_Recent"
-msgstr "_Nylig"
-
-#: ../data/resources/message-user-dialog.ui.h:5
-msgid "_Name"
-msgstr "_Navn"
+#: ../data/resources/menus.ui.h:3
+msgid "Quit"
+msgstr "Avslutt"
#: ../data/resources/room-list-header.ui.h:1
-msgid "Connection Error"
-msgstr "Feil ved tilkobling"
+msgid "Reconnect"
+msgstr "Koble til på nytt"
+
+#: ../data/resources/room-list-header.ui.h:2
+msgid "Remove"
+msgstr "Fjern"
+
+#: ../data/resources/room-list-header.ui.h:3
+msgid "Properties"
+msgstr "Egenskaper"
#: ../data/resources/user-list-details.ui.h:1
msgid "Loading details"
msgstr "Laster inn detaljer"
-#: ../data/resources/user-list-details.ui.h:2 ../src/userList.js:222
+#: ../data/resources/user-list-details.ui.h:2 ../src/userList.js:218
msgid "Last Activity:"
msgstr "Siste aktivitet:"
@@ -255,11 +281,20 @@
msgid "Message"
msgstr "Melding"
-#: ../src/application.js:372
+#: ../src/application.js:225 ../src/utils.js:181
+msgid "Failed to open link"
+msgstr "Klarte ikke å åpne lenke"
+
+#: ../src/application.js:535
msgid "Good Bye"
msgstr "Ha det bra"
-#: ../src/application.js:454
+#: ../src/application.js:567
+#, javascript-format
+msgid "%s removed."
+msgstr "%s fjernet."
+
+#: ../src/application.js:624
msgid "translator-credits"
msgstr ""
"Øivind Hoel \n"
@@ -267,70 +302,74 @@
"Kjartan Maraas \n"
"Åka Sikrom "
-#: ../src/application.js:460
+#: ../src/application.js:630
msgid "Learn more about Polari"
msgstr "Lær mer om Polari"
-#: ../src/chatView.js:129
+#: ../src/appNotifications.js:85
+msgid "Undo"
+msgstr "Angre"
+
+#: ../src/chatView.js:133
msgid "New Messages"
msgstr "Nye meldinger"
-#: ../src/chatView.js:605
+#: ../src/chatView.js:642
msgid "Open Link"
msgstr "Åpne lenke"
-#: ../src/chatView.js:611
+#: ../src/chatView.js:648
msgid "Copy Link Address"
msgstr "Kopier lenkeadresse"
-#: ../src/chatView.js:774
+#: ../src/chatView.js:819
#, javascript-format
msgid "%s is now known as %s"
msgstr "%s er nå kjent som %s"
-#: ../src/chatView.js:781
+#: ../src/chatView.js:826
#, javascript-format
msgid "%s has disconnected"
msgstr "%s har koblet fra"
-#: ../src/chatView.js:790
+#: ../src/chatView.js:835
#, javascript-format
msgid "%s has been kicked by %s"
msgstr "%s er kastet ut av %s"
-#: ../src/chatView.js:792
+#: ../src/chatView.js:837
#, javascript-format
msgid "%s has been kicked"
msgstr "%s er kastet ut"
-#: ../src/chatView.js:799
+#: ../src/chatView.js:844
#, javascript-format
msgid "%s has been banned by %s"
msgstr "%s er nå utestengt av %s"
-#: ../src/chatView.js:801
+#: ../src/chatView.js:846
#, javascript-format
msgid "%s has been banned"
msgstr "%s er nå utestengt"
-#: ../src/chatView.js:807
+#: ../src/chatView.js:852
#, javascript-format
msgid "%s joined"
msgstr "%s ble med"
-#: ../src/chatView.js:813
+#: ../src/chatView.js:858
#, javascript-format
msgid "%s left"
msgstr "%s gikk ut"
-#: ../src/chatView.js:902
+#: ../src/chatView.js:954
#, javascript-format
msgid "%d user joined"
msgid_plural "%d users joined"
msgstr[0] "%d bruker ble med"
msgstr[1] "%d brukere ble med"
-#: ../src/chatView.js:905
+#: ../src/chatView.js:957
#, javascript-format
msgid "%d user left"
msgid_plural "%d users left"
@@ -339,14 +378,14 @@
#. today
#. Translators: Time in 24h format
-#: ../src/chatView.js:966
+#: ../src/chatView.js:1024
msgid "%H∶%M"
msgstr "%H.%M"
#. yesterday
#. Translators: this is the word "Yesterday" followed by a
#. time string in 24h format. i.e. "Yesterday, 14:30"
-#: ../src/chatView.js:971
+#: ../src/chatView.js:1029
#, no-c-format
msgid "Yesterday, %H∶%M"
msgstr "I går, %H.%M"
@@ -354,7 +393,7 @@
#. this week
#. Translators: this is the week day name followed by a time
#. string in 24h format. i.e. "Monday, 14:30"
-#: ../src/chatView.js:976
+#: ../src/chatView.js:1034
#, no-c-format
msgid "%A, %H∶%M"
msgstr "%A, %H.%M"
@@ -363,7 +402,7 @@
#. Translators: this is the month name and day number
#. followed by a time string in 24h format.
#. i.e. "May 25, 14:30"
-#: ../src/chatView.js:982
+#: ../src/chatView.js:1040
#, no-c-format
msgid "%B %d, %H∶%M"
msgstr "%d %B, %H.%M"
@@ -372,21 +411,21 @@
#. Translators: this is the month name, day number, year
#. number followed by a time string in 24h format.
#. i.e. "May 25 2012, 14:30"
-#: ../src/chatView.js:988
+#: ../src/chatView.js:1046
#, no-c-format
msgid "%B %d %Y, %H∶%M"
msgstr "%d %B %Y, %H.%M"
#. today
#. Translators: Time in 12h format
-#: ../src/chatView.js:993
+#: ../src/chatView.js:1051
msgid "%l∶%M %p"
msgstr "%H.%M"
#. yesterday
#. Translators: this is the word "Yesterday" followed by a
#. time string in 12h format. i.e. "Yesterday, 2:30 pm"
-#: ../src/chatView.js:998
+#: ../src/chatView.js:1056
#, no-c-format
msgid "Yesterday, %l∶%M %p"
msgstr "I går, %H.%M"
@@ -394,7 +433,7 @@
#. this week
#. Translators: this is the week day name followed by a time
#. string in 12h format. i.e. "Monday, 2:30 pm"
-#: ../src/chatView.js:1003
+#: ../src/chatView.js:1061
#, no-c-format
msgid "%A, %l∶%M %p"
msgstr "%A, %H.%M"
@@ -403,7 +442,7 @@
#. Translators: this is the month name and day number
#. followed by a time string in 12h format.
#. i.e. "May 25, 2:30 pm"
-#: ../src/chatView.js:1009
+#: ../src/chatView.js:1067
#, no-c-format
msgid "%B %d, %l∶%M %p"
msgstr "%d %B, %H.%M"
@@ -412,12 +451,22 @@
#. Translators: this is the month name, day number, year
#. number followed by a time string in 12h format.
#. i.e. "May 25 2012, 2:30 pm"
-#: ../src/chatView.js:1015
+#: ../src/chatView.js:1073
#, no-c-format
msgid "%B %d %Y, %l∶%M %p"
msgstr "%d %B %Y, %H.%M"
-#: ../src/connections.js:239
+#: ../src/connections.js:42
+msgid "Already added"
+msgstr "Allerede lagt til"
+
+#. Translators: %s is a connection name
+#: ../src/connections.js:431
+#, javascript-format
+msgid "“%s” Properties"
+msgstr "Egenskaper for «%s»"
+
+#: ../src/connections.js:475
msgid ""
"Polari disconnected due to a network error. Please check if the address "
"field is correct."
@@ -425,21 +474,38 @@
"Polari er koblet fra på grunn av en nettverksfeil. Vennligst sjekk om "
"adressefeltet er korrekt."
-#: ../src/connections.js:379 ../src/roomList.js:235 ../src/roomList.js:255
-msgid "Edit Connection"
-msgstr "Rediger tilkobling"
-
-#: ../src/connections.js:380
-msgid "New Connection"
-msgstr "Ny tilkobling"
+#: ../src/entryArea.js:236
+#, javascript-format
+msgid "Paste %s line of text to public paste service?"
+msgid_plural "Paste %s lines of text to public paste service?"
+msgstr[0] "Lim inn %s tekstlinje på offentlig utklippstavle?"
+msgstr[1] "Lim inn %s tekstlinjer på offentlig utklippstavle?"
+
+#: ../src/entryArea.js:240
+#, javascript-format
+msgid "Uploading %s line of text to public paste service…"
+msgid_plural "Uploading %s lines of text to public paste service…"
+msgstr[0] ""
+msgstr[1] ""
-#: ../src/connections.js:396
-msgid "A_pply"
-msgstr "_Bruk"
+#: ../src/entryArea.js:247
+msgid "Upload image to public paste service?"
+msgstr ""
-#: ../src/connections.js:396
-msgid "Cr_eate"
-msgstr "_Lag"
+#: ../src/entryArea.js:248
+msgid "Uploading image to public paste service…"
+msgstr ""
+
+#. translators: %s is a nick, #%s a channel
+#: ../src/entryArea.js:257
+#, javascript-format
+msgid "%s in #%s"
+msgstr "%s i #%s"
+
+#: ../src/entryArea.js:259
+#, javascript-format
+msgid "Paste from %s"
+msgstr "Lim inn fra %s"
#. commands that would be nice to support:
#.
@@ -478,204 +544,190 @@
msgstr "/ME <handling> - sender <handling> til gjeldende kanal"
#: ../src/ircParser.js:29
+msgid "/MSG <nick> [<message>] - sends a private message to <nick>"
+msgstr "/MSG <kallenavn> - sender en privat melding til <kallenavn>"
+
+#: ../src/ircParser.js:30
msgid "/NAMES - lists users on the current channel"
msgstr "/NAMES - viser brukere i gjeldende kanal"
-#: ../src/ircParser.js:30
+#: ../src/ircParser.js:31
msgid "/NICK <nickname> - sets your nick to <nickname>"
msgstr "/NICK <kallenavn> - endrer eget kallenavn til <kallenavn>"
-#: ../src/ircParser.js:31
+#: ../src/ircParser.js:32
msgid ""
"/PART [<channel>] [<reason>] - leaves <channel>, by default the current one"
msgstr ""
"/PART [<kanal>] [<grunn>] - forlater <kanal>, eller gjeldende kanal hvis du "
"ikke velger noe"
-#: ../src/ircParser.js:32
+#: ../src/ircParser.js:33
msgid "/QUERY <nick> - opens a private conversation with <nick>"
msgstr "/QUERY <kallenavn> - åpner en privat samtale med <kallenavn>"
-#: ../src/ircParser.js:33
+#: ../src/ircParser.js:34
msgid "/QUIT [<reason>] - disconnects from the current server"
msgstr "/QUIT [<grunn>] - kobler fra gjeldende tjener"
-#: ../src/ircParser.js:34
+#: ../src/ircParser.js:35
msgid "/SAY <text> - sends <text> to the current room/contact"
msgstr "/SAY <tekst> - sender <tekst> til gjeldende rom/kontakt"
-#: ../src/ircParser.js:35
+#: ../src/ircParser.js:36
msgid "/TOPIC <topic> - sets the topic to <topic>, or shows the current one"
msgstr ""
"/TOPIC <tema> - endrer kanaltema til <tema>, eller viser gjeldende tema"
-#: ../src/ircParser.js:38
+#: ../src/ircParser.js:39
msgid "Unknown command - try /HELP for a list of available commands"
msgstr ""
"Ukjent kommando. Prøv /HELP for å se en liste over tilgjengelige kommandoer"
-#: ../src/ircParser.js:59
+#: ../src/ircParser.js:60
#, javascript-format
msgid "Usage: %s"
msgstr "Bruk: %s"
-#: ../src/ircParser.js:97
+#: ../src/ircParser.js:98
msgid "Known commands:"
msgstr "Kjente kommandoer:"
-#: ../src/ircParser.js:177
+#: ../src/ircParser.js:198
#, javascript-format
msgid "Users on %s:"
msgstr "Brukere på %s:"
-#: ../src/ircParser.js:261
+#: ../src/ircParser.js:283
msgid "No topic set"
msgstr "Emne er ikke valgt"
-#: ../src/joinDialog.js:224
-msgid "Add Connection"
-msgstr "Legg til tilkobling"
-
-#: ../src/joinDialog.js:226
-msgid "_Save"
-msgstr "_Lagre"
+#: ../src/joinDialog.js:273
+msgid "Add Network"
+msgstr "Legg til nettverk"
-#: ../src/mainWindow.js:306
+#: ../src/mainWindow.js:308
#, javascript-format
msgid "%d user"
msgid_plural "%d users"
msgstr[0] "%d bruker"
msgstr[1] "%d brukere"
-#: ../src/messageDialog.js:95
-msgid "No recent users"
-msgstr "Ingen nylige brukere"
-
-#. translators: %s is a nick, #%s a channel
-#: ../src/pasteManager.js:95
-#, javascript-format
-msgid "%s in #%s"
-msgstr "%s i #%s"
-
-#: ../src/pasteManager.js:97
-#, javascript-format
-msgid "Paste from %s"
-msgstr "Lim inn fra %s"
-
-#: ../src/pasteManager.js:306
-#, javascript-format
-msgid "Uploading %s"
-msgstr "Laster opp %s"
-
-#: ../src/roomList.js:104
+#: ../src/roomList.js:129
msgid "Leave chatroom"
msgstr "Forlat praterom"
-#: ../src/roomList.js:105
+#: ../src/roomList.js:129
msgid "End conversation"
msgstr "Avslutt samtale"
-#: ../src/roomList.js:213
+#: ../src/roomList.js:216
#, javascript-format
-msgid "Connection %s has an error"
-msgstr "Tilkobling %s har en feil"
+msgid "Network %s has an error"
+msgstr "Nettverk %s har en feil"
-#: ../src/roomList.js:233
-msgid "Please check your connection details."
-msgstr "Vennligst sjekk tilkoblingsdetaljene."
-
-#: ../src/roomList.js:254
-msgid "Could not make connection in a safe way."
-msgstr "Kunne ikke koble til på en sikker måte."
-
-#: ../src/roomList.js:262
-msgid "Authentication failed."
-msgstr "Autentisering feilet."
-
-#: ../src/roomList.js:263 ../src/roomList.js:274 ../src/roomList.js:282
-msgid "Try again"
-msgstr "Prøv igjen"
+#. Translators: This is an account name followed by a
+#. server address, e.g. "GNOME (irc.gnome.org)"
+#: ../src/roomList.js:266
+#, javascript-format
+msgid "%s (%s)"
+msgstr "%s (%s)"
#: ../src/roomList.js:273
-msgid "The server is busy."
-msgstr "Tjeneren er opptatt."
+msgid "Connection Problem"
+msgstr "Feil ved tilkobling"
#: ../src/roomList.js:281
-msgid "Failed to connect for an unknown reason."
-msgstr "Klarte ikke å koble til av ukjent grunn."
+msgid "Connected"
+msgstr "Koblet til"
+
+#: ../src/roomList.js:283
+msgid "Connecting..."
+msgstr "Kobler til …"
-#: ../src/roomStack.js:111
-msgid "Begin chatting by adding a new connection."
-msgstr "Start samtale ved å legge til en ny tilkobling."
+#: ../src/roomList.js:285
+msgid "Offline"
+msgstr "Frakoblet"
-#: ../src/roomStack.js:114
+#: ../src/roomList.js:287
+msgid "Unknown"
+msgstr "Ukjent"
+
+#: ../src/roomList.js:307
#, javascript-format
-msgid "Open %s in the application menu."
-msgstr "Åpne %s i programmenyen."
+msgid "Could not connect to %s in a safe way."
+msgstr "Kunne ikke koble til %s på en sikker måte."
-#: ../src/roomStack.js:117
-msgid "Join a room using the + button."
-msgstr "Bli med i et samtalerom ved å bruke +-knappen"
+#: ../src/roomList.js:310
+#, javascript-format
+msgid "%s requires a password."
+msgstr "%s krever et passord."
-#: ../src/roomStack.js:121
-msgid "Your connections are disabled."
-msgstr "Tilkoblingene dine er slått av."
+#: ../src/roomList.js:316
+#, javascript-format
+msgid "Could not connect to %s. The server is busy."
+msgstr "Kunne ikke koble til %s. Tjeneren er opptatt."
-#: ../src/roomStack.js:124
+#: ../src/roomList.js:319
#, javascript-format
-msgid "Enable them by opening %s in the application menu."
-msgstr "Slå dem på ved å åpne %s i programmenyen."
+msgid "Could not connect to %s."
+msgstr "Kunne ikke koble til %s."
-#: ../src/userList.js:178
+#: ../src/roomStack.js:97
+msgid "Join a room using the + button."
+msgstr "Bli med i et samtalerom ved å bruke +-knappen"
+
+#: ../src/userList.js:174
#, javascript-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] "%d sekund siden"
msgstr[1] "%d sekunder siden"
-#: ../src/userList.js:183
+#: ../src/userList.js:179
#, javascript-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%d minutt siden"
msgstr[1] "%d minutter siden"
-#: ../src/userList.js:188
+#: ../src/userList.js:184
#, javascript-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "%d time siden"
msgstr[1] "%d timer siden"
-#: ../src/userList.js:193
+#: ../src/userList.js:189
#, javascript-format
msgid "%d day ago"
msgid_plural "%d days ago"
msgstr[0] "%d dag siden"
msgstr[1] "%d dager siden"
-#: ../src/userList.js:198
+#: ../src/userList.js:194
#, javascript-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] "%d uke siden"
msgstr[1] "%d uker siden"
-#: ../src/userList.js:202
+#: ../src/userList.js:198
#, javascript-format
msgid "%d month ago"
msgid_plural "%d months ago"
msgstr[0] "%d måned siden"
msgstr[1] "%d måneder siden"
-#: ../src/userList.js:380
+#: ../src/userList.js:383
msgid "No results"
msgstr "Ingen resultater"
-#: ../src/userList.js:554
+#: ../src/userList.js:556
msgid "All"
msgstr "Alle"
-#: ../src/utils.js:133
-msgid "Failed to open link"
-msgstr "Klarte ikke å åpne lenke"
+#: ../src/utils.js:121
+#, javascript-format
+msgid "Polari server password for %s"
+msgstr "Passord tjener for %s"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polari-3.20.1/src/chatView.js new/polari-3.20.2/src/chatView.js
--- old/polari-3.20.1/src/chatView.js 2016-04-29 18:08:12.000000000 +0200
+++ new/polari-3.20.2/src/chatView.js 2016-05-10 21:56:34.000000000 +0200
@@ -11,6 +11,7 @@
const Lang = imports.lang;
const Mainloop = imports.mainloop;
+const PasteManager = imports.pasteManager;
const Signals = imports.signals;
const Utils = imports.utils;
@@ -220,7 +221,9 @@
const ChatView = new Lang.Class({
Name: 'ChatView',
Extends: Gtk.ScrolledWindow,
+ Implements: [PasteManager.DropTargetIface],
Properties: {
+ 'can-drop': GObject.ParamSpec.override('can-drop', PasteManager.DropTargetIface),
'max-nick-chars': GObject.ParamSpec.uint('max-nick-chars',
'max-nick-chars',
'max-nick-chars',
@@ -308,7 +311,7 @@
this._scrollBottom = adj.upper - adj.page_size;
this._app = Gio.Application.get_default();
- this._app.pasteManager.addWidget(this._view);
+ PasteManager.DropTargetIface.addTargets(this, this._view);
this._hoverCursor = Gdk.Cursor.new(Gdk.CursorType.HAND1);
@@ -516,6 +519,10 @@
return this._maxNickChars;
},
+ get can_drop() {
+ return this._channel != null;
+ },
+
_updateMaxNickChars: function(length) {
if (length <= this._maxNickChars)
return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polari-3.20.1/src/entryArea.js new/polari-3.20.2/src/entryArea.js
--- old/polari-3.20.1/src/entryArea.js 2016-03-16 18:22:07.000000000 +0100
+++ new/polari-3.20.2/src/entryArea.js 2016-05-10 21:56:34.000000000 +0200
@@ -21,16 +21,37 @@
const ChatEntry = new Lang.Class({
Name: 'ChatEntry',
Extends: Gtk.Entry,
+ Implements: [PasteManager.DropTargetIface],
+ Properties: {
+ 'can-drop': GObject.ParamSpec.override('can-drop', PasteManager.DropTargetIface),
+ },
Signals: { 'text-pasted': { param_types: [GObject.TYPE_STRING,
GObject.TYPE_INT] },
- 'image-pasted': { param_types: [GdkPixbuf.Pixbuf.$gtype] } },
+ 'image-pasted': { param_types: [GdkPixbuf.Pixbuf.$gtype] },
+ 'file-pasted': { param_types: [Gio.File.$gtype] } },
_init: function(params) {
this.parent(params);
+ PasteManager.DropTargetIface.addTargets(this, this);
+
this._useDefaultHandler = false;
},
+ get can_drop() {
+ return true;
+ },
+
+ vfunc_drag_data_received: function(context, x, y, data, info, time) {
+ let str = data.get_text();
+ if (!str || str.split('\n').length >= MAX_LINES)
+ // Disable GtkEntry's built-in drop target support
+ return;
+
+ GObject.signal_stop_emission_by_name(this, 'drag-data-received');
+ this.parent(context, x, y, data, info, time);
+ },
+
vfunc_paste_clipboard: function(entry) {
if (!this.editable || this._useDefaultHandler) {
this.parent();
@@ -38,21 +59,12 @@
}
let clipboard = Gtk.Clipboard.get_default(this.get_display());
- clipboard.request_text(Lang.bind(this,
- function(clipboard, text) {
- if (text == null)
- return;
- text = text.trim();
-
- let nLines = text.split('\n').length;
- if (nLines >= MAX_LINES) {
- this.emit('text-pasted', text, nLines);
- return;
- }
-
- this._useDefaultHandler = true;
- this.emit('paste-clipboard');
- this._useDefaultHandler = false;
+ clipboard.request_uris(Lang.bind(this,
+ function(clipboard, uris) {
+ if (uris && uris.length)
+ this.emit('file-pasted', Gio.File.new_for_uri(uris[0]));
+ else
+ clipboard.request_text(Lang.bind(this, this._onTextReceived));
}));
clipboard.request_image(Lang.bind(this,
@@ -62,6 +74,22 @@
this.emit('image-pasted', pixbuf);
}));
},
+
+ _onTextReceived: function(clipboard, text) {
+ if (text == null)
+ return;
+ text = text.trim();
+
+ let nLines = text.split('\n').length;
+ if (nLines >= MAX_LINES) {
+ this.emit('text-pasted', text, nLines);
+ return;
+ }
+
+ this._useDefaultHandler = true;
+ this.emit('paste-clipboard');
+ this._useDefaultHandler = false;
+ }
});
const EntryArea = new Lang.Class({
@@ -116,8 +144,33 @@
}));
this._nickPopover.set_default_widget(this._changeButton);
- this._chatEntry.connect('text-pasted', Lang.bind(this, this._onTextPasted));
- this._chatEntry.connect('image-pasted', Lang.bind(this, this._onImagePasted));
+ this._chatEntry.connect('text-pasted', Lang.bind(this,
+ function(entry, text, nLines) {
+ this.pasteText(text, nLines);
+ }));
+ this._chatEntry.connect('text-dropped', Lang.bind(this,
+ function(entry, text) {
+ this.pasteText(text, text.split('\n').length);
+ }));
+
+ this._chatEntry.connect('image-pasted', Lang.bind(this,
+ function(entry, image) {
+ this.pasteImage(image);
+ }));
+ this._chatEntry.connect('image-dropped', Lang.bind(this,
+ function(entry, image) {
+ this.pasteImage(image);
+ }));
+
+ this._chatEntry.connect('file-pasted', Lang.bind(this,
+ function(entry, file) {
+ this.pasteFile(file);
+ }));
+ this._chatEntry.connect('file-dropped', Lang.bind(this,
+ function(entry, file) {
+ this.pasteFile(file);
+ }));
+
this._chatEntry.connect('changed', Lang.bind(this, this._onEntryChanged));
this._chatEntry.connect('activate', Lang.bind(this,
@@ -231,7 +284,7 @@
}
},
- _onTextPasted: function(entry, text, nLines) {
+ pasteText: function(text, nLines) {
this._confirmLabel.label =
ngettext("Paste %s line of text to public paste service?",
"Paste %s lines of text to public paste service?",
@@ -243,12 +296,48 @@
this._setPasteContent(text);
},
- _onImagePasted: function(entry, pixbuf) {
+ pasteImage: function(pixbuf) {
this._confirmLabel.label = _("Upload image to public paste service?");
this._uploadLabel.label = _("Uploading image to public paste service…");
this._setPasteContent(pixbuf);
},
+ pasteFile: function(file) {
+ file.query_info_async(Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ Gio.FileQueryInfoFlags.NONE,
+ GLib.PRIORITY_DEFAULT, null,
+ Lang.bind(this, this._onFileInfoReady));
+ },
+
+ _onFileInfoReady: function(file, res) {
+ let fileInfo = null;
+ try {
+ fileInfo = file.query_info_finish(res);
+ } catch(e) {
+ return;
+ }
+
+ let contentType = fileInfo.get_content_type();
+
+ if (Gio.content_type_is_a(contentType, 'text/plain'))
+ file.load_contents_async(null, Lang.bind(this,
+ function(f, res) {
+ let [, contents, ,] = f.load_contents_finish(res);
+ let text = contents.toString();
+ this.pasteText(text, text.length);
+ }));
+ else if (Gio.content_type_is_a(contentType, 'image/*'))
+ file.read_async(GLib.PRIORITY_DEFAULT, null, Lang.bind(this,
+ function(f, res) {
+ let stream = f.read_finish(res);
+ GdkPixbuf.Pixbuf.new_from_stream_async(stream, null,
+ Lang.bind(this, function(stream, res) {
+ let pixbuf = GdkPixbuf.Pixbuf.new_from_stream_finish(res);
+ this.pasteImage(pixbuf);
+ }));
+ }));
+ },
+
_onPasteClicked: function() {
let title;
let nick = this._room.channel.connection.self_contact.alias;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polari-3.20.1/src/pasteManager.js new/polari-3.20.2/src/pasteManager.js
--- old/polari-3.20.1/src/pasteManager.js 2016-02-25 12:44:04.000000000 +0100
+++ new/polari-3.20.2/src/pasteManager.js 2016-05-10 21:56:34.000000000 +0200
@@ -2,6 +2,7 @@
const GdkPixbuf = imports.gi.GdkPixbuf;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
+const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Polari = imports.gi.Polari;
const Tp = imports.gi.TelepathyGLib;
@@ -18,25 +19,49 @@
IMAGE: 3,
};
+function _getTargetForContentType(contentType) {
+ if (Gio.content_type_is_a(contentType, 'text/plain'))
+ return DndTargetType.TEXT;
+ else if (Gio.content_type_is_a(contentType, 'image/*'))
+ return DndTargetType.IMAGE;
+ else
+ return 0;
+}
+
+
const PasteManager = new Lang.Class({
Name: 'PasteManager',
_init: function() {
- this._widgets = [];
+ },
- this._dragHighlight = false;
- this._dragDataReceived = false;
- this._dragPending = false;
+ pasteContent: function(content, title, callback) {
+ if (typeof content == 'string') {
+ Utils.gpaste(content, title, callback);
+ } else if (content instanceof GdkPixbuf.Pixbuf) {
+ Utils.imgurPaste(content, title, callback);
+ } else {
+ throw new Error('Unhandled content type');
+ }
+ }
+});
- this._roomManager = ChatroomManager.getDefault();
+const DropTargetIface = new Lang.Interface({
+ Name: 'DropTargetIface',
+ Requires: [GObject.Object],
+ Properties: {
+ 'can-drop': GObject.ParamSpec.boolean('can-drop', '', '',
+ GObject.ParamFlags.READABLE,
+ false)
+ },
+ Signals: {
+ 'text-dropped': { param_types: [GObject.TYPE_STRING] },
+ 'image-dropped': { param_types: [GdkPixbuf.Pixbuf.$gtype] },
+ 'file-dropped': { param_types: [Gio.File.$gtype] }
},
- addWidget: function(widget) {
- // auto-paste needs some design; disable for now
- return;
-
- if (this._widgets.indexOf(widget) != -1)
- return;
+ addTargets: function(widget) {
+ this._dragHighlight = false;
widget.drag_dest_set(0, [], Gdk.DragAction.COPY);
@@ -53,32 +78,14 @@
widget.connect('drag-drop', Lang.bind(this, this._onDragDrop));
widget.connect('drag-leave', Lang.bind(this, this._onDragLeave));
widget.connect('drag-motion', Lang.bind(this, this._onDragMotion));
- widget.connect('drag-data-received',
- Lang.bind(this, this._onDragDataReceived));
-
- widget.connect('destroy', Lang.bind(this,
- function(w) {
- for (let i = 0; i < this._widgets.length; i++)
- if (this._widgets[i] == w) {
- this._widgets.slice(i, 1);
- break;
- }
- }));
-
- this._widgets.push(widget);
- },
-
- pasteContent: function(content, title, callback) {
- if (typeof content == 'string') {
- Utils.gpaste(content, title, callback);
- } else if (content instanceof GdkPixbuf.Pixbuf) {
- Utils.imgurPaste(content, title, callback);
- } else {
- throw new Error('Unhandled content type');
- }
+ widget.connect_after('drag-data-received',
+ Lang.bind(this, this._onDragDataReceived));
},
_onDragDrop: function(widget, context, x, y, time) {
+ if (!this.can_drop)
+ return Gdk.EVENT_PROPAGATE;
+
if (!Polari.drag_dest_supports_target(widget, context, null))
return Gdk.EVENT_PROPAGATE;
@@ -89,34 +96,22 @@
_onDragLeave: function(widget, context, time) {
widget.drag_unhighlight();
this._dragHighlight = false;
- this._dragDataReceived = false;
- this._dragPending = false;
},
_onDragMotion: function(widget, context, x, y, time) {
+ if (!this.can_drop)
+ return Gdk.EVENT_PROPAGATE;
+
if (!Polari.drag_dest_supports_target(widget, context, null))
return Gdk.EVENT_PROPAGATE;
let info = Polari.drag_dest_find_target(widget, context);
switch (info) {
case DndTargetType.TEXT:
- //case DndTargetType.IMAGE:
- Gdk.drag_status(context, Gdk.DragAction.COPY, time);
- break;
+ case DndTargetType.IMAGE:
case DndTargetType.URI_LIST:
- /* FIXME: the latter doesn't seem to work, pretend to support
- all drops */
Gdk.drag_status(context, Gdk.DragAction.COPY, time);
break;
-
- let action = 0;
- if (!this._dragDataReceived) {
- this._dragPending = true;
- Polari.drag_dest_request_data(widget, context, time);
- } else {
- Gdk.drag_status(context, action, time);
- }
- break;
default:
return Gdk.EVENT_PROPAGATE;
}
@@ -131,28 +126,6 @@
_onDragDataReceived: function(widget, context, x, y, data, info, time) {
- if (this._dragPending) {
- this._dragPending = false;
-
- if (info != DndTargetType.URI_LIST) {
- Gdk.drag_status(context, 0, time);
- return;
- }
-
- let uris = data.get_uris();
- this._dragDataReceived = true;
- // TODO: handle multiple files ...
- let file = Gio.File.new_for_uri(uris[0]);
- this._lookupFileInfo(file, Lang.bind(this,
- function(name, targetType) {
- let action = 0;
- if (targetType == DndTargetType.TEXT)
- action = Gdk.DragAction.COPY;
- Gdk.drag_status(context, action, time);
- }));
- return;
- }
-
if (info == DndTargetType.URI_LIST) {
let uris = data.get_uris();
if (!uris) {
@@ -163,43 +136,30 @@
// TODO: handle multiple files ...
let file = Gio.File.new_for_uri(uris[0]);
this._lookupFileInfo(file, Lang.bind(this,
- function(name, targetType) {
- let canHandle = // targetType != 0;
- targetType == DndTargetType.TEXT;
-
+ function(targetType) {
+ let canHandle = targetType != 0;
if (canHandle)
- this._handleFileContent(file, displayName, targetType);
+ this.emit('file-dropped', file);
Gtk.drag_finish(context, canHandle, false, time);
}));
} else {
let success = false;
switch(info) {
case DndTargetType.TEXT:
- this.pasteText(data.get_text());
+ this.emit('text-dropped', data.get_text());
success = true;
break;
case DndTargetType.IMAGE:
- // not implemented
- //this._pasteImage(data.get_pixbuf());
+ this.emit('image-dropped', data.get_pixbuf());
+ success = true;
break;
}
Gtk.drag_finish(context, success, false, time);
}
},
- _getTargetForContentType: function(contentType) {
- if (Gio.content_type_is_a(contentType, 'text/plain'))
- return DndTargetType.TEXT;
- else if (Gio.content_type_is_a(contentType, 'image/*'))
- return DndTargetType.IMAGE;
- else
- return 0;
- },
-
_lookupFileInfo: function(file, callback) {
- let attr = Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE + ',' +
- Gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME;
- file.query_info_async(attr,
+ file.query_info_async(Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
Gio.FileQueryInfoFlags.NONE,
GLib.PRIORITY_DEFAULT,
null, Lang.bind(this,
@@ -208,43 +168,12 @@
try {
fileInfo = file.query_info_finish(res);
} catch(e) {
- logError(e);
- callback(null, 0);
+ callback(0);
Gtk.drag_finish(context, false, false, time);
}
- let displayName = fileInfo.get_display_name();
let contentType = fileInfo.get_content_type();
- let targetType = this._getTargetForContentType(contentType);
- callback(displayName, targetType);
+ callback(_getTargetForContentType(contentType));
}))
- },
-
-
- _handleFileContent: function(file, name, type) {
- let app = Gio.Application.get_default();
- let n = new UploadNotification(name);
- app.notificationQueue.addNotification(n);
-
- if (type == DndTargetType.TEXT) {
- file.load_contents_async(null, Lang.bind(this,
- function(f, res) {
- let [, contents, ,] = f.load_contents_finish(res);
- this._pasteText(contents.toString(), n);
- }));
- } else if (type == DndTargetType.IMAGE) {
- file.read_async(GLib.PRIORITY_DEFAULT, null, Lang.bind(this,
- function(f, res) {
- let stream = f.read_finish(res);
- GdkPixbuf.Pixbuf.new_from_stream_async(stream, null,
- Lang.bind(this, function(stream, res) {
- let pixbuf = GdkPixbuf.Pixbuf.new_from_stream_finish(res);
- this._pasteImage(pixbuf, n);
- }));
- }));
- } else {
- log('Unhandled type');
- n.close();
- }
}
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polari-3.20.1/src/roomStack.js new/polari-3.20.2/src/roomStack.js
--- old/polari-3.20.1/src/roomStack.js 2016-04-29 18:06:24.000000000 +0200
+++ new/polari-3.20.2/src/roomStack.js 2016-05-10 21:56:34.000000000 +0200
@@ -135,6 +135,19 @@
GObject.BindingFlags.SYNC_CREATE);
sizeGroup.add_widget(this._entryArea);
+ this._view.connect('text-dropped', Lang.bind(this,
+ function(view, text) {
+ this._entryArea.pasteText(text, text.split('\n').length);
+ }));
+ this._view.connect('image-dropped', Lang.bind(this,
+ function(view, image) {
+ this._entryArea.pasteImage(image);
+ }));
+ this._view.connect('file-dropped', Lang.bind(this,
+ function(view, file) {
+ this._entryArea.pasteFile(file);
+ }));
+
this.show_all();
},