Author: tgoettlicher
Date: Tue Mar 10 13:23:48 2009
New Revision: 56044
URL: http://svn.opensuse.org/viewcvs/yast?rev=56044&view=rev
Log:
minor change: `opt(`contextMenu) to opt(`notifyContextMenu)
Modified:
trunk/libyui/src/YUISymbols.h
trunk/libyui/src/YWidget.cc
trunk/libyui/src/YWidget.h
trunk/qt/src/YQLogView.cc
trunk/qt/src/YQSelectionBox.cc
trunk/qt/src/YQTable.cc
trunk/qt/src/YQTable.h
trunk/qt/src/YQTree.cc
trunk/qt/src/YQTree.h
trunk/ycp-ui-bindings/examples/ContextMenu.ycp
trunk/ycp-ui-bindings/examples/Events.ycp
trunk/ycp-ui-bindings/src/YCPDialogParser.cc
trunk/ycp-ui-bindings/src/YWidgetOpt.h
Modified: trunk/libyui/src/YUISymbols.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YUISymbols.h?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/libyui/src/YUISymbols.h (original)
+++ trunk/libyui/src/YUISymbols.h Tue Mar 10 13:23:48 2009
@@ -202,7 +202,6 @@
#define YUIOpt_cancelButton "cancelButton"
#define YUIOpt_centered "centered"
#define YUIOpt_confirmUnsupported "confirmUnsupported"
-#define YUIOpt_contextMenu "contextMenu"
#define YUIOpt_customButton "customButton"
#define YUIOpt_debugLayout "debugLayout"
#define YUIOpt_decorated "decorated"
@@ -223,6 +222,7 @@
#define YUIOpt_multiSelection "multiSelection"
#define YUIOpt_noAutoEnable "noAutoEnable"
#define YUIOpt_notify "notify"
+#define YUIOpt_notifyContextMenu "notifyContextMenu"
#define YUIOpt_okButton "okButton"
#define YUIOpt_outputField "outputField"
#define YUIOpt_plainText "plainText"
Modified: trunk/libyui/src/YWidget.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YWidget.cc?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/libyui/src/YWidget.cc (original)
+++ trunk/libyui/src/YWidget.cc Tue Mar 10 13:23:48 2009
@@ -57,7 +57,7 @@
, beingDestroyed( false )
, enabled( true )
, notify( false )
- , contextMenu( false )
+ , notifyContextMenu( false )
, sendKeyEvents( false )
, autoShortcut( false )
, toolkitWidgetRep( 0 )
@@ -79,7 +79,7 @@
bool beingDestroyed;
bool enabled;
bool notify;
- bool contextMenu;
+ bool notifyContextMenu;
bool sendKeyEvents;
bool autoShortcut;
void * toolkitWidgetRep;
@@ -394,7 +394,7 @@
/**
* @property boolean Enabled enabled/disabled state of this widget
* @property boolean Notify the current notify state (see also `opt( `notify ))
- * @property boolean ContextMenu the current contextmenu state (see also `opt( `contextMenu ))
+ * @property boolean ContextMenu the current contextmenu state (see also `opt( `notifyContextMenu ))
* @property string WidgetClass the widget class of this widget (YLabel, YPushButton, ...)
* @property string DebugLabel (possibly translated) text describing this widget for debugging
* @property string HelpText help text
@@ -459,7 +459,7 @@
if ( propertyName == YUIProperty_Enabled ) return YPropertyValue( isEnabled() );
if ( propertyName == YUIProperty_Notify ) return YPropertyValue( notify() );
- if ( propertyName == YUIProperty_ContextMenu ) return YPropertyValue( contextMenu() );
+ if ( propertyName == YUIProperty_ContextMenu ) return YPropertyValue( notifyContextMenu() );
if ( propertyName == YUIProperty_WidgetClass ) return YPropertyValue( widgetClass() );
if ( propertyName == YUIProperty_HelpText ) return YPropertyValue( helpText() );
if ( propertyName == YUIProperty_DebugLabel ) return YPropertyValue( debugLabel() );
@@ -515,9 +515,9 @@
}
-void YWidget::setContextMenu( bool contextMenu )
+void YWidget::setNotifyContextMenu( bool notifyContextMenu )
{
- priv->contextMenu = contextMenu;
+ priv->notifyContextMenu = notifyContextMenu;
}
@@ -527,9 +527,9 @@
}
-bool YWidget::contextMenu() const
+bool YWidget::notifyContextMenu() const
{
- return priv->contextMenu;
+ return priv->notifyContextMenu;
}
Modified: trunk/libyui/src/YWidget.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YWidget.h?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/libyui/src/YWidget.h (original)
+++ trunk/libyui/src/YWidget.h Tue Mar 10 13:23:48 2009
@@ -455,15 +455,15 @@
bool notify() const;
/**
- * Sets the ContextMenu property
+ * Sets the notifyContextMenu property
**/
- void setContextMenu( bool contextMenu = true );
+ void setNotifyContextMenu( bool notifyContextMenu = true );
/**
* Returns whether the widget will send an event when the user
* clicks selects the context menu e.g. via right click.
**/
- bool contextMenu() const;
+ bool notifyContextMenu() const;
/**
Modified: trunk/qt/src/YQLogView.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQLogView.cc?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/qt/src/YQLogView.cc (original)
+++ trunk/qt/src/YQLogView.cc Tue Mar 10 13:23:48 2009
@@ -71,9 +71,16 @@
void
YQLogView::displayLogText( const string & text )
{
- _qt_text->setPlainText( fromUTF8( text ) );
+ bool scrollToBottom = false;
QScrollBar *sb = _qt_text->verticalScrollBar();
- sb->setValue( sb->maximum() );
+
+ if ( sb->value() == sb->maximum() )
+ scrollToBottom = true;
+
+ _qt_text->setPlainText( fromUTF8( text ) );
+
+ if (scrollToBottom)
+ sb->setValue( sb->maximum() );
}
Modified: trunk/qt/src/YQSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQSelectionBox.cc?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/qt/src/YQSelectionBox.cc (original)
+++ trunk/qt/src/YQSelectionBox.cc Tue Mar 10 13:23:48 2009
@@ -294,7 +294,7 @@
QContextMenuEvent * contextMenuEvent = dynamic_cast (ev);
YQUI::yqApp()->setContextMenuPos( contextMenuEvent->globalPos() );
- if ( contextMenu() )
+ if ( notifyContextMenu() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ContextMenuActivated ) );
}
Modified: trunk/qt/src/YQTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQTable.cc?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/qt/src/YQTable.cc (original)
+++ trunk/qt/src/YQTable.cc Tue Mar 10 13:23:48 2009
@@ -393,7 +393,7 @@
return;
YQUI::yqApp()->setContextMenuPos( _qt_listView->viewport()->mapToGlobal( pos ) );
- if ( contextMenu() )
+ if ( notifyContextMenu() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ContextMenuActivated ) );
}
Modified: trunk/qt/src/YQTable.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQTable.h?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/qt/src/YQTable.h (original)
+++ trunk/qt/src/YQTable.h Tue Mar 10 13:23:48 2009
@@ -155,7 +155,7 @@
/**
* Propagate a context menu selection
*
- * This will trigger an 'ContextMenuActivated' event if 'contextMenu' is set.
+ * This will trigger an 'ContextMenuActivated' event if 'notifyContextMenu' is set.
**/
void slotContextMenu ( const QPoint & pos );
Modified: trunk/qt/src/YQTree.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQTree.cc?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/qt/src/YQTree.cc (original)
+++ trunk/qt/src/YQTree.cc Tue Mar 10 13:23:48 2009
@@ -297,7 +297,7 @@
return;
YQUI::yqApp()->setContextMenuPos( _qt_treeWidget->viewport()->mapToGlobal( pos ) );
- if ( contextMenu() )
+ if ( notifyContextMenu() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ContextMenuActivated ) );
}
Modified: trunk/qt/src/YQTree.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQTree.h?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/qt/src/YQTree.h (original)
+++ trunk/qt/src/YQTree.h Tue Mar 10 13:23:48 2009
@@ -149,7 +149,7 @@
/**
* Propagate a context menu selection
*
- * This will trigger an 'ContextMenuActivated' event if 'contextMenu' is set.
+ * This will trigger an 'ContextMenuActivated' event if 'notifyContextMenu' is set.
**/
void slotContextMenu ( const QPoint & pos );
Modified: trunk/ycp-ui-bindings/examples/ContextMenu.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/ContextMenu.ycp?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/examples/ContextMenu.ycp (original)
+++ trunk/ycp-ui-bindings/examples/ContextMenu.ycp Tue Mar 10 13:23:48 2009
@@ -33,7 +33,7 @@
UI::OpenDialog(
`VBox(
- `SelectionBox( `id(`sport), `opt(`notify,`immediate, `contextMenu),
+ `SelectionBox( `id(`sport), `opt(`notify,`immediate, `notifyContextMenu),
"Select your sport:",
[
"Swimming",
Modified: trunk/ycp-ui-bindings/examples/Events.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/Events.ycp?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/examples/Events.ycp (original)
+++ trunk/ycp-ui-bindings/examples/Events.ycp Tue Mar 10 13:23:48 2009
@@ -42,7 +42,7 @@
"chef de cuisine Giuseppe</a>.</p>";
- term delivery = `Tree(`id(`delivery_service ), `opt(`notify, `contextMenu), "&Delivery Service",
+ term delivery = `Tree(`id(`delivery_service ), `opt(`notify, `notifyContextMenu), "&Delivery Service",
[
`item(`id(`europe), "Europe", true,
[
@@ -81,7 +81,7 @@
]
);
- term pizza = `SelectionBox(`id(`pizza), `opt(`notify,`immediate, `contextMenu), "Pi&zza",
+ term pizza = `SelectionBox(`id(`pizza), `opt(`notify,`immediate, `notifyContextMenu), "Pi&zza",
[
`item(`id(`napoli ), "Napoli" ),
`item(`id(`funghi ), "Funghi" ),
@@ -92,7 +92,7 @@
]
);
- term toppings = `MultiSelectionBox(`id(`toppings), `opt(`notify, `contextMenu), "To&ppings",
+ term toppings = `MultiSelectionBox(`id(`toppings), `opt(`notify, `notifyContextMenu), "To&ppings",
[
`item( `id(`cheese ), "Cheese" , true ),
`item( `id(`tomatoes ), "Tomatoes" , true ),
@@ -103,7 +103,7 @@
]
);
- term drink = `Table(`id(`drink), `opt(`notify, `immediate, `multiSelection, `contextMenu), `header( "Drink", "Contents" ),
+ term drink = `Table(`id(`drink), `opt(`notify, `immediate, `multiSelection, `notifyContextMenu), `header( "Drink", "Contents" ),
[
`item(`id(`coke), "Coca Cola", "Caffeine" ),
`item(`id(`sprite), "Sprite", "" ),
Modified: trunk/ycp-ui-bindings/src/YCPDialogParser.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/src/YCPDialogParser.cc?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/src/YCPDialogParser.cc (original)
+++ trunk/ycp-ui-bindings/src/YCPDialogParser.cc Tue Mar 10 13:23:48 2009
@@ -144,9 +144,9 @@
* ( if `opt( `notify ) is set for that SelectionBox ).
* Only widgets with this option set are affected.
*
- * @option contextMenu Make this widget to send an event when the context menu is requested
+ * @option notifyContextMenu Make this widget to send an event when the context menu is requested
* e.g. when the user clicks right mouse button
- * ( if `opt( `contextMenu ) is set for that SelectionBox ).
+ * ( if `opt( `notifyContextMenu ) is set for that SelectionBox ).
* Only widgets with this option set are affected.
*
* @option disabled Set this widget insensitive, i.e. disable any user interaction.
@@ -196,7 +196,7 @@
{
string sym = rawopt->value(o)->asSymbol()->symbol();
if ( sym == YUIOpt_notify ) opt.notifyMode.setValue( true );
- else if ( sym == YUIOpt_contextMenu ) opt.contextMenu.setValue( true );
+ else if ( sym == YUIOpt_notifyContextMenu) opt.notifyContextMenu.setValue( true );
else if ( sym == YUIOpt_disabled ) opt.isDisabled.setValue( true );
else if ( sym == YUIOpt_hstretch ) opt.isHStretchable.setValue( true );
else if ( sym == YUIOpt_vstretch ) opt.isVStretchable.setValue( true );
@@ -351,7 +351,7 @@
if ( opt.isDisabled.value() ) w->setDisabled();
if ( opt.notifyMode.value() ) w->setNotify( true );
- if ( opt.contextMenu.value() ) w->setContextMenu( true );
+ if ( opt.notifyContextMenu.value()) w->setNotifyContextMenu( true );
if ( opt.keyEvents.value() ) w->setSendKeyEvents( true );
if ( opt.autoShortcut.value() ) w->setAutoShortcut( true );
if ( opt.isHStretchable.value() ) w->setStretchable( YD_HORIZ, true );
Modified: trunk/ycp-ui-bindings/src/YWidgetOpt.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/src/YWidgetOpt.h?rev=56044&r1=56043&r2=56044&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/src/YWidgetOpt.h (original)
+++ trunk/ycp-ui-bindings/src/YWidgetOpt.h Tue Mar 10 13:23:48 2009
@@ -120,7 +120,7 @@
YBoolOpt isDisabled;
YBoolOpt notifyMode;
- YBoolOpt contextMenu;
+ YBoolOpt notifyContextMenu;
YBoolOpt isHStretchable;
YBoolOpt isVStretchable;
YBoolOpt autoShortcut;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org