YaST Commits
Threads by month
- ----- 2024 -----
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2008
- 26 participants
- 1056 discussions
[yast-commit] r44125 - in /trunk/network: VERSION package/yast2-network.changes src/lan/address.ycp
by mzugec@svn.opensuse.org 04 Feb '08
by mzugec@svn.opensuse.org 04 Feb '08
04 Feb '08
Author: mzugec
Date: Mon Feb 4 15:59:40 2008
New Revision: 44125
URL: http://svn.opensuse.org/viewcvs/yast?rev=44125&view=rev
Log:
keep firewall zone information when changing deive name (#358523)
Modified:
trunk/network/VERSION
trunk/network/package/yast2-network.changes
trunk/network/src/lan/address.ycp
Modified: trunk/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=44125&r1=441…
==============================================================================
--- trunk/network/VERSION (original)
+++ trunk/network/VERSION Mon Feb 4 15:59:40 2008
@@ -1 +1 @@
-2.16.21
+2.16.22
Modified: trunk/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.ch…
==============================================================================
--- trunk/network/package/yast2-network.changes (original)
+++ trunk/network/package/yast2-network.changes Mon Feb 4 15:59:40 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Feb 4 15:57:49 CET 2008 - mzugec(a)suse.de
+
+- keep firewall zone information when changing deive name (#358523)
+- 2.16.22
+
+-------------------------------------------------------------------
Sun Jan 27 21:01:33 CET 2008 - coolo(a)suse.de
- fix changelog
Modified: trunk/network/src/lan/address.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/address.ycp?rev=…
==============================================================================
--- trunk/network/src/lan/address.ycp (original)
+++ trunk/network/src/lan/address.ycp Mon Feb 4 15:59:40 2008
@@ -966,7 +966,7 @@
if (ret != `back && ret != `abort)
{
- string ifcfgname = settings["IFCFGID"]:"";
+ string ifcfgname = LanItems::Items[LanItems::current, "ifcfg"]:"";//settings["IFCFGID"]:"";
// general tab
LanItems::startmode = settings["STARTMODE"]:"";
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r44124 - in /trunk: core/ core/libyui/src/ ncurses/ ncurses/src/ qt/ qt/src/
by sh-sh-sh@svn.opensuse.org 04 Feb '08
by sh-sh-sh@svn.opensuse.org 04 Feb '08
04 Feb '08
Author: sh-sh-sh
Date: Mon Feb 4 15:58:33 2008
New Revision: 44124
URL: http://svn.opensuse.org/viewcvs/yast?rev=44124&view=rev
Log:
Moved stuff from UI to YApp
Modified:
trunk/core/VERSION
trunk/core/libyui/src/YApplication.cc
trunk/core/libyui/src/YApplication.h
trunk/core/libyui/src/YUI.h
trunk/core/libyui/src/YUISymbols.h
trunk/core/libyui/src/YUI_builtins.cc
trunk/ncurses/src/NCApplication.cc
trunk/ncurses/src/NCApplication.h
trunk/ncurses/src/YNCursesUI.cc
trunk/ncurses/src/YNCursesUI.h
trunk/ncurses/yast2-ncurses.spec.in
trunk/qt/src/YQApplication.cc
trunk/qt/src/YQApplication.h
trunk/qt/src/YQGenericButton.cc
trunk/qt/src/YQRadioButton.cc
trunk/qt/src/YQSelectionBox.cc
trunk/qt/src/YQUI.h
trunk/qt/src/YQUI_core.cc
trunk/qt/src/YQUI_x11.cc
trunk/qt/yast2-qt.spec.in
Modified: trunk/core/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/VERSION?rev=44124&r1=44123&…
==============================================================================
--- trunk/core/VERSION (original)
+++ trunk/core/VERSION Mon Feb 4 15:58:33 2008
@@ -1 +1 @@
-2.16.26
+2.16.27
Modified: trunk/core/libyui/src/YApplication.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/src/YApplication.cc?…
==============================================================================
--- trunk/core/libyui/src/YApplication.cc (original)
+++ trunk/core/libyui/src/YApplication.cc Mon Feb 4 15:58:33 2008
@@ -169,3 +169,13 @@
return "";
}
}
+
+
+int
+YApplication::runInTerminal ( const string & module )
+{
+ yuiError() << "Not in text mode: Cannot run external program in terminal." << endl;
+
+ return -1;
+}
+
Modified: trunk/core/libyui/src/YApplication.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/src/YApplication.h?r…
==============================================================================
--- trunk/core/libyui/src/YApplication.h (original)
+++ trunk/core/libyui/src/YApplication.h Mon Feb 4 15:58:33 2008
@@ -135,14 +135,14 @@
/**
* Return a string for a named glyph:
*
- * YUIGlyph_ArrowLeft
- * YUIGlyph_ArrowRight
- * YUIGlyph_ArrowUp
- * YUIGlyph_ArrowDown
- * YUIGlyph_CheckMark
- * YUIGlyph_BulletArrowRight
- * YUIGlyph_BulletCircle
- * YUIGlyph_BulletSquare
+ * YUIGlyph_ArrowLeft
+ * YUIGlyph_ArrowRight
+ * YUIGlyph_ArrowUp
+ * YUIGlyph_ArrowDown
+ * YUIGlyph_CheckMark
+ * YUIGlyph_BulletArrowRight
+ * YUIGlyph_BulletCircle
+ * YUIGlyph_BulletSquare
*
* Using this is discouraged in new applications.
* This method is available for backward compatibility.
@@ -154,7 +154,7 @@
* call this base class method in a new implementation.
**/
virtual string glyph( const string & glyphSymbolName );
-
+
/**
* Open a directory selection box and prompt the user for an existing
* directory.
@@ -214,9 +214,53 @@
const string & filter,
const string & headline ) = 0;
+ /**
+ * Run a shell command (typically an interactive program using NCurses)
+ * in a terminal (window).
+ *
+ * This is useful for text UIs (e.g., NCurses) that need special
+ * preparation prior to running an NCurses-based application and special
+ * clean-up afterwards.
+ *
+ * This default implementation logs an error and returns with -1.
+ **/
+ virtual int runInTerminal( const string & command );
+
+
+ //
+ // Display information.
+ //
+ // Width and height are returned in the the UI's native dimension:
+ // Pixels for graphical UIs, character cells for text UIs.
+ // -1 means "value cannot be obtained" for int functions.
+ //
+ // Derived classes are required to implement these functions.
+ //
+
+ virtual int displayWidth() = 0;
+ virtual int displayHeight() = 0;
+ virtual int displayDepth() = 0;
+ virtual long displayColors() = 0;
+
+ // Size of main dialogs
+ virtual int defaultWidth() = 0;
+ virtual int defaultHeight() = 0;
+
+ //
+ // UI capabilities
+ //
+
+ virtual bool isTextMode() = 0;
+ virtual bool hasImageSupport() = 0;
+ virtual bool hasIconSupport() = 0;
+ virtual bool hasAnimationSupport() = 0;
+ virtual bool hasFullUtf8Support() = 0;
+ virtual bool richTextSupportsTable() = 0;
+ virtual bool leftHandedMouse() = 0;
+
+
private:
-
ImplPtr<YApplicationPrivate> priv;
};
Modified: trunk/core/libyui/src/YUI.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/src/YUI.h?rev=44124&…
==============================================================================
--- trunk/core/libyui/src/YUI.h (original)
+++ trunk/core/libyui/src/YUI.h Mon Feb 4 15:58:33 2008
@@ -58,7 +58,7 @@
YUIBuiltinCallData()
: result( YCPVoid() )
{
- function = 0;
+ function = 0;
}
};
@@ -383,34 +383,6 @@
virtual YCPValue setKeyboard();
-
- /**
- * UI-specific runInTerminal() function.
- * Returns (integer) return code of external program it spawns
- * in the same terminal
- **/
-
- virtual int runInTerminal( const YCPString & module );
-
- /**
- * UI-specific getDisplayInfo() functions.
- * See UI builtin GetDisplayInfo() doc for details.
- **/
- virtual int getDisplayWidth() { return -1; }
- virtual int getDisplayHeight() { return -1; }
- virtual int getDisplayDepth() { return -1; }
- virtual long getDisplayColors() { return -1; }
- virtual int getDefaultWidth() { return -1; }
- virtual int getDefaultHeight() { return -1; }
- virtual bool textMode() { return true; }
- virtual bool hasImageSupport() { return false; }
- virtual bool hasLocalImageSupport() { return true; }
- virtual bool hasAnimationSupport() { return false; }
- virtual bool hasIconSupport() { return false; }
- virtual bool hasFullUtf8Support() { return false; }
- virtual bool richTextSupportsTable() { return false; }
- virtual bool leftHandedMouse() { return false; }
-
/**
* UI-specific busyCursor function.
* This default implementation does nothing.
Modified: trunk/core/libyui/src/YUISymbols.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/src/YUISymbols.h?rev…
==============================================================================
--- trunk/core/libyui/src/YUISymbols.h (original)
+++ trunk/core/libyui/src/YUISymbols.h Mon Feb 4 15:58:33 2008
@@ -278,7 +278,6 @@
#define YUICap_DefaultHeight "DefaultHeight"
#define YUICap_TextMode "TextMode"
#define YUICap_HasImageSupport "HasImageSupport"
-#define YUICap_HasLocalImageSupport "HasLocalImageSupport"
#define YUICap_HasAnimationSupport "HasAnimationSupport"
#define YUICap_HasIconSupport "HasIconSupport"
#define YUICap_HasFullUtf8Support "HasFullUtf8Support"
Modified: trunk/core/libyui/src/YUI_builtins.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/src/YUI_builtins.cc?…
==============================================================================
--- trunk/core/libyui/src/YUI_builtins.cc (original)
+++ trunk/core/libyui/src/YUI_builtins.cc Mon Feb 4 15:58:33 2008
@@ -265,32 +265,22 @@
* @builtin RunInTerminal
* @short runs external program in the same terminal
* @description
- * Use this builtin if you want to run external program from ncurses UI
- * as a separate process. It saves current window layout to the stack and
- * runs the external program in the same terminal. When done, it restores
- * the original window layout and returns exit code of the external program
- * (an integer value returned by system() call). When called from the Qt UI,
- * an error message is printed to the log.
+ * Use this builtin if you want to run an external program from the NCcurses UI
+ * as a separate process. It saves the current window layout and runs the
+ * external program in the same terminal. When done, it restores the original
+ * window layout and returns the exit code of the external program.
+ * When called from the Qt UI, an error message is printed to the log.
* @param string external_program
* return integer
*
* @usage RunInTerminal("/bin/bash")
*/
-YCPInteger YUI::evaluateRunInTerminal(const YCPString & module )
+YCPInteger YUI::evaluateRunInTerminal(const YCPString & command )
{
- int ret = runInTerminal( module );
-
- return YCPInteger ( ret );
-
+ return YCPInteger( yApp()->runInTerminal( command->value() ) );
}
-int YUI::runInTerminal ( const YCPString & module )
-{
- yuiError() << "Not in text mode: Cannot run external program in terminal." << endl;
-
- return -1;
-}
/**
* @builtin SetKeyboard
@@ -568,7 +558,7 @@
if ( event )
{
YCPEvent ycpEvent( event );
-
+
if ( detailed )
input = ycpEvent.eventMap();
else
@@ -1341,7 +1331,6 @@
* "HasFullUtf8Support":true,
* "HasIconSupport":false,
* "HasImageSupport":true,
- * "HasLocalImageSupport":true,
* "Height":1050,
* "LeftHandedMouse":false,
* "RichTextSupportsTable":true,
@@ -1361,7 +1350,6 @@
* "HasFullUtf8Support":true,
* "HasIconSupport":false,
* "HasImageSupport":false,
- * "HasLocalImageSupport":true,
* "Height":54,
* "LeftHandedMouse":false,
* "RichTextSupportsTable":false,
@@ -1378,21 +1366,21 @@
YCPMap YUI::evaluateGetDisplayInfo()
{
YCPMap info_map;
+ YApplication * app = yApp(); // slight optimization
- info_map->add( YCPString( YUICap_Width ), YCPInteger( getDisplayWidth() ) );
- info_map->add( YCPString( YUICap_Height ), YCPInteger( getDisplayHeight() ) );
- info_map->add( YCPString( YUICap_Depth ), YCPInteger( getDisplayDepth() ) );
- info_map->add( YCPString( YUICap_Colors ), YCPInteger( getDisplayColors() ) );
- info_map->add( YCPString( YUICap_DefaultWidth ), YCPInteger( getDefaultWidth() ) );
- info_map->add( YCPString( YUICap_DefaultHeight ), YCPInteger( getDefaultHeight() ) );
- info_map->add( YCPString( YUICap_TextMode ), YCPBoolean( textMode() ) );
- info_map->add( YCPString( YUICap_HasImageSupport ), YCPBoolean( hasImageSupport() ) );
- info_map->add( YCPString( YUICap_HasLocalImageSupport ), YCPBoolean( hasLocalImageSupport() ) );
- info_map->add( YCPString( YUICap_HasAnimationSupport ), YCPBoolean( hasAnimationSupport() ) );
- info_map->add( YCPString( YUICap_HasIconSupport ), YCPBoolean( hasIconSupport() ) );
- info_map->add( YCPString( YUICap_HasFullUtf8Support ), YCPBoolean( hasFullUtf8Support() ) );
- info_map->add( YCPString( YUICap_RichTextSupportsTable ), YCPBoolean( richTextSupportsTable() ) );
- info_map->add( YCPString( YUICap_LeftHandedMouse ), YCPBoolean( leftHandedMouse() ) );
+ info_map->add( YCPString( YUICap_Width ), YCPInteger( app->displayWidth() ) );
+ info_map->add( YCPString( YUICap_Height ), YCPInteger( app->displayHeight() ) );
+ info_map->add( YCPString( YUICap_Depth ), YCPInteger( app->displayDepth() ) );
+ info_map->add( YCPString( YUICap_Colors ), YCPInteger( app->displayColors() ) );
+ info_map->add( YCPString( YUICap_DefaultWidth ), YCPInteger( app->defaultWidth() ) );
+ info_map->add( YCPString( YUICap_DefaultHeight ), YCPInteger( app->defaultHeight() ) );
+ info_map->add( YCPString( YUICap_TextMode ), YCPBoolean( app->isTextMode() ) );
+ info_map->add( YCPString( YUICap_HasImageSupport ), YCPBoolean( app->hasImageSupport() ) );
+ info_map->add( YCPString( YUICap_HasIconSupport ), YCPBoolean( app->hasIconSupport() ) );
+ info_map->add( YCPString( YUICap_HasAnimationSupport ), YCPBoolean( app->hasAnimationSupport() ) );
+ info_map->add( YCPString( YUICap_HasFullUtf8Support ), YCPBoolean( app->hasFullUtf8Support() ) );
+ info_map->add( YCPString( YUICap_RichTextSupportsTable ), YCPBoolean( app->richTextSupportsTable() ) );
+ info_map->add( YCPString( YUICap_LeftHandedMouse ), YCPBoolean( app->leftHandedMouse() ) );
return info_map;
}
@@ -1555,7 +1543,7 @@
YCPEvent ycpEvent( event );
result = ycpEvent.eventId();
- if ( result->isString() )
+ if ( result->isString() )
result = YCPSymbol( result->asString()->value() ); // "accept" -> `accept
yuiMilestone() << "Package selection done. Returning with " << result << endl;
Modified: trunk/ncurses/src/NCApplication.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCApplication.cc?rev…
==============================================================================
--- trunk/ncurses/src/NCApplication.cc (original)
+++ trunk/ncurses/src/NCApplication.cc Mon Feb 4 15:58:33 2008
@@ -10,15 +10,19 @@
| (C) SuSE GmbH |
\----------------------------------------------------------------------/
- File: NCApplication.cc
+ File: NCApplication.cc
- Author: Gabriele Mohr <gs(a)suse.de>
+ Authors: Gabriele Mohr <gs(a)suse.de>
+ Stefan Hundhammer <sh(a)suse.de>
/-*/
+#include <curses.h>
+
#include "Y2Log.h"
#include "NCurses.h"
+#include "YNCursesUI.h"
#include "NCApplication.h"
#include "NCAskForDirectory.h"
#include "NCAskForFile.h"
@@ -94,3 +98,81 @@
return retEvent.result;
}
+
+/**
+ * Run external program supplied as string parameter the same terminal.
+ **/
+int
+NCApplication::runInTerminal( const string & cmd )
+{
+ int ret;
+
+ // Save tty modes and end ncurses mode temporarily
+ ::def_prog_mode();
+ ::endwin();
+
+ // Regenerate saved stdout and stderr, so that app called
+ // via system() can use them and draw something to the terminal
+ dup2( YNCursesUI::ui()->stdout_save, 1 );
+ dup2( YNCursesUI::ui()->stderr_save, 2 );
+
+ // Call external program
+ ret = system( cmd.c_str() );
+
+ if ( ret != 0 )
+ {
+ NCERR << cmd << " returned:" << ret << endl;
+ }
+
+ // Redirect stdout and stderr to y2log again
+ YNCursesUI::ui()->RedirectToLog();
+
+ // Resume tty modes and refresh the screen
+ ::reset_prog_mode();
+ ::refresh();
+
+ return ret;
+}
+
+
+int
+NCApplication::displayWidth()
+{
+ return ::COLS; // exported from ncurses.h
+}
+
+int
+NCApplication::displayHeight()
+{
+ return ::LINES; // exported from ncurses.h
+}
+
+int
+NCApplication::displayDepth()
+{
+ return -1;
+}
+
+long
+NCApplication::displayColors()
+{
+ return NCattribute::colors();
+}
+
+int
+NCApplication::defaultWidth()
+{
+ return ::COLS; // exported from ncurses.h
+}
+
+int
+NCApplication::defaultHeight()
+{
+ return ::LINES; // exported from ncurses.h
+}
+
+bool
+NCApplication::hasFullUtf8Support()
+{
+ return ( NCstring::terminalEncoding() == "UTF-8" );
+}
Modified: trunk/ncurses/src/NCApplication.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCApplication.h?rev=…
==============================================================================
--- trunk/ncurses/src/NCApplication.h (original)
+++ trunk/ncurses/src/NCApplication.h Mon Feb 4 15:58:33 2008
@@ -115,6 +115,40 @@
virtual string askForSaveFileName( const string & startWith,
const string & filter,
const string & headline );
+
+ /**
+ * Run a shell command (typically an interactive program using NCurses)
+ * in a terminal (window).
+ *
+ * Here in the NCurses UI, this shuts down the NCurses lib, runs the
+ * command and then restores the status of the NCurses lib so that the next
+ * instance of the NCurses lib from the started command doesn't interfere
+ * with the NCurses UI's instance.
+ *
+ * Reimplemented from YApplication.
+ **/
+ virtual int runInTerminal ( const string & command );
+
+
+ // Display information and UI capabilities.
+ //
+ // All implemented from YApplication.
+
+ virtual int displayWidth();
+ virtual int displayHeight();
+ virtual int displayDepth();
+ virtual long displayColors();
+
+ virtual int defaultWidth();
+ virtual int defaultHeight();
+
+ virtual bool isTextMode() { return true; }
+ virtual bool hasImageSupport() { return false; }
+ virtual bool hasIconSupport() { return false; }
+ virtual bool hasAnimationSupport() { return false; }
+ virtual bool hasFullUtf8Support();
+ virtual bool richTextSupportsTable() { return false; }
+ virtual bool leftHandedMouse() { return false; }
};
Modified: trunk/ncurses/src/YNCursesUI.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/YNCursesUI.cc?rev=44…
==============================================================================
--- trunk/ncurses/src/YNCursesUI.cc (original)
+++ trunk/ncurses/src/YNCursesUI.cc Mon Feb 4 15:58:33 2008
@@ -278,48 +278,6 @@
///////////////////////////////////////////////////////////////////
//
//
-// METHOD NAME : YNCursesUI::runInTerminal
-// METHOD TYPE : YCPValue
-//
-// DESCRIPTION:: Run external program supplied as string parameter
-// in the same terminal
-//
-
-int YNCursesUI::runInTerminal( const YCPString & module )
-{
- int ret;
- string cmd = module->value();
-
- //Save tty modes and end ncurses mode temporarily
- ::def_prog_mode();
- ::endwin();
-
- //Regenerate saved stdout and stderr, so that app called
- //via system() can use them and draw something to the terminal
- dup2(NCurses::stdout_save, 1);
- dup2(NCurses::stderr_save, 2);
-
- //Call external program
- ret = system(cmd.c_str());
-
- if ( ret != 0 )
- {
- NCERR << cmd << " returned:" << ret << endl;
- }
-
- //Redirect stdout and stderr to y2log again
- NCurses::RedirectToLog();
-
- //Resume tty modes and refresh the screen
- ::reset_prog_mode();
- ::refresh();
-
- return ret;
-}
-
-///////////////////////////////////////////////////////////////////
-//
-//
// METHOD NAME : YNCursesUI::setConsoleFont
// METHOD TYPE : YCPValue
//
@@ -406,26 +364,6 @@
///////////////////////////////////////////////////////////////////
//
//
-// METHOD NAME : YNCursesUI::hasFullUtf8Support
-// METHOD TYPE : bool
-//
-// DESCRIPTION :
-//
-bool YNCursesUI::hasFullUtf8Support()
-{
- if ( NCstring::terminalEncoding() == "UTF-8" )
- {
- return true;
- }
- else
- {
- return false;
- }
-}
-
-///////////////////////////////////////////////////////////////////
-//
-//
// METHOD NAME : YNCursesUI::init_title
// METHOD TYPE : void
//
Modified: trunk/ncurses/src/YNCursesUI.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/YNCursesUI.h?rev=441…
==============================================================================
--- trunk/ncurses/src/YNCursesUI.h (original)
+++ trunk/ncurses/src/YNCursesUI.h Mon Feb 4 15:58:33 2008
@@ -124,14 +124,6 @@
virtual YCPValue setKeyboard ( );
/**
- * UI-specific runInTerminal() function.
- * Returns (integer) return code of external program it spawns
- * in the same terminal
- */
-
- virtual int runInTerminal ( const YCPString & module);
-
- /**
* UI-specific beep() function.
* Beeps the system bell.
*/
@@ -148,22 +140,6 @@
* This default implementation does nothing.
*/
virtual void redrawScreen() { Refresh(); }
-
- /**
- * UI-specific getDisplayInfo() functions.
- * See UI builtin GetDisplayInfo() doc for details.
- **/
- virtual int getDisplayWidth() { return cols(); }
- virtual int getDisplayHeight() { return lines(); }
- virtual int getDisplayDepth() { return -1; }
- virtual long getDisplayColors() { return NCattribute::colors(); }
- virtual int getDefaultWidth() { return cols(); }
- virtual int getDefaultHeight() { return lines(); }
- virtual bool textMode() { return true; }
- virtual bool hasImageSupport() { return false; }
- virtual bool hasIconSupport() { return false; }
-
- virtual bool hasFullUtf8Support();
};
#endif // YNCursesUI_h
Modified: trunk/ncurses/yast2-ncurses.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/yast2-ncurses.spec.in?re…
==============================================================================
--- trunk/ncurses/yast2-ncurses.spec.in (original)
+++ trunk/ncurses/yast2-ncurses.spec.in Mon Feb 4 15:58:33 2008
@@ -17,8 +17,8 @@
Provides: y2curses
Obsoletes: y2curses
Requires: glibc-locale
-BuildRequires: yast2-core-devel >= 2.16.26
-Requires: yast2-core >= 2.16.26
+BuildRequires: yast2-core-devel >= 2.16.27
+Requires: yast2-core >= 2.16.27
#adapted to libzypp 3.11 refactoring
Requires: libzypp >= 3.11.8
%description
Modified: trunk/qt/src/YQApplication.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQApplication.cc?rev=4412…
==============================================================================
--- trunk/qt/src/YQApplication.cc (original)
+++ trunk/qt/src/YQApplication.cc Mon Feb 4 15:58:33 2008
@@ -18,16 +18,19 @@
/-*/
+#include <unistd.h> // access()
+
#include <QApplication>
#include <QLocale>
-#include <unistd.h> // access()
-#include <qregexp.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h>
+#include <QRegExp>
+#include <QFileDialog>
+#include <QDesktopWidget>
+#include <QMessageBox>
#define YUILogComponent "qt-ui"
#include "YUILog.h"
#include "YUISymbols.h"
+#include "YQUI.h"
#include "utf8.h"
#include "YQi18n.h"
@@ -47,6 +50,8 @@
, _autoFonts( false )
, _autoNormalFontSize( -1 )
, _autoHeadingFontSize( -1 )
+ , _leftHandedMouse( false )
+ , _askedForLeftHandedMouse( false )
{
yuiDebug() << "YQApplication constructor start" << endl;
@@ -535,5 +540,96 @@
}
+int
+YQApplication::displayWidth()
+{
+ return qApp->desktop()->width();
+}
+
+
+int
+YQApplication::displayHeight()
+{
+ return qApp->desktop()->height();
+}
+
+
+int
+YQApplication::displayDepth()
+{
+ return qApp->desktop()->depth();
+}
+
+
+long
+YQApplication::displayColors()
+{
+ return 1L << qApp->desktop()->depth();
+}
+
+
+int
+YQApplication::defaultWidth()
+{
+ return YQUI::ui()->defaultSize( YD_HORIZ );
+}
+
+
+int
+YQApplication::defaultHeight()
+{
+ return YQUI::ui()->defaultSize( YD_VERT );
+}
+
+
+bool
+YQApplication::leftHandedMouse()
+{
+ return _leftHandedMouse;
+}
+
+
+void
+YQApplication::maybeLeftHandedUser()
+{
+ if ( _askedForLeftHandedMouse )
+ return;
+
+ QString message =
+ _( "You clicked the right mouse button "
+ "where a left-click was expected."
+ "\n"
+ "Switch left and right mouse buttons?"
+ );
+ int button = QMessageBox::question( 0,
+ // Popup dialog caption
+ _( "Unexpected Click" ),
+ message,
+ QMessageBox::Yes | QMessageBox::Default,
+ QMessageBox::No,
+ QMessageBox::Cancel | QMessageBox::Escape );
+
+ if ( button == QMessageBox::Yes )
+ {
+
+ const char * command =
+ _leftHandedMouse ?
+ "xmodmap -e \"pointer = 1 2 3\"": // switch back to right-handed mouse
+ "xmodmap -e \"pointer = 3 2 1\""; // switch to left-handed mouse
+
+ _leftHandedMouse = ! _leftHandedMouse; // might be set repeatedly!
+ _askedForLeftHandedMouse = false; // give the user a chance to switch back
+ yuiMilestone() << "Switching mouse buttons: " << command << endl;
+
+ system( command );
+ }
+ else if ( button == 1 ) // No
+ {
+ _askedForLeftHandedMouse = true;
+ }
+}
+
+
+
#include "YQApplication.moc"
Modified: trunk/qt/src/YQApplication.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQApplication.h?rev=44124…
==============================================================================
--- trunk/qt/src/YQApplication.h (original)
+++ trunk/qt/src/YQApplication.h Mon Feb 4 15:58:33 2008
@@ -207,7 +207,44 @@
**/
static YQPackageSelectorPlugin * packageSelectorPlugin();
+ /**
+ * A mouse click with the wrong mouse button was detected - e.g., a right
+ * click on a push button. The user might be left-handed, but his mouse
+ * might not (yet) be configured for left-handed use - e.g., during
+ * installation. Ask him if he would like his mouse temporarily configured
+ * as a left-handed mouse.
+ *
+ * This status can be queried with YQApplication::leftHandedMouse().
+ **/
+ void maybeLeftHandedUser();
+
+ // Display information and UI capabilities.
+ //
+ // All implemented from YApplication.
+
+ virtual int displayWidth();
+ virtual int displayHeight();
+ virtual int displayDepth();
+ virtual long displayColors();
+
+ // Size of main dialogs
+ virtual int defaultWidth();
+ virtual int defaultHeight();
+
+ //
+ // UI capabilities
+ //
+
+ virtual bool isTextMode() { return false; }
+ virtual bool hasImageSupport() { return true; }
+ virtual bool hasIconSupport() { return true; }
+ virtual bool hasAnimationSupport() { return true; }
+ virtual bool hasFullUtf8Support() { return true; }
+ virtual bool richTextSupportsTable() { return true; }
+ virtual bool leftHandedMouse();
+
+
protected:
/**
@@ -247,13 +284,17 @@
**/
QTranslator * _qtTranslations;
- /**
- * For auto fonts
- **/
+ //
+ // Misc
+ //
+
bool _autoFonts;
int _autoNormalFontSize;
int _autoHeadingFontSize;
+ bool _leftHandedMouse;
+ bool _askedForLeftHandedMouse;
+
};
Modified: trunk/qt/src/YQGenericButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQGenericButton.cc?rev=44…
==============================================================================
--- trunk/qt/src/YQGenericButton.cc (original)
+++ trunk/qt/src/YQGenericButton.cc Mon Feb 4 15:58:33 2008
@@ -27,6 +27,7 @@
#include "utf8.h"
#include "YQUI.h"
+#include "YQApplication.h"
#include "YEvent.h"
#include "YQGenericButton.h"
#include "YQDialog.h"
@@ -203,7 +204,7 @@
if ( mouseEvent && mouseEvent->button() == Qt::RightButton )
{
yuiMilestone() << "Right click on button detected" << endl;
- YQUI::ui()->maybeLeftHandedUser();
+ YQUI::yqApp()->maybeLeftHandedUser();
}
}
}
Modified: trunk/qt/src/YQRadioButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQRadioButton.cc?rev=4412…
==============================================================================
--- trunk/qt/src/YQRadioButton.cc (original)
+++ trunk/qt/src/YQRadioButton.cc Mon Feb 4 15:58:33 2008
@@ -150,7 +150,7 @@
if ( mouseEvent && mouseEvent->button() == Qt::RightButton )
{
yuiMilestone() << "Right click on button detected" << endl;
- YQUI::ui()->maybeLeftHandedUser();
+ YQUI::yqApp()->maybeLeftHandedUser();
}
}
Modified: trunk/qt/src/YQSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQSelectionBox.cc?rev=441…
==============================================================================
--- trunk/qt/src/YQSelectionBox.cc (original)
+++ trunk/qt/src/YQSelectionBox.cc Mon Feb 4 15:58:33 2008
@@ -31,6 +31,7 @@
#include "utf8.h"
#include "YEvent.h"
#include "YQUI.h"
+#include "YQApplication.h"
#include "YQSelectionBox.h"
#include "YQSignalBlocker.h"
#include "YQDialog.h"
@@ -253,7 +254,7 @@
if ( mouseEvent && mouseEvent->button() == Qt::RightButton )
{
yuiMilestone() << "Right click in selecton box detected" << endl;
- YQUI::ui()->maybeLeftHandedUser();
+ YQUI::yqApp()->maybeLeftHandedUser();
}
}
Modified: trunk/qt/src/YQUI.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI.h?rev=44124&r1=44123…
==============================================================================
--- trunk/qt/src/YQUI.h (original)
+++ trunk/qt/src/YQUI.h Mon Feb 4 15:58:33 2008
@@ -238,18 +238,6 @@
void askConfigureLogging();
/**
- * A mouse click with the wrong mouse button was detected - e.g., a right
- * click on a push button. The user might be left-handed, but his mouse
- * might not (yet) be configured for left-handed use - e.g., during
- * installation. Ask him if he would like his mouse temporarily configured
- * as a left-handed mouse.
- *
- * This status can be queried with
- * UI::GetDisplayInfo() (map entry "LeftHandedMouse").
- **/
- void maybeLeftHandedUser();
-
- /**
* Go into event loop until next user input is available.
*
* Reimplemented from YUI.
@@ -263,7 +251,6 @@
**/
YEvent * pollInput();
-
/**
* Initialize and set a textdomain for gettext()
**/
Modified: trunk/qt/src/YQUI_core.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI_core.cc?rev=44124&r1…
==============================================================================
--- trunk/qt/src/YQUI_core.cc (original)
+++ trunk/qt/src/YQUI_core.cc Mon Feb 4 15:58:33 2008
@@ -68,8 +68,6 @@
_fatal_error = false;
_fullscreen = false;
_usingVisionImpairedPalette = false;
- _leftHandedMouse = false;
- _askedForLeftHandedMouse = false;
_noborder = false;
screenShotNameTemplate = "";
blocked_level = 0;
Modified: trunk/qt/src/YQUI_x11.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI_x11.cc?rev=44124&r1=…
==============================================================================
--- trunk/qt/src/YQUI_x11.cc (original)
+++ trunk/qt/src/YQUI_x11.cc Mon Feb 4 15:58:33 2008
@@ -44,42 +44,6 @@
#include <X11/Xlib.h>
-int YQUI::getDisplayWidth()
-{
- return qApp->desktop()->width();
-}
-
-
-int YQUI::getDisplayHeight()
-{
- return qApp->desktop()->height();
-}
-
-
-int YQUI::getDisplayDepth()
-{
- return qApp->desktop()->depth();
-}
-
-
-long YQUI::getDisplayColors()
-{
- return 1L << qApp->desktop()->depth();
-}
-
-
-int YQUI::getDefaultWidth()
-{
- return _default_size.width();
-}
-
-
-int YQUI::getDefaultHeight()
-{
- return _default_size.height();
-}
-
-
int YQUI::defaultSize(YUIDimension dim) const
{
return dim == YD_HORIZ ? _default_size.width() : _default_size.height();
@@ -205,46 +169,5 @@
}
-void YQUI::maybeLeftHandedUser()
-{
- if ( _askedForLeftHandedMouse )
- return;
-
-
- QString message =
- _( "You clicked the right mouse button "
- "where a left-click was expected."
- "\n"
- "Switch left and right mouse buttons?"
- );
- int button = QMessageBox::question( 0,
- // Popup dialog caption
- _( "Unexpected Click" ),
- message,
- QMessageBox::Yes | QMessageBox::Default,
- QMessageBox::No,
- QMessageBox::Cancel | QMessageBox::Escape );
-
- if ( button == QMessageBox::Yes )
- {
-
- const char * command =
- _leftHandedMouse ?
- "xmodmap -e \"pointer = 1 2 3\"": // switch back to right-handed mouse
- "xmodmap -e \"pointer = 3 2 1\""; // switch to left-handed mouse
-
- _leftHandedMouse = ! _leftHandedMouse; // might be set repeatedly!
- _askedForLeftHandedMouse = false; // give the user a chance to switch back
- yuiMilestone() << "Switching mouse buttons: " << command << endl;
-
- system( command );
- }
- else if ( button == 1 ) // No
- {
- _askedForLeftHandedMouse = true;
- }
-}
-
-
// EOF
Modified: trunk/qt/yast2-qt.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/yast2-qt.spec.in?rev=44124&r1…
==============================================================================
--- trunk/qt/yast2-qt.spec.in (original)
+++ trunk/qt/yast2-qt.spec.in Mon Feb 4 15:58:33 2008
@@ -6,8 +6,8 @@
Summary: -
BuildRequires: yast2-devtools >= 2.16.3
-BuildRequires: yast2-core-devel >= 2.16.26
-Requires: yast2-core >= 2.16.26
+BuildRequires: yast2-core-devel >= 2.16.27
+Requires: yast2-core >= 2.16.27
Requires: yast2_theme >= 2.16.1
Requires: libzypp >= 3.11.8
Provides: yast2_ui
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r44123 - in /branches/tmp/tgoettlicher/yast2cc_rewrite/src: kcategorizedview.cpp kcmoduleinfo.cpp kcmodulemodel.cpp main_window.cpp main_window.h menuitem.cpp moduleiconitem.cpp
by tgoettlicher@svn.opensuse.org 04 Feb '08
by tgoettlicher@svn.opensuse.org 04 Feb '08
04 Feb '08
Author: tgoettlicher
Date: Mon Feb 4 14:49:29 2008
New Revision: 44123
URL: http://svn.opensuse.org/viewcvs/yast?rev=44123&view=rev
Log:
added debugging to console
Modified:
branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedview.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmoduleinfo.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmodulemodel.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h
branches/tmp/tgoettlicher/yast2cc_rewrite/src/menuitem.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/moduleiconitem.cpp
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedview.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewr…
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedview.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedview.cpp Mon Feb 4 14:49:29 2008
@@ -58,6 +58,8 @@
const QModelIndexList &KCategorizedView::Private::intersectionSet(const QRect &rect)
{
+ std::cout << "&KCategorizedView::Private::intersectionSet" << std::endl;
+
QModelIndex index;
QRect indexVisualRect;
@@ -80,6 +82,7 @@
int middle = (top + bottom) / 2;
while (bottom <= top)
{
+ std::cout << "bottom <= top" << std::endl;
middle = (top + bottom) / 2;
index = proxyModel->index(middle, 0);
@@ -548,6 +551,9 @@
void KCategorizedView::setModel(QAbstractItemModel *model)
{
+
+ std::cout << "KCategorizedView::setModel" << std::endl;
+
d->lastSelection = QItemSelection();
d->forcedSelectionPosition = 0;
d->elementsInfo.clear();
@@ -563,6 +569,8 @@
if (d->proxyModel)
{
+ std::cout << "d->proxyModel1" << std::endl;
+
QObject::disconnect(d->proxyModel,
SIGNAL(layoutChanged()),
this, SLOT(slotLayoutChanged()));
@@ -582,6 +590,8 @@
if (d->proxyModel)
{
+ std::cout << "d->proxyModel2" << std::endl;
+
d->modelSortRole = d->proxyModel->sortRole();
d->modelSortColumn = d->proxyModel->sortColumn();
d->modelSortOrder = d->proxyModel->sortOrder();
@@ -602,6 +612,8 @@
if (d->proxyModel->rowCount())
{
+ std::cout << "rowCount()" << std::endl;
+
d->layoutChanged(true);
}
}
@@ -750,6 +762,8 @@
option.features |= QStyleOptionViewItemV2::WrapText;
}
+ std::cout << ".";
+
QPainter painter(viewport());
QRect area = event->rect();
const bool focus = (hasFocus() || viewport()->hasFocus()) &&
@@ -758,10 +772,12 @@
const bool enabled = (state & QStyle::State_Enabled) != 0;
painter.save();
+ std::cout << ",";
QModelIndexList dirtyIndexes = d->intersectionSet(area);
foreach (const QModelIndex &index, dirtyIndexes)
{
+ std::cout << "foreach QModelIndex..." << std::endl;
option.state = state;
option.rect = visualRect(index);
@@ -803,6 +819,8 @@
itemDelegate(index)->paint(&painter, option, index);
}
+ std::cout << "-";
+
// Redraw categories
QStyleOptionViewItem otherOption;
bool intersectedInThePast = false;
@@ -829,6 +847,7 @@
// this is doable because we know that categories are correctly ordered on the list
}
}
+ std::cout << "+";
if ((selectionMode() != SingleSelection) && (selectionMode() != NoSelection))
{
@@ -871,6 +890,8 @@
}
painter.restore();
+
+ std::cout << "!" << std::endl;
}
void KCategorizedView::resizeEvent(QResizeEvent *event)
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmoduleinfo.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewr…
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmoduleinfo.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmoduleinfo.cpp Mon Feb 4 14:49:29 2008
@@ -133,6 +133,8 @@
{
allLoaded = true;
+ std::cout << "KCModuleInfo::Private::loadAll" << std::endl;
+
// if( !service ) /* We have a bogus service. All get functions will return empty/zero values */
return;
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmodulemodel.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewr…
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmodulemodel.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcmodulemodel.cpp Mon Feb 4 14:49:29 2008
@@ -59,6 +59,9 @@
bool SystemSettingsProxyModel::filterAcceptsRow( int source_row, const QModelIndex & source_parent ) const
{
+
+std::cout << "SystemSettingsProxyModel::filterAcceptsRow" << std::endl;
+
QModelIndex index = sourceModel()->index( source_row, 0, source_parent );
MenuItem * mItem = index.data( Qt::UserRole ).value<MenuItem*>();
// accept only systemsettings categories that have children
@@ -156,6 +159,8 @@
QVariant KCModuleModel::data(const QModelIndex &index, int role) const
{
+ std::cout << "KCModuleModel::data" << std::endl;
+
///TG//////////
return(QString("data"));
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewr…
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.cpp Mon Feb 4 14:49:29 2008
@@ -22,14 +22,15 @@
QHBoxLayout *layout = new QHBoxLayout;
centralWidget->setLayout(layout);
+
MenuItem *rootItem = new MenuItem(true, 0);
- MenuItem * kat = new MenuItem(true, rootItem);
- kat->name = "Kat";
+ readMenu( rootItem );
+
+
+
+
- MenuItem *mod = new MenuItem(false, kat);
- mod->name="hi";
- mod->caption="hallo";
KCModuleModel *model;
@@ -52,7 +53,10 @@
kcsfpm->setFilterRole( KCModuleModel::UserFilterRole );
kcsfpm->setFilterCaseSensitivity( Qt::CaseInsensitive );
kcsfpm->sort( 0 );
- tv->setModel( kcsfpm );
+ tv->setModel( kcsfpm );
+// tv->setModel( model );
+
+
layout->addWidget(tv);
}
@@ -61,7 +65,6 @@
-// layout->addWidget(tv);
}
@@ -72,4 +75,73 @@
+void MainWindow::readMenu( MenuItem * parent )
+{
+
+ int depth=0;
+ MenuItem * current = parent;
+
+// for cats
+
+ MenuItem * menuItem = new MenuItem(true, parent);
+ menuItem->name = "Kat1";
+
+// readMenu
+ MenuItem* infoItem = new MenuItem(false,menuItem);
+ infoItem->name="Kat1";
+
+/*
+
+
+
+
+ // look for any categories inside this level, and recurse into them
+ int depth = 0;
+ MenuItem * current = parent;
+ while ( current && current->parent ) {
+ depth++;
+ current = current->parent;
+ }
+
+ QString space;
+ space.fill( ' ', depth * 2 );
+ std::cout << space.data() << "Looking for children in '" << parent->name.data() << "'";
+ for (int i = 0; i < categories.size(); ++i) {
+ KService::Ptr entry = categories.at(i);
+ QString parentCategory = entry->property("X-KDE-System-Settings-Parent-Category").toString();
+ QString category = entry->property("X-KDE-System-Settings-Category").toString();
+ std::cout << "Examining category " << parentCategory.data() << "/" << category.data();
+ if ( parentCategory == parent->name ) {
+ KCModuleInfo module( entry->entryPath() );
+
+ MenuItem * menuItem = new MenuItem(true, parent);
+ menuItem->name = category;
+ menuItem->service = entry;
+ menuItem->item = module;
+ readMenu( menuItem );
+ }
+ }
+
+ // scan for any modules at this level and add them
+ for (int i = 0; i < modules.size(); ++i) {
+ KService::Ptr entry = modules.at(i);
+ QString category = entry->property("X-KDE-System-Settings-Parent-Category").toString();
+ //kDebug() << "Examining module " << category;
+ if(!parent->name.isEmpty() && category == parent->name ) {
+ kDebug() << space << "found module '" << entry->name() << "' " << entry->desktopEntryPath();
+ // Add the module info to the menu
+ KCModuleInfo module(entry->entryPath());
+ kDebug() << space << "filename is " << module.fileName();
+ //append(module);
+ MenuItem * infoItem = new MenuItem(false, parent);
+ infoItem->name = category;
+ infoItem->service = entry;
+ infoItem->item = module;
+ }
+ }
+
+*/
+}
+
+
#include "main_window.moc"
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewr…
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/main_window.h Mon Feb 4 14:49:29 2008
@@ -1,6 +1,13 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
+#include "kcategorizedview.h"
+#include "menuitem.h"
+#include "kcmodulemodel.h"
+#include "kcategorydrawer.h"
+#include "moduleiconitem.h"
+
+
#include <QMainWindow>
class MainWindow : public QMainWindow
@@ -14,6 +21,7 @@
public slots:
private:
+ void readMenu( MenuItem * parent );
};
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/menuitem.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewr…
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/menuitem.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/menuitem.cpp Mon Feb 4 14:49:29 2008
@@ -30,6 +30,7 @@
{
if ( parent ) {
+ std::cout << "parent->children.append" << std::endl;
parent->children.append( this );
}
}
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/moduleiconitem.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewr…
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/moduleiconitem.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/moduleiconitem.cpp Mon Feb 4 14:49:29 2008
@@ -102,6 +102,8 @@
:// QListWidgetItem(SmallIcon( module.icon(), IMAGE_SIZE ), module.moduleName(), parent),
imageName(module.icon())
{
+
+ std::cout << "ModuleIconItem::ModuleIconItem" << std::endl;
// setData( Qt::UserRole, KIconLoader::DefaultState );
modules.append(module);
setSize();
@@ -112,12 +114,14 @@
: //QListWidgetItem( SmallIcon( _imageName, IMAGE_SIZE ), text, parent ),
imageName(_imageName)
{
+ std::cout << "ModuleIconItem::ModuleIconItem" << std::endl;
// setData( Qt::UserRole, KIconLoader::DefaultState );
setSize();
}
void ModuleIconItem::loadIcon( bool enabled )
{
+ std::cout << "ModuleIconItem::loadIcon" << std::endl;
// int newState = enabled ? KIconLoader::DefaultState : KIconLoader::DisabledState;
// if( newState == data( Qt::UserRole ).toInt() )
return;
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r44122 - in /trunk/qt: VERSION.cmake package/yast2-qt.changes src/pkg/YQPkgRepoList.cc
by tgoettlicher@svn.opensuse.org 04 Feb '08
by tgoettlicher@svn.opensuse.org 04 Feb '08
04 Feb '08
Author: tgoettlicher
Date: Mon Feb 4 13:49:04 2008
New Revision: 44122
URL: http://svn.opensuse.org/viewcvs/yast?rev=44122&view=rev
Log:
Fixed Bug #340898: Selecting specific repository out of sync
Modified:
trunk/qt/VERSION.cmake
trunk/qt/package/yast2-qt.changes
trunk/qt/src/pkg/YQPkgRepoList.cc
Modified: trunk/qt/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/VERSION.cmake?rev=44122&r1=44…
==============================================================================
--- trunk/qt/VERSION.cmake (original)
+++ trunk/qt/VERSION.cmake Mon Feb 4 13:49:04 2008
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "16")
-SET(VERSION_PATCH "22")
+SET(VERSION_PATCH "23")
Modified: trunk/qt/package/yast2-qt.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/package/yast2-qt.changes?rev=…
==============================================================================
--- trunk/qt/package/yast2-qt.changes (original)
+++ trunk/qt/package/yast2-qt.changes Mon Feb 4 13:49:04 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Feb 4 13:48:16 CET 2008 - tgoettlicher(a)suse.de
+
+- Fixed Bug #340898: Selecting specific repository out of sync
+- V 2.16.23
+
+-------------------------------------------------------------------
Fri Feb 1 15:48:55 CET 2008 - sh(a)suse.de
- Moved event handling from Y(Q)UI to Y(Q)Dialog
Modified: trunk/qt/src/pkg/YQPkgRepoList.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/pkg/YQPkgRepoList.cc?rev=…
==============================================================================
--- trunk/qt/src/pkg/YQPkgRepoList.cc (original)
+++ trunk/qt/src/pkg/YQPkgRepoList.cc Mon Feb 4 13:49:04 2008
@@ -57,7 +57,7 @@
//setAllColumnsShowFocus( true );
//setSelectionMode( Q3ListView::Extended ); // allow multi-selection with Ctrl-mouse
- connect( this, SIGNAL( currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *) ),
+ connect( this, SIGNAL( itemSelectionChanged() ),
this, SLOT ( filterIfVisible()) );
fillList();
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r44121 - in /trunk/qt/src: CMakeLists.txt YQApplication.cc YQApplication.h YQOptionalWidgetFactory.cc YQUI.h YQUI_widgets.cc YQWidgetFactory.cc
by sh-sh-sh@svn.opensuse.org 04 Feb '08
by sh-sh-sh@svn.opensuse.org 04 Feb '08
04 Feb '08
Author: sh-sh-sh
Date: Mon Feb 4 13:33:36 2008
New Revision: 44121
URL: http://svn.opensuse.org/viewcvs/yast?rev=44121&view=rev
Log:
moved pkg plugin from YQUI to YQApp
Removed:
trunk/qt/src/YQUI_widgets.cc
Modified:
trunk/qt/src/CMakeLists.txt
trunk/qt/src/YQApplication.cc
trunk/qt/src/YQApplication.h
trunk/qt/src/YQOptionalWidgetFactory.cc
trunk/qt/src/YQUI.h
trunk/qt/src/YQWidgetFactory.cc
Modified: trunk/qt/src/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/CMakeLists.txt?rev=44121&…
==============================================================================
--- trunk/qt/src/CMakeLists.txt (original)
+++ trunk/qt/src/CMakeLists.txt Mon Feb 4 13:33:36 2008
@@ -66,7 +66,6 @@
YQTree.cc
YQUI_builtins.cc
YQUI_core.cc
- YQUI_widgets.cc
YQUI_x11.cc
YQWidgetCaption.cc
YQWidgetFactory.cc
Modified: trunk/qt/src/YQApplication.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQApplication.cc?rev=4412…
==============================================================================
--- trunk/qt/src/YQApplication.cc (original)
+++ trunk/qt/src/YQApplication.cc Mon Feb 4 13:33:36 2008
@@ -33,6 +33,7 @@
#include "YQi18n.h"
#include "YQApplication.h"
+#include "YQPackageSelectorPlugin.h"
YQApplication::YQApplication()
@@ -515,4 +516,24 @@
}
+YQPackageSelectorPlugin *
+YQApplication::packageSelectorPlugin()
+{
+ static YQPackageSelectorPlugin * plugin = 0;
+
+ if ( ! plugin )
+ {
+ plugin = new YQPackageSelectorPlugin();
+
+ // This is a deliberate memory leak: If an application requires a
+ // PackageSelector, it is a package selection application by
+ // definition. In this case, the qt_pkg plugin is intentionally kept
+ // open to avoid repeated start-up cost of the plugin and libzypp.
+ }
+
+ return plugin;
+}
+
+
+
#include "YQApplication.moc"
Modified: trunk/qt/src/YQApplication.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQApplication.h?rev=44121…
==============================================================================
--- trunk/qt/src/YQApplication.h (original)
+++ trunk/qt/src/YQApplication.h Mon Feb 4 13:33:36 2008
@@ -27,6 +27,8 @@
#include "QY2Settings.h"
#include "YApplication.h"
+class YQPackageSelectorPlugin;
+
class YQApplication: public QObject, public YApplication
{
@@ -199,6 +201,12 @@
const QString & filter,
const QString & headline );
+ /**
+ * Return the package selector plugin singleton or creates it
+ * (including loading the plugin lib) if it does not exist yet.
+ **/
+ static YQPackageSelectorPlugin * packageSelectorPlugin();
+
protected:
Modified: trunk/qt/src/YQOptionalWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQOptionalWidgetFactory.c…
==============================================================================
--- trunk/qt/src/YQOptionalWidgetFactory.cc (original)
+++ trunk/qt/src/YQOptionalWidgetFactory.cc Mon Feb 4 13:33:36 2008
@@ -17,7 +17,7 @@
/-*/
#include "YQOptionalWidgetFactory.h"
-#include "YQUI.h"
+#include "YQApplication.h"
#include "YUIException.h"
#include "YQPackageSelectorPlugin.h"
#include "YQWizard.h"
@@ -158,7 +158,7 @@
YQPatternSelector *
YQOptionalWidgetFactory::createPatternSelector( YWidget * parent, long modeFlags )
{
- YQPackageSelectorPlugin * plugin = YQUI::ui()->packageSelectorPlugin();
+ YQPackageSelectorPlugin * plugin = YQApplication::packageSelectorPlugin();
if ( plugin )
return plugin->createPatternSelector( parent, modeFlags );
@@ -176,7 +176,7 @@
YQSimplePatchSelector *
YQOptionalWidgetFactory::createSimplePatchSelector( YWidget * parent, long modeFlags )
{
- YQPackageSelectorPlugin * plugin = YQUI::ui()->packageSelectorPlugin();
+ YQPackageSelectorPlugin * plugin = YQApplication::packageSelectorPlugin();
if ( plugin )
return plugin->createSimplePatchSelector( parent, modeFlags );
Modified: trunk/qt/src/YQUI.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI.h?rev=44121&r1=44120…
==============================================================================
--- trunk/qt/src/YQUI.h (original)
+++ trunk/qt/src/YQUI.h Mon Feb 4 13:33:36 2008
@@ -39,7 +39,6 @@
class QY2Settings;
class YEvent;
class YQOptionalWidgetFactory;
-class YQPackageSelectorPlugin;
class YQWidgetFactory;
class YQApplication;
class YQUI_Ui;
@@ -310,12 +309,6 @@
virtual float layoutUnits( YUIDimension dim, int device_units );
/**
- * Returns the package selector plugin singleton of this UI or creates it
- * (including loading the plugin lib) if it does not exist yet.
- **/
- YQPackageSelectorPlugin * packageSelectorPlugin();
-
- /**
* Show hourglass cursor.
*
* Reimplemented from YUI.
Modified: trunk/qt/src/YQWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQWidgetFactory.cc?rev=44…
==============================================================================
--- trunk/qt/src/YQWidgetFactory.cc (original)
+++ trunk/qt/src/YQWidgetFactory.cc Mon Feb 4 13:33:36 2008
@@ -21,7 +21,7 @@
#include "YUILog.h"
#include "YQWidgetFactory.h"
-#include "YQUI.h"
+#include "YQApplication.h"
#include "YUIException.h"
#include "YQPackageSelectorPlugin.h"
#include "YQMainWinDock.h"
@@ -30,12 +30,14 @@
using std::string;
+
YQWidgetFactory::YQWidgetFactory()
: YWidgetFactory()
{
// NOP
}
+
YQWidgetFactory::~YQWidgetFactory()
{
// NOP
@@ -292,7 +294,7 @@
YQPackageSelector *
YQWidgetFactory::createPackageSelector( YWidget * parent, long modeFlags )
{
- YQPackageSelectorPlugin * plugin = YQUI::ui()->packageSelectorPlugin();
+ YQPackageSelectorPlugin * plugin = YQApplication::packageSelectorPlugin();
if ( plugin )
return plugin->createPackageSelector( parent, modeFlags );
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r44120 - in /trunk/qt/src: YQUI.h YQUI_core.cc
by sh-sh-sh@svn.opensuse.org 04 Feb '08
by sh-sh-sh@svn.opensuse.org 04 Feb '08
04 Feb '08
Author: sh-sh-sh
Date: Mon Feb 4 13:14:24 2008
New Revision: 44120
URL: http://svn.opensuse.org/viewcvs/yast?rev=44120&view=rev
Log:
obsolete
Modified:
trunk/qt/src/YQUI.h
trunk/qt/src/YQUI_core.cc
Modified: trunk/qt/src/YQUI.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI.h?rev=44120&r1=44119…
==============================================================================
--- trunk/qt/src/YQUI.h (original)
+++ trunk/qt/src/YQUI.h Mon Feb 4 13:14:24 2008
@@ -191,13 +191,6 @@
void askPlayMacro();
/**
- * Issue an internal error: Open popup with that message and wait.
- *
- * Reimplemented from YUI.
- **/
- void internalError( const char * msg );
-
- /**
* Block (or unblock) events. If events are blocked, any event sent
* should be ignored until events are unblocked again.
*
Modified: trunk/qt/src/YQUI_core.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI_core.cc?rev=44120&r1…
==============================================================================
--- trunk/qt/src/YQUI_core.cc (original)
+++ trunk/qt/src/YQUI_core.cc Mon Feb 4 13:14:24 2008
@@ -387,25 +387,6 @@
}
-
-void YQUI::internalError( const char * msg )
-{
- normalCursor();
- int button = QMessageBox::critical( 0, "YaST2 Internal Error", msg,
- QMessageBox::Abort | QMessageBox::Default,
- 0 ); // button1
- busyCursor();
-
- if ( button == QMessageBox::Abort )
- {
- raiseFatalError();
- abort();
-
- // exit() leaves a process running (WFM?), so this really seems to be
- // the only way to make sure we are really going down.
- }
-}
-
void YQUI::idleLoop( int fd_ycp )
{
init_ui();
@@ -425,16 +406,19 @@
delete notifier;
}
+
void YQUI::leaveIdleLoop()
{
_leave_idle_loop = true;
}
+
void YQUI_Ui::slotLeaveIdleLoop()
{
YQUI::ui()->leaveIdleLoop();
}
+
void YQUI::sendEvent( YEvent * event )
{
if ( event )
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r44119 - in /trunk/gtk: ChangeLog src/YGDialog.cc src/YGDialog.h src/YGPackageSelector.cc src/YGUI.cc src/YGUI.h src/yzyppwrapper.cc
by rpmcruz@svn.opensuse.org 03 Feb '08
by rpmcruz@svn.opensuse.org 03 Feb '08
03 Feb '08
Author: rpmcruz
Date: Sun Feb 3 02:23:04 2008
New Revision: 44119
URL: http://svn.opensuse.org/viewcvs/yast?rev=44119&view=rev
Log:
* src/yzyppwrapper.cc: bug fix: licenses were being rejected regardless
user's acceptance.
* src/YGPackageSelector.cc: Christian Jäger asked for an Update All button.
Added a context menu to the listing, that has among package actions, a Select
All item, so to make it clear it supports multi-selections and one can easily
select-all then the upgrade button.
* src/YGDialog.cc: keep up with libyui changes.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGDialog.cc
trunk/gtk/src/YGDialog.h
trunk/gtk/src/YGPackageSelector.cc
trunk/gtk/src/YGUI.cc
trunk/gtk/src/YGUI.h
trunk/gtk/src/yzyppwrapper.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=44119&r1=44118…
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Sun Feb 3 02:23:04 2008
@@ -1,3 +1,19 @@
+2008-02-03 Ricardo Cruz <rpmcruz(a)alunos.dcc.fc.up.pt>
+
+ * src/yzyppwrapper.cc: bug fix: licenses were being rejected regardless
+ user's acceptance.
+
+ * src/YGPackageSelector.cc: Christian Jäger asked for an Update All button.
+ Added a context menu to the listing, that has among package actions, a Select
+ All item, so to make it clear it supports multi-selections and one can easily
+ select-all then the upgrade button.
+
+ * src/YGDialog.cc: keep up with libyui changes.
+
+2008-02-03 Stephan Kulow <coolo(a)suse.de>
+
+ * src/YGUI.cc/h: maintaince: keep up with libyui changes.
+
2008-01-24 Ricardo Cruz <rpmcruz(a)alunos.dcc.fc.up.pt>
* src/YGDumbTab.cc: bug fix: honor tab default flag.
Modified: trunk/gtk/src/YGDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDialog.cc?rev=44119&r1…
==============================================================================
--- trunk/gtk/src/YGDialog.cc (original)
+++ trunk/gtk/src/YGDialog.cc Sun Feb 3 02:23:04 2008
@@ -55,7 +55,6 @@
gtk_window_set_modal (window, TRUE);
gtk_window_set_transient_for (window, parent);
gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DIALOG);
- //gtk_window_set_focus_on_map (window, FALSE);
}
else {
gtk_window_set_title (window, "YaST");
@@ -85,6 +84,9 @@
G_CALLBACK (close_window_cb), this);
g_signal_connect_after (G_OBJECT (m_widget), "key-press-event",
G_CALLBACK (key_pressed_cb), this);
+ // set busy cursor at start
+ g_signal_connect_after (G_OBJECT (m_widget), "realize",
+ G_CALLBACK (realize_cb), this);
}
~YGWindow()
@@ -95,6 +97,31 @@
g_object_unref (G_OBJECT (m_widget));
}
+ void show()
+ { gtk_widget_show (m_widget); }
+
+ void present()
+ { gtk_window_present (GTK_WINDOW (m_widget)); }
+
+ void normalCursor()
+ {
+ if (GTK_WIDGET_REALIZED (m_widget))
+ gdk_window_set_cursor (m_widget->window, NULL);
+ }
+
+ void busyCursor()
+ {
+ if (GTK_WIDGET_REALIZED (m_widget)) {
+ // GdkDisplay won't change for new dialogs
+ static GdkCursor *cursor = NULL;
+ if (!cursor) {
+ GdkDisplay *display = gtk_widget_get_display (m_widget);
+ cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
+ }
+ gdk_window_set_cursor (m_widget->window, cursor);
+ }
+ }
+
void setChild (YWidget *new_child)
{
IMPL
@@ -226,6 +253,9 @@
return TRUE;
}
+ static void realize_cb (GtkWidget *widget, YGWindow *pThis)
+ { pThis->busyCursor(); }
+
static gboolean expode_window_timeout_cb (gpointer data)
{
YGWindow *pThis = (YGWindow *) data;
@@ -233,7 +263,7 @@
srand (time (NULL));
gint x, y;
gtk_window_get_position (window, &x, &y);
- #if 0
+ #if 0
// OVAL MOVE
for (int i = 180; i < 360+180; i++) {
gtk_window_move (window, x+(int)(sin((i*G_PI)/180)*50),
@@ -242,7 +272,7 @@
gtk_main_iteration();
usleep (25);
}
- #else
+ #else
// EXPLOSION
for (int i = 0; i < 40; i++) {
gtk_window_move (window, x+(int)((((float)(rand())/RAND_MAX)*40)-20),
@@ -251,7 +281,7 @@
gtk_main_iteration();
usleep (200);
}
- #endif
+ #endif
gtk_window_move (window, x, y);
return TRUE;
}
@@ -371,19 +401,12 @@
void YGDialog::normalCursor()
{
- gdk_window_set_cursor (m_window->getWidget()->window, NULL);
+ m_window->normalCursor();
}
void YGDialog::busyCursor()
{
- // NOTE: GdkDisplay won't change for new dialogs, so we don't
- // have to synchronize between them or something.
- static GdkCursor *cursor = NULL;
- if (!cursor) {
- GdkDisplay *display = gtk_widget_get_display (m_window->getWidget());
- cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
- }
- gdk_window_set_cursor (m_window->getWidget()->window, cursor);
+ m_window->busyCursor();
}
@@ -421,34 +444,19 @@
return new YGDialog (dialogType, colorMode);
}
-void
-YGDialog::openInternal()
+void YGDialog::openInternal()
{
-#if TESTED
- // Ensure only one default button ?
- gtk_widget_show (m_widget);
- gtk_window_present (GTK_WINDOW (m_widget));
- gtk_widget_queue_draw (m_widget);
-#endif
-#if 0
- ensureOnlyOneDefaultButton();
- QWidget::show();
- QWidget::raise(); // FIXME: is this really necessary?
- QWidget::update();
-#endif
+ m_window->show();
}
-
-void
-YGDialog::activate()
-{
-#if TESTED
- gtk_window_present (GTK_WINDOW (m_widget));
- gtk_widget_queue_draw (m_widget);
-#endif
-#if 0
- QWidget::raise();
- QWidget::update();
-#endif
+void YGDialog::activate()
+{
+ m_window->present();
}
+YEvent *YGDialog::waitForEventInternal (int timeout_millisec)
+{ return YGUI::ui()->userInput (timeout_millisec); }
+
+YEvent *YGDialog::pollEventInternal()
+{ return YGUI::ui()->pollInput(); }
+
Modified: trunk/gtk/src/YGDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDialog.h?rev=44119&r1=…
==============================================================================
--- trunk/gtk/src/YGDialog.h (original)
+++ trunk/gtk/src/YGDialog.h Sun Feb 3 02:23:04 2008
@@ -33,8 +33,11 @@
virtual int preferredWidth() { return 0; }
virtual int preferredHeight() { return 0; }
- virtual void activate();
- virtual void openInternal();
+ virtual void activate();
+ virtual void openInternal();
+
+ virtual YEvent *waitForEventInternal (int timeout_millisec);
+ virtual YEvent *pollEventInternal();
YGWIDGET_IMPL_CHILD_ADDED (m_containee)
YGWIDGET_IMPL_CHILD_REMOVED (m_containee)
Modified: trunk/gtk/src/YGPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev…
==============================================================================
--- trunk/gtk/src/YGPackageSelector.cc (original)
+++ trunk/gtk/src/YGPackageSelector.cc Sun Feb 3 02:23:04 2008
@@ -41,6 +41,136 @@
static void normalCursor()
{ YGUI::ui()->normalCursor(); }
+struct PkgList
+{
+ bool empty() const
+ { return packages.empty(); }
+ bool single() const
+ { return packages.size() == 1; }
+ Ypp::Package *front() const
+ { return packages.front(); }
+
+ bool installed() const
+ { init(); return _allInstalled; }
+ bool notInstalled() const
+ { init(); return _allNotInstalled; }
+ bool upgradable() const
+ { init(); return _allUpgradable; }
+ bool modified() const
+ { init(); return _allModified; }
+ bool locked() const
+ { init(); return _allLocked; }
+ bool unlocked() const
+ { init(); return _allUnlocked; }
+
+ void install() // or upgrade
+ {
+ busyCursor();
+ Ypp::get()->startTransactions();
+ for (std::list <Ypp::Package *>::iterator it = packages.begin();
+ it != packages.end(); it++)
+ (*it)->install (0);
+ Ypp::get()->finishTransactions();
+ normalCursor();
+ }
+
+ void remove()
+ {
+ busyCursor();
+ Ypp::get()->startTransactions();
+ for (std::list <Ypp::Package *>::iterator it = packages.begin();
+ it != packages.end(); it++)
+ (*it)->remove();
+ Ypp::get()->finishTransactions();
+ normalCursor();
+ }
+
+ void lock (bool toLock)
+ {
+ busyCursor();
+ Ypp::get()->startTransactions();
+ for (std::list <Ypp::Package *>::iterator it = packages.begin();
+ it != packages.end(); it++)
+ (*it)->lock (toLock);
+ Ypp::get()->finishTransactions();
+ normalCursor();
+ }
+
+ void undo()
+ {
+ busyCursor();
+ Ypp::get()->startTransactions();
+ for (std::list <Ypp::Package *>::iterator it = packages.begin();
+ it != packages.end(); it++)
+ (*it)->undo();
+ Ypp::get()->finishTransactions();
+ normalCursor();
+ }
+
+ void push (Ypp::Package *package)
+ { packages.push_back (package); }
+
+ bool contains (const Ypp::Package *package) const
+ {
+ const_iterator it;
+ for (it = packages.begin(); it != packages.end(); it++)
+ if (*it == package)
+ return true;
+ return false;
+ }
+
+ PkgList() : inited (0)
+ {}
+
+ typedef std::list <Ypp::Package *>::const_iterator const_iterator;
+ const_iterator begin() const
+ { return packages.begin(); }
+ const_iterator end() const
+ { return packages.end(); }
+
+private:
+ void init() const
+ { PkgList *packages = const_cast <PkgList *> (this); packages->_init(); }
+ void _init()
+ {
+ if (inited) return; inited = 1;
+ if (packages.empty())
+ _allInstalled = _allNotInstalled = _allUpgradable = _allModified =
+ _allLocked = _allUnlocked = false;
+ else {
+ _allInstalled = _allNotInstalled = _allUpgradable = _allModified =
+ _allLocked = _allUnlocked = true;
+ for (std::list <Ypp::Package *>::const_iterator it = packages.begin();
+ it != packages.end(); it++) {
+ if (!(*it)->isInstalled()) {
+ _allInstalled = false;
+ _allUpgradable = false;
+ }
+ else {
+ _allNotInstalled = false;
+ const Ypp::Package::Version *version = (*it)->getAvailableVersion(0);
+ if (!version || version->cmp <= 0)
+ _allUpgradable = false;
+ }
+ if ((*it)->isModified()) {
+ // if modified, can't be locked or unlocked
+ _allLocked = _allUnlocked = false;
+ }
+ else
+ _allModified = false;
+ if ((*it)->isLocked())
+ _allUnlocked = false;
+ else
+ _allLocked = false;
+ }
+ }
+ }
+
+ std::list <Ypp::Package *> packages;
+ guint inited : 2, _allInstalled : 2, _allNotInstalled : 2, _allUpgradable : 2,
+ _allModified : 2, _allLocked : 2, _allUnlocked : 2;
+};
+
#include "icons/pkg-list-mode.xpm"
#include "icons/pkg-tiles-mode.xpm"
@@ -48,7 +178,7 @@
{
public:
struct Listener {
- virtual void packagesSelected (const std::list <Ypp::Package *> &selection) = 0;
+ virtual void packagesSelected (const PkgList &packages) = 0;
};
void setListener (Listener *listener)
{ m_listener = listener; }
@@ -56,25 +186,50 @@
private:
Listener *m_listener;
- void packagesSelected (const std::list <Ypp::Package *> &selection)
+ void packagesSelected (const PkgList &packages)
{
if (m_listener) {
busyCursor();
- m_listener->packagesSelected (selection);
+ m_listener->packagesSelected (packages);
normalCursor();
}
}
- struct View {
+ struct View
+ {
PackagesView *m_parent;
- GtkWidget *m_widget;
- View (PackagesView *parent) : m_parent (parent)
+ GtkWidget *m_widget, *m_popup_hack;
+ View (PackagesView *parent) : m_parent (parent), m_popup_hack (NULL)
{}
+
+ virtual ~View()
+ {
+ if (m_popup_hack) gtk_widget_destroy (m_popup_hack);
+ }
+
virtual void setModel (GtkTreeModel *model) = 0;
+ virtual GList *getSelectedPaths (GtkTreeModel **model) = 0;
+ virtual void selectAll() = 0;
+
+ virtual int countSelected()
+ {
+ int count = 0;
+ GtkTreeModel *model;
+ GList *paths = getSelectedPaths (&model);
+ for (GList *i = paths; i; i = i->next) {
+ GtkTreePath *path = (GtkTreePath *) i->data;
+ gtk_tree_path_free (path);
+ count++;
+ }
+ g_list_free (paths);
+ return count;
+ }
- void selectedPaths (GtkTreeModel *model, GList *paths)
+ PkgList getSelected()
{
- std::list <Ypp::Package *> packages;
+ GtkTreeModel *model;
+ GList *paths = getSelectedPaths (&model);
+ PkgList packages;
for (GList *i = paths; i; i = i->next) {
Ypp::Package *package;
GtkTreePath *path = (GtkTreePath *) i->data;
@@ -83,11 +238,86 @@
gtk_tree_model_get (model, &iter, YGtkZyppModel::PTR_COLUMN, &package, -1);
gtk_tree_path_free (path);
- packages.push_back (package);
+ packages.push (package);
}
g_list_free (paths);
+ return packages;
+ }
+
+ void signalSelected()
+ {
+ PkgList packages = getSelected();
m_parent->packagesSelected (packages);
}
+
+ void signalPopup (int button, int event_time)
+ {
+ // GtkMenu emits "deactivate" before Items notifications, so there isn't
+ // a better way to de-allocate the popup
+ if (m_popup_hack) gtk_widget_destroy (m_popup_hack);
+ GtkWidget *menu = m_popup_hack = gtk_menu_new();
+
+ struct inner {
+ static void appendItem (GtkWidget *menu, const char *label, const char *stock_icon,
+ void (& callback) (GtkMenuItem *item, View *pThis), View *pThis)
+ {
+ GtkWidget *item;
+ if (stock_icon) {
+ if (label) {
+ item = gtk_image_menu_item_new_with_mnemonic (label);
+ GtkWidget *icon;
+ icon = gtk_image_new_from_stock (stock_icon, GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), icon);
+ }
+ else
+ item = gtk_image_menu_item_new_from_stock (stock_icon, NULL);
+ }
+ else
+ item = gtk_menu_item_new_with_mnemonic (label);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+ g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (callback), pThis);
+ }
+ static void install_cb (GtkMenuItem *item, View *pThis)
+ {
+ PkgList packages = pThis->getSelected();
+ packages.install();
+ }
+ static void remove_cb (GtkMenuItem *item, View *pThis)
+ {
+ PkgList packages = pThis->getSelected();
+ packages.remove();
+ }
+ static void undo_cb (GtkMenuItem *item, View *pThis)
+ {
+ PkgList packages = pThis->getSelected();
+ packages.undo();
+ }
+ static void select_all_cb (GtkMenuItem *item, View *pThis)
+ {
+ pThis->selectAll();
+ }
+ };
+
+ PkgList packages = getSelected();
+ bool empty = true;
+ if (packages.notInstalled())
+ inner::appendItem (menu, _("_Install"), GTK_STOCK_DELETE, inner::install_cb, this), empty = false;
+ if (packages.upgradable())
+ inner::appendItem (menu, _("_Upgrade"), GTK_STOCK_GOTO_TOP, inner::install_cb, this), empty = false;
+ if (packages.installed())
+ inner::appendItem (menu, _("_Remove"), GTK_STOCK_SAVE, inner::remove_cb, this), empty = false;
+ if (packages.modified())
+ inner::appendItem (menu, _("_Undo"), GTK_STOCK_UNDO, inner::undo_cb, this), empty = false;
+ if (!empty)
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
+ inner::appendItem (menu, NULL, GTK_STOCK_SELECT_ALL, inner::select_all_cb, this);
+
+ gtk_widget_show_all (menu);
+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time);
+ }
+
+ static gboolean popup_key_cb (GtkWidget *widget, View *pThis)
+ { pThis->signalPopup (0, gtk_get_current_event_time()); return TRUE; }
};
struct ListView : public View
{
@@ -118,8 +348,13 @@
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
g_signal_connect (G_OBJECT (selection), "changed",
- G_CALLBACK (packages_selected_cb), this);
+ G_CALLBACK (packages_selected_cb), this);
gtk_widget_show (m_widget);
+
+ g_signal_connect (G_OBJECT (m_widget), "popup-menu",
+ G_CALLBACK (popup_key_cb), this);
+ g_signal_connect (G_OBJECT (m_widget), "button-press-event",
+ G_CALLBACK (popup_button_cb), this);
}
virtual void setModel (GtkTreeModel *model)
@@ -129,11 +364,39 @@
gtk_tree_view_scroll_to_point (GTK_TREE_VIEW (m_widget), 0, 0);
}
+ GtkTreeSelection *getTreeSelection()
+ { return gtk_tree_view_get_selection (GTK_TREE_VIEW (m_widget)); }
+
+ virtual GList *getSelectedPaths (GtkTreeModel **model)
+ { return gtk_tree_selection_get_selected_rows (getTreeSelection(), model); }
+
+ virtual void selectAll()
+ { gtk_tree_selection_select_all (getTreeSelection()); }
+
+ virtual int countSelected()
+ { return gtk_tree_selection_count_selected_rows (getTreeSelection()); }
+
static void packages_selected_cb (GtkTreeSelection *selection, View *pThis)
+ { pThis->signalSelected(); }
+
+ static gboolean popup_button_cb (GtkWidget *widget, GdkEventButton *event, View *pThis)
{
- GtkTreeModel *model;
- GList *paths = gtk_tree_selection_get_selected_rows (selection, &model);
- pThis->selectedPaths (model, paths);
+ // workaround (based on gedit): we want the tree view to receive this press in order
+ // to select the row, but we can't use connect_after, so we throw a dummy mouse press
+ if (event->type == GDK_BUTTON_PRESS && event->button == 3) {
+ static bool safeguard = false;
+ if (safeguard) return false;
+ safeguard = true;
+ if (pThis->countSelected() <= 1) { // if there is a selection, let it be
+ event->button = 1;
+ if (!gtk_widget_event (widget, (GdkEvent *) event))
+ return FALSE;
+ }
+ pThis->signalPopup (3, event->time);
+ safeguard = false;
+ return TRUE;
+ }
+ return FALSE;
}
};
struct IconView : public View
@@ -148,6 +411,11 @@
g_signal_connect (G_OBJECT (m_widget), "selection-changed",
G_CALLBACK (packages_selected_cb), this);
gtk_widget_show (m_widget);
+
+ g_signal_connect (G_OBJECT (m_widget), "popup-menu",
+ G_CALLBACK (popup_key_cb), this);
+ g_signal_connect_after (G_OBJECT (m_widget), "button-press-event",
+ G_CALLBACK (popup_button_after_cb), this);
}
virtual void setModel (GtkTreeModel *model)
@@ -161,11 +429,26 @@
}
}
- static void packages_selected_cb (GtkIconView *view, View *pThis)
+ virtual GList *getSelectedPaths (GtkTreeModel **model)
{
- GtkTreeModel *model = gtk_icon_view_get_model (view);
+ GtkIconView *view = GTK_ICON_VIEW (m_widget);
+ *model = gtk_icon_view_get_model (view);
GList *paths = gtk_icon_view_get_selected_items (view);
- pThis->selectedPaths (model, paths);
+ return paths;
+ }
+
+ virtual void selectAll()
+ { gtk_icon_view_select_all (GTK_ICON_VIEW (m_widget)); }
+
+ static void packages_selected_cb (GtkIconView *view, View *pThis)
+ { pThis->signalSelected(); }
+
+ static gboolean popup_button_after_cb (GtkWidget *widget, GdkEventButton *event,
+ View *pThis)
+ {
+ if (event->type == GDK_BUTTON_PRESS && event->button == 3)
+ pThis->signalPopup (3, event->time);
+ return FALSE;
}
};
@@ -217,7 +500,7 @@
if (m_model)
m_view->setModel (m_model);
- packagesSelected (std::list <Ypp::Package *> ());
+ packagesSelected (PkgList());
normalCursor();
}
@@ -233,11 +516,14 @@
m_model = GTK_TREE_MODEL (zmodel);
if (m_view) {
m_view->setModel (m_model);
- packagesSelected (std::list <Ypp::Package *> ());
+ packagesSelected (PkgList());
}
normalCursor();
}
+ PkgList getSelected()
+ { return m_view->getSelected(); }
+
private:
GtkWidget *create_toggle_button (const char **xpm, const char *tooltip, GtkWidget *member)
{
@@ -322,6 +608,7 @@
else
gtk_widget_show (m_button);
gtk_label_set_text (GTK_LABEL (m_label), text.c_str());
+ gtk_widget_set_tooltip_text (m_label, package->summary().c_str());
}
static void undo_clicked_cb (GtkButton *button, Ypp::Package *package)
@@ -671,28 +958,25 @@
gtk_box_pack_start (GTK_BOX (m_box), m_buttons_box, FALSE, TRUE, 0);
}
- std::list <Ypp::Package *> m_selected;
-
- virtual void packagesSelected (const std::list <Ypp::Package *> &selection)
+ virtual void packagesSelected (const PkgList &selection)
{
gtk_widget_set_sensitive (m_buttons_box, !selection.empty());
- m_selected = selection;
m_filters->signalChanged();
}
virtual void writeQuery (Ypp::Query *query)
{
- for (std::list <Ypp::Package *>::const_iterator it = m_selected.begin();
- it != m_selected.end(); it++)
+ PkgList selected = m_view->getSelected();
+ for (PkgList::const_iterator it = selected.begin();
+ it != selected.end(); it++)
query->addCollection (*it);
}
void doAll (bool install /*or remove*/)
{
// we just need to mark the collections themselves
- for (std::list <Ypp::Package *>::iterator it = m_selected.begin();
- it != m_selected.end(); it++)
- install ? (*it)->install(0) : (*it)->remove();
+ PkgList selected = m_view->getSelected();
+ install ? selected.install() : selected.remove();
}
static void install_cb (GtkButton *button, Pool *pThis)
@@ -981,7 +1265,7 @@
*m_unlocked_image, *m_package_image;
public:
-std::list <Ypp::Package *> m_packages; // we keep a copy to test against modified...
+PkgList m_packages; // we keep a copy to test against modified...
Filters *m_filters; // used to filter repo versions...
GtkWidget *getWidget()
@@ -1077,40 +1361,15 @@
g_object_unref (G_OBJECT (m_unlocked_image));
}
- void setPackages (const std::list <Ypp::Package *> &packages)
+ void setPackages (const PkgList &packages)
{
m_packages = packages;
if (packages.empty())
return;
- Ypp::Package *single_package = packages.size() == 1 ? packages.front() : NULL;
- bool allInstalled = true, allNotInstalled = true, allUpgradable = true,
- allModified = true, allLocked = true, allUnlocked = true;
- for (std::list <Ypp::Package *>::const_iterator it = packages.begin();
- it != packages.end(); it++) {
- if (!(*it)->isInstalled()) {
- allInstalled = false;
- allUpgradable = false;
- }
- else {
- allNotInstalled = false;
- const Ypp::Package::Version *version = (*it)->getAvailableVersion(0);
- if (!version || version->cmp <= 0)
- allUpgradable = false;
- }
- if ((*it)->isModified()) {
- // if modified, can't be locked or unlocked
- allLocked = allUnlocked = false;
- }
- else
- allModified = false;
- if ((*it)->isLocked())
- allUnlocked = false;
- else
- allLocked = false;
- }
+ Ypp::Package *single_package = packages.single() ? packages.front() : NULL;
- if (allInstalled) {
+ if (packages.installed()) {
gtk_widget_show (m_remove_button);
if (single_package)
gtk_label_set_text (GTK_LABEL (m_installed_version),
@@ -1147,12 +1406,12 @@
gtk_widget_hide (m_install_button);
}
else {
- if (allUpgradable) {
+ if (packages.upgradable()) {
gtk_combo_box_append_text (GTK_COMBO_BOX (m_available_versions), "(upgrades)");
gtk_combo_box_set_active (GTK_COMBO_BOX (m_available_versions), 0);
gtk_button_set_label (GTK_BUTTON (m_install_button), _("Upgrade"));
}
- else if (allNotInstalled) {
+ else if (packages.notInstalled()) {
gtk_combo_box_append_text (GTK_COMBO_BOX (m_available_versions), "(several)");
gtk_combo_box_set_active (GTK_COMBO_BOX (m_available_versions), 0);
gtk_button_set_label (GTK_BUTTON (m_install_button), _("Install"));
@@ -1162,13 +1421,13 @@
}
// is locked
- if (allLocked || allUnlocked) {
+ if (packages.locked() || packages.unlocked()) {
gtk_widget_show (m_lock_button);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m_lock_button), allLocked);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m_lock_button), packages.locked());
gtk_button_set_image (GTK_BUTTON (m_lock_button),
- allLocked ? m_locked_image : m_unlocked_image);
- gtk_widget_set_sensitive (m_install_button, !allLocked);
- gtk_widget_set_sensitive (m_remove_button, !allLocked);
+ packages.locked() ? m_locked_image : m_unlocked_image);
+ gtk_widget_set_sensitive (m_install_button, !packages.locked());
+ gtk_widget_set_sensitive (m_remove_button, !packages.locked());
}
else {
gtk_widget_hide (m_lock_button);
@@ -1176,7 +1435,7 @@
gtk_widget_set_sensitive (m_remove_button, TRUE);
}
- if (allModified)
+ if (packages.modified())
gtk_widget_show (m_undo_button);
else
gtk_widget_hide (m_undo_button);
@@ -1196,59 +1455,37 @@
private:
static void install_clicked_cb (GtkButton *button, PackageControl *pThis)
{
- busyCursor();
- Ypp::get()->startTransactions();
- for (std::list <Ypp::Package *>::iterator it = pThis->m_packages.begin();
- it != pThis->m_packages.end(); it++) {
- int version;
- if (GTK_WIDGET_VISIBLE (pThis->m_available_versions))
- version = gtk_combo_box_get_active (GTK_COMBO_BOX (
+ if (pThis->m_packages.single()) {
+ busyCursor();
+ Ypp::Package *package = pThis->m_packages.front();
+ int version = gtk_combo_box_get_active (GTK_COMBO_BOX (
pThis->m_available_versions));
- else
- version = 0; // i.e. most recent (on multi-packages)
- (*it)->install (version);
+ package->install (version);
+ normalCursor();
}
- Ypp::get()->finishTransactions();
- normalCursor();
+ else
+ pThis->m_packages.install();
}
static void remove_clicked_cb (GtkButton *button, PackageControl *pThis)
{
- busyCursor();
- Ypp::get()->startTransactions();
- for (std::list <Ypp::Package *>::iterator it = pThis->m_packages.begin();
- it != pThis->m_packages.end(); it++)
- (*it)->remove();
- Ypp::get()->finishTransactions();
- normalCursor();
+ pThis->m_packages.remove();
}
static void locked_toggled_cb (GtkToggleButton *button, PackageControl *pThis)
{
bool lock = gtk_toggle_button_get_active (button);
- busyCursor();
- Ypp::get()->startTransactions();
- for (std::list <Ypp::Package *>::iterator it = pThis->m_packages.begin();
- it != pThis->m_packages.end(); it++)
- (*it)->lock (lock);
- Ypp::get()->finishTransactions();
- normalCursor();
+ pThis->m_packages.lock (lock);
}
static void undo_clicked_cb (GtkButton *button, PackageControl *pThis)
{
- busyCursor();
- Ypp::get()->startTransactions();
- for (std::list <Ypp::Package *>::iterator it = pThis->m_packages.begin();
- it != pThis->m_packages.end(); it++)
- (*it)->undo();
- Ypp::get()->finishTransactions();
- normalCursor();
+ pThis->m_packages.undo();
}
static void version_changed_cb (GtkComboBox *combo, PackageControl *pThis)
{
- if (pThis->m_packages.size() == 1) {
+ if (pThis->m_packages.single()) {
Ypp::Package *package = pThis->m_packages.front();
int nb = gtk_combo_box_get_active (GTK_COMBO_BOX (pThis->m_available_versions));
if (nb == -1) return;
@@ -1310,7 +1547,7 @@
}
}
- void setPackages (std::list <Ypp::Package *> packages)
+ void setPackages (const PkgList &packages)
{
if (packages.empty()) {
gtk_widget_hide (m_widget);
@@ -1336,11 +1573,7 @@
{
// GTK+ doesn't fire selection change when a selected row changes, so we need
// to re-load PackageControl in that occasions.
- std::list <Ypp::Package *>::iterator it;
- for (it = m_control->m_packages.begin(); it != m_control->m_packages.end(); it++)
- if (*it == package)
- break;
- if (it != m_control->m_packages.end())
+ if (m_control->m_packages.contains (package))
m_control->setPackages (m_control->m_packages);
}
@@ -1564,7 +1797,7 @@
gtk_widget_show_all (m_box);
m_changes->setContainer (changes_box);
- m_details->setPackages (std::list <Ypp::Package *> ());
+ m_details->setPackages (PkgList());
}
~PackageSelector()
@@ -1581,7 +1814,7 @@
m_packages->setQuery (query);
}
- virtual void packagesSelected (const std::list <Ypp::Package *> &packages)
+ virtual void packagesSelected (const PkgList &packages)
{
m_details->setPackages (packages);
}
@@ -1607,9 +1840,6 @@
setBorder (0);
YGTK_WIZARD (getWidget())->child_border_width = 0;
- YGDialog *dialog = YGDialog::currentDialog();
- dialog->setCloseCallback (confirm_cb, this);
-
GtkWindow *window = YGDialog::currentWindow();
gtk_window_resize (window,
MAX (700, GTK_WIDGET (window)->allocation.width),
@@ -1620,7 +1850,6 @@
THEMEDIR "/icons/22x22/apps/yast-software.png");
ygtk_wizard_set_header_text (wizard, window,
onlineUpdateMode() ? _("Patch Selector") : _("Package Selector"));
- ygtk_wizard_set_help_text (wizard, onlineUpdateMode() ? patch_help : pkg_help);
ygtk_wizard_set_abort_button_label (wizard, _("_Cancel"));
ygtk_wizard_set_abort_button_str_id (wizard, "cancel");
@@ -1630,6 +1859,12 @@
g_signal_connect (G_OBJECT (getWidget()), "action-triggered",
G_CALLBACK (wizard_action_cb), this);
+ busyCursor();
+ ygtk_wizard_set_help_text (wizard, onlineUpdateMode() ? patch_help : pkg_help);
+
+ YGDialog *dialog = YGDialog::currentDialog();
+ dialog->setCloseCallback (confirm_cb, this);
+
m_package_selector = new PackageSelector (onlineUpdateMode());
gtk_container_add (GTK_CONTAINER (wizard), m_package_selector->getWidget());
Modified: trunk/gtk/src/YGUI.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUI.cc?rev=44119&r1=441…
==============================================================================
--- trunk/gtk/src/YGUI.cc (original)
+++ trunk/gtk/src/YGUI.cc Sun Feb 3 02:23:04 2008
@@ -171,8 +171,7 @@
timeout = g_timeout_add (timeout_ms,
(GSourceFunc) user_input_timeout_cb, this);
- if (block)
- {
+ if (block) {
while (!pendingEvent())
g_main_context_iteration (NULL, TRUE);
}
@@ -303,10 +302,7 @@
YEvent *event = 0;
try {
- do
- {
- event = filterInvalidEvents( userInput(0) );
- } while ( ! event );
+ event = packageSelector->findDialog()->waitForEvent();
} catch (const std::exception &e) {
y2error ("UI::RunPkgSelection() error: %s", e.what());
y2error( "This is a libzypp problem. Do not file a bug against the UI!" );
@@ -314,8 +310,6 @@
y2error ("UI::RunPkgSelection() error (unspecified)");
y2error( "This is a libzypp problem. Do not file a bug against the UI!" );
}
-
- // y2milestone ("Package selection done - returning %s", input->toString().c_str());
return event;
}
Modified: trunk/gtk/src/YGUI.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUI.h?rev=44119&r1=4411…
==============================================================================
--- trunk/gtk/src/YGUI.h (original)
+++ trunk/gtk/src/YGUI.h Sun Feb 3 02:23:04 2008
@@ -54,8 +54,9 @@
public:
YEvent *waitInput (unsigned long timeout_ms, bool block);
virtual void idleLoop (int fd_ycp);
- virtual YEvent *userInput (unsigned long timeout_millisec);
- virtual YEvent *pollInput();
+ // these two are now implemented at YDialog...
+ YEvent *userInput (unsigned long timeout_millisec);
+ YEvent *pollInput();
virtual void internalError (const char *msg);
Modified: trunk/gtk/src/yzyppwrapper.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/yzyppwrapper.cc?rev=4411…
==============================================================================
--- trunk/gtk/src/yzyppwrapper.cc (original)
+++ trunk/gtk/src/yzyppwrapper.cc Sun Feb 3 02:23:04 2008
@@ -1173,7 +1173,7 @@
bool Ypp::Impl::acceptLicense (Ypp::Package *package, const std::string &license)
{
if (interface)
- interface->acceptLicense (package, license);
+ return interface->acceptLicense (package, license);
return false;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
02 Feb '08
Author: coolo
Date: Sat Feb 2 07:43:18 2008
New Revision: 44118
URL: http://svn.opensuse.org/viewcvs/yast?rev=44118&view=rev
Log:
sort changelog
Modified:
trunk/yast2/package/yast2.changes
Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=…
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Sat Feb 2 07:43:18 2008
@@ -7,6 +7,12 @@
- 2.16.25
-------------------------------------------------------------------
+Mon Jan 28 16:28:34 CET 2008 - locilka(a)suse.cz
+
+- Adjusted SCR agent for SuSEfirewall2 sysconfig file. Values can
+ use also single quotes, not only double-quotes (bnc#327565).
+
+-------------------------------------------------------------------
Mon Jan 28 13:14:13 CET 2008 - locilka(a)suse.cz
- Removing useless Wizard() calls in ProductControl to minimize the
@@ -19,12 +25,6 @@
- 2.16.24
-------------------------------------------------------------------
-Mon Jan 28 16:28:34 CET 2008 - locilka(a)suse.cz
-
-- Adjusted SCR agent for SuSEfirewall2 sysconfig file. Values can
- use also single quotes, not only double-quotes (bnc#327565).
-
--------------------------------------------------------------------
Sun Jan 27 21:22:06 CET 2008 - coolo(a)suse.de
- fixing changelog
@@ -5220,6 +5220,11 @@
running system.
-------------------------------------------------------------------
+Wed Mar 13 11:48:58 EST 2002 - nashif(a)suse.de
+
+- Don't probe hardware in Mode::config
+
+-------------------------------------------------------------------
Wed Mar 13 15:41:26 CET 2002 - fehr(a)suse.de
- prevent upward rounding in combination of
@@ -5232,11 +5237,6 @@
and setting timezone again in continue mode.
-------------------------------------------------------------------
-Wed Mar 13 11:48:58 EST 2002 - nashif(a)suse.de
-
-- Don't probe hardware in Mode::config
-
--------------------------------------------------------------------
Wed Mar 13 10:15:41 CET 2002 - kkaempf(a)suse.de
- Fix locale for greek (ISO8859-7 -> ISO-8859-7, #14898).
@@ -6262,17 +6262,17 @@
- Saving user package selections
-------------------------------------------------------------------
-Mon Jan 21 12:28:29 CET 2002 - schubi(a)suse.de
-
-- bufixes in installing packages after reboot
-
--------------------------------------------------------------------
Mon Jan 21 12:12:27 EST 2002 - nashif(a)suse.de
- Skip confirmation(inst_doit) in autoinst mode
if requested in control file
-------------------------------------------------------------------
+Mon Jan 21 12:28:29 CET 2002 - schubi(a)suse.de
+
+- bufixes in installing packages after reboot
+
+-------------------------------------------------------------------
Fri Jan 18 16:14:05 CET 2002 - kkaempf(a)suse.de
- more agents moved here.
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r44117 - in /trunk/ca-management: MAINTAINER src/crl.ycp src/crlExport.ycp
by jdsn@svn.opensuse.org 02 Feb '08
by jdsn@svn.opensuse.org 02 Feb '08
02 Feb '08
Author: jdsn
Date: Sat Feb 2 02:43:41 2008
New Revision: 44117
URL: http://svn.opensuse.org/viewcvs/yast?rev=44117&view=rev
Log:
initial checkin of Fate #2613 (not yep complete)
Added:
trunk/ca-management/src/crlExport.ycp
Modified:
trunk/ca-management/MAINTAINER
trunk/ca-management/src/crl.ycp
Modified: trunk/ca-management/MAINTAINER
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ca-management/MAINTAINER?rev=441…
==============================================================================
--- trunk/ca-management/MAINTAINER (original)
+++ trunk/ca-management/MAINTAINER Sat Feb 2 02:43:41 2008
@@ -1 +1,2 @@
Michael Calmer <mc(a)suse.de>
+J. Daniel Schmidt <jdsn(a)suse.de>
Modified: trunk/ca-management/src/crl.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ca-management/src/crl.ycp?rev=44…
==============================================================================
--- trunk/ca-management/src/crl.ycp (original)
+++ trunk/ca-management/src/crl.ycp Sat Feb 2 02:43:41 2008
@@ -25,6 +25,7 @@
import "YaPI::CaManagement";
include "ca-management/crlDefault.ycp";
+ include "ca-management/crlExport.ycp";
// help text 1/4
string CRLHelptext = _("<p>Here, see the most important values of the CRL.</p>");
@@ -199,12 +200,14 @@
`PushButton (`id (`view) , _("&View")),
`PushButton (`id (`defaults) , _("&Default")),
`HStretch(),
- `MenuButton (_("Export"),
- [
- `item(`id(`exportFile), _("to &File") ),
- `item(`id(`exportLDAP), _("to &LDAP"))
- ]
- ),
+ // Fate (#2613)
+ `PushButton (`id (`exportDialog) , _("Export")),
+ //`MenuButton (_("Export"),
+ // [
+ // `item(`id(`exportFile), _("to &File") ),
+ // `item(`id(`exportLDAP), _("to &LDAP"))
+ // ]
+ // ),
`HSpacing (1)
)
);
@@ -223,7 +226,7 @@
* Handle events in a tab of a dialog
*/
symbol handleCRLTab (map event) {
- any ui = event["ID"]:nil;
+ any ui = event["ID"]:nil;
if (ui == `gererateCRL)
{
createCRL (CaMgm::currentCA);
@@ -232,20 +235,24 @@
if (ui == `view)
{
showLongCRLDescription (CaMgm::currentCA);
- }
- if (ui == `exportLDAP)
- {
- exportToLDAP ("CRL", CaMgm::currentCA, "" ,"", "", "");
- }
- if (ui == `exportFile)
- {
- exportCRLtoFile (CaMgm::currentCA);
}
+// if (ui == `exportLDAP)
+// {
+// exportToLDAP ("CRL", CaMgm::currentCA, "" ,"", "", "");
+// }
+// if (ui == `exportFile)
+// {
+// exportCRLtoFile (CaMgm::currentCA);
+// }
+ if (ui == `exportDialog) // (Fate #2613)
+ {
+ exportCRL(CaMgm::currentCA);
+ }
if (ui == `defaults)
{
- editCRLDefaults (CaMgm::currentCA);
- }
- return (symbol) ui;
+ editCRLDefaults (CaMgm::currentCA);
+ }
+ return (symbol) ui;
}
}
Added: trunk/ca-management/src/crlExport.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ca-management/src/crlExport.ycp?…
==============================================================================
--- trunk/ca-management/src/crlExport.ycp (added)
+++ trunk/ca-management/src/crlExport.ycp Sat Feb 2 02:43:41 2008
@@ -0,0 +1,332 @@
+/**
+ *
+ * File:
+ * crlExport.ycp
+ *
+ * Module:
+ * CA Management
+ *
+ * Summary:
+ * Export a CRL to a local file or an LDAP directory.
+ * Possibility to setup a cron job to do this automatically.
+ *
+ * Authors:
+ * J. Daniel Schmidt <jdsn(a)suse.de>
+ *
+ * $Id: crlExport.ycp 1 2007-11-20 12:15:18Z jdsn $
+ *
+ * Export a CRL for a selected CA
+ *
+ */
+
+
+{
+
+textdomain "ca-management";
+
+import "CaMgm";
+import "Wizard";
+import "Label";
+import "Popup";
+import "YaPI::CaManagement";
+include "ca-management/util.ycp";
+include "ca-management/new_cert_callbacks.ycp";
+
+map uiInfo = UI::GetDisplayInfo();
+boolean textmode = (boolean) uiInfo["TextMode"]:nil;
+
+float hspace = textmode ? 4 : 3;
+float vspace = textmode ? 0 : 1;
+boolean seenSecurityInfo = false;
+
+// here are our settings for the CRL of this CA
+boolean periodic = false; // default off
+boolean file_active = true; // default on
+boolean ldap_active = false; // default off
+symbol fileformat = `ffpem; // default is pem
+string crlfile = ""; // is set from inside the export function
+integer intervalDays = 30;
+integer intervalHours = 0;
+map<string,string> ldapCred = $[ "hostname":"", "port":"", "dn":"",
+ "binddn":"", "password":"" ];
+
+
+map crlConfFormat = $[ "options" : [ "line_can_continue", "global_values", "join_multiline", "comments_last", "flat" ],
+ "comments": [ "^[ \t]*#.*$", "^[ \t]*$" ],
+ "params" : [ $[ "match" : [ "([a-zA-Z0-9_-]+)[ \t]*=[ \t]*([^ \t]*)", "%s = %s" ] ] ]
+ ];
+
+
+define void showSecurityInfo()
+{
+ Popup::LongText(
+ // Translators: window caption
+ _("Security Information"),
+ // Translators: long help text - security information
+ `RichText(_("Warning!<br>Activating the automatic creation and export of a CRL will write the CA password to a config file on disk. The password will be stored there in plain text as it is needed to create a CRL. The file will only be readable for the root user.<br>Please note that this is a security risk if there are more people that have root access. They all will be able to read the CA password.")),
+ 50, 20
+ );
+ seenSecurityInfo = true;
+}
+
+
+define void updateEnabled()
+{
+ periodic = (boolean) UI::QueryWidget(`id(`mode_periodically), `Value);
+ file_active = (boolean) UI::QueryWidget(`id(`exportFile), `Value);
+ ldap_active = (boolean) UI::QueryWidget(`id(`exportLDAP), `Value);
+ UI::ChangeWidget(`id(`periodicInterval), `Enabled, periodic);
+ UI::ChangeWidget(`id(`fileSettings), `Enabled, file_active);
+ UI::ChangeWidget(`id(`ldapSettings), `Enabled, ldap_active);
+ if (periodic && !seenSecurityInfo) { showSecurityInfo(); }
+}
+
+
+
+define void setSettings()
+{
+ // write settings to the UI
+ UI::ChangeWidget(`id(`mode_periodically), `Value, periodic);
+ UI::ChangeWidget(`id(`periodicInterval), `Enabled, periodic);
+ UI::ChangeWidget(`id(`interval_days), `Value, intervalDays);
+ UI::ChangeWidget(`id(`interval_hours), `Value, intervalHours);
+
+ UI::ChangeWidget(`id(`exportFile), `Value, file_active);
+ UI::ChangeWidget(`id(`exportLDAP), `Value, ldap_active);
+
+ UI::ChangeWidget(`id(`ffpem), `Value, fileformat == `ffpem ? true:false);
+ UI::ChangeWidget(`id(`crlfile), `Value, crlfile);
+
+ UI::ChangeWidget(`id(`hostname), `Value, ldapCred["hostname"]:"");
+ UI::ChangeWidget(`id(`port), `Value, ldapCred["port"]:"");
+ UI::ChangeWidget(`id(`dn), `Value, ldapCred["dn"]:"");
+ UI::ChangeWidget(`id(`binddn), `Value, ldapCred["binddn"]:"");
+ UI::ChangeWidget(`id(`ldapPassword),`Value, ldapCred["password"]:"");
+}
+
+
+
+define void cleanLdapCred()
+{
+ foreach (string key, string val, ldapCred, {
+ if (val == nil) ldapCred[key]="";
+ });
+}
+
+
+define void readSettings(string ca)
+{
+ string crlConf = sformat("/var/lib/CAM/%1/crl-export.conf", ca);
+ if (SCR::Execute(.target.bash, sformat("[ -f %1 ]", crlConf) ) == 0 )
+ {
+ SCR::RegisterAgent( .temp_crlexport_agent, `ag_ini(
+ `IniAgent( crlConf, crlConfFormat )) );
+
+ periodic = SCR::Read(.temp_crlexport_agent.periodic) == "true" ? true:false;
+ if (periodic) seenSecurityInfo = true;
+ integer getDays = (integer) SCR::Read(.temp_crlexport_agent.interval_days);
+ intervalDays = getDays != nil ? getDays:intervalDays;
+ integer getHours = (integer) SCR::Read(.temp_crlexport_agent.interval_hours);
+ intervalHours = getHours != nil ? getHours:intervalHours;
+ file_active = SCR::Read(.temp_crlexport_agent.export_file) == "true" ? true:false;
+ ldap_active = SCR::Read(.temp_crlexport_agent.export_ldap) == "true" ? true:false;
+ crlfile = (string) SCR::Read(.temp_crlexport_agent.crlfilename);
+ if (crlfile == nil) crlfile = "";
+ fileformat = SCR::Read(.temp_crlexport_agent.crlfileformat) == "der" ? `ffder:`ffpem;
+ ldapCred["hostname"] = (string) SCR::Read(.temp_crlexport_agent.ldap_hostname);
+ ldapCred["port"] = (string) SCR::Read(.temp_crlexport_agent.ldap_port);
+ ldapCred["dn"] = (string) SCR::Read(.temp_crlexport_agent.ldap_dn);
+ ldapCred["binddn"] = (string) SCR::Read(.temp_crlexport_agent.ldap_binddn);
+ ldapCred["password"] = (string) SCR::Read(.temp_crlexport_agent.ldap_password);
+ cleanLdapCred();
+
+ SCR::UnregisterAgent(.temp_crlexport_agent);
+ y2milestone("Found config file for automatic CRL export of CA %1 and read settings.", ca);
+ }
+ else
+ {
+ y2milestone("No config file found for automatic CRL export of CA %1", ca);
+ }
+}
+
+
+
+define void writeSettings(string ca)
+{
+ string crlConf = sformat("/var/lib/CAM/%1/crl-export.conf", ca);
+ if (! (SCR::Execute(.target.bash, sformat("[ -f %1 ]", crlConf) ) == 0))
+ {
+ SCR::Execute(.target.bash, sformat("umask 0077 && touch %1", crlConf) );
+ }
+
+ SCR::RegisterAgent( .temp_crlexport_agent, `ag_ini(
+ `IniAgent( crlConf, crlConfFormat )) );
+
+ SCR::Write(.temp_crlexport_agent.periodic, periodic ? "true":"false");
+ SCR::Write(.temp_crlexport_agent.capassword, periodic ? getPassword(ca):"" );
+
+ SCR::Write(.temp_crlexport_agent.interval_days, sformat("%1", intervalDays));
+ SCR::Write(.temp_crlexport_agent.interval_hours, sformat("%1",intervalHours));
+
+ SCR::Write(.temp_crlexport_agent.export_file, file_active == true ? "true":"false");
+ SCR::Write(.temp_crlexport_agent.export_ldap, ldap_active == true ? "true":"false");
+
+ SCR::Write(.temp_crlexport_agent.crlfilename, crlfile);
+ SCR::Write(.temp_crlexport_agent.crlfileformat, fileformat == `ffder ? "der":"pem");
+
+ SCR::Write(.temp_crlexport_agent.ldap_hostname, ldapCred["hostname"]:"");
+ SCR::Write(.temp_crlexport_agent.ldap_port, ldapCred["port"]:"");
+ SCR::Write(.temp_crlexport_agent.ldap_dn, ldapCred["dn"]:"");
+ SCR::Write(.temp_crlexport_agent.ldap_binddn, ldapCred["binddn"]:"");
+ SCR::Write(.temp_crlexport_agent.ldap_password, ldapCred["password"]:"");
+
+ SCR::UnregisterAgent(.temp_crlexport_agent);
+
+ y2milestone("Written settings for automatic CRL export to conf file %1", crlConf);
+}
+
+
+/**
+* Editing CRL defaults of a selected CA
+* @param selected CA
+*/
+define void exportCRL (string ca) {
+
+ map ret = (map) YaPI::CaManagement::ReadCRLDefaults ($["caName":ca, "caPasswd":getPassword(ca)]);
+ y2milestone ("ReadCRLDefaults(%1) return %2", $["caName":ca], ret );
+
+ string caption = _("Export CRL");
+ // this default can only be set inside this function
+ crlfile = sformat("/var/lib/CAM/%1/crl/crl.pem", ca);
+
+
+ string help_para1 = sformat("<p><b>%1</b></p>", caption);
+ string help_para2 = _("<p>Export the CRL of this CA once by selecting <b>Export once</b>.</p>");
+ string help_para3 = _("<p>To setup a repeated recreation of the CRL select <b>Repeated recreation and export</b>. In this case set the interval for the recreation in <b>Periodic interval</b>. The interval is the sum of days and hours you set. To export every few hours set days to 0 and hours to the hourly interval. Please make sure you read and understood the <b>Security Information</b>.</p>");
+ string help_para4 = _("<p>You can activate an export of the CRL to a local file or to a LDAP server or both. Setup the respective parameters in <b>Export to local file</b> and <b>Export to LDAP</b>.</p>");
+
+ string helptext = help_para1 + help_para2 + help_para3 + help_para4;
+
+ term cradiobuttons = `VBox (
+ `RadioButtonGroup( `id(`export_mode),`VBox(
+ `Left( `RadioButton(`id(`mode_once), `opt(`notify), _("Export once"), true )),
+ `Left( `RadioButton(`id(`mode_periodically), `opt(`notify), _("Repeated recreation and export") ))
+ ))
+ );
+
+ term cldapsettings = `VBox ( `id(`ldapSettings),
+ `TextEntry( `id(`hostname), _("&Host Name:"), ""),
+ `TextEntry( `id(`port), _("&Port:"), ""),
+ //`HBox (`HWeight (1, `ComboBox( `id(`dn), `opt(`editable), _("&DN:"), []))),
+ `TextEntry( `id(`dn), _("&DN:")),
+ `TextEntry( `id(`binddn), _("&Bind DN:"), ""),
+ `Password( `id(`ldapPassword), _("Pass&word"))
+ ) ;
+
+ term cfilesettings = `VBox( `id(`fileSettings), `HBox(
+ `TextEntry(`id(`crlfile), _("Save &as"), crlfile ),
+ `VBox(`VSpacing(1), `PushButton(`id(`askFile), Label::BrowseButton() ))
+ ),
+ `Left( `RadioButtonGroup(`id(`fileformat),
+ `HBox(
+ `Label(_("Export Format")),
+ `RadioButton(`id(`ffpem), _("PEM Format"), true ),
+ `RadioButton(`id(`ffder), _("DER Format") )
+ )
+ ))
+ );
+
+ term cinterval = `Left( `id(`periodicInterval),
+ `HBox(
+ `VBox(`Label(_("Periodic interval:")), `VSpacing(1)),
+ `HSpacing(3),
+ `HSquash( `IntField( `id(`interval_days), "&days", 0, 100, 30 )),
+ `Label("+"),
+ `HSquash( `IntField( `id(`interval_hours), "&hours", 0, 23, 0 )),
+ `HSpacing(3),
+ `VBox( `VSpacing(1), `PushButton(`id(`securityInfo), _("&Security Information")) )
+ )
+ );
+
+ term contents = `HBox( `HSpacing(1),
+ `VBox( `Left( `Heading(_("CA Name: ") + CaMgm::currentCA) ),
+ `VSpacing(1),
+ cradiobuttons,
+ `HBox(
+ `HSpacing(3),
+ `VBox(
+ `VSpacing(vspace),
+ `Left( `CheckBox(`id(`exportFile), `opt(`notify), _("Export to local file"), true )),
+ `HBox( `HSpacing(hspace), cfilesettings ),
+ `VSpacing(vspace),
+ `Left( `CheckBox(`id(`exportLDAP), `opt(`notify), _("Export to LDAP"), false )),
+ `HBox( `HSpacing(hspace), cldapsettings ),
+ `VSpacing(vspace),
+ cinterval
+ )
+ )
+ ),
+ `HSpacing(1)
+ );
+
+ Wizard::CreateDialog();
+ Wizard::SetContentsButtons ( _("Export CRL"), contents, helptext, Label::BackButton (), Label::OKButton ());
+ Wizard::DisableBackButton();
+
+ // fill UI with settings
+ readSettings(ca); // read conf file if exists
+ setSettings(); // push data to UI
+ updateEnabled(); // gray out or ungray UI elements
+
+ symbol ui = nil;
+
+ repeat
+ {
+ ui = (symbol) UI::UserInput ();
+
+ if (ui == `add)
+ {
+ string add_advanced_issuer_alt_name="test";
+ }
+ if (ui == `askFile)
+ {
+ string newdirectory = UI::AskForSaveFileName( crlfile, "*.pem", _("Save as") );
+ UI::ChangeWidget(`id(`exportDirectory), `Value, newdirectory);
+ }
+ if ( contains([`mode_once, `mode_periodically, `exportFile, `exportLDAP], ui ))
+ {
+ updateEnabled();
+ }
+ if (ui == `securityInfo)
+ {
+ showSecurityInfo();
+ }
+ if (ui == `next)
+ {
+ updateEnabled();
+ fileformat = (symbol) UI::QueryWidget(`id(`fileformat), `Value);
+ crlfile = (string) UI::QueryWidget(`id(`crlfile), `Value);
+ intervalDays = (integer) UI::QueryWidget(`id(`interval_days), `Value);
+ intervalHours = (integer) UI::QueryWidget(`id(`interval_hours), `Value);
+ ldapCred["hostname"] = (string) UI::QueryWidget(`id(`hostname), `Value);
+ ldapCred["port"] = (string) UI::QueryWidget(`id(`port), `Value);
+ ldapCred["dn"] = (string) UI::QueryWidget(`id(`dn), `Value);
+ ldapCred["binddn"] = (string) UI::QueryWidget(`id(`binddn), `Value);
+ ldapCred["password"] = (string) UI::QueryWidget(`id(`ldapPassword), `Value);
+ cleanLdapCred();
+
+ // TODO only write settings if export should happen periodically
+ writeSettings(ca);
+ // else export the crl once
+ // exportOnce(ca, `file)
+ // exportOnce(ca, `ldap)
+ }
+
+ }
+ until (contains ([`next, `abort], ui));
+
+ UI::CloseDialog();
+}
+
+
+}
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
01 Feb '08
Author: mvidner
Date: Fri Feb 1 17:19:59 2008
New Revision: 44116
URL: http://svn.opensuse.org/viewcvs/yast?rev=44116&view=rev
Log:
Created tag stable-2_16_4 for devtools
Added:
tags/stable-2_16_4/devtools/
- copied from r44115, trunk/devtools/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0