From 4bacf60326518a8ac002e4829504a6b0a3ef0041 Mon Sep 17 00:00:00 2001 From: Jesper Thomschutz Date: Mon, 2 Apr 2007 20:23:25 +0200 Subject: [PATCH] Minor fixes for push --- w_timeline.cpp | 9 +++++++-- w_timeline.ui | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/w_timeline.cpp b/w_timeline.cpp index d268379..4708123 100644 --- a/w_timeline.cpp +++ b/w_timeline.cpp @@ -9,8 +9,11 @@ w_Timeline::w_Timeline(TwitterSocket *socket, QWidget *parent) twitterSocket = socket; + // Send message button (Squawk!) QObject::connect(pb_update, SIGNAL(clicked()), this, SLOT(sendUpdate())); - + //Result of the button press + QObject::connect( twitterSocket, SIGNAL( result(bool,QString) ), this, SLOT( updateResult(bool, QString) ) ); + //Refresh the timeline ever so often... timer = new QTimer(this); QObject::connect(timer, SIGNAL(timeout()), this, SLOT(refresh())); @@ -19,12 +22,14 @@ w_Timeline::w_Timeline(TwitterSocket *socket, QWidget *parent) void w_Timeline::sendUpdate() { - QObject::connect( twitterSocket, SIGNAL( result(bool,QString) ), this, SLOT( updateResult(bool, QString) ) ); + pb_update->setEnabled(false); twitterSocket->update(le_message->text()); } void w_Timeline::updateResult(bool error, QString errorstring) { + pb_update->setEnabled(true); + le_message->clear(); qDebug() << "Update done:" << error; } diff --git a/w_timeline.ui b/w_timeline.ui index d4ce544..e013232 100644 --- a/w_timeline.ui +++ b/w_timeline.ui @@ -31,7 +31,11 @@ 6 - + + + 140 + + -- 2.11.4.GIT