rpms/kdebase3/devel KDE.session.gnome, NONE, 1.1 cr16-app-package_games_kids.png, NONE, 1.1 cr32-app-package_games_kids.png, NONE, 1.1 cr48-app-package_games_kids.png, NONE, 1.1 env.sh, NONE, 1.1 kde-legacy.pamd, NONE, 1.1 kde-np-legacy.pamd, NONE, 1.1 kde-np.pamd, NONE, 1.1 kde.desktop, NONE, 1.1 kde.pamd, NONE, 1.1 kdebase-3.1-startpage.patch, NONE, 1.1 kdebase-3.1.3-konsole-double-esc.patch, NONE, 1.1 kdebase-3.2.0-keymap.patch, NONE, 1.1 kdebase-3.2.92-logo.patch, NONE, 1.1 kdebase-3.3.92-kpersonalizer.patch, NONE, 1.1 kdebase-3.3.92-vroot.patch, NONE, 1.1 kdebase-3.4.2-kdesktop-konsole.patch, NONE, 1.1 kdebase-3.5.1-kdm-readme.patch, NONE, 1.1 kdebase-3.5.1-konsole-fonts.patch, NONE, 1.1 kdebase-3.5.1-xdg.patch, NONE, 1.1 kdebase-3.5.2-kconf_update-klipper.patch, NONE, 1.1 kdebase-3.5.3-khelpcenter-sort.patch, NONE, 1.1 kdebase-3.5.4-htdig.patch, NONE, 1.1 kdebase-3.5.4-konqueror-shortcut.patch, NONE, 1.1 kdebase-3.5.4-tango-icon-theme.patch, NONE, 1.1 kdebase-3.5.5-dbus.patch, NONE, 1.1 kdebase-3.5.5-keyinit.patch, NONE, 1.1 kdebase-3.5.5-redhat-pam.patch, NONE, 1.1 kdebase-3.5.5-suspend.patch, NONE, 1.1 kdebase-3.5.6-kdm-alternatebackground.patch, NONE, 1.1 kdebase-3.5.7-kde#83974.patch, NONE, 1.1 kdebase-3.5.7-kio_media_mounthelper.patch, NONE, 1.1 kdebase-3.5.7-konsolesu.patch, NONE, 1.1 kdebase-3.5.8-consolekit-kdm.patch, NONE, 1.1 kdebase-3.5.8-gdm-socket.patch, NONE, 1.1 kdebase-3.5.8-konsole-bz#244906.patch, NONE, 1.1 kdebase-3.5.8-redhat-startkde.patch, NONE, 1.1 kdebase-3.x-shortcuts.patch, NONE, 1.1 kdebase3.spec, NONE, 1.1 kderc, NONE, 1.1 konsole.desktop, NONE, 1.1 logrotate-kdm, NONE, 1.1 mailsettings.cc, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Kevin Kofler (kkofler)
fedora-extras-commits at redhat.com
Sat Dec 1 06:53:25 UTC 2007
- Previous message (by thread): rpms/kdebase-workspace/devel kdebase-workspace.spec,1.2,1.3
- Next message (by thread): rpms/xchat-ruby/devel xchat-ruby-dont-ignore-cflags.patch, NONE, 1.1 xchat-ruby-global-rubyenv.patch, NONE, 1.1 xchat-ruby.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: kkofler
Update of /cvs/pkgs/rpms/kdebase3/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19818/devel
Modified Files:
.cvsignore sources
Added Files:
KDE.session.gnome cr16-app-package_games_kids.png
cr32-app-package_games_kids.png
cr48-app-package_games_kids.png env.sh kde-legacy.pamd
kde-np-legacy.pamd kde-np.pamd kde.desktop kde.pamd
kdebase-3.1-startpage.patch
kdebase-3.1.3-konsole-double-esc.patch
kdebase-3.2.0-keymap.patch kdebase-3.2.92-logo.patch
kdebase-3.3.92-kpersonalizer.patch kdebase-3.3.92-vroot.patch
kdebase-3.4.2-kdesktop-konsole.patch
kdebase-3.5.1-kdm-readme.patch
kdebase-3.5.1-konsole-fonts.patch kdebase-3.5.1-xdg.patch
kdebase-3.5.2-kconf_update-klipper.patch
kdebase-3.5.3-khelpcenter-sort.patch kdebase-3.5.4-htdig.patch
kdebase-3.5.4-konqueror-shortcut.patch
kdebase-3.5.4-tango-icon-theme.patch kdebase-3.5.5-dbus.patch
kdebase-3.5.5-keyinit.patch kdebase-3.5.5-redhat-pam.patch
kdebase-3.5.5-suspend.patch
kdebase-3.5.6-kdm-alternatebackground.patch
kdebase-3.5.7-kde#83974.patch
kdebase-3.5.7-kio_media_mounthelper.patch
kdebase-3.5.7-konsolesu.patch
kdebase-3.5.8-consolekit-kdm.patch
kdebase-3.5.8-gdm-socket.patch
kdebase-3.5.8-konsole-bz#244906.patch
kdebase-3.5.8-redhat-startkde.patch
kdebase-3.x-shortcuts.patch kdebase3.spec kderc
konsole.desktop logrotate-kdm mailsettings.cc
Log Message:
New package kdebase3 - K Desktop Environment 3 - core files
--- NEW FILE KDE.session.gnome ---
#!/bin/bash
exec /etc/X11/xdm/Xsession kde
--- NEW FILE env.sh ---
## from http://standards.freedesktop.org/menu-spec/latest/
# XDG_CONFIG_DIRS: where to look for menu config(s)
if [ -z "${XDG_CONFIG_DIRS}" ] ; then
XDG_CONFIG_DIRS=/etc/kde/xdg:/etc/xdg
export XDG_CONFIG_DIRS
fi
# XDG_MENU_PREFIX
if [ -z "${XDG_MENU_PREFIX}" ] ; then
XDG_MENU_PREFIX="kde-"
export XDG_MENU_PREFIX
fi
--- NEW FILE kde-legacy.pamd ---
#%PAM-1.0
auth sufficient pam_timestamp.so
auth required pam_stack.so service=system-auth
account required pam_nologin.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session required pam_loginuid.so
session optional pam_timestamp.so
session optional pam_console.so
--- NEW FILE kde-np-legacy.pamd ---
#%PAM-1.0
auth required pam_env.so
auth required pam_nologin.so
auth required pam_permit.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session required pam_loginuid.so
session optional pam_selinux.so
session optional pam_console.so
--- NEW FILE kde-np.pamd ---
#%PAM-1.0
auth required pam_env.so
auth required pam_nologin.so
auth required pam_permit.so
account include system-auth
password include system-auth
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so
session optional pam_selinux.so
session optional pam_console.so
--- NEW FILE kde.desktop ---
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=startkde
TryExec=startkde
Name=KDE
Name[xh]=iKDE
Comment=The K Desktop Environment, a powerful Open Source graphical desktop environment
Comment[ca]=L'entorn d'escriptori K, un poderós entorn d'escriptori grà fic de Codi Font Obert
Comment[da]=K Desktopmiljøet, et kraftigt, åbent, grafisk desktop-miljø
Comment[de]=K Desktop Environment (KDE), eine mächtige Open Source grafische Desktop Umgebung
Comment[es]=El Entorno de Escritorio K, un potente entorno de escritorio gráfico realizado en código abierto
Comment[et]=K töölaua keskkond on võimas vaba tarkvara graafiline töölaua keskkond
Comment[hu]=A KDE grafikus munkakörnyezet, egy szabad forráskódú grafikus ablakkezelŠkörnyezet
Comment[nl]=De K Desktop Environment, een krachtige open source grafische desktop environment
Comment[pt_BR]=Acrônimo para K Desktop Environment (ou Ambiente de Trabalho K), um poderoso ambiente de trabalho gráfico de código aberto
Comment[sr]=K Desktop Environment (KDE), моÑно, оÑвоÑеног кода, гÑаÑиÑко Ñадно окÑÑжеÑе
Comment[sv]=K-skrivbordsmiljön, en kraftfull grafisk skrivbordsmiljö med öppen källkod
Comment[tr]=KDE Masaüstü Yöneticisi
--- NEW FILE kde.pamd ---
#%PAM-1.0
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so
session optional pam_selinux.so
session optional pam_console.so
kdebase-3.1-startpage.patch:
--- NEW FILE kdebase-3.1-startpage.patch ---
--- kdebase-3.1/konqueror/profile_webbrowsing.desktop.than 2003-02-22 14:52:21.000000000 +0100
+++ kdebase-3.1/konqueror/profile_webbrowsing.desktop 2003-02-22 14:53:54.000000000 +0100
@@ -54,8 +54,8 @@
Name[zh_TW]=Web ç覽
Name[zu]=Ukucinga kwi-Web
RootItem=View0
-View0_ServiceName=konq_aboutpage
-View0_ServiceType=KonqAboutPage
-View0_URL=about:konqueror
+View0_ServiceName=khtml
+View0_ServiceType=text/html
+View0_URL=file:/usr/share/doc/HTML/index.html
Width=80%
Height=80%
kdebase-3.1.3-konsole-double-esc.patch:
--- NEW FILE kdebase-3.1.3-konsole-double-esc.patch ---
--- kdebase-3.1.3/konsole/konsole/TEmuVt102.cpp.hdg 2003-09-26 23:51:33.000000000 +0200
+++ kdebase-3.1.3/konsole/konsole/TEmuVt102.cpp 2003-09-26 23:56:40.000000000 +0200
@@ -904,7 +904,10 @@
scr->setHistCursor(scr->getHistLines());
if (cmd==CMD_send) {
- if ((ev->state() & AltButton) && !metaspecified ) sendString("\033");
+ if ( (ev->state() & AltButton) &&
+ !metaspecified &&
+ !(len && txt[0]==27) )
+ sendString("\033");
emit sndBlock(txt,len);
return;
}
kdebase-3.2.0-keymap.patch:
--- NEW FILE kdebase-3.2.0-keymap.patch ---
--- kdebase-3.2.0/kcontrol/keys/bluecurve.kksrc.keymap 2004-02-06 06:09:26.000000000 -0500
+++ kdebase-3.2.0/kcontrol/keys/bluecurve.kksrc 2004-02-10 05:11:48.000000000 -0500
@@ -0,0 +1,127 @@
+[Settings]
+Name=Bluecurve
+Uses Win Modifer=false
+
+[Global Shortcuts]
+Desktop Screenshot=Print
+Enable/Disable Clipboard Actions=Alt+Ctrl+X
+Execute Command=Alt+F2
+Halt Computer=none
+Halt without Confirmation=none
+Kill Window=Alt+Ctrl+Escape
+Lock Screen=Alt+Ctrl+L
+Logout=Alt+Ctrl+Delete
+Logout without Confirmation=Alt+Ctrl+Shift+Delete
+Manually Invoke Action on Current Clipboard=Alt+Ctrl+R
+Mouse Emulation=Alt+F12
+Popup Launch Menu=Alt+F1
+Reboot Computer=none
+Reboot without Confirmation=none
+Show Klipper Popup-Menu=Alt+Ctrl+V
+Show Taskmanager=Ctrl+Escape
+Show Window List=Alt+F5
+Switch One Desktop Down=none
+Switch One Desktop to the Left=none
+Switch One Desktop to the Right=none
+Switch One Desktop Up=none
+Switch To Next Keyboard Layout=Alt+Ctrl+K
+Switch to Desktop 1=Ctrl+F1
+Switch to Desktop 10=Ctrl+F10
+Switch to Desktop 11=Ctrl+F11
+Switch to Desktop 12=Ctrl+F12
+Switch to Desktop 13=Ctrl+Shift+F1
+Switch to Desktop 14=Ctrl+Shift+F2
+Switch to Desktop 15=Ctrl+Shift+F3
+Switch to Desktop 16=Ctrl+Shift+F4
+Switch to Desktop 2=Ctrl+F2
+Switch to Desktop 3=Ctrl+F3
+Switch to Desktop 4=Ctrl+F4
+Switch to Desktop 5=Ctrl+F5
+Switch to Desktop 6=Ctrl+F6
+Switch to Desktop 7=Ctrl+F7
+Switch to Desktop 8=Ctrl+F8
+Switch to Desktop 9=Ctrl+F9
+Switch to Next Desktop=Alt+Ctrl+Right
+Switch to Previous Desktop=Alt+Ctrl+Left
+Toggle Showing Desktop=Alt+Ctrl+D
+Toggle Window Raise/Lower=none
+Walk Through Desktop List=Ctrl+Tab
+Walk Through Desktop List (Reverse)=Ctrl+Shift+Tab
+Walk Through Desktops=none
+Walk Through Desktops (Reverse)=none
+Walk Through Windows=Alt+Tab
+Walk Through Windows (Reverse)=Alt+Shift+Tab
+Window Close=Alt+F4
+Window Iconify=Alt+F9
+Window Lower=none
+Window Maximize=none
+Window Maximize Horizontal=none
+Window Maximize Vertical=none
+Window Move=Alt+F7
+Window Operations Menu=Alt+Space
+Window Raise=none
+Window Resize=Alt+F8
+Window Screenshot=Alt+Print
+Window Shade=none
+Window to Desktop 1=none
+Window to Desktop 10=none
+Window to Desktop 11=none
+Window to Desktop 12=none
+Window to Desktop 13=none
+Window to Desktop 14=none
+Window to Desktop 15=none
+Window to Desktop 16=none
+Window to Desktop 2=none
+Window to Desktop 3=none
+Window to Desktop 4=none
+Window to Desktop 5=none
+Window to Desktop 6=none
+Window to Desktop 7=none
+Window to Desktop 8=none
+Window to Desktop 9=none
+Window to Next Desktop=none
+Window to Previous Desktop=none
+
+[Shortcuts]
+AddBookmark=Ctrl+B
+Back=Alt+Left
+Close=Ctrl+W
+Copy=Ctrl+C;Ctrl+Insert
+Cut=Ctrl+X;Shift+Delete
+DeleteWordBack=Ctrl+Backspace
+DeleteWordForward=Ctrl+Delete
+Deselect=Ctrl+Shift+A
+End=Ctrl+End
+Find=Ctrl+F
+FindNext=F3
+FindPrev=Shift+F3
+Forward=Alt+Right
+GotoLine=Ctrl+G
+Help=F1
+Home=Ctrl+Home
+Insert=Ctrl+Insert
+New=Ctrl+N
+Next=Next
+NextCompletion=Ctrl+Down
+Open=Ctrl+O
+Paste=Ctrl+V;Shift+Insert
+PopupMenuContext=Menu
+PrevCompletion=Ctrl+Up
+Print=Ctrl+P
+Prior=Prior
+Quit=Ctrl+Q
+Redo=Ctrl+Shift+Z
+Reload=F5
+Replace=Ctrl+R
+RotateDown=Down
+RotateUp=Up
+Save=Ctrl+S
+SelectAll=Ctrl+A
+ShowMenubar=Ctrl+M
+SubstringCompletion=Ctrl+T
+TextCompletion=Ctrl+E
+Undo=Ctrl+Z
+Up=Alt+Up
+WhatsThis=Shift+F1
+ZoomIn=Ctrl+Plus
+ZoomOut=Ctrl+Minus
--- kdebase-3.2.0/kcontrol/keys/Makefile.am.keymap 2003-09-02 09:54:00.000000000 -0400
+++ kdebase-3.2.0/kcontrol/keys/Makefile.am 2004-02-06 06:09:26.000000000 -0500
@@ -17,5 +17,5 @@
xdg_apps_DATA = keys.desktop
-scheme_DATA = wm3.kksrc kde3.kksrc kde4.kksrc win3.kksrc win4.kksrc mac4.kksrc unix3.kksrc
+scheme_DATA = wm3.kksrc kde3.kksrc kde4.kksrc win3.kksrc win4.kksrc mac4.kksrc unix3.kksrc bluecurve.kksrc
schemedir = $(kde_datadir)/kcmkeys
kdebase-3.2.92-logo.patch:
--- NEW FILE kdebase-3.2.92-logo.patch ---
--- kdebase-3.2.92/kcontrol/energy/energy.cpp.orig 2004-07-26 14:22:30.093671939 +0200
+++ kdebase-3.2.92/kcontrol/energy/energy.cpp 2004-07-26 14:24:50.108990431 +0200
@@ -162,7 +162,7 @@
lbl = new QLabel(i18n("Your display does not support power saving."), this);
hbox->addWidget(lbl);
}
-
+#if 0
KURLLabel *logo = new KURLLabel(this);
logo->setURL("http://www.energystar.gov");
logo->setPixmap(QPixmap(locate("data", "kcontrol/pics/energybig.png")));
@@ -172,7 +172,7 @@
hbox->addStretch();
hbox->addWidget(logo);
-
+#endif
// Sliders
m_pStandbySlider = new KIntNumInput(m_Standby, this);
m_pStandbySlider->setLabel(i18n("&Standby after:"));
kdebase-3.3.92-kpersonalizer.patch:
--- NEW FILE kdebase-3.3.92-kpersonalizer.patch ---
--- kdebase-3.3.92/kwin/kcmkwin/kwindecoration/kwindecoration.cpp.kper 2005-01-03 15:51:05.000000000 +0100
+++ kdebase-3.3.92/kwin/kcmkwin/kwindecoration/kwindecoration.cpp 2005-02-15 15:14:24.065146611 +0100
@@ -431,7 +431,7 @@
oldLibraryName = currentLibraryName;
currentLibraryName = conf->readEntry("PluginLib",
- ((QPixmap::defaultDepth() > 8) ? "kwin_plastik" : "kwin_quartz"));
+ ((QPixmap::defaultDepth() > 8) ? "kwin_bluecurve" : "kwin_quartz"));
QString decoName = decorationName( currentLibraryName );
// If we are using the "default" kde client, use the "default" entry.
--- kdebase-3.3.92/kpersonalizer/kstylepage.h.kper 2004-09-25 13:31:51.000000000 +0200
+++ kdebase-3.3.92/kpersonalizer/kstylepage.h 2005-02-15 15:14:24.070145873 +0100
@@ -77,6 +77,7 @@
QColor link;
QColor visitedLink;
+ QListViewItem * bluecurve;
QListViewItem * kde;
QListViewItem * classic;
QListViewItem * keramik;
@@ -88,14 +89,14 @@
// widget-style existence
bool kde_hc_exist, kde_def_exist, kde_keramik_exist, kde_light_exist,
- cde_exist, win_exist, platinum_exist, kde_plastik_exist;
+ cde_exist, win_exist, platinum_exist, kde_plastik_exist, bluecurve_exist;
// kwin-style-existence
bool kwin_keramik_exist, kwin_default_exist, kwin_system_exist,
- kwin_win_exist, kwin_cde_exist, kwin_quartz_exist, kwin_plastik_exist;
+ kwin_win_exist, kwin_cde_exist, kwin_quartz_exist, kwin_plastik_exist, kwin_bluecurve_exist;
// icon-theme-existence
- bool icon_crystalsvg_exist, icon_kdeclassic_exist, icon_Locolor_exist;
+ bool icon_crystalsvg_exist, icon_kdeclassic_exist, icon_Locolor_exist, icon_bluecurve_exist;
public slots: // Public slots
/** to be connected to the OS page. Catches either KDE, CDE, win or mac and pre-sets the style. */
--- kdebase-3.3.92/kpersonalizer/kstylepage.cpp.kper 2004-09-25 13:31:51.000000000 +0200
+++ kdebase-3.3.92/kpersonalizer/kstylepage.cpp 2005-02-15 15:14:24.071145725 +0100
@@ -51,6 +51,10 @@
klv_styles->addColumn( i18n( "Description" ) );
klv_styles->setAllColumnsShowFocus(true);
+ bluecurve = new QListViewItem( klv_styles);
+ bluecurve->setText( 0, i18n( "Bluecurve" ));
+ bluecurve->setText( 1, i18n( "Red Hat Linux ® default style" ) );
+
kde = new QListViewItem( klv_styles);
kde->setText( 0, QPixmap::defaultDepth() > 8 ? i18n( "Plastik" ) : i18n( "Light" ) );
kde->setText( 1, i18n( "KDE default style" ) );
@@ -80,7 +84,7 @@
// Note: if the default is changed here it needs to be changed in kdebase/kwin/plugins.cpp
// and kdebase/kwin/kcmkwin/kwindecoration/kwindecoration.cpp as well.
- defaultKWinStyle = QPixmap::defaultDepth() > 8 ? "kwin_plastik" : "kwin_quartz";
+ defaultKWinStyle = QPixmap::defaultDepth() > 8 ? "kwin_bluecurve" : "kwin_quartz";
appliedStyle = NULL;
getAvailability();
@@ -133,6 +137,8 @@
else if (kwin_quartz_exist)
kdf = new KDesktopFile(kstd->findResource("data", "kwin/quartz.desktop"));
}
+ else if (bluecurve->isSelected())
+ kdf = new KDesktopFile(kstd->findResource("data", "kwin/bluecurve.desktop"));
if (kdf) {
kdf->setGroup("Desktop Entry");
@@ -228,6 +234,8 @@
else if ( (classic->isSelected() || cde->isSelected() || win->isSelected())
&& (QColor::numBitPlanes() <= 8) && icon_Locolor_exist)
theme = "Locolor";
+ else if (bluecurve->isSelected() && icon_bluecurve_exist)
+ theme = "Bluecurve";
}
// save, what we got
KGlobal::config()->setGroup("Icons");
@@ -308,9 +316,10 @@
klv_styles->setSelected(cde,true);
else if(style=="win" && win_exist)
klv_styles->setSelected(win,true);
- else if(style=="mac") {
+ else if(style=="mac")
klv_styles->setSelected(platinum,true);
- }
+ else if(style=="Bluecurve" && bluecurve_exist)
+ klv_styles->setSelected(bluecurve,true);
}
/** set the defaults for this page */
@@ -361,6 +370,12 @@
set->usrCol2.setNamedColor("#6C8BB9");
set->colorFile=locate("colors","EveX.kcsrc");
}
+ else if(bluecurve->isSelected()){
+ set->bgMode="VerticalGradient";
+ set->usrCol1.setNamedColor("#8a94c6");
+ set->usrCol2.setNamedColor("#687096");
+ set->colorFile=locate("colors","Bluecurve.kcsrc");
+ }
set->contrast=7;
config = new KSimpleConfig(set->colorFile, true);
config->setGroup("Color Scheme");
@@ -413,7 +428,7 @@
void KStylePage::getAvailability() {
// test, wich styles are available
kde_keramik_exist = kde_hc_exist = kde_def_exist = cde_exist
- = kde_plastik_exist = win_exist = platinum_exist = false;
+ = kde_plastik_exist = win_exist = platinum_exist = bluecurve_exist = false;
QStringList styles = QStyleFactory::keys();
for (QStringList::iterator it = styles.begin(); it != styles.end(); it++) {
if (*it == "Keramik") kde_keramik_exist = true;
@@ -424,6 +439,7 @@
else if (*it == "Windows") win_exist = true;
else if (*it == "Platinum") platinum_exist = true;
else if (*it == "Light, 3rd revision") kde_light_exist = true;
+ else if (*it == "Bluecurve") bluecurve_exist = true;
}
// and disable the ListItems, if they are not.
if ( !(kde_plastik_exist || kde_light_exist) ) kde->setVisible(false);
@@ -432,6 +448,7 @@
if (!cde_exist) cde->setVisible(false);
if (!win_exist) win->setVisible(false);
if (!platinum_exist) platinum->setVisible(false);
+ if (!bluecurve_exist) bluecurve->setVisible(false);
// test, wich KWin-styles are available
kwin_keramik_exist = kwin_system_exist = kwin_plastik_exist
@@ -450,10 +467,12 @@
kwin_cde_exist = true;
if (!kstd->findResource("data", "kwin/quartz.desktop").isNull())
kwin_quartz_exist = true;
+ if (!kstd->findResource("data", "kwin/bluecurve.desktop").isNull())
+ kwin_bluecurve_exist = true;
kwin_default_exist = true; // we can't check for a .desktop-file for the old default because there is none
// check, wich Icon-themes are available
- icon_crystalsvg_exist = icon_kdeclassic_exist = icon_Locolor_exist = false;
+ icon_crystalsvg_exist = icon_kdeclassic_exist = icon_Locolor_exist = icon_bluecurve_exist = false;
QStringList icons(KIconTheme::list());
for (QStringList::iterator it=icons.begin(); it != icons.end(); it++) {
KIconTheme icontheme(*it);
@@ -461,6 +480,7 @@
if (*it == "crystalsvg") icon_crystalsvg_exist = true;
else if (*it == "kdeclassic") icon_kdeclassic_exist = true;
else if (*it == "Locolor") icon_Locolor_exist = true;
+ else if (*it == "Bluecurve") icon_bluecurve_exist = true;
}
}
--- kdebase-3.3.92/kpersonalizer/kospage.h.kper 2005-02-04 00:19:05.000000000 +0100
+++ kdebase-3.3.92/kpersonalizer/kospage.h 2005-02-15 15:14:24.071145725 +0100
@@ -32,6 +32,7 @@
~KOSPage();
void save(bool currSettings=true);
void saveCheckState(bool currSettings);
+ void writeBluecurve();
void writeKDE();
void writeUNIX();
void writeWindows();
@@ -41,6 +42,7 @@
void writeUserDefaults();
/** retrieve the user's local values */
void getUserDefaults();
+ void slotBluecurveDescription();
void slotMacDescription();
void slotWindowsDescription();
void slotUnixDescription();
--- kdebase-3.3.92/kpersonalizer/kospagedlg.ui.kper 2005-02-04 00:19:05.000000000 +0100
+++ kdebase-3.3.92/kpersonalizer/kospagedlg.ui 2005-02-15 15:14:24.067146316 +0100
@@ -73,13 +73,25 @@
</property>
<widget class="QRadioButton" row="0" column="0">
<property name="name">
+ <cstring>rb_bluecurve</cstring>
+ </property>
+ <property name="text">
+ <string>Bluecurve (R)</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+
+ <widget class="QRadioButton">
+ <property name="name">
<cstring>rb_kde</cstring>
</property>
<property name="text">
<string>KDE (TM)</string>
</property>
<property name="checked">
- <bool>true</bool>
+ <bool>false</bool>
</property>
</widget>
<widget class="QRadioButton" row="1" column="0">
@@ -183,6 +195,12 @@
</widget>
<connections>
<connection>
+ <sender>rb_bluecurve</sender>
+ <signal>clicked()</signal>
+ <receiver>KOSPageDlg</receiver>
+ <slot>slotBluecurveDescription()</slot>
+ </connection>
+ <connection>
<sender>rb_kde</sender>
<signal>clicked()</signal>
<receiver>KOSPageDlg</receiver>
@@ -208,6 +226,7 @@
</connection>
</connections>
<slots>
+ <slot>slotBluecurveDescription()</slot>
<slot>slotWindowsDescription()</slot>
<slot>slotKDEDescription()</slot>
<slot>slotMacDescription()</slot>
--- kdebase-3.3.92/kpersonalizer/kospage.cpp.kper 2005-02-04 00:19:05.000000000 +0100
+++ kdebase-3.3.92/kpersonalizer/kospage.cpp 2005-02-15 15:17:57.105666576 +0100
@@ -37,7 +37,7 @@
KOSPage::KOSPage(QWidget *parent, const char *name ) : KOSPageDlg(parent,name) {
px_osSidebar->setPixmap(UserIcon("step2.png"));
// initialize the textview with the default description - KDE of course
- slotKDEDescription();
+ slotBluecurveDescription();
// Set the configfiles
cglobal = new KConfig("kdeglobals");
claunch = new KConfig("klaunchrc", false, false);
@@ -105,7 +105,10 @@
// Set the path for the keysscheme resource files
KGlobal::dirs()->addResourceType("keys", KStandardDirs::kde_default("data")+"kcmkeys");
// write the settings to the configfiles, depending on wich radiobutton is checked
- if(rb_kde->isChecked()){
+ if(rb_bluecurve->isChecked()) {
+ writeBluecurve();
+ emit selectedOS("Bluecurve");
+ } else if(rb_kde->isChecked()){
writeKDE();
emit selectedOS("KDE"); // send a signal to be caught by the KStylePage to set the according style by default depending on the OS selection
}
@@ -131,6 +134,46 @@
}
}
+/* Write Bluecurve behaviour */
+void KOSPage::writeBluecurve() {
+ kdDebug() << "KOSPage::writeBluecurve()" << endl;
+
+ ckcmdisplay->setGroup("Bluecurve");
+ ckcmdisplay->writeEntry("macStyle", false, true, true);
+
+ cglobal->setGroup("Bluecurve");
+ cglobal->writeEntry("SingleClick", false, true, true);
+
+ claunch->setGroup("FeedbackStyle");
+ claunch->writeEntry("BusyCursor", false);
+
+ cwin->setGroup("Windows");
+ cwin->writeEntry("TitlebarDoubleClickCommand", "Shade");
+ cwin->writeEntry("FocusPolicy", "ClickToFocus");
+ cwin->writeEntry("AltTabStyle", "KDE");
+ cwin->setGroup( "MouseBindings");
+ cwin->writeEntry("CommandActiveTitlebar2", "Lower");
+ cwin->writeEntry("CommandActiveTitlebar3", "Operations menu");
+
+ cdesktop->setGroup( "Menubar" );
+ cdesktop->writeEntry("ShowMenubar", false);
+ cdesktop->setGroup( "Mouse Buttons" );
+ cdesktop->writeEntry("Middle", "WindowListMenu");
+ cdesktop->setGroup( "FMSettings" );
+ cdesktop->writeEntry("UnderlineLinks", true);
+
+ ckonqueror->setGroup( "FMSettings" );
+ ckonqueror->writeEntry("UnderlineLinks", true);
+
+ ckcminput->setGroup("KDE");
+ ckcminput->writeEntry("ChangeCursor", true, true, true );
+
+ cklipper->setGroup("General");
+ cklipper->writeEntry("SynchronizeClipboards", false);
+
+ writeKeyEntrys(locate("keys", "bluecurve.kksrc"));
+}
+
/** write the settings for KDE-Behavior (called by saveCheckStatus) */
void KOSPage::writeKDE(){
@@ -343,6 +386,18 @@
delete defScheme;
}
+void KOSPage::slotBluecurveDescription(){
+ kdDebug() << "slotBluecurveDescription()" << endl;
+ textview_ospage->setText("");
+ textview_ospage->setText(i18n(
+ "<b>Window activation:</b> <i>Focus on click</i><br>"
+ "<b>Titlebar double-click:</b> <i>Shade window</i><br>"
+ "<b>Mouse selection:</b> <i>Double click</i><br>"
+ "<b>Application startup notification:</b> <i>busy cursor</i><br>"
+ "<b>Keyboard scheme:</b> <i>Bluecurve</i><br>"
+ ));
+}
+
void KOSPage::slotKDEDescription(){
kdDebug() << "slotKDEDescription()" << endl;
textview_ospage->setText("");
@@ -498,7 +553,7 @@
/** resets the radio button selected to kde */
void KOSPage::setDefaults(){
- rb_kde->setChecked(true);
+ rb_bluecurve->setChecked(true);
cb_gestures->setChecked(false);
}
kdebase-3.3.92-vroot.patch:
--- NEW FILE kdebase-3.3.92-vroot.patch ---
--- kdebase-3.3.92/kcontrol/konq/desktopbehavior_impl.cpp.orig 2005-02-15 18:57:09.717565337 +0100
+++ kdebase-3.3.92/kcontrol/konq/desktopbehavior_impl.cpp 2005-02-15 18:57:30.992421648 +0100
@@ -298,7 +298,7 @@
else
desktopMenuGroup->setButton( 0 );
g_pConfig->setGroup( "General" );
- vrootBox->setChecked( g_pConfig->readBoolEntry( "SetVRoot", false ) );
+ vrootBox->setChecked( g_pConfig->readBoolEntry( "SetVRoot", true ) );
iconsEnabledBox->setChecked( g_pConfig->readBoolEntry( "Enabled", true ) );
autoLineupIconsBox->setChecked( g_pConfig->readBoolEntry( "AutoLineUpIcons", false ) );
kdebase-3.4.2-kdesktop-konsole.patch:
--- NEW FILE kdebase-3.4.2-kdesktop-konsole.patch ---
--- kdebase-3.4.2/kdesktop/krootwm.h.kdestop-konsole 2005-05-23 14:14:38.000000000 +0200
+++ kdebase-3.4.2/kdesktop/krootwm.h 2005-07-26 22:22:46.000000000 +0200
@@ -117,6 +117,7 @@
void slotSessionActivated( int );
void slotNewSession();
void slotLockNNewSession();
+ void slotOpenTerminal();
private:
KDesktop* m_pDesktop;
--- kdebase-3.4.2/kdesktop/krootwm.cc.kdestop-konsole 2005-07-20 12:03:58.000000000 +0200
+++ kdebase-3.4.2/kdesktop/krootwm.cc 2005-09-05 14:41:33.000000000 +0200
@@ -50,6 +50,7 @@
#include <kuser.h>
#include <qfile.h>
+#include <kprocess.h>
#include "krootwm.h"
#include "kdiconview.h"
#include "desktop.h"
@@ -79,6 +80,9 @@
customMenu2 = 0;
+ new KAction(i18n("Konsole..." ), "openterm", 0, this, SLOT( slotOpenTerminal() ),
+ m_actionCollection, "open_terminal" );
+
// Creates the new menu
menuBar = 0; // no menubar yet
menuNew = 0;
@@ -131,6 +135,7 @@
{
new KAction(i18n("Run Command..."), "run", 0, m_pDesktop, SLOT( slotExecuteCommand() ), m_actionCollection, "exec" );
}
+
if (!KGlobal::config()->isImmutable())
{
new KAction(i18n("Configure Desktop..."), "configure", 0, this, SLOT( slotConfigureDesktop() ),
@@ -366,6 +371,13 @@
desktopMenu->disconnect( this );
bool needSeparator = false;
+ action = m_actionCollection->action("open_terminal");
+ if (action)
+ {
+ action->plug( desktopMenu );
+ needSeparator = true;
+ }
+
if (menuNew)
{
menuNew->plug( desktopMenu );
@@ -693,6 +705,13 @@
return args;
}
+void KRootWm::slotOpenTerminal()
+{
+ KProcess proc;
+ proc << locate("exe", "konsole");
+ proc.start(KProcess::DontCare);
+}
+
void KRootWm::slotConfigureDesktop() {
QStringList args = configModules();
args.prepend(i18n("Desktop"));
kdebase-3.5.1-kdm-readme.patch:
--- NEW FILE kdebase-3.5.1-kdm-readme.patch ---
--- kdebase-3.5.1/kdm/kfrontend/genkdmconf.c.tn 2006-02-15 22:57:04.000000000 +0100
+++ kdebase-3.5.1/kdm/kfrontend/genkdmconf.c 2006-02-15 23:05:31.000000000 +0100
@@ -2845,7 +2845,7 @@
f = Create( newkdmrc, kdmrcmode );
wrconf( f );
fclose( f );
-
+#if 0
ASPrintf( &nname, "%s/README", newdir );
f = Create( nname, 0644 );
fprintf( f,
@@ -2894,6 +2894,6 @@
"\nTry 'genkdmconf --help' if you want to generate another configuration.\n"
"\nYou may delete this README.\n" );
fclose( f );
-
+#endif
return 0;
}
--- kdebase-3.5.1/kdm/Makefile.am.tn 2006-02-15 22:56:02.000000000 +0100
+++ kdebase-3.5.1/kdm/Makefile.am 2006-02-15 22:55:56.000000000 +0100
@@ -4,9 +4,6 @@
noinst_DATA=config.ci
-kdmdocdir = $(datadir)/doc/kdm
-kdmdoc_DATA = README
-
install-data-local:
- at test -n "$(DESTDIR)" || test -z "$(PAM)" || { $(top_srcdir)/mkpamserv $(PAM) && $(top_srcdir)/mkpamserv -P $(PAM)-np; }
kdebase-3.5.1-konsole-fonts.patch:
--- NEW FILE kdebase-3.5.1-konsole-fonts.patch ---
--- kdebase-3.5.1/konsole/Makefile.am.orig 2006-02-21 19:52:27.000000000 +0100
+++ kdebase-3.5.1/konsole/Makefile.am 2006-02-21 19:52:32.000000000 +0100
@@ -1,4 +1,4 @@
-SUBDIRS = konsole other doc fonts
+SUBDIRS = konsole other doc
xdg_apps_DATA = konsole.desktop konsolesu.desktop
kdebase-3.5.1-xdg.patch:
--- NEW FILE kdebase-3.5.1-xdg.patch ---
--- kdebase-3.4.0/applnk/kde-essential.menu.tn 2005-04-25 16:18:40.000000000 +0200
+++ kdebase-3.4.0/applnk/kde-essential.menu 2005-04-25 16:18:58.000000000 +0200
@@ -2,6 +2,7 @@
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
+ <Name>Applications</Name>
<!-- The following menus are hidden by default -->
<Menu>
<Name>Settings</Name>
--- kdebase-3.5.1/applnk/kde-settings.menu.orig 2006-02-21 16:30:54.000000000 +0100
+++ kdebase-3.5.1/applnk/kde-settings.menu 2006-02-21 16:31:45.000000000 +0100
@@ -29,6 +29,7 @@
<Directory>kde-settings-looknfeel.directory</Directory>
<Include>
<Category>X-KDE-settings-looknfeel</Category>
+ <Category>X-KDE-LookNFeel</Category>
</Include>
</Menu>
<Menu>
kdebase-3.5.2-kconf_update-klipper.patch:
--- NEW FILE kdebase-3.5.2-kconf_update-klipper.patch ---
--- kdebase-3.5.2/klipper/klipper-kde31.sh.me 2006-05-24 15:36:19.000000000 +0200
+++ kdebase-3.5.2/klipper/klipper-kde31.sh 2006-05-24 15:36:29.000000000 +0200
@@ -2,7 +2,5 @@
filename=`kde-config --localprefix`share/autostart/klipper.desktop
if grep 'Hidden=true' "$filename" > /dev/null 2> /dev/null; then
echo AutoStart=false
-else
- echo AutoStart=true
fi
-rm -f "$filename"
\ No newline at end of file
+rm -f "$filename"
kdebase-3.5.3-khelpcenter-sort.patch:
--- NEW FILE kdebase-3.5.3-khelpcenter-sort.patch ---
--- kdebase-3.5.3/khelpcenter/infotree.cpp.tn 2006-07-16 22:39:40.000000000 +0200
+++ kdebase-3.5.3/khelpcenter/infotree.cpp 2006-07-16 22:57:50.000000000 +0200
@@ -123,6 +123,7 @@
}
m_alphabItem->sortChildItems( 0, true /* ascending */ );
+ m_categoryItem->sortChildItems( 0, true /* ascending */ );
}
void InfoTree::parseInfoDirFile( const QString &infoDirFileName )
@@ -174,8 +175,10 @@
item = new InfoNodeItem( alphabSection, appName );
item->entry()->setUrl( url );
+ alphabSection->sortChildItems( 0, true /* ascending */ );
}
}
+ catItem->sortChildItems( 0, true /* ascending */ );
}
infoDirFile.close();
}
kdebase-3.5.4-htdig.patch:
--- NEW FILE kdebase-3.5.4-htdig.patch ---
--- kdebase-3.5.4/khelpcenter/searchhandlers/khc_htsearch.pl.orig 2006-08-18 16:31:15.000000000 +0200
+++ kdebase-3.5.4/khelpcenter/searchhandlers/khc_htsearch.pl 2006-08-18 16:39:30.000000000 +0200
@@ -8,7 +8,7 @@
use open IO => ':utf8';
use open ':std';
-my $htsearchpath="/srv/www/cgi-bin/htsearch";
+my $htsearchpath="/var/www/cgi-bin/htsearch";
my $config;
my $format;
--- kdebase-3.5.4/khelpcenter/searchhandlers/khc_htdig.pl.in.orig 2006-08-18 16:30:16.000000000 +0200
+++ kdebase-3.5.4/khelpcenter/searchhandlers/khc_htdig.pl.in 2006-08-18 16:30:37.000000000 +0200
@@ -26,7 +26,7 @@
use Getopt::Long;
-my $htdigdata = "/srv/www/htdig/common/";
+my $htdigdata = "/usr/share/htdig/";
my $htdigbin = "/usr/bin";
my $kdeprefix = "@prefix@";
chomp $kdeprefix;
--- kdebase-3.5.4/khelpcenter/searchhandlers/khc_docbookdig.pl.in.orig 2006-08-18 16:28:11.000000000 +0200
+++ kdebase-3.5.4/khelpcenter/searchhandlers/khc_docbookdig.pl.in 2006-08-18 16:28:55.000000000 +0200
@@ -26,7 +26,7 @@
use Getopt::Long;
-my $htdigdata = "/srv/www/htdig/common/";
+my $htdigdata = "/usr/share/htdig/";
my $htdigbin = "/usr/bin";
my $kdeprefix = "@prefix@";
chomp $kdeprefix;
kdebase-3.5.4-konqueror-shortcut.patch:
--- NEW FILE kdebase-3.5.4-konqueror-shortcut.patch ---
--- kdebase-3.5.4/konqueror/konqueror.rc.orig 2006-10-04 16:03:25.000000000 +0200
+++ kdebase-3.5.4/konqueror/konqueror.rc 2006-10-04 16:03:33.000000000 +0200
@@ -146,6 +146,8 @@
</ToolBar>
<ActionProperties>
<Action shortcut="F9" name="konq_sidebartng" />
+ <Action shortcut="Ctrl+Shift+Left;Shift+Left" name="tab_move_left" />
+ <Action shortcut="Ctrl+Shift+Right;Shift+Right" name="tab_move_right" />
</ActionProperties>
</gui>
kdebase-3.5.4-tango-icon-theme.patch:
--- NEW FILE kdebase-3.5.4-tango-icon-theme.patch ---
--- kdebase-3.5.4/kdialog/kdialog.cpp.orig 2006-05-22 20:12:42.000000000 +0200
+++ kdebase-3.5.4/kdialog/kdialog.cpp 2006-09-13 16:48:41.000000000 +0200
@@ -621,6 +621,20 @@
context = KIcon::Application;
else if ( contextStr == QString::fromLatin1( "Actions" ) )
context = KIcon::Action;
+ else if ( contextStr == QString::fromLatin1( "Animations" ) )
+ context = KIcon::Animation;
+ else if ( contextStr == QString::fromLatin1( "Categories" ) )
+ context = KIcon::Category;
+ else if ( contextStr == QString::fromLatin1( "Emblems" ) )
+ context = KIcon::Emblem;
+ else if ( contextStr == QString::fromLatin1( "Emotes" ) )
+ context = KIcon::Emote;
+ else if ( contextStr == QString::fromLatin1( "International" ) )
+ context = KIcon::International;
+ else if ( contextStr == QString::fromLatin1( "Places" ) )
+ context = KIcon::Place;
+ else if ( contextStr == QString::fromLatin1( "Status" ) )
+ context = KIcon::StatusIcon;
KIconDialog dlg(0, "icon dialog");
kapp->setTopWidget( &dlg );
kdebase-3.5.5-dbus.patch:
--- NEW FILE kdebase-3.5.5-dbus.patch ---
--- kdebase-3.5.5/kioslave/media/configure.in.in.dbus 2006-10-01 19:31:54.000000000 +0200
+++ kdebase-3.5.5/kioslave/media/configure.in.in 2006-10-10 19:55:19.000000000 +0200
@@ -97,70 +97,6 @@
AC_SUBST(DBUS_INCS)
AC_SUBST(DBUS_LIBS)
-
-########### Check for DBus-Qt3 bindings
-
- AC_MSG_CHECKING(for DBus-Qt3 bindings)
-
- dbusqt_inc=NOTFOUND
- dbusqt_lib=NOTFOUND
- dbusqt=NOTFOUND
-
- search_incs="$kde_includes $kde_extra_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
- AC_FIND_FILE(dbus/connection.h, $search_incs, dbusqt_incdir)
-
- if test -r $dbusqt_incdir/dbus/connection.h ; then
- have_qt_patch=0
- grep dbus_connection_setup_with_qt_main $dbusqt_incdir/dbus/connection.h \
- > /dev/null 2>&1 && have_qt_patch=1
- if test $have_qt_patch = 1 ; then
- DBUSQT_INCS="-I$dbusqt_incdir"
- dbusqt_inc=FOUND
- fi
- fi
-
- search_libs="$kde_libraries $kde_extra_libs /usr/lib$kdelibsuff /usr/local/lib$kdelibsuff"
- AC_FIND_FILE(libdbus-qt-1.so, $search_libs, dbusqt_libdir)
-
- if test -r $dbusqt_libdir/libdbus-qt-1.so ; then
- DBUSQT_LIBS="-L$dbusqt_libdir -ldbus-qt-1"
- dbusqt_lib=FOUND
- fi
-
- if test $dbusqt_inc != FOUND || test $dbusqt_lib != FOUND ; then
-
- search_incs="`pkg-config --cflags dbus-1 |sed 's/-I//g'`"
- AC_FIND_FILE(dbus/connection.h, $search_incs, dbusqt_incdir)
- if test -r $dbusqt_incdir/dbus/connection.h ; then
- have_qt_patch=0
- grep dbus_connection_setup_with_qt_main $dbusqt_incdir/dbus/connection.h \
- > /dev/null 2>&1 && have_qt_patch=1
- if test $have_qt_patch = 1 ; then
- DBUSQT_INCS="-I$dbusqt_incdir"
- dbusqt_inc=FOUND
- fi
- fi
-
- search_libs="`pkg-config --libs dbus-1 --libs-only-L | sed 's/-L//g'`"
- AC_FIND_FILE(libdbus-qt-1.so, $search_libs, dbusqt_libdir)
-
- if test -r $dbusqt_libdir/libdbus-qt-1.so ; then
- DBUSQT_LIBS="-L$dbusqt_libdir -ldbus-qt-1"
- dbusqt_lib=FOUND
- fi
-
- fi
-
-
- if test $dbusqt_inc = FOUND && test $dbusqt_lib = FOUND ; then
- AC_MSG_RESULT(headers $dbusqt_incdir libraries $dbusqt_libdir)
- dbusqt=FOUND
- else
- AC_MSG_RESULT(searched but not found)
- fi
-
- AC_SUBST(DBUSQT_INCS)
- AC_SUBST(DBUSQT_LIBS)
fi
########### Check if media HAL backend sould be compiled
@@ -168,7 +104,7 @@
AC_MSG_CHECKING(if the HAL backend for media:/ should be compiled)
HALBACKEND=no
-if test "x$hal" = "xFOUND" && test "x$dbus" = "xFOUND" && test "x$dbusqt" = "xFOUND" ; then
+if test "x$hal" = "xFOUND" && test "x$dbus" = "xFOUND" ; then
AC_DEFINE_UNQUOTED([COMPILE_HALBACKEND],1, [media HAL backend compilation])
HALBACKEND=yes
AC_SUBST(HALBACKEND)
--- kdebase-3.5.5/kioslave/media/mediamanager/halbackend.h.dbus 2006-07-22 10:15:45.000000000 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/halbackend.h 2006-10-10 17:41:42.000000000 +0200
@@ -40,7 +40,7 @@
/* We acknowledge the the dbus API is unstable */
#define DBUS_API_SUBJECT_TO_CHANGE
/* DBus-Qt bindings */
-#include <dbus/connection.h>
+#include <connection.h>
/* HAL libraries */
#include <libhal.h>
#include <libhal-storage.h>
--- /dev/null 2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/connection.cpp 2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,168 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+/* connection.cpp: Qt wrapper for DBusConnection
+ *
+ * Copyright (C) 2003 Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#include "connection.h"
+
+using namespace DBusQt;
+
+#include "integrator.h"
+using Internal::Integrator;
+
+struct Connection::Private
+{
+ Private( Connection *qq );
+ void setConnection( DBusConnection *c );
+ DBusConnection *connection;
+ int connectionSlot;
+ DBusError error;
+ Integrator *integrator;
+ int timeout;
+ Connection *q;
+};
+
+Connection::Private::Private( Connection *qq )
+ : connection( 0 ), connectionSlot( 0 ), integrator( 0 ),
+ timeout( -1 ), q( qq )
+{
+ dbus_error_init( &error );
+}
+
+void Connection::Private::setConnection( DBusConnection *c )
+{
+ if (!c) {
+ qDebug( "error: %s, %s", error.name, error.message );
+ dbus_error_free( &error );
+ return;
+ }
+ connection = c;
+ integrator = new Integrator( c, q );
+ connect( integrator, SIGNAL(readReady()), q, SLOT(dispatchRead()) );
+}
+
+Connection::Connection( QObject *parent )
+ : QObject( parent )
+{
+ d = new Private( this );
+}
+
+Connection::Connection( const QString& host, QObject *parent )
+ : QObject( parent )
+{
+ d = new Private( this );
+
+ if ( !host.isEmpty() )
+ init( host );
+}
+
+Connection::Connection( DBusBusType type, QObject* parent )
+ : QObject( parent )
+{
+ d = new Private( this );
+ d->setConnection( dbus_bus_get(type, &d->error) );
+}
+
+void Connection::init( const QString& host )
+{
+ d->setConnection( dbus_connection_open( host.ascii(), &d->error) );
+ //dbus_connection_allocate_data_slot( &d->connectionSlot );
+ //dbus_connection_set_data( d->connection, d->connectionSlot, 0, 0 );
+}
+
+bool Connection::isConnected() const
+{
+ return dbus_connection_get_is_connected( d->connection );
+}
+
+bool Connection::isAuthenticated() const
+{
+ return dbus_connection_get_is_authenticated( d->connection );
+}
+
+void Connection::open( const QString& host )
+{
+ if ( host.isEmpty() ) return;
+
+ init( host );
+}
+
+void Connection::close()
+{
+ dbus_connection_close( d->connection );
+}
+
+void Connection::flush()
+{
+ dbus_connection_flush( d->connection );
+}
+
+void Connection::dispatchRead()
+{
+ while ( dbus_connection_dispatch( d->connection ) == DBUS_DISPATCH_DATA_REMAINS )
+ ;
+}
+
+DBusConnection* Connection::connection() const
+{
+ return d->connection;
+}
+
+Connection::Connection( DBusConnection *connection, QObject *parent )
+ : QObject( parent )
+{
+ d = new Private(this);
+ d->setConnection(connection);
+}
+
+void Connection::send( const Message &m )
+{
+ dbus_connection_send(d->connection, m.message(), 0);
+}
+
+void Connection::sendWithReply( const Message& )
+{
+}
+
+Message Connection::sendWithReplyAndBlock( const Message &m )
+{
+ DBusMessage *reply;
+ reply = dbus_connection_send_with_reply_and_block( d->connection, m.message(), d->timeout, &d->error );
+ if (dbus_error_is_set(&d->error)) {
+ qDebug("error: %s, %s", d->error.name, d->error.message);
+ dbus_error_free(&d->error);
+ }
+ return Message( reply );
+}
+
+void* Connection::virtual_hook( int, void* )
+{
+}
+
+void Connection::dbus_connection_setup_with_qt_main (DBusConnection *connection)
+{
+ d->setConnection( connection );
+}
+
+
+
+/////////////////////////////////////////////////////////
+
+#include "connection.moc"
--- /dev/null 2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/connection.h 2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,86 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+/* connection.h: Qt wrapper for DBusConnection
+ *
+ * Copyright (C) 2003 Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef DBUS_QT_CONNECTION_H
+#define DBUS_QT_CONNECTION_H
+
+/* We acknowledge the the dbus API is unstable */
+#define DBUS_API_SUBJECT_TO_CHANGE
+
+#include "message.h"
+
+#include <qobject.h>
+#include <qstring.h>
+
+#include "dbus/dbus.h"
+
+namespace DBusQt {
+ namespace Internal {
+ class Integrator;
+ }
+
+ class Connection : public QObject
+ {
+ Q_OBJECT
+ public:
+ Connection( QObject *parent =0 );
+ Connection( const QString& host,
+ QObject *parent = 0 );
+ Connection( DBusBusType type, QObject* parent = 0 );
+
+ bool isConnected() const;
+ bool isAuthenticated() const;
+
+ Message borrowMessage();
+ Message popMessage();
+ void stealBorrowMessage( const Message& );
+ void dbus_connection_setup_with_qt_main (DBusConnection *connection);
+
+ public slots:
+ void open( const QString& );
+ void close();
+ void flush();
+ void send( const Message& );
+ void sendWithReply( const Message& );
+ Message sendWithReplyAndBlock( const Message& );
+
+ protected slots:
+ void dispatchRead();
+
+ protected:
+ void init( const QString& host );
+ virtual void *virtual_hook( int id, void *data );
+
+ private:
+ friend class Internal::Integrator;
+ DBusConnection *connection() const;
+ Connection( DBusConnection *connection, QObject *parent );
+
+ private:
+ struct Private;
+ Private *d;
+ };
+
+}
+
+
+#endif
--- /dev/null 2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/message.h 2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,132 @@
+/* -*- mode: C++; c-file-style: "gnu" -*- */
+/* message.h: Qt wrapper for DBusMessage
+ *
+ * Copyright (C) 2003 Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef DBUS_QT_MESSAGE_H
+#define DBUS_QT_MESSAGE_H
+
+/* We acknowledge the the dbus API is unstable */
+#define DBUS_API_SUBJECT_TO_CHANGE
+
+#include <qvariant.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include "dbus/dbus.h"
+
+namespace DBusQt {
+
+ class Message
+ {
+ public:
+ class iterator {
+ public:
+ iterator();
+ iterator( const iterator& );
+ iterator( DBusMessage* msg );
+ ~iterator();
+
+ iterator& operator=( const iterator& );
+ const QVariant& operator*() const;
+ QVariant& operator*();
+ iterator& operator++();
+ iterator operator++(int);
+ bool operator==( const iterator& it );
+ bool operator!=( const iterator& it );
+
+ QVariant var() const;
+ protected:
+ QVariant marshallBaseType( DBusMessageIter* i );
+ void fillVar();
+ struct IteratorData;
+ IteratorData *d;
+ };
+
+ Message( int messageType );
+ Message( DBusMessage * );//hide this one from the public implementation
+ Message( const QString& service, const QString& path,
+ const QString& interface, const QString& method );
+ Message( const Message& replayingTo );
+ Message( const QString& path, const QString& interface,
+ const QString& name );
+ Message( const Message& replayingTo, const QString& errorName,
+ const QString& errorMessage );
+
+ Message operator=( const Message& other );
+
+ virtual ~Message();
+
+ int type() const;
+
+ void setPath( const QString& );
+ QString path() const;
+
+ void setInterface( const QString& );
+ QString interface() const;
+
+ void setMember( const QString& );
+ QString member() const;
+
+ QString errorName() const;
+
+ QString destination() const;
+
+ bool setSender( const QString& sender );
+ QString sender() const;
+
+ QString signature() const;
+
+ iterator begin() const;
+ iterator end() const;
+
+ QVariant at( int i );
+
+
+ public:
+ Message& operator<<( bool );
+ Message& operator<<( Q_INT8 );
+ Message& operator<<( Q_INT32 );
+ Message& operator<<( Q_UINT32 );
+ Message& operator<<( Q_INT64 );
+ Message& operator<<( Q_UINT64 );
+ Message& operator<<( double );
+ Message& operator<<( const QString& );
+ Message& operator<<( const QVariant& );
+ //Message& operator<<();
+ //Message& operator<<();
+ //Message& operator<<();
+ //Message& operator<<();
+ //Message& operator<<();
+ //Message& operator<<();
+ //Message& operator<<();
+
+ protected:
+ friend class Connection;
+ DBusMessage* message() const;
+
+ private:
+ struct Private;
+ Private *d;
+ };
+
+}
+
+#endif
--- /dev/null 2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/integrator.h 2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,95 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+/* integrator.h: integrates D-BUS into Qt event loop
+ *
+ * Copyright (C) 2003 Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef DBUS_QT_INTEGRATOR_H
+#define DBUS_QT_INTEGRATOR_H
+
+/* We acknowledge the the dbus API is unstable */
+#define DBUS_API_SUBJECT_TO_CHANGE
+
+#include <qobject.h>
+
+#include <qintdict.h>
+#include <qptrdict.h>
+
+#include "dbus/dbus.h"
+
+class QTimer;
+
+namespace DBusQt
+{
+ class Connection;
+
+ namespace Internal
+ {
+ struct Watch;
+
+ class Timeout : public QObject
+ {
+ Q_OBJECT
+ public:
+ Timeout( QObject *parent, DBusTimeout *t );
+ public:
+ void start();
+ signals:
+ void timeout( DBusTimeout* );
+ protected slots:
+ void slotTimeout();
+ private:
+ QTimer *m_timer;
+ DBusTimeout *m_timeout;
+ };
+
+ class Integrator : public QObject
+ {
+ Q_OBJECT
+ public:
+ Integrator( DBusConnection *connection, QObject *parent );
+ Integrator( DBusServer *server, QObject *parent );
+
+ signals:
+ void readReady();
+ void newConnection( Connection* );
+
+ protected slots:
+ void slotRead( int );
+ void slotWrite( int );
+ void slotTimeout( DBusTimeout *timeout );
+
+ public:
+ void addWatch( DBusWatch* );
+ void removeWatch( DBusWatch* );
+
+ void addTimeout( DBusTimeout* );
+ void removeTimeout( DBusTimeout* );
+
+ void handleConnection( DBusConnection* );
+ private:
+ QIntDict<Watch> m_watches;
+ QPtrDict<Timeout> m_timeouts;
+ DBusConnection *m_connection;
+ DBusServer *m_server;
+ };
+ }
+}
+
+#endif
--- kdebase-3.5.5/kioslave/media/mediamanager/Makefile.am.dbus 2005-09-10 10:25:36.000000000 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/Makefile.am 2006-10-10 17:41:42.000000000 +0200
@@ -1,17 +1,22 @@
kde_module_LTLIBRARIES = kded_mediamanager.la
if include_media_halbackend
-HALBACKEND_INCS = $(HAL_INCS) $(DBUS_INCS) $(DBUSQT_INCS)
+HALBACKEND_INCS = $(HAL_INCS) $(DBUS_INCS)
endif
METASOURCES = AUTO
INCLUDES = -I$(srcdir)/../libmediacommon -I../libmediacommon $(HALBACKEND_INCS) $(all_includes)
+DBUSQT3BINDING_LIB = libdbusqt3.la
+libdbusqt3_la_SOURCES = connection.cpp integrator.cpp message.cpp
+libdbusqt3_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
+libdbusqt3_la_LIBADD = $(HAL_LIBS) $(DBUS_LIBS)
+
if include_media_halbackend
HALBACKEND_LIB = libhalbackend.la
libhalbackend_la_SOURCES = halbackend.cpp
libhalbackend_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
-libhalbackend_la_LIBADD = $(HAL_LIBS) $(DBUS_LIBS) $(DBUSQT_LIBS)
+libhalbackend_la_LIBADD = $(HAL_LIBS) $(DBUS_LIBS) $(DBUSQT3BINDING_LIB)
endif
if include_media_linuxcdpolling
@@ -20,7 +25,7 @@
liblinuxcdpolling_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
endif
-noinst_LTLIBRARIES = $(LINUXCDPOLLING_LIB) $(HALBACKEND_LIB)
+noinst_LTLIBRARIES = $(LINUXCDPOLLING_LIB) $(HALBACKEND_LIB) $(DBUSQT3BINDING_LIB)
kded_mediamanager_la_SOURCES = mediamanager.cpp mediamanager.skel medialist.cpp backendbase.cpp fstabbackend.cpp removablebackend.cpp mediadirnotify.cpp mediadirnotify.skel
kded_mediamanager_la_LDFLAGS = $(all_libraries) -module -avoid-version
--- /dev/null 2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/message.cpp 2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,551 @@
+/* -*- mode: C++; c-file-style: "gnu" -*- */
+/* message.cpp: Qt wrapper for DBusMessage
+ *
+ * Copyright (C) 2003 Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#include "message.h"
+
+#include <qmap.h>
+
+#include <cstdlib>
+
+namespace DBusQt {
+
+struct Message::iterator::IteratorData {
+ DBusMessageIter *iter;
+ QVariant var;
+ bool end;
+ DBusMessage *mesg;
+};
+
+/**
+ * Iterator.
+ */
+Message::iterator::iterator()
+{
+ d = new IteratorData;
+ d->iter = 0; d->end = true;
+}
+
+/**
+ * Constructs iterator for the message.
+ * @param msg message whose fields we want to iterate
+ */
+Message::iterator::iterator( DBusMessage* msg )
+{
+ d = new IteratorData;
+ d->mesg = msg;
+ d->iter = static_cast<DBusMessageIter *>( malloc( sizeof(DBusMessageIter) ) );
+ dbus_message_iter_init( d->mesg, d->iter );
+ if ( !d->iter ) {
+ qDebug("No iterator??");
+ }
+ fillVar();
+ d->end = false;
+}
+
+/**
+ * Copy constructor for the iterator.
+ * @param itr iterator
+ */
+Message::iterator::iterator( const iterator& itr )
+{
+ d = new IteratorData;
+ d->iter = itr.d->iter;
+ d->var = itr.d->var;
+ d->end = itr.d->end;
+}
+
+/**
+ * Destructor.
+ */
+Message::iterator::~iterator()
+{
+ free( d->iter );
+ delete d; d=0;
+}
+
+/**
+ * Creates an iterator equal to the @p itr iterator
+ * @param itr other iterator
+ * @return
+ */
+Message::iterator&
+Message::iterator::operator=( const iterator& itr )
+{
+ IteratorData *tmp = new IteratorData;
+ tmp->iter = itr.d->iter;
+ tmp->var = itr.d->var;
+ tmp->end = itr.d->end;
+ delete d; d=tmp;
+ return *this;
+}
+
+/**
+ * Returns the constant QVariant held by the iterator.
+ * @return the constant reference to QVariant held by this iterator
+ */
+const QVariant&
+Message::iterator::operator*() const
+{
+ return d->var;
+}
+
+/**
+ * Returns the QVariant held by the iterator.
+ * @return reference to QVariant held by this iterator
+ */
+QVariant&
+Message::iterator::operator*()
+{
+ return d->var;
+}
+
+/**
+ * Moves to the next field and return a reference to itself after
+ * incrementing.
+ * @return reference to self after incrementing
+ */
+Message::iterator&
+Message::iterator::operator++()
+{
+ if ( d->end )
+ return *this;
+
+ if ( dbus_message_iter_next( d->iter ) ) {
+ fillVar();
+ } else {
+ d->end = true;
+ d->var = QVariant();
+ }
+ return *this;
+}
+
+/**
+ * Moves to the next field and returns self before incrementing.
+ * @return self before incrementing
+ */
+Message::iterator
+Message::iterator::operator++(int)
+{
+ iterator itr( *this );
+ operator++();
+ return itr;
+}
+
+/**
+ * Compares this iterator to @p it iterator.
+ * @param it the iterator to which we're comparing this one to
+ * @return true if they're equal, false otherwise
+ */
+bool
+Message::iterator::operator==( const iterator& it )
+{
+ if ( d->end == it.d->end ) {
+ if ( d->end == true ) {
+ return true;
+ } else {
+ return d->var == it.d->var;
+ }
+ } else
+ return false;
+}
+
+/**
+ * Compares two iterators.
+ * @param it The other iterator.
+ * @return true if two iterators are not equal, false
+ * otherwise
+ */
+bool
+Message::iterator::operator!=( const iterator& it )
+{
+ return !operator==( it );
+}
+
+QVariant Message::iterator::marshallBaseType( DBusMessageIter* i )
+{
+ QVariant ret;
+ switch (dbus_message_iter_get_arg_type(i)) {
+ case DBUS_TYPE_INT32:
+ {
+ dbus_int32_t v;
+ dbus_message_iter_get_basic (i, &v);
+ ret = QVariant( v );
+ }
+ break;
+ case DBUS_TYPE_UINT32:
+ {
+ dbus_uint32_t v;
+ dbus_message_iter_get_basic (i, &v);
+ ret = QVariant( v );
+ }
+ break;
+ case DBUS_TYPE_DOUBLE:
+ {
+ double v;
+ dbus_message_iter_get_basic (i, &v);
+ ret = QVariant( v );
+ }
+ break;
+ case DBUS_TYPE_STRING:
+ {
+ const char *v;
+ dbus_message_iter_get_basic (i, &v);
+ ret = QVariant( v );
+ }
+ break;
+ default:
+ ret = QVariant();
+ break;
+ }
+ return ret;
+}
+
+/**
+ * Fills QVariant based on what current DBusMessageIter helds.
+ */
+void
+Message::iterator::fillVar()
+{
+ switch ( dbus_message_iter_get_arg_type( d->iter ) ) {
+ case DBUS_TYPE_INT32:
+ case DBUS_TYPE_UINT32:
+ case DBUS_TYPE_DOUBLE:
+ case DBUS_TYPE_STRING:
+ d->var = marshallBaseType( d->iter );
+ break;
+ case DBUS_TYPE_ARRAY: {
+ switch ( dbus_message_iter_get_element_type( d->iter ) ) {
+ case DBUS_TYPE_STRING: {
+ QStringList tempList;
+ DBusMessageIter sub;
+ dbus_message_iter_recurse (d->iter, &sub);
+ while (dbus_message_iter_get_arg_type (&sub) != DBUS_TYPE_INVALID)
+ {
+ const char *v;
+ dbus_message_iter_get_basic (&sub, &v);
+ tempList.append( QString( v ) );
+ dbus_message_iter_next (&sub);
+ }
+ d->var = QVariant( tempList );
+ break;
+ }
+ default:
+ qDebug( "Array of type not implemented" );
+ d->var = QVariant();
+ break;
+ }
+ break;
+ }
+#if 0
+ /* DICT is gone for now, but expected to be reintroduced, or else
+ * reintroduced as a flag on the introspection data that can
+ * apply to array of struct of two fields
+ */
+ case DBUS_TYPE_DICT: {
+ qDebug( "Got a hash!" );
+ QMap<QString, QVariant> tempMap;
+ DBusMessageIter dictIter;
+ dbus_message_iter_init_dict_iterator( d->iter, &dictIter );
+ do {
+ char *key = dbus_message_iter_get_dict_key( &dictIter );
+ tempMap[key] = marshallBaseType( &dictIter );
+ dbus_free( key );
+ dbus_message_iter_next( &dictIter );
+ } while( dbus_message_iter_has_next( &dictIter ) );
+ d->var = QVariant( tempMap );
+ break;
+ qDebug( "Hash/Dict type not implemented" );
+ d->var = QVariant();
+ break;
+ }
+#endif
+ default:
+ qDebug( "not implemented" );
+ d->var = QVariant();
+ break;
+ }
+}
+
+/**
+ * Returns a QVariant help by this iterator.
+ * @return QVariant held by this iterator
+ */
+QVariant
+Message::iterator::var() const
+{
+ return d->var;
+}
+
+struct Message::Private {
+ DBusMessage *msg;
+};
+
+Message::Message( DBusMessage *m )
+{
+ d = new Private;
+ d->msg = m;
+}
+
+/**
+ *
+ */
+Message::Message( int messageType )
+{
+ d = new Private;
+ d->msg = dbus_message_new( messageType );
+}
+
+/**
+ * Constructs a new Message with the given service and name.
+ * @param service service service that the message should be sent to
+ * @param name name of the message
+ */
+Message::Message( const QString& service, const QString& path,
+ const QString& interface, const QString& method )
+{
+ d = new Private;
+ d->msg = dbus_message_new_method_call( service.latin1(), path.latin1(),
+ interface.latin1(), method.latin1() );
+}
+
+/**
+ * Constructs a message that is a reply to some other
+ * message.
+ * @param name the name of the message
+ * @param replayingTo original_message the message which the created
+ * message is a reply to.
+ */
+Message::Message( const Message& replayingTo )
+{
+ d = new Private;
+ d->msg = dbus_message_new_method_return( replayingTo.d->msg );
+}
+
+Message:: Message( const QString& path, const QString& interface,
+ const QString& name )
+{
+ d = new Private;
+ d->msg = dbus_message_new_signal( path.ascii(), interface.ascii(),
+ name.ascii() );
+}
+
+Message::Message( const Message& replayingTo, const QString& errorName,
+ const QString& errorMessage )
+{
+ d = new Private;
+ d->msg = dbus_message_new_error( replayingTo.d->msg, errorName.utf8(),
+ errorMessage.utf8() );
+}
+
+Message Message::operator=( const Message& other )
+{
+ //FIXME: ref the other.d->msg instead of copying it?
+}
+/**
+ * Destructs message.
+ */
+Message::~Message()
+{
+ if ( d->msg ) {
+ dbus_message_unref( d->msg );
+ }
+ delete d; d=0;
+}
+
+int Message::type() const
+{
+ return dbus_message_get_type( d->msg );
+}
+
+void Message::setPath( const QString& path )
+{
+ dbus_message_set_path( d->msg, path.ascii() );
+}
+
+QString Message::path() const
+{
+ return dbus_message_get_path( d->msg );
+}
+
+void Message::setInterface( const QString& iface )
+{
+ dbus_message_set_interface( d->msg, iface.ascii() );
+}
+
+QString Message::interface() const
+{
+ return dbus_message_get_interface( d->msg );
+}
+
+void Message::setMember( const QString& member )
+{
+ dbus_message_set_member( d->msg, member.ascii() );
+}
+
+QString Message::member() const
+{
+ return dbus_message_get_member( d->msg );
+}
+
+QString Message::errorName() const
+{
+ return dbus_message_get_error_name( d->msg );
+}
+
+QString Message::destination() const
+{
+ return dbus_message_get_destination( d->msg );
+}
+
+/**
+ * Sets the message sender.
+ * @param sender the sender
+ * @return false if unsuccessful
+ */
+bool
+Message::setSender( const QString& sender )
+{
+ return dbus_message_set_sender( d->msg, sender.latin1() );
+}
+
+/**
+ * Returns sender of this message.
+ * @return sender
+ */
+QString
+Message::sender() const
+{
+ return dbus_message_get_sender( d->msg );
+}
+
+QString Message::signature() const
+{
+ return dbus_message_get_signature( d->msg );
+}
+
+
+/**
+ * Returns the starting iterator for the fields of this
+ * message.
+ * @return starting iterator
+ */
+Message::iterator
+Message::begin() const
+{
+ return iterator( d->msg );
+}
+
+/**
+ * Returns the ending iterator for the fields of this
+ * message.
+ * @return ending iterator
+ */
+Message::iterator
+Message::end() const
+{
+ return iterator();
+}
+
+/**
+ * Returns the field at position @p i
+ * @param i position of the wanted field
+ * @return QVariant at position @p i or an empty QVariant
+ */
+QVariant
+Message::at( int i )
+{
+ iterator itr( d->msg );
+
+ while ( i-- ) {
+ if ( itr == end() )
+ return QVariant();//nothing there
+ ++itr;
+ }
+ return *itr;
+}
+
+/**
+ * The underlying DBusMessage of this class.
+ * @return DBusMessage pointer.
+ */
+DBusMessage*
+Message::message() const
+{
+ return d->msg;
+}
+
+Message& Message::operator<<( bool b )
+{
+ const dbus_bool_t right_size_bool = b;
+ dbus_message_append_args( d->msg, DBUS_TYPE_BOOLEAN, &right_size_bool,
+ DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_INT8 byte )
+{
+ dbus_message_append_args( d->msg, DBUS_TYPE_BYTE, &byte,
+ DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_INT32 num )
+{
+ dbus_message_append_args( d->msg, DBUS_TYPE_INT32, &num,
+ DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_UINT32 num )
+{
+ dbus_message_append_args( d->msg, DBUS_TYPE_UINT32, &num,
+ DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_INT64 num )
+{
+ dbus_message_append_args( d->msg, DBUS_TYPE_INT64, &num,
+ DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_UINT64 num )
+{
+ dbus_message_append_args( d->msg, DBUS_TYPE_UINT64, &num,
+ DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( double num )
+{
+ dbus_message_append_args( d->msg, DBUS_TYPE_DOUBLE, &num,
+ DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( const QString& str )
+{
+ const char *u = str.utf8();
+ dbus_message_append_args( d->msg, DBUS_TYPE_STRING, &u,
+ DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( const QVariant& custom )
+{
+ //FIXME: imeplement
+}
+
+}
--- /dev/null 2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/integrator.cpp 2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,244 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+/* integrator.h: integrates D-BUS into Qt event loop
+ *
+ * Copyright (C) 2003 Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#include "integrator.h"
+#include "connection.h"
+
+#include <qtimer.h>
+#include <qsocketnotifier.h>
+#include <qintdict.h>
+#include <qptrlist.h>
+
+namespace DBusQt
+{
+namespace Internal {
+
+struct Watch {
+ Watch(): readSocket( 0 ), writeSocket( 0 ) { }
+
+ DBusWatch *watch;
+ QSocketNotifier *readSocket;
+ QSocketNotifier *writeSocket;
+};
+
+//////////////////////////////////////////////////////////////
+dbus_bool_t dbusAddWatch( DBusWatch *watch, void *data )
+{
+ Integrator *con = static_cast<Integrator*>( data );
+ con->addWatch( watch );
+ return true;
+}
+void dbusRemoveWatch( DBusWatch *watch, void *data )
+{
+ Integrator *con = static_cast<Integrator*>( data );
+ con->removeWatch( watch );
+}
+
+void dbusToggleWatch( DBusWatch *watch, void *data )
+{
+ Integrator *itg = static_cast<Integrator*>( data );
+ if ( dbus_watch_get_enabled( watch ) )
+ itg->addWatch( watch );
+ else
+ itg->removeWatch( watch );
+}
+
+dbus_bool_t dbusAddTimeout( DBusTimeout *timeout, void *data )
+{
+ if ( !dbus_timeout_get_enabled(timeout) )
+ return true;
+
+ Integrator *itg = static_cast<Integrator*>( data );
+ itg->addTimeout( timeout );
+ return true;
+}
+
+void dbusRemoveTimeout( DBusTimeout *timeout, void *data )
+{
+ Integrator *itg = static_cast<Integrator*>( data );
+ itg->removeTimeout( timeout );
+}
+
+void dbusToggleTimeout( DBusTimeout *timeout, void *data )
+{
+ Integrator *itg = static_cast<Integrator*>( data );
+
+ if ( dbus_timeout_get_enabled( timeout ) )
+ itg->addTimeout( timeout );
+ else
+ itg->removeTimeout( timeout );
+}
+
+void dbusWakeupMain( void* )
+{
+}
+
+void dbusNewConnection( DBusServer *server,
+ DBusConnection *new_connection,
+ void *data )
+{
+ Integrator *itg = static_cast<Integrator*>( data );
+ itg->handleConnection( new_connection );
+}
+/////////////////////////////////////////////////////////////
+
+Timeout::Timeout( QObject *parent, DBusTimeout *t )
+ : QObject( parent ), m_timeout( t )
+{
+ m_timer = new QTimer( this );
+ connect( m_timer, SIGNAL(timeout()),
+ SLOT(slotTimeout()) );
+}
+
+void Timeout::slotTimeout()
+{
+ emit timeout( m_timeout );
+}
+
+void Timeout::start()
+{
+ m_timer->start( dbus_timeout_get_interval( m_timeout ) );
+}
+
+Integrator::Integrator( DBusConnection *conn, QObject *parent )
+ : QObject( parent ), m_connection( conn )
+{
+ m_timeouts.setAutoDelete( true );
+
+ dbus_connection_set_watch_functions( m_connection,
+ dbusAddWatch,
+ dbusRemoveWatch,
+ dbusToggleWatch,
+ this, 0 );
+ dbus_connection_set_timeout_functions( m_connection,
+ dbusAddTimeout,
+ dbusRemoveTimeout,
+ dbusToggleTimeout,
+ this, 0 );
+ dbus_connection_set_wakeup_main_function( m_connection,
+ dbusWakeupMain,
+ this, 0 );
+}
+
+Integrator::Integrator( DBusServer *server, QObject *parent )
+ : QObject( parent ), m_server( server )
+{
+ m_connection = reinterpret_cast<DBusConnection*>( m_server );
+ m_timeouts.setAutoDelete( true );
+
+ dbus_server_set_watch_functions( m_server,
+ dbusAddWatch,
+ dbusRemoveWatch,
+ dbusToggleWatch,
+ this, 0 );
+ dbus_server_set_timeout_functions( m_server,
+ dbusAddTimeout,
+ dbusRemoveTimeout,
+ dbusToggleTimeout,
+ this, 0 );
+ dbus_server_set_new_connection_function( m_server,
+ dbusNewConnection,
+ this, 0 );
+}
+
+void Integrator::slotRead( int fd )
+{
+ QIntDictIterator<Watch> it( m_watches );
+ for ( ; it.current(); ++it )
+ dbus_watch_handle ( it.current()->watch, DBUS_WATCH_READABLE );
+
+ emit readReady();
+}
+
+void Integrator::slotWrite( int fd )
+{
+ QIntDictIterator<Watch> it( m_watches );
+ for ( ; it.current(); ++it )
+ dbus_watch_handle ( it.current()->watch, DBUS_WATCH_WRITABLE );
+}
+
+void Integrator::slotTimeout( DBusTimeout *timeout )
+{
+ dbus_timeout_handle( timeout );
+}
+
+void Integrator::addWatch( DBusWatch *watch )
+{
+ if ( !dbus_watch_get_enabled( watch ) )
+ return;
+
+ Watch *qtwatch = new Watch;
+ qtwatch->watch = watch;
+
+ int flags = dbus_watch_get_flags( watch );
+ int fd = dbus_watch_get_fd( watch );
+
+ if ( flags & DBUS_WATCH_READABLE ) {
+ qtwatch->readSocket = new QSocketNotifier( fd, QSocketNotifier::Read, this );
+ QObject::connect( qtwatch->readSocket, SIGNAL(activated(int)), SLOT(slotRead(int)) );
+ }
+
+ if (flags & DBUS_WATCH_WRITABLE) {
+ qtwatch->writeSocket = new QSocketNotifier( fd, QSocketNotifier::Write, this );
+ QObject::connect( qtwatch->writeSocket, SIGNAL(activated(int)), SLOT(slotWrite(int)) );
+ }
+
+ m_watches.insert( fd, qtwatch );
+}
+
+void Integrator::removeWatch( DBusWatch *watch )
+{
+ int key = dbus_watch_get_fd( watch );
+
+ Watch *qtwatch = m_watches.take( key );
+
+ if ( qtwatch ) {
+ delete qtwatch->readSocket; qtwatch->readSocket = 0;
+ delete qtwatch->writeSocket; qtwatch->writeSocket = 0;
+ delete qtwatch;
+ }
+}
+
+void Integrator::addTimeout( DBusTimeout *timeout )
+{
+ Timeout *mt = new Timeout( this, timeout );
+ m_timeouts.insert( timeout, mt );
+ connect( mt, SIGNAL(timeout(DBusTimeout*)),
+ SLOT(slotTimeout(DBusTimeout*)) );
+ mt->start();
+}
+
+void Integrator::removeTimeout( DBusTimeout *timeout )
+{
+ m_timeouts.remove( timeout );
+}
+
+void Integrator::handleConnection( DBusConnection *c )
+{
+ Connection *con = new Connection( c, this );
+ emit newConnection( con );
+}
+
+}//end namespace Internal
+}//end namespace DBusQt
+
+#include "integrator.moc"
kdebase-3.5.5-keyinit.patch:
--- NEW FILE kdebase-3.5.5-keyinit.patch ---
diff -uNrp kdebase-3.5.5-orig/kdm.pamd kdebase-3.5.5/kdm.pamd
--- kdebase-3.5.5-orig/kdm.pamd 1970-01-01 01:00:00.000000000 +0100
+++ kdebase-3.5.5/kdm.pamd 2006-07-13 14:26:10.000000000 +0100
@@ -0,0 +1,10 @@
+#%PAM-1.0
+auth include system-auth
+account required pam_nologin.so
+account include system-auth
+password include system-auth
+session optional pam_keyinit.so force revoke
+session include system-auth
+session required pam_loginuid.so
+session optional pam_selinux.so
+session optional pam_console.so
kdebase-3.5.5-redhat-pam.patch:
--- NEW FILE kdebase-3.5.5-redhat-pam.patch ---
--- kdebase-3.5.4/kde.pamd.redhat 2005-09-10 10:26:16.000000000 +0200
+++ kdebase-3.5.4/kde.pamd 2006-08-25 14:15:02.000000000 +0200
@@ -1,7 +1,9 @@
#%PAM-1.0
-auth required /lib/security/pam_pwdb.so shadow nullok
-auth required /lib/security/pam_nologin.so
-account required /lib/security/pam_pwdb.so
-password required /lib/security/pam_cracklib.so
-password required /lib/security/pam_pwdb.so shadow nullok use_authtok
-session required /lib/security/pam_pwdb.so
+auth include system-auth
+account required pam_nologin.so
+account include system-auth
+password include system-auth
+session include system-auth
+session required pam_loginuid.so
+session optional pam_selinux.so
+session optional pam_console.so
kdebase-3.5.5-suspend.patch:
--- NEW FILE kdebase-3.5.5-suspend.patch ---
--- kdebase-3.5.5/ksmserver/shutdowndlg.h.tn 2006-11-06 12:50:17.000000000 +0100
+++ kdebase-3.5.5/ksmserver/shutdowndlg.h 2006-11-07 15:50:59.000000000 +0100
@@ -17,6 +17,9 @@
#include <kapplication.h>
+#define SUSPEND_TYPE_HIBERNATE 0
+#define SUSPEND_TYPE_STANDBY 1
+
// The (singleton) widget that makes the desktop gray.
class KSMShutdownFeedback : public QWidget
{
@@ -54,6 +57,7 @@
void slotHalt();
void slotReboot();
void slotReboot(int);
+ void slotSuspend();
protected:
~KSMShutdownDlg() {};
@@ -64,6 +68,10 @@
QString m_bootOption;
QPopupMenu *targets;
QStringList rebootOptions;
+ KPushButton *btnSuspend;
+ int suspendType;
+ void keyPressEvent( QKeyEvent *e);
+ void keyReleaseEvent( QKeyEvent *e );
};
class KSMDelayedPushButton : public KPushButton
--- kdebase-3.5.5/ksmserver/shutdowndlg.cpp.tn 2006-11-06 12:50:05.000000000 +0100
+++ kdebase-3.5.5/ksmserver/shutdowndlg.cpp 2006-11-07 16:02:27.000000000 +0100
@@ -87,7 +87,7 @@
KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
bool maysd, KApplication::ShutdownType sdtype )
- : QDialog( parent, 0, TRUE, WType_Popup ), targets(0)
+ : QDialog( parent, 0, TRUE, WType_Popup ), targets(0), btnSuspend(0)
// this is a WType_Popup on purpose. Do not change that! Not
// having a popup here has severe side effects.
{
@@ -132,6 +132,13 @@
if (maysd) {
+ // hibernate and standby
+ suspendType = SUSPEND_TYPE_STANDBY;
+ btnSuspend = new KPushButton( KGuiItem( i18n("&Suspend Computer"), "down"), frame );
+ btnSuspend->setFont( btnFont );
+ buttonlay->addWidget( btnSuspend );
+ connect(btnSuspend, SIGNAL(clicked()), SLOT(slotSuspend()));
+
// Shutdown
KPushButton* btnHalt = new KPushButton( KGuiItem( i18n("&Turn Off Computer"), "exit"), frame );
btnHalt->setFont( btnFont );
@@ -274,3 +281,34 @@
popt->stop();
setDown(false);
}
+
+void KSMShutdownDlg::slotSuspend()
+{
+ switch ( suspendType ) {
+ case SUSPEND_TYPE_HIBERNATE: system("/usr/bin/pm-hibernate"); break;
+ case SUSPEND_TYPE_STANDBY: system("/usr/bin/pm-suspend"); break;
+ }
+ reject();
+}
+
+void KSMShutdownDlg::keyPressEvent( QKeyEvent *e )
+{
+ switch ( e->key() ) {
+ case Key_Shift:
+ btnSuspend->setText("&Hibernate Computer");
+ suspendType = SUSPEND_TYPE_HIBERNATE;
+ default:
+ e->ignore();
+ }
+}
+
+void KSMShutdownDlg::keyReleaseEvent( QKeyEvent *e )
+{
+ switch( e->key() ) {
+ case Key_Shift:
+ btnSuspend->setText("&Suspend Computer");
+ suspendType = SUSPEND_TYPE_STANDBY;
+ default:
+ e->ignore();
+ }
+}
kdebase-3.5.6-kdm-alternatebackground.patch:
--- NEW FILE kdebase-3.5.6-kdm-alternatebackground.patch ---
diff -ur kdebase-3.5.6/kdm/kfrontend/kgapp.cpp kdebase-3.5.6-kdm-alternatebackground/kdm/kfrontend/kgapp.cpp
--- kdebase-3.5.6/kdm/kfrontend/kgapp.cpp 2006-05-22 20:13:07.000000000 +0200
+++ kdebase-3.5.6-kdm-alternatebackground/kdm/kfrontend/kgapp.cpp 2007-05-11 15:26:03.000000000 +0200
@@ -40,6 +40,7 @@
#include <qtimer.h>
#include <qcursor.h>
#include <qpalette.h>
+#include <qcolor.h>
#include <stdlib.h> // free(), exit()
#include <unistd.h> // alarm()
@@ -145,6 +146,8 @@
if (!_colorScheme.isEmpty()) {
KSimpleConfig config( _colorScheme, true );
config.setGroup( "Color Scheme" );
+ flagAlternateBackground = true;
+ gAlternateBackground = config.readColorEntry( "alternateBackground" );
app.setPalette( app.createApplicationPalette( &config, 7 ) );
}
diff -ur kdebase-3.5.6/kdm/kfrontend/kgreeter.cpp kdebase-3.5.6-kdm-alternatebackground/kdm/kfrontend/kgreeter.cpp
--- kdebase-3.5.6/kdm/kfrontend/kgreeter.cpp 2006-10-01 19:32:15.000000000 +0200
+++ kdebase-3.5.6-kdm-alternatebackground/kdm/kfrontend/kgreeter.cpp 2007-05-11 15:26:44.000000000 +0200
@@ -54,6 +54,7 @@
#include <qtooltip.h>
#include <qaccel.h>
#include <qeventloop.h>
+#include <qcolor.h>
#include <pwd.h>
#include <grp.h>
@@ -63,12 +64,17 @@
#include <X11/Xlib.h>
+bool flagAlternateBackground;
+QColor gAlternateBackground;
+
class UserListView : public KListView {
public:
UserListView( QWidget *parent = 0, const char *name = 0 )
: KListView( parent, name )
, cachedSizeHint( -1, 0 )
{
+ if (flagAlternateBackground)
+ setAlternateBackground( gAlternateBackground );
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
header()->hide();
addColumn( QString::null );
diff -ur kdebase-3.5.6/kdm/kfrontend/kgreeter.h kdebase-3.5.6-kdm-alternatebackground/kdm/kfrontend/kgreeter.h
--- kdebase-3.5.6/kdm/kfrontend/kgreeter.h 2005-10-10 17:04:31.000000000 +0200
+++ kdebase-3.5.6-kdm-alternatebackground/kdm/kfrontend/kgreeter.h 2007-05-11 15:25:28.000000000 +0200
@@ -26,6 +26,8 @@
#ifndef KGREETER_H
#define KGREETER_H
+#include <qcolor.h>
+
#include "kgverify.h"
#include "kgdialog.h"
@@ -42,6 +44,9 @@
class QPopupMenu;
class QListViewItem;
+extern bool flagAlternateBackground;
+extern QColor gAlternateBackground;
+
struct SessType {
QString name, type;
bool hid;
kdebase-3.5.7-kde#83974.patch:
--- NEW FILE kdebase-3.5.7-kde#83974.patch ---
--- branches/KDE/3.5/kdebase/konsole/konsole/main.cpp 2007/05/29 14:31:54 669487
+++ branches/KDE/3.5/kdebase/konsole/konsole/main.cpp 2007/05/29 14:32:54 669488
@@ -46,18 +46,15 @@
#include "konsole.h"
-// COMPOSITE disabled by default because the QApplication constructor
-// needed to enable the ARGB32 visual has undesired side effects.
-//#if 0
#if defined(Q_WS_X11) && defined(HAVE_XRENDER) && QT_VERSION >= 0x030300
#define COMPOSITE
#endif
-//#endif
#ifdef COMPOSITE
# include <X11/Xlib.h>
# include <X11/extensions/Xrender.h>
# include <fixx11h.h>
+# include <dlfcn.h>
#endif
static const char description[] =
@@ -255,47 +252,62 @@
if( qtargs->isSet("font") )
kdWarning() << "The Qt option -fn, --font has no effect." << endl;
+ KApplication* a = NULL;
#ifdef COMPOSITE
- char *display = 0;
- if ( qtargs->isSet("display"))
- display = qtargs->getOption( "display" ).data();
-
- Display *dpy = XOpenDisplay( display );
- if ( !dpy ) {
- kdError() << "cannot connect to X server " << display << endl;
- exit( 1 );
- }
-
- int screen = DefaultScreen( dpy );
- Colormap colormap = 0;
- Visual *visual = 0;
- int event_base, error_base;
-
- if ( args->isSet("real-transparency") && XRenderQueryExtension( dpy, &event_base, &error_base ) )
- {
- int nvi;
- XVisualInfo templ;
- templ.screen = screen;
- templ.depth = 32;
- templ.c_class = TrueColor;
- XVisualInfo *xvi = XGetVisualInfo( dpy, VisualScreenMask | VisualDepthMask
- | VisualClassMask, &templ, &nvi );
-
- for ( int i = 0; i < nvi; i++ ) {
- XRenderPictFormat *format = XRenderFindVisualFormat( dpy, xvi[i].visual );
- if ( format->type == PictTypeDirect && format->direct.alphaMask ) {
- visual = xvi[i].visual;
- colormap = XCreateColormap( dpy, RootWindow( dpy, screen ), visual, AllocNone );
- kdDebug() << "found visual with alpha support" << endl;
- argb_visual = true;
- break;
+ if ( args->isSet("real-transparency")) {
+ char *display = 0;
+ if ( qtargs->isSet("display"))
+ display = qtargs->getOption( "display" ).data();
+
+ Display *dpy = XOpenDisplay( display );
+ if ( !dpy ) {
+ kdError() << "cannot connect to X server " << display << endl;
+ exit( 1 );
+ }
+
+ int screen = DefaultScreen( dpy );
+ Colormap colormap = 0;
+ Visual *visual = 0;
+ int event_base, error_base;
+
+ if ( XRenderQueryExtension( dpy, &event_base, &error_base ) ) {
+ int nvi;
+ XVisualInfo templ;
+ templ.screen = screen;
+ templ.depth = 32;
+ templ.c_class = TrueColor;
+ XVisualInfo *xvi = XGetVisualInfo( dpy, VisualScreenMask | VisualDepthMask
+ | VisualClassMask, &templ, &nvi );
+
+ for ( int i = 0; i < nvi; i++ ) {
+ XRenderPictFormat *format = XRenderFindVisualFormat( dpy, xvi[i].visual );
+ if ( format->type == PictTypeDirect && format->direct.alphaMask ) {
+ visual = xvi[i].visual;
+ colormap = XCreateColormap( dpy, RootWindow( dpy, screen ), visual, AllocNone );
+ kdDebug() << "found visual with alpha support" << endl;
+ argb_visual = true;
+ break;
+ }
}
}
- }
+ // The QApplication ctor used is normally intended for applications not using Qt
+ // as the primary toolkit (e.g. Motif apps also using Qt), with some slightly
+ // unpleasant side effects (e.g. #83974). This code checks if qt-copy patch #0078
+ // is applied, which allows turning this off.
+ bool* qt_no_foreign_hack = static_cast< bool* >( dlsym( RTLD_DEFAULT, "qt_no_foreign_hack" ));
+ if( qt_no_foreign_hack )
+ *qt_no_foreign_hack = true;
+ // else argb_visual = false ... ? *shrug*
- KApplication a( dpy, Qt::HANDLE( visual ), Qt::HANDLE( colormap ) );
+ if( argb_visual )
+ a = new KApplication( dpy, Qt::HANDLE( visual ), Qt::HANDLE( colormap ) );
+ else
+ XCloseDisplay( dpy );
+ }
+ if( a == NULL )
+ a = new KApplication;
#else
- KApplication a;
+ KApplication* a = new KApplication;
#endif
QString dataPathBase = KStandardDirs::kde_default("data").append("konsole/");
@@ -351,7 +363,7 @@
fixed_size = !args->isSet("resize");
if (!full_script)
- a.dcopClient()->setQtBridgeEnabled(false);
+ a->dcopClient()->setQtBridgeEnabled(false);
QCString type = "";
@@ -467,13 +479,13 @@
putenv((char*)"COLORTERM="); // to trigger mc's color detection
KonsoleSessionManaged ksm;
- if (a.isRestored() || !profile.isEmpty())
+ if (a->isRestored() || !profile.isEmpty())
{
if (!shell)
shell = konsole_shell(eargs);
if (profile.isEmpty())
- sessionconfig = a.sessionConfig();
+ sessionconfig = a->sessionConfig();
sessionconfig->setDesktopGroup();
int n = 1;
@@ -629,7 +641,7 @@
m->setAutoClose(auto_close);
}
- int ret = a.exec();
+ int ret = a->exec();
//// Temporary code, waiting for Qt to do this properly
@@ -654,6 +666,8 @@
delete w;
}
delete list;
+
+ delete a;
return ret;
}
kdebase-3.5.7-kio_media_mounthelper.patch:
--- NEW FILE kdebase-3.5.7-kio_media_mounthelper.patch ---
--- kdebase-3.5.7/kioslave/media/mediamanager/halbackend.cpp.orig 2007-08-30 14:45:33.000000000 +0200
+++ kdebase-3.5.7/kioslave/media/mediamanager/halbackend.cpp 2007-08-30 15:03:16.000000000 +0200
@@ -990,8 +990,11 @@
QString HALBackend::listUsingProcesses(const Medium* medium)
{
- QString proclist, fullmsg;
- QString cmdline = QString("/usr/bin/env fuser -vm %1 2>&1").arg(KProcess::quote(medium->mountPoint()));
+ QString proclist, fullmsg, cmdline;
+ if(QFile::exists("/sbin/fuser"))
+ cmdline = QString("/sbin/fuser -vm %1 2>&1").arg(KProcess::quote(medium->mountPoint()));
+ else
+ cmdline = QString("/usr/bin/env fuser -vm %1 2>&1").arg(KProcess::quote(medium->mountPoint()));
FILE *fuser = popen(cmdline.latin1(), "r");
uint counter = 0;
kdebase-3.5.7-konsolesu.patch:
--- NEW FILE kdebase-3.5.7-konsolesu.patch ---
--- kdebase-3.5.7/konsole/konsolesu.desktop.orig 2007-09-27 13:47:40.000000000 +0200
+++ kdebase-3.5.7/konsole/konsolesu.desktop 2007-09-27 13:49:40.000000000 +0200
@@ -1,7 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
-Exec=konsole --type su
+Exec=kdesu konsole
Icon=konsole
DocPath=konsole/index.html
MimeType=application/x-konsole
kdebase-3.5.8-consolekit-kdm.patch:
--- NEW FILE kdebase-3.5.8-consolekit-kdm.patch ---
diff -up kdebase-3.5.8/kdm/configure.in.in.consolekit kdebase-3.5.8/kdm/configure.in.in
--- kdebase-3.5.8/kdm/configure.in.in.consolekit 2006-01-19 11:03:15.000000000 -0600
+++ kdebase-3.5.8/kdm/configure.in.in 2007-11-28 14:08:22.000000000 -0600
@@ -240,4 +240,51 @@ if test "x$with_kdm_xconsole" = xyes; th
AC_DEFINE(WITH_KDM_XCONSOLE, 1, [Build kdm with built-in xconsole])
fi
+########### Check for DBus
+
+ AC_MSG_CHECKING(for DBus)
+
+ dbus_inc=NOTFOUND
+ dbus_lib=NOTFOUND
+ dbus=NOTFOUND
+
+ search_incs="$kde_includes $kde_extra_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
+ AC_FIND_FILE(dbus/dbus.h, $search_incs, dbus_incdir)
+
+ search_incs_arch_deps="$kde_includes $kde_extra_includes /usr/lib$kdelibsuff/dbus-1.0/include /usr/local/lib$kdelibsuff/dbus-1.0/include"
+ AC_FIND_FILE(dbus/dbus-arch-deps.h, $search_incs_arch_deps, dbus_incdir_arch_deps)
+
+ if test -r $dbus_incdir/dbus/dbus.h && test -r $dbus_incdir_arch_deps/dbus/dbus-arch-deps.h ; then
+ DBUS_INCS="-I$dbus_incdir -I$dbus_incdir_arch_deps"
+ dbus_inc=FOUND
+ fi
+
+ search_libs="$kde_libraries $kde_extra_libs /usr/lib$kdelibsuff /usr/local/lib$kdelibsuff"
+ AC_FIND_FILE(libdbus-1.so, $search_libs, dbus_libdir)
+
+ if test -r $dbus_libdir/libdbus-1.so ; then
+ DBUS_LIBS="-L$dbus_libdir -ldbus-1"
+ dbus_lib=FOUND
+ fi
+
+ if test $dbus_inc != FOUND || test $dbus_lib != FOUND ; then
+ KDE_PKG_CHECK_MODULES( DBUS, "dbus-1", [ DBUS_INCS=$DBUS_CFLAGS; dbus_inc=FOUND; dbus_lib=FOUND; ] , AC_MSG_RESULT( Nothing found on PKG_CONFIG_PATH ) )
+ fi
+
+ dbus_bus_var=`pkg-config --variable=system_bus_default_address dbus-1 2>/dev/null`
+ if test -z "$dbus_bus_var"; then
+ dbus_bus_var="unix:path=/var/run/dbus/system_bus_socket"
+ fi
+ AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS, "$dbus_bus_var", [Define the unix domain path for dbus system bus])
+
+ if test $dbus_inc = FOUND && test $dbus_lib = FOUND ; then
+ AC_MSG_RESULT(headers $DBUS_INCS libraries $DBUS_LIBS)
+ dbus=FOUND
+ else
+ AC_MSG_RESULT(searched but not found)
+ fi
+
+ AC_SUBST(DBUS_INCS)
+ AC_SUBST(DBUS_LIBS)
+
dnl AC_OUTPUT(kdm/kfrontend/sessions/kde.desktop)
diff -up /dev/null kdebase-3.5.8/kdm/backend/consolekit.h
--- /dev/null 2007-11-13 08:47:25.891060497 -0600
+++ kdebase-3.5.8/kdm/backend/consolekit.h 2007-11-28 14:08:22.000000000 -0600
@@ -0,0 +1,36 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2006 William Jon McCann <mccann at jhu.edu>
+ * Copyright (C) 2007 Kevin Kofler <Kevin at tigcc.ticalc.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef __CONSOLE_KIT_H
+#define __CONSOLE_KIT_H
+
+#include <pwd.h>
+
+struct display;
+
+char * open_ck_session (struct passwd *pwent,
+ struct display *display);
+void close_ck_session (const char *cookie);
+void unlock_ck_session (const char *user,
+ const char *x11_display);
+
+#endif /* __CONSOLE_KIT_H */
diff -up kdebase-3.5.8/kdm/backend/session.c.consolekit kdebase-3.5.8/kdm/backend/session.c
--- kdebase-3.5.8/kdm/backend/session.c.consolekit 2007-10-08 04:51:33.000000000 -0500
+++ kdebase-3.5.8/kdm/backend/session.c 2007-11-28 14:13:05.000000000 -0600
@@ -45,6 +45,10 @@ from the copyright holder.
#include <ctype.h>
#include <signal.h>
+#ifdef WITH_CONSOLE_KIT
+#include "consolekit.h"
+#endif
+
struct display *td;
const char *td_setup = "auto";
@@ -526,6 +530,10 @@ ManageSession( struct display *d )
int ex, cmd;
volatile int clientPid = 0;
volatile Time_t tdiff = 0;
+#ifdef WITH_CONSOLE_KIT
+ char *ck_session_cookie;
+#endif
+
td = d;
Debug( "ManageSession %s\n", d->name );
@@ -622,7 +630,12 @@ ManageSession( struct display *d )
if (td_setup)
SetupDisplay( td_setup );
+#ifdef WITH_CONSOLE_KIT
+ ck_session_cookie = open_ck_session (getpwnam(curuser), d);
+ if (!(clientPid = StartClient(ck_session_cookie))) {
+#else
if (!(clientPid = StartClient())) {
+#endif
LogError( "Client start failed\n" );
SessionExit( EX_NORMAL ); /* XXX maybe EX_REMANAGE_DPY? -- enable in dm.c! */
}
@@ -644,6 +657,14 @@ ManageSession( struct display *d )
catchTerm( SIGTERM );
}
}
+
+#ifdef WITH_CONSOLE_KIT
+ if (ck_session_cookie != NULL) {
+ close_ck_session (ck_session_cookie);
+ free (ck_session_cookie);
+ }
+#endif
+
/*
* Sometimes the Xsession somehow manages to exit before
* a server crash is noticed - so we sleep a bit and wait
diff -up kdebase-3.5.8/kdm/backend/dm.h.consolekit kdebase-3.5.8/kdm/backend/dm.h
--- kdebase-3.5.8/kdm/backend/dm.h.consolekit 2005-09-10 03:26:12.000000000 -0500
+++ kdebase-3.5.8/kdm/backend/dm.h 2007-11-28 14:08:22.000000000 -0600
@@ -37,6 +37,8 @@ from the copyright holder.
#ifndef _DM_H_
#define _DM_H_ 1
+#define WITH_CONSOLE_KIT
+
#include "greet.h"
#include <config.ci>
@@ -476,7 +478,11 @@ char **GRecvArgv( void );
#define GCONV_BINARY 5
typedef char *(*GConvFunc)( int what, const char *prompt );
int Verify( GConvFunc gconv, int rootok );
+#ifdef WITH_CONSOLE_KIT
+int StartClient( const char *ck_session_cookie );
+#else
int StartClient( void );
+#endif
void SessionExit( int status ) ATTR_NORETURN;
int ReadDmrc( void );
extern char **userEnviron, **systemEnviron;
diff -up kdebase-3.5.8/kdm/backend/xdmcp.c.consolekit kdebase-3.5.8/kdm/backend/xdmcp.c
--- kdebase-3.5.8/kdm/backend/xdmcp.c.consolekit 2006-07-22 03:15:55.000000000 -0500
+++ kdebase-3.5.8/kdm/backend/xdmcp.c 2007-11-28 14:08:22.000000000 -0600
@@ -924,6 +924,9 @@ manage( struct sockaddr *from, int froml
}
d->clientAddr = clientAddress;
d->connectionType = connectionType;
+ d->remoteHost = NetworkAddressToHostname (pdpy->connectionType,
+ &pdpy->connectionAddress);
+
XdmcpDisposeARRAY8( &clientPort );
if (pdpy->fileAuthorization) {
d->authorizations = (Xauth **)Malloc( sizeof(Xauth *) );
diff -up /dev/null kdebase-3.5.8/kdm/backend/consolekit.c
--- /dev/null 2007-11-13 08:47:25.891060497 -0600
+++ kdebase-3.5.8/kdm/backend/consolekit.c 2007-11-28 14:08:22.000000000 -0600
@@ -0,0 +1,557 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2006-2007 William Jon McCann <mccann at jhu.edu>
+ * Copyright (C) 2007 Kevin Kofler <Kevin at tigcc.ticalc.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "dm.h"
+#include "dm_auth.h"
+#include "dm_error.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <pwd.h>
+
+#define DBUS_API_SUBJECT_TO_CHANGE
+#include <dbus/dbus.h>
+
+#include "consolekit.h"
+
+
+#define CK_NAME "org.freedesktop.ConsoleKit"
+#define CK_PATH "/org/freedesktop/ConsoleKit"
+#define CK_INTERFACE "org.freedesktop.ConsoleKit"
+#define CK_MANAGER_PATH "/org/freedesktop/ConsoleKit/Manager"
+#define CK_MANAGER_INTERFACE "org.freedesktop.ConsoleKit.Manager"
+#define CK_SESSION_INTERFACE "org.freedesktop.ConsoleKit.Session"
+
+static DBusConnection *private_connection = NULL;
+
+static void
+add_param_int (DBusMessageIter *iter_struct,
+ const char *key,
+ int value)
+{
+ DBusMessageIter iter_struct_entry;
+ DBusMessageIter iter_var;
+
+ dbus_message_iter_open_container (iter_struct,
+ DBUS_TYPE_STRUCT,
+ NULL,
+ &iter_struct_entry);
+
+ dbus_message_iter_append_basic (&iter_struct_entry,
+ DBUS_TYPE_STRING,
+ &key);
+
+ dbus_message_iter_open_container (&iter_struct_entry,
+ DBUS_TYPE_VARIANT,
+ DBUS_TYPE_INT32_AS_STRING,
+ &iter_var);
+
+ dbus_message_iter_append_basic (&iter_var,
+ DBUS_TYPE_INT32,
+ &value);
+
+ dbus_message_iter_close_container (&iter_struct_entry,
+ &iter_var);
+
+ dbus_message_iter_close_container (iter_struct, &iter_struct_entry);
+}
+
+static void
+add_param_boolean (DBusMessageIter *iter_struct,
+ const char *key,
+ int value)
+{
+ DBusMessageIter iter_struct_entry;
+ DBusMessageIter iter_var;
+
+ dbus_message_iter_open_container (iter_struct,
+ DBUS_TYPE_STRUCT,
+ NULL,
+ &iter_struct_entry);
+
+ dbus_message_iter_append_basic (&iter_struct_entry,
+ DBUS_TYPE_STRING,
+ &key);
+
+ dbus_message_iter_open_container (&iter_struct_entry,
+ DBUS_TYPE_VARIANT,
+ DBUS_TYPE_BOOLEAN_AS_STRING,
+ &iter_var);
+
+ dbus_message_iter_append_basic (&iter_var,
+ DBUS_TYPE_BOOLEAN,
+ &value);
+
+ dbus_message_iter_close_container (&iter_struct_entry,
+ &iter_var);
+
+ dbus_message_iter_close_container (iter_struct, &iter_struct_entry);
+}
+
+static void
+add_param_string (DBusMessageIter *iter_struct,
+ const char *key,
+ const char *value)
+{
+ DBusMessageIter iter_struct_entry;
+ DBusMessageIter iter_var;
+
+ dbus_message_iter_open_container (iter_struct,
+ DBUS_TYPE_STRUCT,
+ NULL,
+ &iter_struct_entry);
+
+ dbus_message_iter_append_basic (&iter_struct_entry,
+ DBUS_TYPE_STRING,
+ &key);
+
+ dbus_message_iter_open_container (&iter_struct_entry,
+ DBUS_TYPE_VARIANT,
+ DBUS_TYPE_STRING_AS_STRING,
+ &iter_var);
+
+ dbus_message_iter_append_basic (&iter_var,
+ DBUS_TYPE_STRING,
+ &value);
+
+ dbus_message_iter_close_container (&iter_struct_entry,
+ &iter_var);
+
+ dbus_message_iter_close_container (iter_struct, &iter_struct_entry);
+}
+
+static int
+session_get_x11_display (DBusConnection *connection,
+ const char *ssid,
+ char **str)
+{
+ DBusError error;
+ DBusMessage *message;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+ const char *value;
+
+ if (str != NULL) {
+ *str = NULL;
+ }
+
+ message = dbus_message_new_method_call (CK_NAME,
+ ssid,
+ CK_SESSION_INTERFACE,
+ "GetX11Display");
+ if (message == NULL) {
+ Debug ("ConsoleKit: Couldn't allocate the D-Bus message");
+ return FALSE;
+ }
+
+ dbus_error_init (&error);
+ reply = dbus_connection_send_with_reply_and_block (connection,
+ message,
+ -1, &error);
+ if (dbus_error_is_set (&error)) {
+ Debug ("ConsoleKit: %s raised:\n %s\n\n", error.name, error.message);
+ reply = NULL;
+ }
+
+ dbus_connection_flush (connection);
+ dbus_message_unref (message);
+
+ if (reply == NULL) {
+ return FALSE;
+ }
+
+ dbus_message_iter_init (reply, &iter);
+ dbus_message_iter_get_basic (&iter, &value);
+ if (str != NULL) {
+ *str = strdup (value);
+ }
+ dbus_message_unref (reply);
+
+ return TRUE;
+}
+
+static int
+session_unlock (DBusConnection *connection,
+ const char *ssid)
+{
+ DBusError error;
+ DBusMessage *message;
+ DBusMessage *reply;
+
+ Debug ("ConsoleKit: Unlocking session %s", ssid);
+ message = dbus_message_new_method_call (CK_NAME,
+ ssid,
+ CK_SESSION_INTERFACE,
+ "Unlock");
+ if (message == NULL) {
+ Debug ("ConsoleKit: Couldn't allocate the D-Bus message");
+ return FALSE;
+ }
+
+ dbus_error_init (&error);
+ reply = dbus_connection_send_with_reply_and_block (connection,
+ message,
+ -1, &error);
+ dbus_message_unref (message);
+ dbus_message_unref (reply);
+ dbus_connection_flush (connection);
+
+ if (dbus_error_is_set (&error)) {
+ Debug ("ConsoleKit: %s raised:\n %s\n\n", error.name, error.message);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/* from libhal */
+static char **
+get_path_array_from_iter (DBusMessageIter *iter,
+ int *num_elements)
+{
+ int count;
+ char **buffer;
+
+ count = 0;
+ buffer = (char **)malloc (sizeof (char *) * 8);
+
+ if (buffer == NULL)
+ goto oom;
+
+ buffer[0] = NULL;
+ while (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_OBJECT_PATH) {
+ const char *value;
+ char *str;
+
+ if ((count % 8) == 0 && count != 0) {
+ buffer = realloc (buffer, sizeof (char *) * (count + 8));
+ if (buffer == NULL)
+ goto oom;
+ }
+
+ dbus_message_iter_get_basic (iter, &value);
+ str = strdup (value);
+ if (str == NULL)
+ goto oom;
+
+ buffer[count] = str;
+
+ dbus_message_iter_next (iter);
+ count++;
+ }
+
+ if ((count % 8) == 0) {
+ buffer = realloc (buffer, sizeof (char *) * (count + 1));
+ if (buffer == NULL)
+ goto oom;
+ }
+
+ buffer[count] = NULL;
+ if (num_elements != NULL)
+ *num_elements = count;
+ return buffer;
+
+oom:
+ LogWarn ("%s %d : error allocating memory\n", __FILE__, __LINE__);
+ return NULL;
+
+}
+
+static char **
+get_sessions_for_user (DBusConnection *connection,
+ const char *user,
+ const char *x11_display)
+{
+ DBusError error;
+ DBusMessage *message;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+ DBusMessageIter iter_reply;
+ DBusMessageIter iter_array;
+ struct passwd *pwent;
+ char **sessions;
+
+ sessions = NULL;
+ message = NULL;
+ reply = NULL;
+
+ pwent = getpwnam (user);
+
+ dbus_error_init (&error);
+ message = dbus_message_new_method_call (CK_NAME,
+ CK_MANAGER_PATH,
+ CK_MANAGER_INTERFACE,
+ "GetSessionsForUser");
+ if (message == NULL) {
+ Debug ("ConsoleKit: Couldn't allocate the D-Bus message");
+ goto out;
+ }
+
+ dbus_message_iter_init_append (message, &iter);
+ dbus_message_iter_append_basic (&iter,
+ DBUS_TYPE_UINT32,
+ &pwent->pw_uid);
+
+ dbus_error_init (&error);
+ reply = dbus_connection_send_with_reply_and_block (connection,
+ message,
+ -1, &error);
+ dbus_connection_flush (connection);
+
+ if (dbus_error_is_set (&error)) {
+ Debug ("ConsoleKit: %s raised:\n %s\n\n", error.name, error.message);
+ goto out;
+ }
+
+ if (reply == NULL) {
+ Debug ("ConsoleKit: No reply for GetSessionsForUser");
+ goto out;
+ }
+
+ dbus_message_iter_init (reply, &iter_reply);
+ if (dbus_message_iter_get_arg_type (&iter_reply) != DBUS_TYPE_ARRAY) {
+ Debug ("ConsoleKit: Wrong reply for GetSessionsForUser - expecting an array.");
+ goto out;
+ }
+
+ dbus_message_iter_recurse (&iter_reply, &iter_array);
+ sessions = get_path_array_from_iter (&iter_array, NULL);
+
+ out:
+ if (message != NULL) {
+ dbus_message_unref (message);
+ }
+ if (reply != NULL) {
+ dbus_message_unref (reply);
+ }
+
+ return sessions;
+}
+
+void
+unlock_ck_session (const char *user,
+ const char *x11_display)
+{
+ DBusError error;
+ DBusConnection *connection;
+ char **sessions;
+ int i;
+
+ Debug ("ConsoleKit: Unlocking session for %s on %s", user, x11_display);
+
+ dbus_error_init (&error);
+ connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
+ if (connection == NULL) {
+ Debug ("ConsoleKit: Failed to connect to the D-Bus daemon: %s", error.message);
+ dbus_error_free (&error);
+ return;
+ }
+
+ sessions = get_sessions_for_user (connection, user, x11_display);
+ if (sessions == NULL || sessions[0] == NULL) {
+ Debug ("ConsoleKit: no sessions found");
+ return;
+ }
+
+ for (i = 0; sessions[i] != NULL; i++) {
+ char *ssid;
+ char *xdisplay;
+
+ ssid = sessions[i];
+ session_get_x11_display (connection, ssid, &xdisplay);
+ Debug ("ConsoleKit: session %s has DISPLAY %s", ssid, xdisplay);
+
+ if (xdisplay != NULL
+ && x11_display != NULL
+ && strcmp (xdisplay, x11_display) == 0) {
+ int res;
+
+ res = session_unlock (connection, ssid);
+ if (! res) {
+ LogError ("ConsoleKit: Unable to unlock %s", ssid);
+ }
+ }
+
+ free (xdisplay);
+ }
+
+ freeStrArr (sessions);
+}
+
+char *
+open_ck_session (struct passwd *pwent,
+ struct display *d)
+{
+ DBusConnection *connection;
+ DBusError error;
+ DBusMessage *message;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+ DBusMessageIter iter_struct;
+ char *cookie;
+
+ cookie = NULL;
+
+ if (pwent == NULL) {
+ Debug ("ConsoleKit: NULL user passed as parameter");
+ return NULL;
+ }
+
+ Debug ("ConsoleKit: Opening session for %s", pwent->pw_name);
+
+ dbus_error_init (&error);
+ connection = dbus_bus_get_private (DBUS_BUS_SYSTEM, &error);
+ private_connection = connection;
+
+ if (connection == NULL) {
+ Debug ("ConsoleKit: Failed to connect to the D-Bus daemon: %s", error.message);
+ dbus_error_free (&error);
+ return NULL;
+ }
+
+ dbus_connection_set_exit_on_disconnect (connection, FALSE);
+ /* FIXME: What to do about these?
+ dbus_connection_set_watch_functions( connection,
+ dbusAddWatch,
+ dbusRemoveWatch,
+ dbusToggleWatch,
+ data, 0 );
+ dbus_connection_set_timeout_functions( connection,
+ dbusAddTimeout,
+ dbusRemoveTimeout,
+ dbusToggleTimeout,
+ data, 0 );
+ dbus_connection_set_wakeup_main_function( connection,
+ dbusWakeupMain,
+ data, 0 ); */
+
+ dbus_error_init (&error);
+ message = dbus_message_new_method_call (CK_NAME,
+ CK_MANAGER_PATH,
+ CK_MANAGER_INTERFACE,
+ "OpenSessionWithParameters");
+ if (message == NULL) {
+ Debug ("ConsoleKit: Couldn't allocate the D-Bus message");
+ return NULL;
+ }
+
+ dbus_message_iter_init_append (message, &iter);
+ dbus_message_iter_open_container (&iter,
+ DBUS_TYPE_ARRAY,
+ DBUS_STRUCT_BEGIN_CHAR_AS_STRING
+ DBUS_TYPE_STRING_AS_STRING
+ DBUS_TYPE_VARIANT_AS_STRING
+ DBUS_STRUCT_END_CHAR_AS_STRING,
+ &iter_struct);
+
+ add_param_int (&iter_struct, "user", pwent->pw_uid);
+ add_param_string (&iter_struct, "x11-display", d->name);
+ add_param_boolean (&iter_struct, "is-local", ((d->displayType & d_location) == dLocal));
+#ifdef XDMCP
+ if ((d->displayType & d_location) != dLocal) {
+ add_param_string (&iter_struct, "remote-host-name", d->remoteHost);
+ }
+#endif
+
+#ifdef HAVE_VTS
+ if (d->serverVT > 0) {
+ char device[20];
+
+ /* FIXME: how does xorg construct this */
+ sprintf(device, "/dev/tty%d", d->serverVT);
+ add_param_string (&iter_struct, "x11-display-device", device);
+ }
+#endif
+
+ dbus_message_iter_close_container (&iter, &iter_struct);
+
+ reply = dbus_connection_send_with_reply_and_block (connection,
+ message,
+ -1, &error);
+ if (dbus_error_is_set (&error)) {
+ Debug ("ConsoleKit: %s raised:\n %s\n\n", error.name, error.message);
+ reply = NULL;
+ }
+
+ dbus_connection_flush (connection);
+
+ dbus_message_unref (message);
+ dbus_error_free (&error);
+
+ if (reply != NULL) {
+ const char *value;
+
+ dbus_message_iter_init (reply, &iter);
+ dbus_message_iter_get_basic (&iter, &value);
+ cookie = strdup (value);
+ dbus_message_unref (reply);
+ }
+
+ return cookie;
+}
+
+void
+close_ck_session (const char *cookie)
+{
+ DBusError error;
+ DBusMessage *message;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+
+ if (cookie == NULL) {
+ return;
+ }
+
+ if (private_connection == NULL) {
+ return;
+ }
+
+ dbus_error_init (&error);
+ message = dbus_message_new_method_call (CK_NAME,
+ CK_MANAGER_PATH,
+ CK_MANAGER_INTERFACE,
+ "CloseSession");
+ if (message == NULL) {
+ Debug ("ConsoleKit: Couldn't allocate the D-Bus message");
+ return;
+ }
+
+ dbus_message_iter_init_append (message, &iter);
+ dbus_message_iter_append_basic (&iter,
+ DBUS_TYPE_STRING,
+ &cookie);
+
+ reply = dbus_connection_send_with_reply_and_block (private_connection,
+ message,
+ -1, &error);
+ if (dbus_error_is_set (&error)) {
+ Debug ("ConsoleKit: %s raised:\n %s\n\n", error.name, error.message);
+ reply = NULL;
+ }
+
+ dbus_connection_flush (private_connection);
+
+ dbus_message_unref (message);
+ dbus_error_free (&error);
+
+ dbus_connection_close (private_connection);
+ private_connection = NULL;
+}
diff -up kdebase-3.5.8/kdm/backend/Imakefile.consolekit kdebase-3.5.8/kdm/backend/Imakefile
--- kdebase-3.5.8/kdm/backend/Imakefile.consolekit 2005-09-10 03:26:12.000000000 -0500
+++ kdebase-3.5.8/kdm/backend/Imakefile 2007-11-28 14:08:22.000000000 -0600
@@ -155,13 +155,13 @@ PROCTITLE_DEFINES = -DHAS_SETPROCTITLE
netaddr.c reset.c resource.c protodpy.c policy.c \
session.c socket.c streams.c util.c xdmcp.c \
process.c mitauth.c \
- genauth.c access.c choose.c \
+ genauth.c access.c choose.c consolekit.c \
$(XDMAUTHSRCS) $(RPCSRCS) $(KRB5SRCS)
COMMOBJS = auth.o daemon.o server.o dpylist.o dm.o error.o \
netaddr.o reset.o resource.o protodpy.o policy.o \
session.o socket.o streams.o util.o xdmcp.o \
process.o mitauth.o \
- genauth.o access.o choose.o \
+ genauth.o access.o choose.o consolekit.o \
$(XDMAUTHOBJS) $(RPCOBJS) $(KRB5OBJS)
SRCS1 = $(COMMSRCS) client.c
diff -up kdebase-3.5.8/kdm/backend/Makefile.am.consolekit kdebase-3.5.8/kdm/backend/Makefile.am
--- kdebase-3.5.8/kdm/backend/Makefile.am.consolekit 2007-10-08 04:51:33.000000000 -0500
+++ kdebase-3.5.8/kdm/backend/Makefile.am 2007-11-28 14:14:42.000000000 -0600
@@ -1,9 +1,9 @@
# forcibly remove thread-related defines & flags
AUTOMAKE_OPTIONS = foreign
-CPPFLAGS = $(USER_INCLUDES) $(X_INCLUDES) $(KRB4_INCS) $(KRB5_INCS) -I.. -I../..
+CPPFLAGS = $(USER_INCLUDES) $(X_INCLUDES) $(KRB4_INCS) $(KRB5_INCS) $(DBUS_INCS) -I.. -I../..
LDFLAGS = $(USER_LDFLAGS) $(X_LDFLAGS) $(X_RPATH) $(KRB4_RPATH) $(KRB5_RPATH)
LDADD = $(LIB_X11) -lXau $(LIBXDMCP) $(PASSWDLIBS) $(LIBSHADOW) $(LIBGEN) \
- $(LIB_LIBS) $(KRB4_LIBS) $(KRB5_LIBS) $(LIBSOCKET) $(LIBRESOLV) \
+ $(LIB_LIBS) $(KRB4_LIBS) $(KRB5_LIBS) $(DBUS_LIBS) $(LIBSOCKET) $(LIBRESOLV) \
$(LIBUCB) $(LIBUTIL) $(LIBPOSIX4)
bin_PROGRAMS = kdm
@@ -13,6 +13,7 @@ kdm_SOURCES = \
bootman.c \
choose.c \
client.c \
+ consolekit.c \
ctrl.c \
daemon.c \
dm.c \
diff -up kdebase-3.5.8/kdm/backend/client.c.consolekit kdebase-3.5.8/kdm/backend/client.c
--- kdebase-3.5.8/kdm/backend/client.c.consolekit 2007-10-08 04:51:33.000000000 -0500
+++ kdebase-3.5.8/kdm/backend/client.c 2007-11-28 14:08:22.000000000 -0600
@@ -82,6 +82,10 @@ extern int loginsuccess( const char *Use
# include <shadow.h>
#endif
+#ifdef WITH_CONSOLE_KIT
+#include "consolekit.h"
+#endif
+
/*
* Session data, mostly what struct verify_info was for
*/
@@ -1120,8 +1124,13 @@ static int removeSession;
static int removeCreds;
#endif
+#ifdef WITH_CONSOLE_KIT
+int
+StartClient( const char *ck_session_cookie )
+#else
int
StartClient()
+#endif
{
const char *home, *sessargs, *desksess;
char **env, *xma;
@@ -1217,6 +1226,11 @@ StartClient()
if (krbtkfile[0] != '\0')
env = setEnv( env, "KRBTKFILE", krbtkfile );
#endif
+#ifdef WITH_CONSOLE_KIT
+ if (ck_session_cookie != NULL) {
+ env = setEnv ( env, "XDG_SESSION_COOKIE", ck_session_cookie );
+ }
+#endif
userEnviron = inheritEnv( env, envvars );
env = systemEnv( p->pw_name );
systemEnviron = setEnv( env, "HOME", p->pw_dir );
kdebase-3.5.8-gdm-socket.patch:
--- NEW FILE kdebase-3.5.8-gdm-socket.patch ---
--- kdebase-3.5.7/kdmlib/dmctl.cpp.orig 2007-08-20 23:43:58.000000000 +0200
+++ kdebase-3.5.7/kdmlib/dmctl.cpp 2007-08-20 23:44:36.000000000 +0200
@@ -66,7 +66,7 @@
return;
sa.sun_family = AF_UNIX;
if (DMType == GDM)
- strcpy( sa.sun_path, "/tmp/.gdm_socket" );
+ strcpy( sa.sun_path, "/var/run/gdm_socket" );
else {
if ((ptr = strchr( dpy, ':' )))
ptr = strchr( ptr, '.' );
kdebase-3.5.8-konsole-bz#244906.patch:
--- NEW FILE kdebase-3.5.8-konsole-bz#244906.patch ---
diff -up kdebase-3.5.8/konsole/konsole/main.cpp.konsole-bz#244906 kdebase-3.5.8/konsole/konsole/main.cpp
--- kdebase-3.5.8/konsole/konsole/main.cpp.konsole-bz#244906 2007-10-08 04:51:33.000000000 -0500
+++ kdebase-3.5.8/konsole/konsole/main.cpp 2007-10-13 06:59:48.000000000 -0500
@@ -46,9 +46,11 @@
#include "konsole.h"
+#if 0
#if defined(Q_WS_X11) && defined(HAVE_XRENDER) && QT_VERSION >= 0x030300
#define COMPOSITE
#endif
+#endif
#ifdef COMPOSITE
# include <X11/Xlib.h>
kdebase-3.5.8-redhat-startkde.patch:
--- NEW FILE kdebase-3.5.8-redhat-startkde.patch ---
--- kdebase-3.5.7/startkde.redhat 2006-10-02 13:13:29.000000000 +0200
+++ kdebase-3.5.7/startkde 2006-10-10 17:35:53.000000000 +0200
@@ -1,7 +1,54 @@
#!/bin/sh
#
# DEFAULT KDE STARTUP SCRIPT ( KDE-3.5.8 )
-#
+# Modified for Red Hat Linux
+
+unset BLOCK_SIZE # breaks parsing of df output
+shopt -u -o noclobber # allow overwriting of files with '>'
+
+# set up user environment if not present
+# check for space on /tmp and "$HOME" and for write access
+# error exit, if not
+space_tmp=`LANG=C df /tmp | xargs | cut -d" " -f11`
+homedir_mount=`LANG=C df "$HOME" | xargs | cut -d" " -f8`
+
+if [ "$homedir_mount" = "AFS" -a -x "`which fs 2>/dev/null`" ] ; then
+ # check for AFS
+ space_home=`LANG=C fs df "$HOME" | xargs | cut -d" " -f10`
+else
+ # check regular mounts
+ space_home=`LANG=C df "$HOME" | xargs | cut -d" " -f11`
+fi
+
+if [ $space_tmp -lt 50 ]; then
+ echo $"Not enough free disk space on /tmp"
+ exit 1
+fi
+
+if [ $space_home -lt 25 ]; then
+ echo $"Not enough free disk space on "$HOME""
+ exit 1
+fi
+testfile_tmp=`mktemp /tmp/KDE.startkde.XXXXXX`
+testfile_home=`mktemp "$HOME"/KDE.startkde.XXXXXX`
+
+if ! echo TEST_TEXT >$testfile_tmp 2>/dev/null ; then
+ echo $"You don't have write permissions for /tmp"
+ exit 1
+fi
+rm -f $testfile_tmp
+
+if ! echo TEST_TEXT >$testfile_home 2>/dev/null ; then
+ echo $"You don't have write permissions for "$HOME""
+ exit 1
+fi
+rm -f $testfile_home
+
+[ -d "$HOME"/.kde/share/config ] || mkdir -p "$HOME"/.kde/share/config
+
+if [ ! -e "$HOME"/.kde/share/config/emaildefaults ]; then
+ /usr/bin/mailsettings >"$HOME"/.kde/share/config/emaildefaults
+fi
# When the X server dies we get a HUP signal from xinit. We must ignore it
# because we still need to do some cleanup.
@@ -14,12 +61,12 @@
exit 1
fi
-# Set the background to plain grey.
+# Set the background to the Red Hat default blue
# The standard X background is nasty, causing moire effects and exploding
# people's heads. We use colours from the standard KDE palette for those with
# palettised displays.
if test -z "$XDM_MANAGED" || echo "$XDM_MANAGED" | grep ",auto" > /dev/null; then
- xsetroot -solid "#000000"
+ xsetroot -solid "#5477A0"
fi
# we have to unset this for Darwin since it will screw up KDE's dynamic-loading
@@ -61,7 +108,7 @@
cat >$kdehome/share/config/startupconfigkeys <<EOF
kcminputrc Mouse cursorTheme ''
kcminputrc Mouse cursorSize ''
-kpersonalizerrc General FirstLogin true
+kpersonalizerrc General FirstLogin false
ksplashrc KSplash Theme Default
kcmrandrrc Display ApplyOnStartup false
kcmrandrrc [Screen0]
@@ -157,8 +204,8 @@
EOF
fi
-# Source scripts found in <localprefix>/env/*.sh and <prefixes>/env/*.sh
-# (where <localprefix> is $KDEHOME or ~/.kde, and <prefixes> is where KDE is installed)
+# Source scripts found in <localprefix>/env/*.sh and /etc/kde/env/*.sh
+# (where <localprefix> is $KDEHOME or ~/.kde)
#
# This is where you can define environment variables that will be available to
# all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent`
@@ -170,9 +217,10 @@
# better use the Autostart folder.
exepath=`kde-config --path exe | tr : '\n'`
+envpath=/etc/kde/env/
-for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/env/,p'`; do
- for file in "$prefix"*.sh; do
+for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/env/,p'` $envpath ; do
+ for file in "$prefix"*.sh ; do
test -r "$file" && . "$file"
done
done
@@ -378,7 +426,8 @@
echo 'startkde: Running shutdown scripts...' 1>&2
# Run scripts found in $KDEDIRS/shutdown
-for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/shutdown/,p'`; do
+shutdownpath=/etc/kde/shutdown/
+for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/shutdown/,p'` $shutdownpath; do
for file in `ls "$prefix" 2> /dev/null | egrep -v '(~|\.bak)$'`; do
test -x "$prefix$file" && "$prefix$file"
done
kdebase-3.x-shortcuts.patch:
--- NEW FILE kdebase-3.x-shortcuts.patch ---
--- /dev/null 2006-02-15 14:04:20.595741250 +0100
+++ kdebase-3.5.1/kcontrol/ebrowsing/plugins/ikws/searchproviders/bugzilla.desktop 2006-02-01 15:04:12.000000000 +0100
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Service
+Name=Red Hat bug tracking system
+ServiceTypes=SearchProvider
+Keys=rhbug,bz
+Query=http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=\\1
--- kdebase-3.5.1/kcontrol/ebrowsing/plugins/ikws/searchproviders/fedora.desktop.shortcuts 2006-02-15 19:44:30.000000000 +0100
+++ kdebase-3.5.1/kcontrol/ebrowsing/plugins/ikws/searchproviders/fedora.desktop 2006-02-15 19:44:16.000000000 +0100
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Hidden=false
+Keys=fp,fedora
+Name=fedoraproject
+Query=http://fedoraproject.org/wiki/?action=fullsearch&context=180&value=\\{@}&titlesearch=Titles
+ServiceTypes=SearchProvider
+Type=Service
+
--- kdebase-3.5.1/kcontrol/ebrowsing/plugins/ikws/searchproviders/Makefile.am.shortcuts 2005-10-10 17:03:45.000000000 +0200
+++ kdebase-3.5.1/kcontrol/ebrowsing/plugins/ikws/searchproviders/Makefile.am 2006-02-15 19:41:59.000000000 +0100
@@ -11,6 +11,7 @@
backports.desktop \
bugft.desktop \
bugno.desktop \
+ bugzilla.desktop \
call.desktop \
cia.desktop \
citeseer.desktop \
@@ -32,6 +33,7 @@
excite.desktop \
feedster.desktop \
foldoc.desktop \
+ fedora.desktop \
fr2de.desktop \
fr2en.desktop \
freedb.desktop \
--- NEW FILE kdebase3.spec ---
%define debug 0
%define final 1
%define redhatify 1
%define kde_settings 1
%define make_cvs 1
%define arts 1
%if 0%{?fedora} > 7
# make -libs subpkg
%define libs 1
%endif
%if 0%{?fedora} <= 8
# make -extras subpkg
%define extras 1
%endif
Version: 3.5.8
Release: 15%{?dist}
%if 0%{?fedora} > 8
Name: kdebase3
Summary: K Desktop Environment 3 - core files
Obsoletes: kdebase < 6:%{version}-%{release}
Provides: kdebase = 6:%{version}-%{release}
%else
Epoch: 6
Name: kdebase
Summary: K Desktop Environment - core files
Obsoletes: kdebase3 = %{version}-%{release}
Provides: kdebase3 = %{version}-%{release}
%endif
# programs: GPLv2, libs: LGPLv2
License: GPLv2
Url: http://www.kde.org
Group: User Interface/Desktops
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kdebase-%{version}.tar.bz2
Source1: konsole.desktop
Source2: KDE.session.gnome
Source3: kde.desktop
Source4: kde-redhat-config-3.5-fc7-1.tar.bz2
Source5: kde-np.pamd
Source6: logrotate-kdm
Source7: mailsettings.cc
Source8: env.sh
Source9: cr16-app-package_games_kids.png
Source10: cr32-app-package_games_kids.png
Source11: cr48-app-package_games_kids.png
Source12: kderc
Source50: kde-np-legacy.pamd
Source1001: kde.pamd
Source1002: kde-legacy.pamd
Patch0: kdebase-3.5.5-redhat-pam.patch
Patch1: kdebase-%{version}-redhat-startkde.patch
Patch2: kdebase-3.3.92-vroot.patch
Patch3: kdebase-3.x-shortcuts.patch
Patch4: kdebase-3.2.0-keymap.patch
Patch5: kdebase-3.1-startpage.patch
Patch6: kdebase-3.1.3-konsole-double-esc.patch
Patch7: kdebase-3.3.92-kpersonalizer.patch
Patch8: kdebase-3.2.92-logo.patch
Patch10: kdebase-3.4.2-kdesktop-konsole.patch
Patch11: kdebase-3.5.1-xdg.patch
Patch13: kdebase-3.5.5-dbus.patch
Patch14: kdebase-3.5.1-kdm-readme.patch
Patch15: kdebase-3.5.1-konsole-fonts.patch
Patch18: kdebase-3.5.2-kconf_update-klipper.patch
Patch20: kdebase-3.5.5-keyinit.patch
Patch21: kdebase-3.5.3-khelpcenter-sort.patch
Patch22: kdebase-3.5.4-htdig.patch
Patch24: kdebase-3.5.4-tango-icon-theme.patch
Patch25: kdebase-3.5.4-konqueror-shortcut.patch
Patch26: kdebase-3.5.5-suspend.patch
Patch27: kdebase-3.5.8-consolekit-kdm.patch
Patch28: kdebase-3.5.6-kdm-alternatebackground.patch
# FIXME? (still needed?) -- Rex
Patch29: kdebase-3.5.8-konsole-bz#244906.patch
Patch30: kdebase-3.5.7-kio_media_mounthelper.patch
Patch31: kdebase-3.5.7-konsolesu.patch
# upstream patches
# alternative to patch29, requires qt-copy 0078-argb-visual-hack.patch
Patch200: kdebase-3.5.7-kde#83974.patch
# http://bugs.kde.org/show_bug.cgi?id=149045
Patch201: kdebase-3.5.8-gdm-socket.patch
# security fixes
%if 0%{?libs}
Requires: %{name}-libs = %{?epoch:%{epoch}:}%{version}-%{release}
%else
Obsoletes: %{name}-libs < %{?epoch:%{epoch}:}%{version}-%{release}
Provides: %{name}-libs = %{?epoch:%{epoch}:}%{version}-%{release}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%endif
%if 0%{?extras} == 0
Obsoletes: kdebase-extras < 6:%{version}-%{release}
Provides: kdebase-extras = 6:%{version}-%{release}
%endif
Requires(post): coreutils fileutils
Requires(postun): coreutils fileutils
# See http://bugzilla.redhat.com/191306
Requires(hint): htdig
# man2html
Requires(hint): man
# /sbin/fuser
Requires: psmisc
# startkde references: which, xargs
Requires: findutils
Requires: which
%ifnarch s390 s390x
Requires: eject
%endif
%if "%{name}" == "kdebase"
# upgrade path for former kde-redhat'ers
Obsoletes: %{name}-kdm < %{epoch}:%{version}-%{release}
Provides: %{name}-kdm = %{epoch}:%{version}-%{release}
%endif
%if %{kde_settings}
Requires: kde-settings
# FIXME/TODO: Is kde-settings-kdm really not needed in kdebase3?
%if "%{name}" == "kdebase"
# when/if -kdm is ever packaged separately
Requires: kde-settings-kdm
%endif
%else
Requires: xorg-x11-xdm
Requires: desktop-backgrounds-basic
Requires: redhat-menus => 6.7.5
Requires: redhat-artwork-kde >= 7.0.0-8
%endif
BuildRequires: kdelibs3-devel >= %{version}
BuildRequires: libxslt-devel libxml2-devel
%if 0%{?fedora} > 6
BuildRequires: libsmbclient-devel
%else
BuildRequires: samba
%endif
BuildRequires: pam-devel
BuildRequires: gettext
BuildRequires: perl
BuildRequires: sed
%if %{make_cvs}
BuildRequires: automake libtool
%endif
BuildRequires: pkgconfig
BuildRequires: doxygen
%if 0%{?fedora} > 4 || 0%{?rhel} > 4
%ifarch %{ix86} x86_64 ia64 ppc ppc64
%define _with_suspend 1
Requires: pm-utils
%endif
%define _with_hal --with-hal
# dbus >= 0.90, hal >= 0.5 (mock/yum is having problems groking this for me on el5/x86_64) -- Rex
BuildRequires: dbus-devel hal-devel
%endif
BuildRequires: freetype-devel
BuildRequires: openldap-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: libart_lgpl-devel
## X11 support details (xmkmf, bdftopcf)
BuildRequires: xorg-x11-font-utils
%if 0%{?fedora} > 4 || 0%{?rhel} > 4
BuildRequires: imake
BuildRequires: xorg-x11-proto-devel
BuildRequires: libfontenc-devel
BuildRequires: libXScrnSaver-devel
BuildRequires: libXdamage-devel
BuildRequires: libXcomposite-devel
BuildRequires: libXinerama-devel
BuildRequires: libXrandr-devel
BuildRequires: libXrender-devel
BuildRequires: libXfixes-devel
BuildRequires: libXext-devel
BuildRequires: libXtst-devel
BuildRequires: libXxf86misc-devel
BuildRequires: libxkbfile-devel
%endif
%if 0%{?fedora} > 5 || 0%{?rhel} > 4
# See also http://bugzilla.redhat.com/205767
%define _with_libutempter 1
%endif
%ifnarch s390 s390x
BuildRequires: libraw1394-devel
[...2198 lines suppressed...]
* Tue Oct 31 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- Move include files to /usr/include/kde
- Don't install any of the mini-lesstif files, we need them at
build time only
- Fix consolehelper config for kappfinder
* Sat Oct 28 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- Update to KDE_2_0_BRANCH, now that the ".0 release" bugs are fixed
- Get rid of the Red Hat menu, it's merged now
- Fix up the gdm session file
- Fix up kappfinder, run it through consolehelper (Bug #19903)
- Enable Netscape plugin support, add a stripped down version of lesstif
to allow this
* Mon Oct 23 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- 2.0 final
* Sun Oct 1 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- new CVS
- fix installation of fonts
* Sat Sep 23 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- new CVS snapshot
- fix up spec file
* Wed Aug 23 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- get rid of the 3d-screensavers package - now that qt-GL is part of qt,
there's no need to keep them separate to avoid the dependency.
* Mon Aug 21 2000 Than Ngo <than at redhat.com>
- fix gnome-session so that KDE2 can be started from gdm
- pam/kde2 instead pam/kde to avoid problem with KDE1
- don't requires qt-GL, It's now in qt
* Sun Aug 20 2000 Than Ngo <than at redhat.com>
- fix dependency problem with KDE1 so that KDE1 and KDE2 can be installed
at the same time
- add missing ldconfig in %%post and %%postun
- fix for reading config files in /etc/X11/xdm, add Xsession to requires
* Tue Aug 8 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- Fix keytable in konsole (Bug #15682)
* Sun Aug 6 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- rebuild, now that kdelibs2 works on alpha
- use the same ugly hack to get kdebase to compile
- remove ksysguard on alpha (even more compiler problems)
* Fri Aug 4 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- new snapshot (fixed libGL detection in CVS)
* Wed Aug 2 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- move to /usr/lib/kde2
- new snapshot
* Sun Jul 23 2000 Nalin Dahyabhai <nalin at redhat.com>
- fix the --xdmdir arg to be correct (oops)
* Fri Jul 21 2000 Nalin Dahyabhai <nalin at redhat.com>
- move kdm config files from /usr/config to /etc/X11 by forcing xdmdir
* Fri Jul 21 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- new snapshot
- some fixes to spec file
* Tue Jul 18 2000 Than Ngo <than at redhat.de>
- rebuilt against glibc-2.1.92-14, gcc-2.96-40
* Sun Jul 16 2000 Than Ngo <than at redhat.de>
- use new snapshot
- disable Motif
* Tue Jul 11 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- use gcc 2.96
- new snapshot
* Sun Jul 2 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- Epoch 3
- Update to current
- Use egcs++
* Fri Jun 30 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- Update (I put the fixes directly to CVS rather than collecting them
in the spec)
* Fri Jun 23 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- remove man2html; we get that from man
- new snapshot
* Tue Jun 20 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- new snapshot
- ExcludeArch ia64 for now
- remove gnome .desktop file, we get it from gnome-core now.
* Wed Apr 5 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- remove dependency on xpm (now in XFree86)
* Sat Mar 18 2000 Bernhard Rosenkraenzer <bero at redhat.com>
- new snapshot
- move it to /usr, where it belongs
* Sat Dec 25 1999 Bernhard Rosenkraenzer <bero at redhat.com>
- Build the OpenGL screensavers, and move them to a separate package
- Improve the spec file (BuildPrereqs etc.)
* Thu Dec 16 1999 Bernhard Rosenkraenzer <bero at redhat.com>
- remove patch #3 (obsoleted by kwin)
* Sun Oct 24 1999 Bernhard Rosenkraenzer <bero at redhat.de>
- 2.0 CVS snapshot
- fix compilation
* Thu Sep 23 1999 Preston Brown <pbrown at redhat.com>
- clean up files in /tmp from startkde
- mark doc files as such
* Tue Sep 21 1999 Preston Brown <pbrown at redhat.com>
- start autorun if present in startkde
- check for configured soundcard before running sound services
* Mon Sep 20 1999 Preston Brown <pbrown at redhat.com>
- made kdelnks display Name property if they are of type Link
* Thu Sep 16 1999 Preston Brown <pbrown at redhat.com>
- moved png handling here (from kdelibs)
- changed low color icon directory name to locolor
* Tue Sep 14 1999 Preston Brown <pbrown at redhat.com>
- added optional session management to logout dialog
- include GNOME menus
* Mon Sep 13 1999 Preston Brown <pbrown at redhat.com>
- added link to /etc/X11/applnk, .directory file
- included lowcolor icon sub-package
- enable .desktop file access
* Fri Sep 10 1999 Preston Brown <pbrown at redhat.com>
- customized startkde script to set up user environment if not present.
- mention kthememgr in description.
* Wed Sep 08 1999 Preston Brown <pbrown at redhat.com>
- upgraded to 1.1.2 release
- kvt is back
- kde icon included
- linux console fonts included
* Thu Jul 15 1999 Preston Brown <pbrown at redhat.com>
- PAM console logout problem solved.
* Mon Jul 12 1999 Preston Brown <pbrown at redhat.com>
- now includes screensaver password security fix
* Fri Jun 11 1999 Preston Brown <pbrown at redhat.com>
- snapshot, includes kde 1.1.1 + fixes
- kvt removed for security reasons. It is a steaming pile of...
* Mon Apr 19 1999 Preston Brown <pbrown at redhat.com>
- last snapshot before release
* Fri Apr 16 1999 Preston Brown <pbrown at redhat.com>
- today's snapshot makes kfm a bit nicer and some other fixes
- moved default rc files to kdesupport
* Thu Apr 15 1999 Preston Brown <pbrown at redhat.com>
- SUID bit removed from konsole_grantpty -- not needed w/glibc 2.1
* Wed Apr 14 1999 Preston Brown <pbrown at redhat.com>
- built with today's snapshot -- had to rebuild to fix pam problems.
* Tue Apr 13 1999 Preston Brown <pbrown at redhat.com>
- new snapshot fixes mimetype video/x-flic problem
* Mon Apr 12 1999 Preston Brown <pbrown at redhat.com>
- latest stable snapshot
* Fri Apr 09 1999 Preston Brown <pbrown at redhat.com>
- removed bell.xpm (used to be in fvwm2-icons, don't want installer to see
- this previous connection and autoselect kdebase for upgrade).
* Tue Mar 23 1999 Preston Brown <pbrown at redhat.com>
- moved gdm patch
* Mon Mar 22 1999 Preston Brown <pbrown at redhat.com>
- added gdm session control file
* Fri Mar 19 1999 Preston Brown <pbrown at redhat.com>
- added pam-console stuff to kde pam file
* Wed Feb 24 1999 Preston Brown <pbrown at redhat.com>
- Injected new description and group.
* Mon Feb 07 1999 Preston Brown <pbrown at redhat.com>
- upgraded to KDE 1.1 final.
* Tue Jan 19 1999 Preston Brown <pbrown at redhat.com>
- updated macros for RPM 3.0, removed red hat logo.
* Tue Jan 05 1999 Preston Brown <pbrown at redhat.com>
- re-merged from Duncan Haldane's stuff
--- NEW FILE kderc ---
[General]
activeFont=Sans,10,-1,5,50,0,0,0,0,0
background=230,230,230
fixed=Monospace,10,-1,5,50,0,0,0,1,0
font=Sans,10,-1,5,50,0,0,0,0,0
foreground=0,0,0
menuFont=Sans,10,-1,5,50,0,0,0,0,0
selectBackground=76,89,166
selectForeground=255,255,255
taskbarFont=Sans,10,-1,5,50,0,0,0,0,0
toolBarFont=Sans,10,-1,5,50,0,0,0,0,0
windowBackground=255,255,255
windowForeground=0,0,0
StandardFont=Sans,10,-1,5,50,0,0,0,0,0
[DirWatch]
NFSPollInterval=5000
PollInterval=500
--- NEW FILE konsole.desktop ---
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=konsole
Icon=konsole
DocPath=konsole/index.html
Terminal=0
X-KDE-StartupNotify=true
Name=Terminal
Name[am]=á°áááá
Name[ar]=شاشة طرÙÙØ©
Name[az]=Terminal
Name[be]=ТÑÑмÑнал
Name[bg]=ТеÑминал
Name[bn]=à¦à¦¾à¦°à§à¦®à¦¿à¦¨à§à¦¯à¦¾à¦²
Name[ca]=Terminal
Name[cs]=Terminál
Name[cy]=Terfynell
Name[da]=Terminal
Name[de]=Terminal
Name[el]=ΤεÏμαÏικÏ
Name[en_CA]=Terminal
Name[es]=Terminal
Name[et]=Terminal
Name[fa]=پاÛاÙÙ
Name[fi]=Pääte
Name[fr]=Terminal
Name[ga]=Terminéal
Name[gl]=Terminal
Name[he]=×ס××£
Name[hi]=à¤à¤°à¥à¤®à¤¿à¤¨à¤²
Name[hr]=Terminal
Name[hu]=Terminál
Name[id]=Terminal
Name[it]=Terminale
Name[ja]=端æ«
Name[ko]=í°ë¯¸ë
Name[lt]=Terminalas
Name[lv]=TerminÄlis
Name[mk]=ТеÑминал
Name[ml]=à´àµâà´°àµà´®à´¿à´¨à´²àµ
Name[mn]=ТеÑминал
Name[ms]=Terminal
Name[nl]=Terminal
Name[nn]=Terminal
Name[no]=Terminal
Name[pl]=Terminal
Name[pt]=Consola
Name[pt_BR]=Terminal
Name[ro]=Terminal
Name[ru]=ТеÑминал
Name[sk]=Terminál
Name[sl]=Terminal
Name[sq]=Terminali
Name[sr]=ТеÑминал
Name[sr at Latn]=Terminal
Name[sv]=Terminal
Name[ta]=à®®à¯à®©à¯à®¯à®®à¯
Name[th]=à¹à¸à¸à¸£à¹à¸¡à¸´à¸à¸à¸¥
Name[tr]=Terminal
Name[uk]=ТеÑмÑнал
Name[vi]=Terminal
Name[wa]=Terminå
Name[zh_CN]=ç»ç«¯
Name[zh_TW]=çµç«¯æ©
Comment=Command line
Comment[ar]=سطر اÙØ£ÙاÙ
ر
Comment[az]=Æmr sÉtiri
Comment[be]=ÐÐ°Ð³Ð°Ð´Ð½Ñ Ñадок
Comment[bg]=Ðоманден Ñед
Comment[bn]=à¦à¦®à¦¾à¦¨à§à¦¡ লাà¦à¦¨
Comment[ca]=LÃnia d'ordres
Comment[cs]=PÅÃkazový Åádek
Comment[cy]=Llinell orchymyn
Comment[da]=Kommandolinje
Comment[de]=Befehlszeile
Comment[el]=ÎÏαμμή ενÏολÏν
Comment[en_CA]=Command line
Comment[es]=LÃnea de comandos
Comment[et]=Käsurida
Comment[fa]=سطر ÙرÙ
اÙ
Comment[fi]=Komentorivi
Comment[fr]=Ligne de commande
Comment[ga]=LÃne Ordú
Comment[gl]=Liña de comandos
Comment[he]=ש×רת ×פק×××
Comment[hi]=à¤à¤®à¤¾à¤à¤¡ लाà¤à¤¨
Comment[hr]=Ime domene
Comment[hu]=Parancssor
Comment[id]=Perintah
Comment[it]=Riga di comando
Comment[ja]=ã³ãã³ãã»ã©ã¤ã³ç«¯æ«ã§ã
Comment[ko]=ëª
ë ¹ í
Comment[lt]=Komandų eilutÄ
Comment[lv]=Komandrinda
Comment[mk]=Ðомандна линиÑа
Comment[ml]=à´à´àµà´à´¾à´®àµà´à´²
Comment[mn]=ТÑÑаалÑн мөÑ
Comment[ms]=Arahan baris
Comment[nl]=Opdrachtregel
Comment[nn]=Kommandolinje
Comment[no]=Kommandolinje
Comment[pl]=Wiersz poleceÅ
Comment[pt]=Linha de comando
Comment[pt_BR]=Linha de Comando
Comment[ro]=Linie de comandÄ
Comment[ru]=ÐÐ¾Ð¼Ð°Ð½Ð´Ð½Ð°Ñ ÑÑÑока оболоÑки
Comment[sk]=PrÃkazový riadok
Comment[sl]=Ukazna vrstica
Comment[sq]=Rreshti i komandës
Comment[sr]=ÐнÑеÑпÑеÑаÑÐ¾Ñ Ð½Ð°Ñедби
Comment[sr at Latn]=Interpretator naredbi
Comment[sv]=Kommandorad
Comment[ta]=à®à®à¯à®à®³à¯ வரி
Comment[th]=à¸à¸£à¸£à¸à¸±à¸à¸à¸³à¸ªà¸±à¹à¸
Comment[tr]=Komut satırı
Comment[uk]=Ðомандний ÑÑдок
Comment[vi]=Dòng lá»nh
Comment[wa]=Roye di comande
Comment[zh_CN]=å½ä»¤è¡
Comment[zh_TW]=æ令å
X-DCOP-ServiceType=Multi
X-KDE-AuthorizeAction=shell_access
Categories=Qt;Application;KDE;System;TerminalEmulator;X-Red-Hat-Base;
OnlyShowIn=KDE;
--- NEW FILE logrotate-kdm ---
/var/log/kdm.log {
weekly
notifempty
missingok
}
--- NEW FILE mailsettings.cc ---
/* Generate reasonable per-user default settings for kcmemail... *
* (c) 2001 Red Hat, Inc. *
* Programmed by Bernhard Rosenkraenzer <bero at redhat.com> *
* Released under the terms of the GNU GPL v2 or later. *
*/
#include <pwd.h>
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
typedef struct {
char *name;
char *path;
char *param;
bool text;
} mailer;
static mailer mailers[]={
{ "kmail", "/usr/bin/kmail", NULL, false },
{ "/usr/bin/balsa", "/usr/bin/balsa", NULL, false },
{ "/usr/bin/mozilla", "/usr/bin/mozilla", "-mail", false },
{ "/usr/bin/exmh", "/usr/bin/exmh", NULL, false },
{ "/usr/bin/netscape", "/usr/bin/netscape", "-mail", false },
{ "/usr/bin/pine", "/usr/bin/pine", NULL, true },
{ "/usr/bin/mutt", "/usr/bin/mutt", NULL, true },
{ "/bin/mail", "/bin/mail", NULL, true },
{ NULL, NULL, false }
};
int main(int argc, char **argv)
{
FILE *f=stdout;
char *client;
int mailer;
struct passwd *p;
char *emailAddress=0, *fullName=0, *mailSpool=0;
p=getpwuid(getuid());
for(mailer=0; mailers[mailer].path!=NULL; mailer++) {
if(!access(mailers[mailer].path, X_OK))
break;
}
if(mailers[mailer].param) {
client=(char*)malloc(strlen(mailers[mailer].param)+strlen(mailers[mailer].name)+2);
sprintf(client, "%s %s", mailers[mailer].name, mailers[mailer].param);
} else
client=strdup(mailers[mailer].name);
if(p) {
/* Look at the passwd file and take a good guess at the *
* email address... *
* username at domainname.tld is usually a good choice. */
char hostname[1024];
gethostname(hostname, 1024);
if(strchr(hostname, '.') && strchr(hostname, '.') != strrchr(hostname, '.'))
strcpy(hostname, strchr(hostname, '.')+1);
emailAddress=(char*)malloc(strlen(p->pw_name)+strlen(hostname)+2);
sprintf(emailAddress, "%s@%s", p->pw_name, hostname);
fullName=p->pw_gecos;
if(!fullName)
fullName=p->pw_name;
mailSpool=(char*)malloc(strlen(p->pw_name)+11);
sprintf(mailSpool, "/var/mail/%s", p->pw_name);
}
fprintf(f,
"[Defaults]\n"
"Profile=Default\n"
"[PROFILE_Default]\n"
"EmailAddress=%s\n"
"EmailClient=%s\n"
"FullName=%s\n"
"IncomingServer=%s\n"
"IncomingServerType=localbox\n"
"OutgoingCommand=/usr/sbin/sendmail\n"
"OutgoingServerType=local\n"
"TerminalClient=%s\n",
emailAddress ? emailAddress : "",
client ? client : "",
fullName ? fullName : "",
mailSpool ? mailSpool : "" ,
mailers[mailer].text ? "true" : "false");
fclose(f);
free(client);
if(emailAddress)
free(emailAddress);
if(mailSpool)
free(mailSpool);
}
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase3/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 1 Dec 2007 05:13:27 -0000 1.1
+++ .cvsignore 1 Dec 2007 06:52:52 -0000 1.2
@@ -0,0 +1,2 @@
+kde-redhat-config-3.5-fc7-1.tar.bz2
+kdebase-3.5.8.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase3/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 1 Dec 2007 05:13:27 -0000 1.1
+++ sources 1 Dec 2007 06:52:52 -0000 1.2
@@ -0,0 +1,2 @@
+d52f08756a8d3e9df478506bd258a4d8 kde-redhat-config-3.5-fc7-1.tar.bz2
+9990c669229daaaa8fca4c5e354441fd kdebase-3.5.8.tar.bz2
- Previous message (by thread): rpms/kdebase-workspace/devel kdebase-workspace.spec,1.2,1.3
- Next message (by thread): rpms/xchat-ruby/devel xchat-ruby-dont-ignore-cflags.patch, NONE, 1.1 xchat-ruby-global-rubyenv.patch, NONE, 1.1 xchat-ruby.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list