From e62039b727398d8ee31eaff1b322e2b046450e49 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Mon, 4 May 2015 11:30:21 -0400 Subject: [PATCH] Added message dialogs for handling retweets over 140 characters (I thought I pushed these but perhaps not). --- src/gtkUI/commonMessageDialogs.py | 7 +++++++ src/wxUI/commonMessageDialogs.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/gtkUI/commonMessageDialogs.py b/src/gtkUI/commonMessageDialogs.py index 36af9727..91ec1f4e 100644 --- a/src/gtkUI/commonMessageDialogs.py +++ b/src/gtkUI/commonMessageDialogs.py @@ -1,6 +1,13 @@ # -*- coding: utf-8 -*- from gi.repository import Gtk import application +def retweet_as_link(parent): + dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(unicode(application.name)) + dialog.format_secondary_text(_(u"This retweet is over 140 characters. Would you like to post it as a mention to the poster with your comments and a link to the original tweet?")) + answer = dialog.run() + dialog.destroy() + return answer + def retweet_question(parent): dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(u"Retweet")) dialog.format_secondary_text(_(u"Would you like to add a comment to this tweet?")) diff --git a/src/wxUI/commonMessageDialogs.py b/src/wxUI/commonMessageDialogs.py index 67a541fa..4c9c1fce 100644 --- a/src/wxUI/commonMessageDialogs.py +++ b/src/wxUI/commonMessageDialogs.py @@ -1,6 +1,9 @@ # -*- coding: utf-8 -*- import wx import application +def retweet_as_link(parent): + return wx.MessageDialog(parent, _(u"This retweet is over 140 characters. Would you like to post it as a mention to the poster with your comments and a link to the original tweet?"), _(application.name), wx.YES_NO|wx.ICON_QUESTION).ShowModal() + def retweet_question(parent): return wx.MessageDialog(parent, _(u"Would you like to add a comment to this tweet?"), _("Retweet"), wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION).ShowModal()