befree-cvs Mailing List for BeFree
Status: Planning
Brought to you by:
plfiorini
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(128) |
Aug
(66) |
Sep
|
Oct
|
Nov
(42) |
Dec
(207) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(62) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Pier L. F. <plf...@us...> - 2005-01-08 10:17:33
|
Update of /cvsroot/befree/panel/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13563 Modified Files: ChangeLog task.h taskicon.cpp tasklistwindow.cpp x11panelwindow.cpp xutils.cpp xutils.h Log Message: Fixes Index: xutils.h =================================================================== RCS file: /cvsroot/befree/panel/src/xutils.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- xutils.h 7 Jan 2005 03:27:54 -0000 1.3 +++ xutils.h 8 Jan 2005 10:17:20 -0000 1.4 @@ -52,7 +52,7 @@ Window xutils_get_group_leader(Window win); QString xutils_get_name(Window win); QString xutils_get_class(Window win); -QPixmap xutils_get_leader_icon(Window leader); +Q_ULONG xutils_get_pid(Window win); QPixmap xutils_get_window_icon(Window win); bool xutils_skip_taskbar(Window win); Index: x11panelwindow.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/x11panelwindow.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- x11panelwindow.cpp 7 Jan 2005 03:27:54 -0000 1.3 +++ x11panelwindow.cpp 8 Jan 2005 10:17:20 -0000 1.4 @@ -96,11 +96,14 @@ } else { - icon = xutils_get_leader_icon(leader); + icon = xutils_get_window_icon(leader); + if (icon.isNull()) + icon = xutils_get_window_icon(win); // Create a new task task = new Task; task->setId(leader); + task->setPid(xutils_get_pid(leader)); // Set name QString className = xutils_get_class(leader); @@ -112,7 +115,8 @@ task->setIcon(icon); // Add this window to its task - TaskWindow taskWin(task, name, icon); + TaskWindow taskWin(task, name, xutils_get_window_icon(win)); + taskWin.setId(win); task->addWindow(taskWin); // Append task to the list Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/panel/src/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ChangeLog 7 Jan 2005 03:27:54 -0000 1.5 +++ ChangeLog 8 Jan 2005 10:17:20 -0000 1.6 @@ -1,10 +1,11 @@ 2005-01-07 Pier Luigi Fiorini <pie...@mo...> + * xutils.cpp (xutils_get_leader_icon): + First check for icon name (using BIconTheme). + * x11panelwindow.cpp (X11PanelWindow::tasksList): First check for leader icon name. - * xutils.cpp (xutils_get_leader_icon): Get leader icon. - * x11panelwindow.cpp (X11PanelWindow::tasksList): Skip if window has "skip taskbar". Index: xutils.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/xutils.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- xutils.cpp 7 Jan 2005 03:27:54 -0000 1.4 +++ xutils.cpp 8 Jan 2005 10:17:20 -0000 1.5 @@ -184,6 +184,7 @@ return true; } + bool xutils_get_cardinal_atom(Window win, Atom atom, Q_ULONG *val) { Atom type = None; @@ -472,6 +473,17 @@ return retval; } +Q_ULONG xutils_get_pid(Window win) +{ + Q_ULONG ret; + Atom atom = XInternAtom(qt_xdisplay(), "_NET_WM_PID", False); + + if (!xutils_get_cardinal_atom(win, atom, &ret)) + return 0; + + return ret; +} + /* * Heavily inspired by KDE core code in * netwm.cpp, readIcon() function. @@ -574,29 +586,24 @@ return true; } -QPixmap xutils_get_leader_icon(Window leader) +QPixmap xutils_get_window_icon(Window win) { - Atom atom = XInternAtom(qt_xdisplay(), "_NET_WM_ICON_NAME", False); + WindowIcons icons; + QPixmap retval; - QString iconName = xutils_get_utf8_string_atom(leader, atom); + // First, check for icon name + Atom atom = XInternAtom(qt_xdisplay(), "_NET_WM_ICON_NAME", False); + QString iconName = xutils_get_utf8_string_atom(win, atom); if (!iconName.isEmpty()) { QIcon icon = BNeptuneXDG::iconTheme()->loadIcon(iconName); - QPixmap retval = icon.pixmap(Qt::LargeIconSize, QIcon::Normal); + QPixmap ret = icon.pixmap(Qt::LargeIconSize, QIcon::Normal); // Return pixmap only if it's not null - if (!retval.isNull()) - return retval; + if (!ret.isNull()) + return ret; } - return xutils_get_window_icon(leader); -} - -QPixmap xutils_get_window_icon(Window win) -{ - WindowIcons icons; - QPixmap retval; - // Search first available icon if (xutils_get_icons(win, &icons)) { @@ -618,7 +625,8 @@ // Image setup image.setAlphaBuffer(true); - image = image.scale(48, 48); + if ((w != 48) || (h != 48)) + image = image.scale(48, 48); // Get pixmap from image retval = image; Index: tasklistwindow.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/tasklistwindow.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- tasklistwindow.cpp 5 Jan 2005 20:05:22 -0000 1.1.1.1 +++ tasklistwindow.cpp 8 Jan 2005 10:17:20 -0000 1.2 @@ -49,7 +49,6 @@ // Layout fLayout = new QVBoxLayout(this); - fLayout->setResizeMode(QLayout::Fixed); fLayout->setMargin(2); fLayout->addWidget(fTitle); @@ -61,15 +60,7 @@ fLayout->addWidget(view); } - //fLayout->addWidget(fActions); - -#if 0 - // Set fixed width - Q_INT32 w = BApplication::desktop()->geometry().width(); - Q_INT32 h = BApplication::desktop()->geometry().height(); - setFixedWidth(w / 10); - setFixedHeight(h / 10); -#endif + fLayout->addWidget(fActions); } TaskListWindow::~TaskListWindow() Index: taskicon.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/taskicon.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- taskicon.cpp 7 Jan 2005 02:11:40 -0000 1.2 +++ taskicon.cpp 8 Jan 2005 10:17:20 -0000 1.3 @@ -44,16 +44,22 @@ void TaskIcon::enterEvent(QEvent *event) { + // Update task list window geometry + fTaskList->updateGeometry(); + QPoint pos = mapToGlobal(QPoint(0, 0)); QPoint mouse = QCursor::pos(); QSize size = sizeHint() + contentsMarginSize(); QRect screen = BApplication::desktop()->screenGeometry(pos); + QWidget *parent = parentWidget(); + Q_UINT32 parentHeight = parent ? parent->rect().height() : 0; + // Set coordinates if (pos.x() + size.width() > screen.right()) pos.setX(mouse.x() - size.width()); if (pos.x() < screen.left()) pos.setX(mouse.x()); - pos.setY(pos.y() - rect().height()); + pos.setY(screen.bottom() - fTaskList->rect().height() - parentHeight); // Show task list window fTaskList->move(pos); Index: task.h =================================================================== RCS file: /cvsroot/befree/panel/src/task.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- task.h 5 Jan 2005 14:30:04 -0000 1.1.1.1 +++ task.h 8 Jan 2005 10:17:20 -0000 1.2 @@ -36,6 +36,9 @@ void setId(Q_ULONG id); Q_ULONG id() const; + void setPid(Q_ULONG pid); + Q_ULONG pid() const; + void setName(const QString &name); QString name() const; @@ -46,7 +49,7 @@ QList<TaskWindow> windows() const; private: - Q_ULONG fId; + Q_ULONG fId, fPid; QString fName; QPixmap fIcon; QList<TaskWindow> fWindows; @@ -62,6 +65,16 @@ fId = id; } +inline Q_ULONG Task::pid() const +{ + return fPid; +} + +inline void Task::setPid(Q_ULONG pid) +{ + fPid = pid; +} + inline QString Task::name() const { return fName; |
|
From: Pier L. F. <plf...@us...> - 2005-01-08 10:14:51
|
Update of /cvsroot/befree/panel/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13022 Modified Files: taskwindowview.cpp Log Message: Set background role like parent Index: taskwindowview.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/taskwindowview.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- taskwindowview.cpp 7 Jan 2005 02:11:40 -0000 1.2 +++ taskwindowview.cpp 8 Jan 2005 10:14:42 -0000 1.3 @@ -28,6 +28,9 @@ TaskWindowView::TaskWindowView(const TaskWindow &window) { + // Set background role like parent + setBackgroundRole(QPalette::Button); + // Save task window object fTaskWindow = TaskWindow(window); @@ -42,6 +45,7 @@ fIcon = new QLabel; fIcon->setPixmap(icon); fTitle = new QLabel("<b>" + window.title() + "</b>"); + fTitle->setAlignment(Qt::AlignTop | Qt::AlignLeft); // Layout fLayout = new QHBoxLayout(this); |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:56:28
|
Update of /cvsroot/befree/neptune/libneptune-xdg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16108 Modified Files: bicontheme.cpp Log Message: Return icon if name is a full path Index: bicontheme.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/bicontheme.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- bicontheme.cpp 7 Jan 2005 03:36:48 -0000 1.13 +++ bicontheme.cpp 7 Jan 2005 03:56:19 -0000 1.14 @@ -274,37 +274,42 @@ QIcon BIconTheme::loadIcon(const QString &name, BIconTheme::Context dircontext) { - QStringList dataDirs = BBaseDirectory::dataDirectories(); - bool found = false; - QString path; - Q_INT32 iconsize; + QFileInfo info(name); QIcon icon; + // If name is a full path just return it + if (info.exists()) + { + icon.setPixmap(info.absoluteFilePath(), Qt::AutomaticIconSize); + return icon; + } + + QStringList dataDirs = BBaseDirectory::dataDirectories(); + // Check if the icon is available out of the icon theme for (int i = 0; i < dataDirs.size(); ++i) { - QFileInfo info(dataDirs.at(i) + "/pixmaps/" + name + ".png"); + info = QFileInfo(dataDirs.at(i) + "/pixmaps/" + name + ".png"); if (info.exists()) { - found = true; - path = info.absoluteFilePath(); - break; + icon.setPixmap(info.absoluteFilePath(), Qt::AutomaticIconSize); + return icon; } } - if (!found) - { - // Get small icon - iconsize = BConfiguration::smallIconSize(); - path = iconPath(name, iconsize, dircontext); - icon.setPixmap(path, Qt::SmallIconSize); + QString path; + Q_INT32 iconsize; - // Get large icon - iconsize = BConfiguration::largeIconSize(); - path = iconPath(name, iconsize, dircontext); - icon.setPixmap(path, Qt::LargeIconSize); - } + // Get small icon + iconsize = BConfiguration::smallIconSize(); + path = iconPath(name, iconsize, dircontext); + icon.setPixmap(path, Qt::SmallIconSize); + + // Get large icon + iconsize = BConfiguration::largeIconSize(); + path = iconPath(name, iconsize, dircontext); + icon.setPixmap(path, Qt::LargeIconSize); return icon; } |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:42:10
|
Update of /cvsroot/befree/tracker/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13108 Modified Files: propdialog.cpp Log Message: Updated for BIconTheme changes Index: propdialog.cpp =================================================================== RCS file: /cvsroot/befree/tracker/src/propdialog.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- propdialog.cpp 6 Jan 2005 09:15:58 -0000 1.6 +++ propdialog.cpp 7 Jan 2005 03:42:01 -0000 1.7 @@ -58,7 +58,7 @@ { // Use a generic file icon for more than one file icon = BNeptuneXDG::iconTheme()->loadIcon("regular-file", - Qt::LargeIconSize, BIconTheme::FileSystem); + BIconTheme::FileSystem); // Type unknown fType->setText("--"); |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:36:57
|
Update of /cvsroot/befree/neptune/libneptune-gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12095/libneptune-gui Modified Files: ChangeLog bfileiconprovider.cpp Log Message: BIconTheme::loadIcon() returns icon with both small and large size Index: bfileiconprovider.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-gui/bfileiconprovider.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bfileiconprovider.cpp 29 Dec 2004 12:50:17 -0000 1.3 +++ bfileiconprovider.cpp 7 Jan 2005 03:36:48 -0000 1.4 @@ -31,11 +31,11 @@ QIcon BFileIconProvider::icon(const QFileInfo &info) const { if (info.isDir()) - return BNeptuneXDG::iconTheme()->loadIcon("folder", Qt::LargeIconSize, + return BNeptuneXDG::iconTheme()->loadIcon("folder", BIconTheme::FileSystem); // TODO: Return MIME icon for files - return BNeptuneXDG::iconTheme()->loadIcon("regular-file", Qt::LargeIconSize, + return BNeptuneXDG::iconTheme()->loadIcon("regular-file", BIconTheme::FileSystem); } Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-gui/ChangeLog,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- ChangeLog 5 Jan 2005 14:17:50 -0000 1.28 +++ ChangeLog 7 Jan 2005 03:36:48 -0000 1.29 @@ -1,3 +1,8 @@ +2005-01-07 Pier Luigi Fiorini <pie...@mo...> + + * bfileiconprovider.cpp (BFileIconProvider::icon): + Updated with BIconTheme::loadIcon() changes. + 2005-01-05 Pier Luigi Fiorini <pie...@mo...> * bmainwindow.cpp (BMainWindow::BMainWindow): |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:36:57
|
Update of /cvsroot/befree/neptune/libneptune-xdg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12095/libneptune-xdg Modified Files: ChangeLog bicontheme.cpp bicontheme.h Log Message: BIconTheme::loadIcon() returns icon with both small and large size Index: bicontheme.h =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/bicontheme.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- bicontheme.h 1 Jan 2005 21:50:43 -0000 1.8 +++ bicontheme.h 7 Jan 2005 03:36:48 -0000 1.9 @@ -75,8 +75,7 @@ QString iconPath(const QString &icon, Q_INT32 iconsize = 48, Context dircontext = Any); - QIcon loadIcon(const QString &name, Qt::IconSize size = Qt::LargeIconSize, - Context dircontext = Any); + QIcon loadIcon(const QString &name, Context dircontext = Any); private: bool directoryMatchesSize(const QString &dir, Q_INT32 iconsize); Index: bicontheme.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/bicontheme.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- bicontheme.cpp 7 Jan 2005 03:09:21 -0000 1.12 +++ bicontheme.cpp 7 Jan 2005 03:36:48 -0000 1.13 @@ -272,8 +272,7 @@ return QString(); } -QIcon BIconTheme::loadIcon(const QString &name, Qt::IconSize size, - BIconTheme::Context dircontext) +QIcon BIconTheme::loadIcon(const QString &name, BIconTheme::Context dircontext) { QStringList dataDirs = BBaseDirectory::dataDirectories(); bool found = false; @@ -296,20 +295,17 @@ if (!found) { - // Determine icon size - if (size == Qt::SmallIconSize) - iconsize = BConfiguration::smallIconSize(); - else - iconsize = BConfiguration::largeIconSize(); + // Get small icon + iconsize = BConfiguration::smallIconSize(); + path = iconPath(name, iconsize, dircontext); + icon.setPixmap(path, Qt::SmallIconSize); - // Get icon path + // Get large icon + iconsize = BConfiguration::largeIconSize(); path = iconPath(name, iconsize, dircontext); + icon.setPixmap(path, Qt::LargeIconSize); } - // Set icon if found - if (!path.isEmpty()) - icon.setPixmap(path, size); - return icon; } Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChangeLog 7 Jan 2005 03:09:21 -0000 1.12 +++ ChangeLog 7 Jan 2005 03:36:48 -0000 1.13 @@ -1,7 +1,8 @@ 2005-01-07 Pier Luigi Fiorini <pie...@mo...> - * bicontheme.cpp (BIconTheme::loadIcon): Check for icons in - datadir/pixmaps/ first. + * bicontheme.cpp (BIconTheme::loadIcon): + Check for icons in datadir/pixmaps/ first. + Return icon with both small and large size. 2005-01-01 Pier Luigi Fiorini <pie...@mo...> |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:28:05
|
Update of /cvsroot/befree/panel/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10463 Modified Files: ChangeLog x11panelwindow.cpp xutils.cpp xutils.h Log Message: First, get leader icon Index: xutils.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/xutils.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- xutils.cpp 7 Jan 2005 02:44:54 -0000 1.3 +++ xutils.cpp 7 Jan 2005 03:27:54 -0000 1.4 @@ -33,6 +33,7 @@ #include <QRect> #include <QSize> #include <QList> +#include <QIcon> #include <QBitmap> #include <QImage> @@ -573,11 +574,30 @@ return true; } +QPixmap xutils_get_leader_icon(Window leader) +{ + Atom atom = XInternAtom(qt_xdisplay(), "_NET_WM_ICON_NAME", False); + + QString iconName = xutils_get_utf8_string_atom(leader, atom); + if (!iconName.isEmpty()) + { + QIcon icon = BNeptuneXDG::iconTheme()->loadIcon(iconName); + QPixmap retval = icon.pixmap(Qt::LargeIconSize, QIcon::Normal); + + // Return pixmap only if it's not null + if (!retval.isNull()) + return retval; + } + + return xutils_get_window_icon(leader); +} + QPixmap xutils_get_window_icon(Window win) { WindowIcons icons; QPixmap retval; + // Search first available icon if (xutils_get_icons(win, &icons)) { for (Q_INT32 i = 0; i < icons.size(); ++i) @@ -608,56 +628,58 @@ } } } - else - { - // Try with window hints - XWMHints *h = XGetWMHints(qt_xdisplay(), win); - Pixmap pixmap_p = None, bitmap_p = None; - if (h->flags & IconPixmapHint) - pixmap_p = h->icon_pixmap; - if (h->flags & IconMaskHint) - bitmap_p = h->icon_mask; + // Try with window hints + XWMHints *h = XGetWMHints(qt_xdisplay(), win); + Pixmap pixmap_p = None, bitmap_p = None; - XFree(h); + // Return immediately if we have no hints + if (!h) + return retval; - if (pixmap_p != None) + if (h->flags & IconPixmapHint) + pixmap_p = h->icon_pixmap; + if (h->flags & IconMaskHint) + bitmap_p = h->icon_mask; + + XFree(h); + + if (pixmap_p != None) + { + Window root; + Q_INT32 x, y; + Q_UINT32 w = 0, h = 0, border, depth; + + XGetGeometry(qt_xdisplay(), pixmap_p, &root, &x, &y, &w, &h, &border, &depth); + + if ((w > 0) && (h > 0)) { - Window root; - Q_INT32 x, y; - Q_UINT32 w = 0, h = 0, border, depth; + // Create pixmap + QPixmap pixmap = QPixmap(w, h, depth); + pixmap.detach(); - XGetGeometry(qt_xdisplay(), pixmap_p, &root, &x, &y, &w, &h, &border, &depth); + // Copy X11 pixmap into QPixmap + XCopyArea(qt_xdisplay(), pixmap_p, pixmap.handle(), + qt_xget_temp_gc(qt_xscreen(), depth==1), + 0, 0, w, h, 0, 0); - if ((w > 0) && (h > 0)) + if (bitmap_p != None) { - // Create pixmap - QPixmap pixmap = QPixmap(w, h, depth); - pixmap.detach(); + QBitmap bitmap(w, h); - // Copy X11 pixmap into QPixmap - XCopyArea(qt_xdisplay(), pixmap_p, pixmap.handle(), - qt_xget_temp_gc(qt_xscreen(), depth==1), + // Copy X11 mask into QBitmap + XCopyArea(qt_xdisplay(), bitmap_p, bitmap.handle(), + qt_xget_temp_gc(qt_xscreen(), true), 0, 0, w, h, 0, 0); + pixmap.setMask(bitmap); + } - if (bitmap_p != None) - { - QBitmap bitmap(w, h); - - // Copy X11 mask into QBitmap - XCopyArea(qt_xdisplay(), bitmap_p, bitmap.handle(), - qt_xget_temp_gc(qt_xscreen(), true), - 0, 0, w, h, 0, 0); - pixmap.setMask(bitmap); - } - - if (!pixmap.isNull()) - { - if ((w != 48) && (h != 48)) - retval = pixmap.scale(48, 48); - else - retval = pixmap; - } + if (!pixmap.isNull()) + { + if ((w != 48) && (h != 48)) + retval = pixmap.scale(48, 48); + else + retval = pixmap; } } } Index: xutils.h =================================================================== RCS file: /cvsroot/befree/panel/src/xutils.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- xutils.h 7 Jan 2005 02:43:53 -0000 1.2 +++ xutils.h 7 Jan 2005 03:27:54 -0000 1.3 @@ -25,6 +25,8 @@ #include <qglobal.h> +#include <libneptune-xdg/bneptunexdg.h> + #ifdef Q_WS_X11 #include <QString> @@ -50,6 +52,7 @@ Window xutils_get_group_leader(Window win); QString xutils_get_name(Window win); QString xutils_get_class(Window win); +QPixmap xutils_get_leader_icon(Window leader); QPixmap xutils_get_window_icon(Window win); bool xutils_skip_taskbar(Window win); Index: x11panelwindow.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/x11panelwindow.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- x11panelwindow.cpp 7 Jan 2005 02:43:53 -0000 1.2 +++ x11panelwindow.cpp 7 Jan 2005 03:27:54 -0000 1.3 @@ -68,6 +68,9 @@ if (!xutils_get_client_list(&list, &nitems)) return tasks; + QString name; + QPixmap icon; + for (Q_INT32 i = 0; i < nitems; i++) { Window win = list[i]; @@ -80,11 +83,12 @@ continue; // Get window name and icon - QString name = xutils_get_name(win); - QPixmap icon = xutils_get_window_icon(win); + name = xutils_get_name(win); if (has_task(tasks, leader, &task)) { + icon = xutils_get_window_icon(win); + // Add this window to its task TaskWindow taskWin(task, name, icon); taskWin.setId(win); @@ -92,6 +96,8 @@ } else { + icon = xutils_get_leader_icon(leader); + // Create a new task task = new Task; task->setId(leader); Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/panel/src/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChangeLog 7 Jan 2005 02:43:53 -0000 1.4 +++ ChangeLog 7 Jan 2005 03:27:54 -0000 1.5 @@ -1,6 +1,11 @@ 2005-01-07 Pier Luigi Fiorini <pie...@mo...> * x11panelwindow.cpp (X11PanelWindow::tasksList): + First check for leader icon name. + + * xutils.cpp (xutils_get_leader_icon): Get leader icon. + + * x11panelwindow.cpp (X11PanelWindow::tasksList): Skip if window has "skip taskbar". * xutils.cpp (xutils_get_atom_list): Get atom list. |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:12:55
|
Update of /cvsroot/befree/neptune/libneptune In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7499/libneptune Modified Files: bclassicstyle.cpp Log Message: Draw PE_PanelButtonTool with button style Index: bclassicstyle.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune/bclassicstyle.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- bclassicstyle.cpp 5 Jan 2005 18:32:13 -0000 1.14 +++ bclassicstyle.cpp 7 Jan 2005 03:12:45 -0000 1.15 @@ -101,6 +101,7 @@ break; case PE_FrameButtonBevel: case PE_PanelButtonBevel: + case PE_PanelButtonTool: case PE_PanelHeader: drawButton(opt->rect, opt->state, opt->palette, p); break; |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:10:27
|
Update of /cvsroot/befree/neptune In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7115 Modified Files: NEWS Log Message: Updated news for next release Index: NEWS =================================================================== RCS file: /cvsroot/befree/neptune/NEWS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NEWS 2 Jan 2005 23:40:12 -0000 1.3 +++ NEWS 7 Jan 2005 03:10:19 -0000 1.4 @@ -8,6 +8,7 @@ + Implemented color schemes (Pier Luigi Fiorini) + Full implementation of Freedesktop base directory and icon theme specifications (Pier Luigi Fiorini) + + Main window set class name to application name (Pier Luigi Fiorini) Fixes |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 03:09:31
|
Update of /cvsroot/befree/neptune/libneptune-xdg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6873 Modified Files: ChangeLog bicontheme.cpp Log Message: First check for icons in datadir/pixmaps/ Index: bicontheme.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/bicontheme.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- bicontheme.cpp 3 Jan 2005 00:17:28 -0000 1.11 +++ bicontheme.cpp 7 Jan 2005 03:09:21 -0000 1.12 @@ -275,17 +275,36 @@ QIcon BIconTheme::loadIcon(const QString &name, Qt::IconSize size, BIconTheme::Context dircontext) { + QStringList dataDirs = BBaseDirectory::dataDirectories(); + bool found = false; + QString path; Q_INT32 iconsize; QIcon icon; - // Determine icon size - if (size == Qt::SmallIconSize) - iconsize = BConfiguration::smallIconSize(); - else - iconsize = BConfiguration::largeIconSize(); + // Check if the icon is available out of the icon theme + for (int i = 0; i < dataDirs.size(); ++i) + { + QFileInfo info(dataDirs.at(i) + "/pixmaps/" + name + ".png"); - // Get icon path - QString path = iconPath(name, iconsize, dircontext); + if (info.exists()) + { + found = true; + path = info.absoluteFilePath(); + break; + } + } + + if (!found) + { + // Determine icon size + if (size == Qt::SmallIconSize) + iconsize = BConfiguration::smallIconSize(); + else + iconsize = BConfiguration::largeIconSize(); + + // Get icon path + path = iconPath(name, iconsize, dircontext); + } // Set icon if found if (!path.isEmpty()) Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-xdg/ChangeLog,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ChangeLog 1 Jan 2005 21:05:48 -0000 1.11 +++ ChangeLog 7 Jan 2005 03:09:21 -0000 1.12 @@ -1,3 +1,8 @@ +2005-01-07 Pier Luigi Fiorini <pie...@mo...> + + * bicontheme.cpp (BIconTheme::loadIcon): Check for icons in + datadir/pixmaps/ first. + 2005-01-01 Pier Luigi Fiorini <pie...@mo...> * bbasedirectory.{cpp,h}: Updated with specification 0.6. |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 02:45:04
|
Update of /cvsroot/befree/panel/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1911 Modified Files: xutils.cpp Log Message: Skip taskbar Index: xutils.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/xutils.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- xutils.cpp 7 Jan 2005 02:43:53 -0000 1.2 +++ xutils.cpp 7 Jan 2005 02:44:54 -0000 1.3 @@ -681,8 +681,12 @@ { if (result[i] == cmp) return true; + + ++i; } + delete [] result; + return false; } |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 02:44:04
|
Update of /cvsroot/befree/panel/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1658 Modified Files: ChangeLog x11panelwindow.cpp xutils.cpp xutils.h Log Message: Skip taskbar Index: xutils.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/xutils.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- xutils.cpp 5 Jan 2005 14:07:58 -0000 1.1.1.1 +++ xutils.cpp 7 Jan 2005 02:43:53 -0000 1.2 @@ -142,6 +142,47 @@ return true; } +bool xutils_get_atom_list(Window win, Atom atom, Atom **list, Q_INT32 *len) +{ + Atom type = None; + Atom *retval; + Q_INT32 format, result; + Q_ULONG nitems, bytes_after; + + // Get window property + if ((result = XGetWindowProperty(qt_xdisplay(), win, atom, 0, MAX_PROP_SIZE, + False, XA_ATOM, &type, &format, &nitems, + &bytes_after, (uchar **)&retval)) + != Success) + return false; + + // Type checking + if (type != XA_ATOM) + { + XFree(retval); + return false; + } + + if (!retval) + return false; + + *list = new Atom[nitems]; + + if (!*list) + { + *list = NULL; + XFree(retval); + + return false; + } + + memcpy(*list, retval, sizeof(Atom) * nitems); + *len = nitems; + + XFree(retval); + + return true; +} bool xutils_get_cardinal_atom(Window win, Atom atom, Q_ULONG *val) { Atom type = None; @@ -624,6 +665,27 @@ return retval; } +bool xutils_skip_taskbar(Window win) +{ + Atom cmp = XInternAtom(qt_xdisplay(), "_NET_WM_STATE_SKIP_TASKBAR", False); + Atom atom = XInternAtom(qt_xdisplay(), "_NET_WM_STATE", False); + Atom *result = NULL; + Q_INT32 len, i = 0; + + // Find property + if (!xutils_get_atom_list(win, atom, &result, &len)) + return false; + + // Compare result + while (i < len) + { + if (result[i] == cmp) + return true; + } + + return false; +} + void xutils_set_dock_window(Window win) { Atom net_wm_window_type = XInternAtom(qt_xdisplay(), Index: xutils.h =================================================================== RCS file: /cvsroot/befree/panel/src/xutils.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- xutils.h 5 Jan 2005 10:26:12 -0000 1.1.1.1 +++ xutils.h 7 Jan 2005 02:43:53 -0000 1.2 @@ -35,6 +35,7 @@ class QRect; bool xutils_get_atom(Window win, Atom atom, Atom *val); +bool xutils_get_atom_list(Window win, Atom atom, Atom **list, Q_INT32 *len); bool xutils_get_cardinal_atom(Window win, Atom atom, Q_ULONG *val); bool xutils_get_cardinal_list_atom(Window win, Atom atom, Q_ULONG **list, Q_INT32 *len); @@ -50,6 +51,7 @@ QString xutils_get_name(Window win); QString xutils_get_class(Window win); QPixmap xutils_get_window_icon(Window win); +bool xutils_skip_taskbar(Window win); void xutils_set_dock_window(Window win); void xutils_set_no_group(Window win); Index: x11panelwindow.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/x11panelwindow.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- x11panelwindow.cpp 5 Jan 2005 14:21:22 -0000 1.1.1.1 +++ x11panelwindow.cpp 7 Jan 2005 02:43:53 -0000 1.2 @@ -75,6 +75,10 @@ Q_INT32 index; Task *task; + // Skip windows with "skip taskbar" + if (xutils_skip_taskbar(win) || xutils_skip_taskbar(leader)) + continue; + // Get window name and icon QString name = xutils_get_name(win); QPixmap icon = xutils_get_window_icon(win); @@ -83,6 +87,7 @@ { // Add this window to its task TaskWindow taskWin(task, name, icon); + taskWin.setId(win); task->addWindow(taskWin); } else Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/panel/src/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChangeLog 7 Jan 2005 02:11:40 -0000 1.3 +++ ChangeLog 7 Jan 2005 02:43:53 -0000 1.4 @@ -1,5 +1,12 @@ 2005-01-07 Pier Luigi Fiorini <pie...@mo...> + * x11panelwindow.cpp (X11PanelWindow::tasksList): + Skip if window has "skip taskbar". + + * xutils.cpp (xutils_get_atom_list): Get atom list. + + * xutils.cpp (xutils_skip_taskbar): Get if "skip taskbar". + * taskwindow.cpp (TaskWindow::close): * taskwindowview.cpp (TaskWindowView::closeTaskWindow): Close task window. |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 02:12:43
|
Update of /cvsroot/befree/panel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25993 Modified Files: configure.ac Log Message: Use moc Index: configure.ac =================================================================== RCS file: /cvsroot/befree/panel/configure.ac,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- configure.ac 5 Jan 2005 22:49:06 -0000 1.1.1.1 +++ configure.ac 7 Jan 2005 02:12:34 -0000 1.2 @@ -39,6 +39,9 @@ AC_SUBST(NEPTUNE_CFLAGS) AC_SUBST(NEPTUNE_LIBS) +dnl Check for support programs. +BEFREE_CHECK_MOC + AC_OUTPUT([ Makefile src/Makefile |
|
From: Pier L. F. <plf...@us...> - 2005-01-07 02:11:54
|
Update of /cvsroot/befree/panel/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25810 Modified Files: ChangeLog Makefile.am taskicon.cpp taskwindow.cpp taskwindow.h taskwindowview.cpp taskwindowview.h Log Message: Close task window Index: taskwindowview.h =================================================================== RCS file: /cvsroot/befree/panel/src/taskwindowview.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- taskwindowview.h 5 Jan 2005 19:15:01 -0000 1.1.1.1 +++ taskwindowview.h 7 Jan 2005 02:11:40 -0000 1.2 @@ -24,18 +24,25 @@ #include <QWidget> -class TaskWindow; +#include "taskwindow.h" + class QToolButton; class QLabel; class QHBoxLayout; class TaskWindowView : public QWidget { + Q_OBJECT + public: TaskWindowView(const TaskWindow &window); ~TaskWindowView(); +private slots: + void closeTaskWindow(); + private: + TaskWindow fTaskWindow; QToolButton *fClose; QLabel *fIcon; QLabel *fTitle; Index: taskwindowview.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/taskwindowview.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- taskwindowview.cpp 5 Jan 2005 22:47:56 -0000 1.1.1.1 +++ taskwindowview.cpp 7 Jan 2005 02:11:40 -0000 1.2 @@ -25,10 +25,12 @@ #include <QHBoxLayout> #include "taskwindowview.h" -#include "taskwindow.h" TaskWindowView::TaskWindowView(const TaskWindow &window) { + // Save task window object + fTaskWindow = TaskWindow(window); + // Scale icon down to small size QPixmap icon = window.icon().scale(16, 16); @@ -48,6 +50,10 @@ fLayout->addWidget(fClose); fLayout->addWidget(fIcon); fLayout->addWidget(fTitle); + + // Connect signals + connect(fClose, SIGNAL(clicked()), + this, SLOT(closeTaskWindow())); } TaskWindowView::~TaskWindowView() @@ -57,3 +63,8 @@ delete fTitle; delete fLayout; } + +void TaskWindowView::closeTaskWindow() +{ + fTaskWindow.close(); +} Index: taskwindow.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/taskwindow.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- taskwindow.cpp 5 Jan 2005 10:14:34 -0000 1.1.1.1 +++ taskwindow.cpp 7 Jan 2005 02:11:40 -0000 1.2 @@ -21,9 +21,33 @@ #include "taskwindow.h" +#ifdef Q_WS_X11 +# include <X11/Xlib.h> +#endif + +TaskWindow::TaskWindow() +{ +} + TaskWindow::TaskWindow(Task *parent, const QString &title, const QPixmap &icon) { fParent = parent; fTitle = title; fIcon = icon; } + +TaskWindow::TaskWindow(const TaskWindow &w) +{ + fParent = w.parent(); + fTitle = w.title(); + fIcon = w.icon(); + fId = w.id(); +} + +void TaskWindow::close() +{ +#ifdef Q_WS_X11 + // Close window + XDestroyWindow(qt_xdisplay(), fId); +#endif +} Index: Makefile.am =================================================================== RCS file: /cvsroot/befree/panel/src/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Makefile.am 5 Jan 2005 19:12:08 -0000 1.1.1.1 +++ Makefile.am 7 Jan 2005 02:11:40 -0000 1.2 @@ -21,6 +21,8 @@ bin_PROGRAMS = befree-panel +befree_panel_MOC = \ + moc_taskwindowview.cpp befree_panel_SOURCES = \ main.cpp \ task.cpp task.h \ @@ -30,5 +32,13 @@ tasklistwindow.cpp tasklistwindow.h \ taskwindowview.cpp taskwindowview.h \ x11panelwindow.cpp x11panelwindow.h \ - xutils.cpp xutils.h + xutils.cpp xutils.h \ + $(befree_panel_MOC) befree_panel_LDADD = $(NEPTUNE_LIBS) + +moc_%.cpp: %.h + $(MOC) -o $@ $< + +BUILT_SOURCES = $(befree_panel_MOC) + +CLEANFILES = $(BUILT_SOURCES) Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/panel/src/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ChangeLog 6 Jan 2005 18:06:38 -0000 1.2 +++ ChangeLog 7 Jan 2005 02:11:40 -0000 1.3 @@ -1,3 +1,9 @@ +2005-01-07 Pier Luigi Fiorini <pie...@mo...> + + * taskwindow.cpp (TaskWindow::close): + * taskwindowview.cpp (TaskWindowView::closeTaskWindow): + Close task window. + 2005-01-06 Pier Luigi Fiorini <pie...@mo...> * panelwindow.cpp (PanelWindow::PanelWindow): Set palette instead of fill a Index: taskwindow.h =================================================================== RCS file: /cvsroot/befree/panel/src/taskwindow.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- taskwindow.h 5 Jan 2005 10:14:26 -0000 1.1.1.1 +++ taskwindow.h 7 Jan 2005 02:11:40 -0000 1.2 @@ -30,16 +30,26 @@ class TaskWindow { public: + TaskWindow(); TaskWindow(Task *parent, const QString &title, const QPixmap &icon); + TaskWindow(const TaskWindow &w); Task *parent() const; + Q_ULONG id() const; + void setId(Q_ULONG id); + QString title() const; + void setTitle(const QString &title); QPixmap icon() const; + void setIcon(const QPixmap &icon); + + void close(); private: Task *fParent; + Q_ULONG fId; QString fTitle; QPixmap fIcon; }; @@ -49,14 +59,34 @@ return fParent; } +inline Q_ULONG TaskWindow::id() const +{ + return fId; +} + +inline void TaskWindow::setId(Q_ULONG id) +{ + fId = id; +} + inline QString TaskWindow::title() const { return fTitle; } +inline void TaskWindow::setTitle(const QString &title) +{ + fTitle = title; +} + inline QPixmap TaskWindow::icon() const { return fIcon; } +inline void TaskWindow::setIcon(const QPixmap &icon) +{ + fIcon = icon; +} + #endif // TASKWINDOW_H Index: taskicon.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/taskicon.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- taskicon.cpp 5 Jan 2005 22:44:51 -0000 1.1.1.1 +++ taskicon.cpp 7 Jan 2005 02:11:40 -0000 1.2 @@ -22,7 +22,6 @@ #include <QDesktopWidget> #include <QCursor> #include <QEvent> -#include <QStyle> #include <libneptune/bapplication.h> @@ -49,18 +48,12 @@ QPoint mouse = QCursor::pos(); QSize size = sizeHint() + contentsMarginSize(); QRect screen = BApplication::desktop()->screenGeometry(pos); - //const int parentHeight = ( parentWidget() ? parentWidget()->sizeHint().height() : 0 ); if (pos.x() + size.width() > screen.right()) pos.setX(mouse.x() - size.width()); - if (pos.y() + size.height() + 2 > screen.bottom()) - pos.setY(mouse.y() - size.height()); - if (pos.x() < screen.left()) pos.setX(mouse.x()); - if (pos.y() < screen.top()) - pos.setY(screen.top()); - //pos.setY((screen.height() - parentHeight) - size.height()); + pos.setY(pos.y() - rect().height()); // Show task list window fTaskList->move(pos); |
|
From: Pier L. F. <plf...@us...> - 2005-01-06 18:06:49
|
Update of /cvsroot/befree/panel/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32250/src Modified Files: ChangeLog panelwindow.cpp panelwindow.h Log Message: PanelWindow::PanelWindow(): set palette color instead of fill a black rectangle in paintEvent() Index: panelwindow.cpp =================================================================== RCS file: /cvsroot/befree/panel/src/panelwindow.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- panelwindow.cpp 5 Jan 2005 18:06:54 -0000 1.1.1.1 +++ panelwindow.cpp 6 Jan 2005 18:06:38 -0000 1.2 @@ -36,6 +36,14 @@ // Adjust our size setPanelGeometry(); + // Set background color + QPalette pal(palette()); + pal.setColor(backgroundRole(), Qt::black); + setPalette(pal); + + // Set window opacity + setWindowOpacity(0.75); + // Create layout fLayout = new QHBoxLayout(this); fLayout->setSpacing(4); @@ -66,18 +74,6 @@ fLayout->addStretch(1); } -void PanelWindow::paintEvent(QPaintEvent *event) -{ -#if 0 - QPainter p(this); - p.setBackgroundMode(Qt::OpaqueMode); - p.fillRect(rect(), Qt::red); -#else - QWidget::paintEvent(event); - return; -#endif -} - QList<Task *> PanelWindow::tasksList() { QList<Task *> empty; Index: panelwindow.h =================================================================== RCS file: /cvsroot/befree/panel/src/panelwindow.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- panelwindow.h 5 Jan 2005 14:31:17 -0000 1.1.1.1 +++ panelwindow.h 6 Jan 2005 18:06:38 -0000 1.2 @@ -39,7 +39,6 @@ void fillTasksList(); protected: - virtual void paintEvent(QPaintEvent *event); virtual QList<Task *> tasksList(); private: Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/panel/src/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ChangeLog 3 Jan 2005 22:10:51 -0000 1.1.1.1 +++ ChangeLog 6 Jan 2005 18:06:38 -0000 1.2 @@ -0,0 +1,4 @@ +2005-01-06 Pier Luigi Fiorini <pie...@mo...> + + * panelwindow.cpp (PanelWindow::PanelWindow): Set palette instead of fill a + black rectangle in paintEvent(). |
|
From: Pier L. F. <plf...@us...> - 2005-01-06 09:16:09
|
Update of /cvsroot/befree/tracker/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14928 Modified Files: propdialog.cpp Log Message: Some fixes Index: propdialog.cpp =================================================================== RCS file: /cvsroot/befree/tracker/src/propdialog.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- propdialog.cpp 29 Dec 2004 12:53:05 -0000 1.5 +++ propdialog.cpp 6 Jan 2005 09:15:58 -0000 1.6 @@ -351,14 +351,14 @@ // the first item which is "" currentItem++; + // Don't set permissions if selected empty item + if (currentItem == 0) + return; + for (int i = 0; i < fInfos.size(); ++i) { - // Don't set permissions if selected empty item - if (currentItem == 0) - continue; - QFile::Permissions perms = fInfos.at(i).permissions(); - perms ^= (QFile::ReadUser | QFile::WriteUser); + perms &= ~(QFile::ReadUser | QFile::WriteUser); switch (currentItem) { @@ -386,7 +386,7 @@ if (state == QCheckBox::On) perms |= QFile::ExeUser; else - perms ^= QFile::ExeUser; + perms &= ~QFile::ExeUser; (void)QFile::setPermissions(fInfos.at(i).absoluteFilePath(), perms); } @@ -409,7 +409,7 @@ continue; QFile::Permissions perms = fInfos.at(i).permissions(); - perms ^= (QFile::ReadGroup | QFile::WriteGroup); + perms &= ~(QFile::ReadGroup | QFile::WriteGroup); switch (currentItem) { @@ -437,7 +437,7 @@ if (state == QCheckBox::On) perms |= QFile::ExeGroup; else - perms ^= QFile::ExeGroup; + perms &= ~QFile::ExeGroup; (void)QFile::setPermissions(fInfos.at(i).absoluteFilePath(), perms); } @@ -460,7 +460,7 @@ continue; QFile::Permissions perms = fInfos.at(i).permissions(); - perms ^= (QFile::ReadOther | QFile::WriteOther); + perms &= ~(QFile::ReadOther | QFile::WriteOther); switch (currentItem) { @@ -488,7 +488,7 @@ if (state == QCheckBox::On) perms |= QFile::ExeOther; else - perms ^= QFile::ExeOther; + perms &= ~QFile::ExeOther; (void)QFile::setPermissions(fInfos.at(i).absoluteFilePath(), perms); } |
|
From: Pier L. F. <plf...@us...> - 2005-01-05 23:01:35
|
Update of /cvsroot/befree/control-center/font-applet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21023 Modified Files: applet.h main.cpp Log Message: Fixes Index: main.cpp =================================================================== RCS file: /cvsroot/befree/control-center/font-applet/main.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- main.cpp 2 Jan 2005 11:18:44 -0000 1.1.1.1 +++ main.cpp 5 Jan 2005 23:01:26 -0000 1.2 @@ -35,7 +35,7 @@ app.setApplicationName(app.tr("Control Center")); app.setOrganizationDomain("Mockup Team"); app.setVersion(VERSION); - app.setDescription(app.tr("Font preferences and volume control.")); + app.setDescription(app.tr("Font preferences.")); app.setCopyright(app.tr("Copyright (C) 2004-2005 Pier Luigi Fiorini")); // Show main window Index: applet.h =================================================================== RCS file: /cvsroot/befree/control-center/font-applet/applet.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- applet.h 2 Jan 2005 18:50:48 -0000 1.1.1.1 +++ applet.h 5 Jan 2005 23:01:26 -0000 1.2 @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// $Id +// $Id$ #ifndef APPLET_H #define APPLET_H |
|
From: Pier L. F. <plf...@us...> - 2005-01-05 23:01:15
|
Update of /cvsroot/befree/control-center/font-applet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20862 Added Files: ChangeLog Log Message: Added ChangeLog --- NEW FILE: ChangeLog --- |
|
From: Pier L. F. <plf...@us...> - 2005-01-05 22:56:18
|
Update of /cvsroot/befree/control-center/background-applet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19883/background-applet Log Message: Directory /cvsroot/befree/control-center/background-applet added to the repository |
|
From: Pier L. F. <plf...@us...> - 2005-01-05 18:32:23
|
Update of /cvsroot/befree/neptune/libneptune In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19060 Modified Files: ChangeLog bclassicstyle.cpp bclassicstyle.h Log Message: Polish QAbstractItemView setting even color to base from palette and odd color to background from palette, lighter by a factor of 130 (30%). Draw frame, menu bar and header. Index: bclassicstyle.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune/bclassicstyle.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- bclassicstyle.cpp 3 Jan 2005 11:49:08 -0000 1.13 +++ bclassicstyle.cpp 5 Jan 2005 18:32:13 -0000 1.14 @@ -24,6 +24,7 @@ #include <QStyleOption> #include <QPainter> +#include <QAbstractItemView> #include "bclassicstyle.h" @@ -41,6 +42,28 @@ { } +void BClassicStyle::polish(QWidget *widget) +{ + if (!widget) + return; + + // Set even and odd color in model views + if (widget->inherits("QAbstractItemView")) + { + QAbstractItemView *view = (QAbstractItemView *)widget; + QColor oddColor = QPalette().background().color().light(115); + + // Actually set colors + view->setEvenRowColor(QPalette().base().color()); + view->setOddRowColor(oddColor); + } + // Call original polish method + else + { + QWindowsStyle::polish(widget); + } +} + void BClassicStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const { @@ -49,6 +72,21 @@ switch (pe) { + case PE_Frame: + if (opt->state & Style_Sunken) + p->setPen(opt->palette.mid().color()); + else + p->setPen(opt->palette.light().color()); + p->drawLine(opt->rect.topLeft(), opt->rect.topRight()); + p->drawLine(opt->rect.topLeft(), opt->rect.bottomLeft()); + + if (opt->state & Style_Sunken) + p->setPen(opt->palette.light().color()); + else + p->setPen(opt->palette.mid().color()); + p->drawLine(opt->rect.topRight(), opt->rect.bottomRight()); + p->drawLine(opt->rect.bottomLeft(), opt->rect.bottomRight()); + break; case PE_FrameLineEdit: case PE_IndicatorCheckBox: { @@ -63,6 +101,7 @@ break; case PE_FrameButtonBevel: case PE_PanelButtonBevel: + case PE_PanelHeader: drawButton(opt->rect, opt->state, opt->palette, p); break; case PE_PanelButtonCommand: @@ -75,6 +114,8 @@ drawButton(btn->rect, btn->state, btn->palette, p); } break; + case PE_PanelMenuBar: + break; case PE_IndicatorBranch: // TODO: Use button text color when w is enabled // If children draw an arrow, otherwise nothing Index: bclassicstyle.h =================================================================== RCS file: /cvsroot/befree/neptune/libneptune/bclassicstyle.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- bclassicstyle.h 2 Jan 2005 22:14:36 -0000 1.5 +++ bclassicstyle.h 5 Jan 2005 18:32:13 -0000 1.6 @@ -33,6 +33,8 @@ public: BClassicStyle(); + virtual void polish(QWidget *widget); + void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w = 0) const; void drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p, Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/neptune/libneptune/ChangeLog,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- ChangeLog 2 Jan 2005 22:14:36 -0000 1.34 +++ ChangeLog 5 Jan 2005 18:32:05 -0000 1.35 @@ -1,3 +1,12 @@ +2005-01-05 Pier Luigi Fiorini <pie...@mo...> + + * bclassicstyle.cpp (BClassicStyle::polish): + Polish QAbstractItemView setting even color to base from palette and odd + color to background from palette, lighter by a factor of 130 (30%). + + * bclassicstyle.cpp (BClassicStyle::drawPrimitive): + Draw frame, menu bar and header. + 2005-01-02 Pier Luigi Fiorini <pie...@mo...> * bclassicstyle.cpp: Draw combo box and fix line edit state when it doesn't |
|
From: Pier L. F. <plf...@us...> - 2005-01-05 14:18:02
|
Update of /cvsroot/befree/neptune/libneptune-gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24504 Modified Files: ChangeLog bmainwindow.cpp Log Message: Set X11 class name in BMainWindow::BMainWindow() Index: ChangeLog =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-gui/ChangeLog,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- ChangeLog 3 Jan 2005 09:22:36 -0000 1.27 +++ ChangeLog 5 Jan 2005 14:17:50 -0000 1.28 @@ -1,3 +1,8 @@ +2005-01-05 Pier Luigi Fiorini <pie...@mo...> + + * bmainwindow.cpp (BMainWindow::BMainWindow): + Set X11 class name. + 2005-01-03 Pier Luigi Fiorini <pie...@mo...> * bfileview.cpp (BFileView::newFolder): [BUG 3] fixed, Index: bmainwindow.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-gui/bmainwindow.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- bmainwindow.cpp 29 Dec 2004 11:51:36 -0000 1.8 +++ bmainwindow.cpp 5 Jan 2005 14:17:50 -0000 1.9 @@ -27,6 +27,10 @@ #include "bactions.h" #include "bapplication.h" +#ifdef Q_WS_X11 +# include <X11/Xutil.h> +#endif + BMainWindow::BMainWindow(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) { @@ -44,6 +48,16 @@ (void) fAppMenu->addAction(fQuitAction); menuBar()->addMenu(fAppMenu); +#ifdef Q_WS_X11 + // Set window class + XClassHint hints; + + hints.res_name = (char *)qAppName(); + hints.res_class = (char *)bApp->applicationName().latin1(); + + XSetClassHint(qt_xdisplay(), winId(), &hints); +#endif + // Read settings readSettings(); } |
|
From: Pier L. F. <plf...@us...> - 2005-01-03 16:40:08
|
Update of /cvsroot/befree/neptune/libneptune-gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25086 Modified Files: bfileview.cpp Log Message: Check if index is valid in BFileView::doubleClicked() Index: bfileview.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-gui/bfileview.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- bfileview.cpp 3 Jan 2005 11:56:12 -0000 1.21 +++ bfileview.cpp 3 Jan 2005 16:39:57 -0000 1.22 @@ -356,6 +356,10 @@ */ void BFileView::doubleClicked(const QModelIndex &index) { + // Cannot open item if index isn't valid + if (!index.isValid()) + return; + // Open a folder if (fModel->isDir(index)) { @@ -363,7 +367,7 @@ setRoot(index); // Set new location - fLocation = fModel->fileInfo(index).absolutePath(); + fLocation = fModel->path(index); emit locationChanged(fLocation); } |
|
From: Pier L. F. <plf...@us...> - 2005-01-03 11:56:22
|
Update of /cvsroot/befree/neptune/libneptune-gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31351 Modified Files: bfileview.cpp Log Message: Use QItemSelectionModel to deselect Index: bfileview.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune-gui/bfileview.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- bfileview.cpp 3 Jan 2005 09:22:36 -0000 1.20 +++ bfileview.cpp 3 Jan 2005 11:56:12 -0000 1.21 @@ -255,10 +255,7 @@ */ void BFileView::deselectAll() { - if (viewMode() == Icon) - fIconView->clearSelection(); - else - fDetailView->clearSelection(); + fSelection->clear(); } /*! |
|
From: Pier L. F. <plf...@us...> - 2005-01-03 11:49:18
|
Update of /cvsroot/befree/neptune/libneptune In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30068/libneptune Modified Files: bclassicstyle.cpp Log Message: We don't need to include QPointArray Index: bclassicstyle.cpp =================================================================== RCS file: /cvsroot/befree/neptune/libneptune/bclassicstyle.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- bclassicstyle.cpp 2 Jan 2005 23:12:27 -0000 1.12 +++ bclassicstyle.cpp 3 Jan 2005 11:49:08 -0000 1.13 @@ -24,7 +24,6 @@ #include <QStyleOption> #include <QPainter> -#include <QPointArray> #include "bclassicstyle.h" |
|
From: Pier L. F. <plf...@us...> - 2005-01-03 09:55:14
|
Update of /cvsroot/befree/tracker/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11208 Modified Files: .cvsignore Log Message: Ignore *.orig files Index: .cvsignore =================================================================== RCS file: /cvsroot/befree/tracker/src/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- .cvsignore 3 Dec 2004 17:44:22 -0000 1.3 +++ .cvsignore 3 Jan 2005 09:55:03 -0000 1.4 @@ -3,4 +3,5 @@ .deps moc* *.o +*.orig befree-tracker |