[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r2922: Remove the horizontal scroll bar behavior. It was really ann (vidalia/trunk/src/vidalia/log)



Author: edmanm
Date: 2008-08-02 21:19:40 -0400 (Sat, 02 Aug 2008)
New Revision: 2922

Modified:
   vidalia/trunk/src/vidalia/log/logheaderview.cpp
   vidalia/trunk/src/vidalia/log/logheaderview.h
   vidalia/trunk/src/vidalia/log/logtreewidget.cpp
   vidalia/trunk/src/vidalia/log/logtreewidget.h
   vidalia/trunk/src/vidalia/log/messagelog.cpp
   vidalia/trunk/src/vidalia/log/messagelog.h
Log:
Remove the horizontal scroll bar behavior. It was really annoying and
unnecessary since long messages have tooltips anyway.


Modified: vidalia/trunk/src/vidalia/log/logheaderview.cpp
===================================================================
--- vidalia/trunk/src/vidalia/log/logheaderview.cpp	2008-08-03 00:35:46 UTC (rev 2921)
+++ vidalia/trunk/src/vidalia/log/logheaderview.cpp	2008-08-03 01:19:40 UTC (rev 2922)
@@ -44,18 +44,3 @@
 }
 
 
-/** Resizes the column headers based on the longest message item. */
-void
-LogHeaderView::resize(int hint)
-{
-  int size = sectionSize(COL_MESG);
-  if (hint > size) {
-    /* The message is wider than the window, so expand the column */
-    setStretchLastSection(false);
-    resizeSection(COL_MESG, hint);
-  } else if (hint < size) {
-    /* The message is short, so just stretch the last column to the end */
-    setStretchLastSection(true);
-  }
-}
-

Modified: vidalia/trunk/src/vidalia/log/logheaderview.h
===================================================================
--- vidalia/trunk/src/vidalia/log/logheaderview.h	2008-08-03 00:35:46 UTC (rev 2921)
+++ vidalia/trunk/src/vidalia/log/logheaderview.h	2008-08-03 01:19:40 UTC (rev 2922)
@@ -30,8 +30,6 @@
 
   /** Resets all column widths back to their defaults. */
   void resetColumnWidths();
-  /** Resizes the column headers based on the longest message item. */
-  void resize(int hint);
 };
 
 #endif

Modified: vidalia/trunk/src/vidalia/log/logtreewidget.cpp
===================================================================
--- vidalia/trunk/src/vidalia/log/logtreewidget.cpp	2008-08-03 00:35:46 UTC (rev 2921)
+++ vidalia/trunk/src/vidalia/log/logtreewidget.cpp	2008-08-03 01:19:40 UTC (rev 2922)
@@ -80,8 +80,6 @@
   if (!shown) {
     /* Set the default column widths the first time this is shown */
     ((LogHeaderView *)header())->resetColumnWidths();
-    /* Adjust the message column properly */
-    adjustMessageColumn();
     shown = true;
   }
 }
@@ -95,24 +93,6 @@
   clear();
 }
 
-/** Adjusts the message column width to accomodate long messages. */
-void
-LogTreeWidget::adjustMessageColumn()
-{
-  /* Adjust the message column, based on the longest item. */
-  ((LogHeaderView *)header())->resize(sizeHintForColumn(MessageColumn));
-}
-
-/** Adds a message log item. */
-void
-LogTreeWidget::addMessageItem(LogTreeItem *item)
-{
-  /* Add the new item. */
-  addTopLevelItem(item);
-  /* Adjust the column headers to accomodate a long message, if necesssary */
-  adjustMessageColumn();
-}
-
 /** Returns a list of all currently selected items. */
 QStringList
 LogTreeWidget::selectedMessages()
@@ -191,8 +171,8 @@
    *       to force the result to be sorted immediately. Otherwise, the new
    *       message is not sorted until the message log has focus again.
    */
-  setSortingEnabled(false); 
-  addMessageItem(item);
+  setSortingEnabled(false);
+  addTopLevelItem(item);
   setSortingEnabled(true);
 
   if (_scrollOnNewItem) {

Modified: vidalia/trunk/src/vidalia/log/logtreewidget.h
===================================================================
--- vidalia/trunk/src/vidalia/log/logtreewidget.h	2008-08-03 00:35:46 UTC (rev 2921)
+++ vidalia/trunk/src/vidalia/log/logtreewidget.h	2008-08-03 01:19:40 UTC (rev 2922)
@@ -63,9 +63,6 @@
   /** Searches the log for entries that contain the given text. */
   QList<LogTreeItem *> find(QString text, bool highlight = true);
 
-  /** Adjusts the message column, for long messages. */
-  void adjustMessageColumn();
-
 public slots:
   /** Clears all contents on the message log and resets the counter. */
   void clearMessages();
@@ -79,8 +76,6 @@
   void verticalSliderReleased();
 
 private:
-  /** Adds a message log item. */
-  void addMessageItem(LogTreeItem *item);
   /** Casts a QList of one pointer type to another. */
   QList<LogTreeItem *> qlist_cast(QList<QTreeWidgetItem *> inlist);
   /** Sortrs a QList of pointers to tree items. */

Modified: vidalia/trunk/src/vidalia/log/messagelog.cpp
===================================================================
--- vidalia/trunk/src/vidalia/log/messagelog.cpp	2008-08-03 00:35:46 UTC (rev 2921)
+++ vidalia/trunk/src/vidalia/log/messagelog.cpp	2008-08-03 01:19:40 UTC (rev 2922)
@@ -82,16 +82,6 @@
   _logFile.close();
 }
 
-/** Responds to the user resizing the message log. */
-void
-MessageLog::resizeEvent(QResizeEvent *event)
-{
-  Q_UNUSED(event);
-
-  /* Let the message list know that it may need to add a scrollbar */
-  ui.lstMessages->adjustMessageColumn();
-}
-
 /** Binds events (signals) to actions (slots). */
 void
 MessageLog::createActions()

Modified: vidalia/trunk/src/vidalia/log/messagelog.h
===================================================================
--- vidalia/trunk/src/vidalia/log/messagelog.h	2008-08-03 00:35:46 UTC (rev 2921)
+++ vidalia/trunk/src/vidalia/log/messagelog.h	2008-08-03 01:19:40 UTC (rev 2922)
@@ -63,10 +63,6 @@
   /** Called when the user clicks "Help" to see help info about the log. */
   void help();
 
-protected:
-  /** Responds to the user resizing the message log. */
-  void resizeEvent(QResizeEvent *event);
-  
 private:  
   /** Create and bind actions to events **/
   void createActions();