Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
b45ab768
by wurstsalat at 2022-02-20T14:44:50+01:00
1 changed file:
Changes:
| ... | ... | @@ -35,6 +35,7 @@ |
| 35 | 35 |
from gajim.common.const import Trust
|
| 36 | 36 |
from gajim.common.const import TRUST_SYMBOL_DATA
|
| 37 | 37 |
from gajim.common.helpers import AdditionalDataDict
|
| 38 |
+from gajim.common.helpers import from_one_line
|
|
| 38 | 39 |
from gajim.common.helpers import get_group_chat_nick
|
| 39 | 40 |
from gajim.common.helpers import get_muc_context
|
| 40 | 41 |
from gajim.common.helpers import message_needs_highlight
|
| ... | ... | @@ -309,10 +310,12 @@ def is_mergeable(self, message: MessageRow) -> bool: |
| 309 | 310 |
return abs(message.timestamp - self.timestamp) < MERGE_TIMEFRAME
|
| 310 | 311 |
|
| 311 | 312 |
def on_copy_message(self, _widget: Gtk.Widget) -> None:
|
| 312 |
- timestamp = self.timestamp.strftime('%x, %X')
|
|
| 313 |
+ time_format = from_one_line(app.settings.get('chat_timestamp_format'))
|
|
| 314 |
+ timestamp_formatted = self.timestamp.strftime(time_format)
|
|
| 315 |
+ |
|
| 313 | 316 |
clip = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
|
| 314 | 317 |
text = self._message_widget.get_text()
|
| 315 |
- clip.set_text(f'{timestamp} - {self.name}: {text}', -1)
|
|
| 318 |
+ clip.set_text(f'{timestamp_formatted} - {self.name}: {text}', -1)
|
|
| 316 | 319 |
|
| 317 | 320 |
def on_quote_message(self, _widget: Gtk.Widget) -> None:
|
| 318 | 321 |
self.emit('quote', self._message_widget.get_text())
|