Changeset 547

Show
Ignore:
Timestamp:
04/01/06 01:55:14 (3 years ago)
Author:
edmanm
Message:

Move the Settings button from the bottom of the message log to the toolbar.

Location:
trunk/src/gui
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/log/messagelog.cpp

    r500 r547  
    8686  ui.lstMessages->header()->resizeSection(COL_TYPE, COL_TYPE_WIDTH); 
    8787   
    88   /* Hide Message Log Settings frame */ 
    89   showSettingsFrame(false); 
    90  
    9188  /* Turn off opacity group on unsupported platforms */ 
    9289#if defined(Q_WS_WIN) 
     
    137134  connect(ui.sldrOpacity, SIGNAL(valueChanged(int)), 
    138135      this, SLOT(setOpacity(int))); 
    139  
    140   connect(ui.btnToggleSettings, SIGNAL(toggled(bool)), 
    141       this, SLOT(showSettingsFrame(bool))); 
    142136 
    143137  connect(ui.btnBrowse, SIGNAL(clicked()), 
     
    236230   
    237231  /* Hide the settings frame and reset toggle button*/ 
    238   showSettingsFrame(false); 
     232  ui.actionSettings->toggle();  
    239233   
    240234  /* Disable the cursor to prevent problems while refiltering */ 
     
    282276{ 
    283277  /* Hide the settings frame and reset toggle button */ 
    284   showSettingsFrame(false); 
     278  ui.actionSettings->toggle(); 
    285279 
    286280  /* Reload the settings */ 
     
    536530} 
    537531 
    538 /** Toggles the Settings pane on and off and changes toggle button text. 
    539  * \param show Whether to show or hide the Settings frame. 
    540  */ 
    541 void 
    542 MessageLog::showSettingsFrame(bool show) 
    543 { 
    544   if (show) { 
    545     ui.frmSettings->setVisible(true); 
    546     ui.btnToggleSettings->setChecked(true); 
    547     ui.btnToggleSettings->setText(tr("Hide Settings")); 
    548   } else { 
    549     ui.frmSettings->setVisible(false); 
    550     ui.btnToggleSettings->setChecked(false); 
    551     ui.btnToggleSettings->setText(tr("Show Settings")); 
    552   } 
    553 } 
    554  
    555532/** Sets the opacity of the Message Log window. 
    556533 * \param value The opaqueness of the window (0-100) 
  • trunk/src/gui/log/messagelog.h

    r446 r547  
    7979  /** Called when the opactity slider changes value **/ 
    8080  void setOpacity(int value); 
    81   /** Called when settings button is toggled **/ 
    82   void showSettingsFrame(bool show); 
    8381  /** Called when user saves settings **/ 
    8482  void saveChanges(); 
  • trunk/src/gui/log/messagelog.ui

    r485 r547  
    356356    </item> 
    357357    <item> 
    358      <layout class="QHBoxLayout" > 
    359       <property name="margin" > 
    360        <number>0</number> 
    361       </property> 
    362       <property name="spacing" > 
    363        <number>6</number> 
    364       </property> 
    365       <item> 
    366        <widget class="QPushButton" name="btnToggleSettings" > 
    367         <property name="contextMenuPolicy" > 
    368          <enum>Qt::NoContextMenu</enum> 
    369         </property> 
    370         <property name="toolTip" > 
    371          <string>Toggles display of Message Log settings</string> 
    372         </property> 
    373         <property name="text" > 
    374          <string>Show Settings</string> 
    375         </property> 
    376         <property name="checkable" > 
    377          <bool>true</bool> 
    378         </property> 
    379        </widget> 
    380       </item> 
    381       <item> 
    382        <spacer> 
    383         <property name="orientation" > 
    384          <enum>Qt::Horizontal</enum> 
    385         </property> 
    386         <property name="sizeHint" > 
    387          <size> 
    388           <width>709</width> 
    389           <height>29</height> 
    390          </size> 
    391         </property> 
    392        </spacer> 
    393       </item> 
    394      </layout> 
    395     </item> 
    396     <item> 
    397358     <widget class="QFrame" name="frmSettings" > 
    398359      <property name="enabled" > 
    399360       <bool>true</bool> 
     361      </property> 
     362      <property name="visible" > 
     363       <bool>false</bool> 
    400364      </property> 
    401365      <property name="sizePolicy" > 
     
    885849   <addaction name="actionClear" /> 
    886850   <addaction name="actionFind" /> 
     851   <addaction name="actionSettings" /> 
    887852   <addaction name="separator" /> 
    888853   <addaction name="actionClose" /> 
     
    10581023     <strikeout>false</strikeout> 
    10591024    </font> 
     1025   </property> 
     1026  </action> 
     1027  <action name="actionSettings" > 
     1028   <property name="icon" > 
     1029    <iconset resource="..\res\vidalia.qrc">:/images/22x22/preferences-desktop.png</iconset> 
     1030   </property> 
     1031   <property name="text" > 
     1032    <string>Settings</string> 
     1033   </property> 
     1034   <property name="statusTip" > 
     1035    <string>Adjust Message Log Settings</string> 
     1036   </property> 
     1037   <property name="checkable" > 
     1038    <bool>true</bool> 
     1039   </property> 
     1040   <property name="font" > 
     1041    <font> 
     1042     <family>Arial</family> 
     1043     <pointsize>10</pointsize> 
     1044     <weight>50</weight> 
     1045     <italic>false</italic> 
     1046     <bold>false</bold> 
     1047     <underline>false</underline> 
     1048     <strikeout>false</strikeout> 
     1049    </font> 
     1050   </property> 
     1051   <property name="shortcut" > 
     1052    <string>Ctrl+T</string> 
    10601053   </property> 
    10611054  </action> 
     
    11691162  </connection> 
    11701163  <connection> 
     1164   <sender>actionSettings</sender> 
     1165   <signal>toggled(bool)</signal> 
     1166   <receiver>frmSettings</receiver> 
     1167   <slot>setVisible(bool)</slot> 
     1168   <hints> 
     1169    <hint type="sourcelabel" > 
     1170     <x>-1</x> 
     1171     <y>-1</y> 
     1172    </hint> 
     1173    <hint type="destinationlabel" > 
     1174     <x>407</x> 
     1175     <y>393</y> 
     1176    </hint> 
     1177   </hints> 
     1178  </connection> 
     1179  <connection> 
    11711180   <sender>sldrOpacity</sender> 
    11721181   <signal>valueChanged(int)</signal> 
  • trunk/src/gui/res/vidalia.qrc

    r539 r547  
    3939        <file>22x22/media-floppy.png</file> 
    4040        <file>22x22/network-server.png</file> 
     41        <file>22x22/preferences-desktop.png</file> 
    4142        <file>22x22/preferences-desktop-locale.png</file> 
    4243        <file>22x22/preferences-system.png</file>