ALT Linux Bugzilla
– Attachment 2500 Details for
Bug 14798
Надо бы сделать возможность вывода полной строки connect
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
вывод полной строки connect
kdenetwork-3.5.9-kppp-connect-str.patch (text/plain), 4.12 KB, created by
Sergey Y. Afonin
on 2008-03-16 20:28:26 MSK
(
hide
)
Description:
вывод полной строки connect
Filename:
MIME Type:
Creator:
Sergey Y. Afonin
Created:
2008-03-16 20:28:26 MSK
Size:
4.12 KB
patch
obsolete
>diff -Nur kppp.old/conwindow.cpp kppp/conwindow.cpp >--- kppp.old/conwindow.cpp 2005-09-10 13:20:37 +0500 >+++ kppp/conwindow.cpp 2008-03-16 18:26:22 +0400 >@@ -43,7 +43,10 @@ > accountingEnabled(false), > volumeAccountingEnabled(false) > { >- info1 = new QLabel(i18n("Connected at:"), this); >+ if (gpppdata.get_full_connect_str()) >+ info1 = new QLabel(i18n("Connection string:"), this); >+ else >+ info1 = new QLabel(i18n("Connected at:"), this); > info2 = new QLabel("", this); > > timelabel1 = new QLabel(i18n("Time connected:"), this); >@@ -261,11 +264,20 @@ > > > void ConWindow::timeclick() { >- QString tooltip = i18n("Connection: %1\n" >- "Connected at: %2\n" >- "Time connected: %3") >- .arg(gpppdata.accname()).arg(info2->text()) >- .arg(time_string2); >+ QString tooltip; >+ >+ if (gpppdata.get_full_connect_str()) >+ tooltip = i18n("Connection: %1\n" >+ "Connection string: %2\n" >+ "Time connected: %3") >+ .arg(gpppdata.accname()).arg(info2->text()) >+ .arg(time_string2); >+ else >+ tooltip = i18n("Connection: %1\n" >+ "Connected at: %2\n" >+ "Time connected: %3") >+ .arg(gpppdata.accname()).arg(info2->text()) >+ .arg(time_string2); > > if(accountingEnabled) > tooltip += i18n("\nSession Bill: %1\nTotal Bill: %2") >diff -Nur kppp.old/general.cpp kppp/general.cpp >--- kppp.old/general.cpp 2008-03-16 20:29:14 +0400 >+++ kppp/general.cpp 2008-03-16 17:17:27 +0400 >@@ -159,6 +159,14 @@ > i18n("Iconifies <i>kppp</i>'s window when a\n" > "connection is established")); > >+ chkBox = new QCheckBox(i18n("Show &full connection string"), parent); >+ chkBox->setChecked(gpppdata.get_full_connect_str()); >+ connect(chkBox,SIGNAL(toggled(bool)), >+ this,SLOT(full_connect_str_toggled(bool))); >+ tl->addWidget(chkBox); >+ QWhatsThis::add(chkBox, >+ i18n("Show full connection string")); >+ > tl->addStretch(); > > } >@@ -187,6 +195,10 @@ > gpppdata.set_redial_on_nocarrier(on); > } > >+void GeneralWidget::full_connect_str_toggled(bool on){ >+ gpppdata.set_full_connect_str(on); >+} >+ > void GeneralWidget::xserver_toggled(bool on){ > gpppdata.set_xserver_exit_disconnect(on); > } >diff -Nur kppp.old/general.h kppp/general.h >--- kppp.old/general.h 2008-03-16 20:29:14 +0400 >+++ kppp/general.h 2008-03-06 23:33:04 +0400 >@@ -51,6 +51,7 @@ > void xserver_toggled(bool on); > void quit_toggled(bool); > void docking_toggled(bool on); >+ void full_connect_str_toggled(bool off); > > }; > >diff -Nur kppp.old/modem.cpp kppp/modem.cpp >--- kppp.old/modem.cpp 2008-03-16 20:29:14 +0400 >+++ kppp/modem.cpp 2008-03-16 20:33:07 +0400 >@@ -445,6 +445,11 @@ > > kdDebug(5002) << "Modem reported result string: " << s << endl; > >+ if (gpppdata.get_full_connect_str()) { >+ result=s.mid(0, s.length()-1); >+ return result; >+ } >+ > const int RXMAX = 7; > const int TXMAX = 2; > QRegExp rrx[RXMAX] = { >diff -Nur kppp.old/pppdata.cpp kppp/pppdata.cpp >--- kppp.old/pppdata.cpp 2008-03-16 20:29:14 +0400 >+++ kppp/pppdata.cpp 2008-03-16 16:31:21 +0400 >@@ -299,6 +299,9 @@ > return (bool) readNumConfig(GENERAL_GRP, REDIALONNOCARR_KEY, false); > } > >+bool PPPData::get_full_connect_str() { >+ return (bool) readNumConfig(GENERAL_GRP, FULLCONNECTSTR_KEY, false); >+} > > void PPPData::setPPPDebug(bool set) { > writeConfig(GENERAL_GRP, PPP_DEBUG_OPTION, (int)set); >@@ -318,6 +321,9 @@ > writeConfig(GENERAL_GRP, REDIALONNOCARR_KEY, (int) set); > } > >+void PPPData::set_full_connect_str(bool set) { >+ writeConfig(GENERAL_GRP, FULLCONNECTSTR_KEY, (int) set); >+} > > bool PPPData::quit_on_disconnect() { > return (bool) readNumConfig(GENERAL_GRP, QUITONDISCONNECT_KEY, false); >diff -Nur kppp.old/pppdata.h kppp/pppdata.h >--- kppp.old/pppdata.h 2008-03-16 20:29:14 +0400 >+++ kppp/pppdata.h 2008-03-16 16:18:53 +0400 >@@ -74,6 +74,7 @@ > #define NUMACCOUNTS_KEY "NumberOfAccounts" > #define NUMMODEMS_KEY "NumberOfModems" > #define REDIALONNOCARR_KEY "RedialOnNoCarrier" >+#define FULLCONNECTSTR_KEY "FullConnectStr" > #define ID_KEY "ID" > > // modem >@@ -230,6 +231,9 @@ > void set_dock_into_panel(bool set); > bool get_dock_into_panel(); > >+ void set_full_connect_str(bool set); >+ bool get_full_connect_str(); >+ > const QString enter(); > void setEnter(const QString &); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 14798
: 2500