diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 3bc08a7..b068016 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -1,3 +1,3 @@ # required stuff -find_package( TQt ) +find_package( Qt ) find_package( TDE ) diff --git a/kcm_gtk/kcmgtk.cpp b/kcm_gtk/kcmgtk.cpp index 3c0860b..3b6b36e 100644 --- a/kcm_gtk/kcmgtk.cpp +++ b/kcm_gtk/kcmgtk.cpp @@ -226,7 +226,7 @@ void KcmGtk::getInstalledThemes() widget->styleBox->clear(); widget->styleBox->insertStringList(themes.keys()); - bool installed = (themes.tqfind("TQt") != themes.end()); + bool installed = (themes.tqfind("Qt") != themes.end()); widget->styleKde->setEnabled(installed); widget->warning1->setHidden(installed); widget->warning2->setHidden(installed); @@ -283,7 +283,7 @@ void KcmGtk::load() { parser.parse(TQDir::homeDirPath() + "/" + GTK_RC_FILE); - bool usingTQtEngine = false; + bool usingQtEngine = false; if (!parser.style.isEmpty()) { for ( TQMapIterator it = themes.begin(); it != themes.end(); ++it ) @@ -291,8 +291,8 @@ void KcmGtk::load() if (it.data() != parser.style) continue; - if (it.key() == "TQt") - usingTQtEngine = true; + if (it.key() == "Qt") + usingQtEngine = true; for (int i=0 ; istyleBox->count() ; ++i) { @@ -306,7 +306,7 @@ void KcmGtk::load() break; } - if (usingTQtEngine) + if (usingQtEngine) widget->styleGroup->setButton(widget->styleGroup->id(widget->styleKde)); else widget->styleGroup->setButton(widget->styleGroup->id(widget->styleOther)); @@ -340,8 +340,8 @@ void KcmGtk::save() TQString(selectedFont.italic() ? "Italic " : "") + TQString::number(selectedFont.pointSize()); - TQString themeName = widget->styleKde->isChecked() ? themes["TQt"] : themes[widget->styleBox->currentText()]; - TQString themeNameShort = widget->styleKde->isChecked() ? TQString("TQt") : widget->styleBox->currentText(); + TQString themeName = widget->styleKde->isChecked() ? themes["Qt"] : themes[widget->styleBox->currentText()]; + TQString themeNameShort = widget->styleKde->isChecked() ? TQString("Qt") : widget->styleBox->currentText(); stream << "# This file was written by KDE\n"; stream << "# You can edit it in the KDE control center, under \"GTK Styles and Fonts\"\n"; @@ -406,7 +406,7 @@ void KcmGtk::save() if (envFileDidNotExist) TQMessageBox::information(this, "Restart KDE", "Your changes have been saved, but you will have to restart KDE for them to take effect.", TQMessageBox::Ok); - // Older versions of the Gtk-TQt theme engine wrote directly into ~/.gtkrc-2.0 + // Older versions of the Gtk-Qt theme engine wrote directly into ~/.gtkrc-2.0 // If the user has upgraded, that file needs to be deleted so the old settings // won't override the new ones set now. file.setName(TQDir::homeDirPath() + "/.gtkrc-2.0"); diff --git a/src/qt_qt_wrapper.cpp b/src/qt_qt_wrapper.cpp index 40f74c7..d871e61 100644 --- a/src/qt_qt_wrapper.cpp +++ b/src/qt_qt_wrapper.cpp @@ -43,7 +43,7 @@ #define RC_CACHE_VERSION TQString("1") -bool gtkTQtEnable = false; +bool gtkQtEnable = false; bool mozillaFix = false; bool tqAppOwner = false; @@ -86,14 +86,14 @@ int isDomino; int isPolyester; int eclipseFix; int openOfficeFix; -int gtkTQtDebug; +int gtkQtDebug; Atom kipcCommAtom; Atom desktopWindowAtom; void setFillPixmap(GdkPixbuf* buf) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; // This code isn't very robust. It doesn't handle depths other than 24 bits. @@ -205,7 +205,7 @@ void createTQApp() } if (ret == -1) { - printf("Gtk-TQt theme engine warning:\n"); + printf("Gtk-Qt theme engine warning:\n"); printf(msg); printf(" This may cause problems for the GNOME window manager\n"); } @@ -289,7 +289,7 @@ void createTQApp() if (ret == -1) { - printf("Gtk-TQt theme engine warning:\n"); + printf("Gtk-Qt theme engine warning:\n"); printf(msg); printf(" This may cause problems for the GNOME window manager\n"); } @@ -300,7 +300,7 @@ void createTQApp() int fd = open(cmdlinePath, O_RDONLY); if (fd == -1) { - printf("Gtk-TQt theme engine warning:\n"); + printf("Gtk-Qt theme engine warning:\n"); printf(" Could not open %s\n", (const char*)cmdlinePath); printf(" This may cause problems for the GNOME window manager\n"); } @@ -330,15 +330,15 @@ void createTQApp() eclipseFix = cmdLine.tqcontains("eclipse"); - gtkTQtDebug = (getenv("GTK_TQT_ENGINE_DEBUG") != NULL) ? 1 : 0; + gtkQtDebug = (getenv("GTK_TQT_ENGINE_DEBUG") != NULL) ? 1 : 0; - if (gtkTQtDebug) + if (gtkQtDebug) printf("createTQApp()\n"); char* sessionEnv = getenv("SESSION_MANAGER"); if (TQString(sessionEnv).endsWith(TQString::number(getpid())) || cmdLine.tqcontains("nspluginviewer") || cmdLine.tqcontains("gnome-wm") || cmdLine.tqcontains("metacity") || cmdLine.tqcontains("xfwm4") || (getenv("GTK_TQT_ENGINE_DISABLE") != NULL)) { - printf("Not initializing the Gtk-TQt theme engine\n"); + printf("Not initializing the Gtk-Qt theme engine\n"); } else { @@ -372,13 +372,13 @@ void createTQApp() XSetErrorHandler( original_x_errhandler ); XSetIOErrorHandler( original_xio_errhandler ); - gtkTQtEnable = true; + gtkQtEnable = true; } free(argv[0]); free(argv); - if (!gtkTQtEnable) + if (!gtkQtEnable) return; isBaghira = (TQString(tqApp->tqstyle().name()).lower() == "baghira"); @@ -436,7 +436,7 @@ void createTQApp() void destroyTQApp() { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; delete meepWidget; delete meepWidgetP; @@ -463,7 +463,7 @@ GdkFilterReturn gdkEventFilter(GdkXEvent *xevent, GdkEvent *gevent, gpointer dat if (event->xclient.data.l[0] != 2) return GDK_FILTER_REMOVE; - if (gtkTQtDebug) + if (gtkQtDebug) printf("StyleChanged IPC message\n"); // Find out the new widget style @@ -619,7 +619,7 @@ TQColor gdkColorToTQColor(GdkColor* c) void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defaultButton, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -654,7 +654,7 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa // Thanks Peter Hartshorn void drawToolbar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; int w1, h1; @@ -709,7 +709,7 @@ void drawToolbar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawMenubar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; int w1, h1; @@ -758,7 +758,7 @@ void drawMenubar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawTab(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -789,7 +789,7 @@ void drawTab(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int void drawVLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int ySource, int yDest) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; int width = style->xthickness; @@ -816,7 +816,7 @@ void drawVLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, in void drawHLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int y, int xSource, int xDest) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; int width = abs(xSource-xDest); @@ -841,7 +841,7 @@ void drawHLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int y, in void drawLineEdit(GdkWindow* window, GtkStyle* style, GtkStateType state, int hasFocus, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -864,7 +864,7 @@ void drawLineEdit(GdkWindow* window, GtkStyle* style, GtkStateType state, int ha void drawFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkShadowType shadow_type, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) // Caused crash in gaim file transfers window @@ -891,7 +891,7 @@ void drawFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkShadow void drawComboBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -919,7 +919,7 @@ void drawComboBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int checked, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight); @@ -938,7 +938,7 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background)); tqApp->tqstyle().tqdrawControl(TQStyle::CE_CheckBox, &painter, &checkbox, TQRect(0, 0, realW, realH), tqApp->tqpalette().active(), sflags); - // TQt checkboxes are usually bigger than GTK wants. + // Qt checkboxes are usually bigger than GTK wants. // We cheat, and draw them over the expected area. int xOffset = (realW - w) / 2; int yOffset = (realH - h) / 2; @@ -950,7 +950,7 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch void drawMenuCheck(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; TQCheckBox checkbox(0); @@ -985,7 +985,7 @@ void drawMenuCheck(GdkWindow* window, GtkStyle* style, GtkStateType state, int x void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int checked, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight); @@ -1010,7 +1010,7 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int tqApp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->tqpalette().active(), sflags); - // TQt checkboxes are usually bigger than GTK wants. + // Qt checkboxes are usually bigger than GTK wants. // We cheat, and draw them over the expected area. int xOffset = (realW - w) / 2; int yOffset = (realH - h) / 2; @@ -1023,7 +1023,7 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, int orientation, GtkAdjustment* adj, int x, int y, int w, int h, int offset, int totalExtent) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1077,13 +1077,13 @@ void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, if (orientation == GTK_ORIENTATION_HORIZONTAL) { - bitBlt(TQT_TQPAINTDEVICE(&pixmap), 1, 0, TQT_TQPAINTDEVICE(&leftPix), leftRect.width(), 0, 6, h, TQt::CopyROP, true); - bitBlt(TQT_TQPAINTDEVICE(&pixmap), w-7, 0, TQT_TQPAINTDEVICE(&rightPix), 0, 0, 7, h, TQt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(&pixmap), 1, 0, TQT_TQPAINTDEVICE(&leftPix), leftRect.width(), 0, 6, h, Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(&pixmap), w-7, 0, TQT_TQPAINTDEVICE(&rightPix), 0, 0, 7, h, Qt::CopyROP, true); } else { - bitBlt(TQT_TQPAINTDEVICE(&pixmap), 0, 1, TQT_TQPAINTDEVICE(&leftPix), 0, leftRect.height(), w, 6, TQt::CopyROP, true); - bitBlt(TQT_TQPAINTDEVICE(&pixmap), 0, h-7, TQT_TQPAINTDEVICE(&rightPix), 0, 0, w, 7, TQt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(&pixmap), 0, 1, TQT_TQPAINTDEVICE(&leftPix), 0, leftRect.height(), w, 6, Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(&pixmap), 0, h-7, TQT_TQPAINTDEVICE(&rightPix), 0, 0, w, 7, Qt::CopyROP, true); } } @@ -1104,7 +1104,7 @@ void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int orientation, GtkAdjustment* adj, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1166,9 +1166,9 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o &painter2, scrollBar, TQRect(0, 0, w, h+thumbSize), tqApp->tqpalette().active(), sflags); - bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, w, offset, TQt::CopyROP); + bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, w, offset, Qt::CopyROP); bitBlt(&pixmap, 0, offset, &tmpPixmap, 0, offset + thumbSize, - w, h - offset, TQt::CopyROP); + w, h - offset, Qt::CopyROP); } else { TQRect r; r = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, @@ -1191,9 +1191,9 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o &painter2, scrollBar, TQRect(0, 0, w+thumbSize, h), tqApp->tqpalette().active(), sflags); - bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, offset, h, TQt::CopyROP); + bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, offset, h, Qt::CopyROP); bitBlt(&pixmap, offset, 0, &tmpPixmap, offset + thumbSize, 0, - w - offset, h, TQt::CopyROP); + w - offset, h, Qt::CopyROP); } GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); @@ -1203,7 +1203,7 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1242,7 +1242,7 @@ void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int void drawMenuBarItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1264,7 +1264,7 @@ void drawMenuBarItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int void drawMenuItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1289,7 +1289,7 @@ void drawMenuItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawSplitter(GdkWindow* window, GtkStyle* style, GtkStateType state, int orientation, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1312,7 +1312,7 @@ void drawSplitter(GdkWindow* window, GtkStyle* style, GtkStateType state, int or void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h, GtkPositionType pos) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1370,7 +1370,7 @@ void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, void drawMenu(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1408,7 +1408,7 @@ void drawMenu(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int void drawProgressChunk(GdkWindow * window, GtkStyle * style, GtkStateType state, int x, int y, int w, int h) { // This is only for Mozilla/Firefox - if (!mozillaFix || !gtkTQtEnable) + if (!mozillaFix || !gtkQtEnable) return; if ((w<=1) || (h<=1)) @@ -1447,7 +1447,7 @@ void drawProgressChunk(GdkWindow * window, GtkStyle * style, GtkStateType state, void drawProgressBar(GdkWindow * window, GtkStyle * style, GtkStateType state, GtkProgressBarOrientation orientation, gfloat percentage, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w<=1) || (h<=1)) @@ -1483,7 +1483,7 @@ void drawProgressBar(GdkWindow * window, GtkStyle * style, GtkStateType state, G void drawSlider(GdkWindow * window, GtkStyle * style, GtkStateType state, GtkAdjustment *adj, int x, int y, int w, int h, GtkOrientation orientation, int inverted) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; meepSlider->setBackgroundOrigin(TQWidget::ParentOrigin); @@ -1508,7 +1508,7 @@ void drawSlider(GdkWindow * window, GtkStyle * style, GtkStateType state, GtkAdj void drawSpinButton(GdkWindow * window, GtkStyle * style, GtkStateType state, int direction, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1529,7 +1529,7 @@ void drawSpinButton(GdkWindow * window, GtkStyle * style, GtkStateType state, in void drawListHeader(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1551,7 +1551,7 @@ void drawListHeader(GdkWindow* window, GtkStyle* style, GtkStateType state, int void drawListViewItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1563,7 +1563,7 @@ void drawListViewItem(GdkWindow* window, GtkStyle* style, GtkStateType state, in /* Get the brush corresponding to highlight color */ TQBrush brush = tqApp->palette().brush(TQPalette::Active, TQColorGroup::Highlight); painter.setBrush(brush); - painter.setPen(TQt::NoPen); + painter.setPen(Qt::NoPen); painter.drawRect(0, 0, w, h); GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle()); @@ -1573,7 +1573,7 @@ void drawListViewItem(GdkWindow* window, GtkStyle* style, GtkStateType state, in void drawSquareButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; TQPixmap pixmap(20, 20); @@ -1600,7 +1600,7 @@ void drawSquareButton(GdkWindow* window, GtkStyle* style, GtkStateType state, in void initDrawTabNG(int count) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; delete meepTabBar; @@ -1615,7 +1615,7 @@ void initDrawTabNG(int count) void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, int y, int w, int h, GtkNotebook *notebook) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; GtkPositionType tpos = gtk_notebook_get_tab_pos(notebook); @@ -1683,7 +1683,7 @@ void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, in void drawArrow(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkArrowType direction, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1724,7 +1724,7 @@ void drawArrow(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkArrowT void drawFocusRect(GdkWindow * window, GtkStyle * style, int x, int y, int w, int h) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((w < 1) || (h < 1)) @@ -1866,10 +1866,10 @@ static TQStringList iconInheritsDirs( const TQString& icondir ) void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; - if (gtkTQtDebug) + if (gtkQtDebug) printf("setRcProperties()\n"); gtkRcStyle = rc_style; @@ -1938,7 +1938,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate) stream.setDevice(TQT_TQIODEVICE(&cacheFile)); stream << "# " << iconTheme << ", " << tqApp->tqstyle().name() << ", " << RC_CACHE_VERSION << "\n\n"; - stream << "# This file was generated by the Gtk TQt Theme Engine\n"; + stream << "# This file was generated by the Gtk Qt Theme Engine\n"; stream << "# It will be recreated when you change your KDE icon theme or widget style\n\n"; TQScrollBar sbar(NULL); @@ -2145,7 +2145,7 @@ void addIconThemeDir(const TQString& theme) void setMenuBackground(GtkStyle* style) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if (menuBackgroundPixmap == NULL) @@ -2185,10 +2185,10 @@ void setColour(GdkColor* g, TQColor q) void setColors(GtkStyle* style) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; - if (gtkTQtDebug) + if (gtkQtDebug) printf("setColors()\n"); /*gtkStyle = style;*/ @@ -2206,7 +2206,7 @@ void setColors(GtkStyle* style) void getTextColor(GdkColor *color, GtkStateType state_type) { - if (!gtkTQtEnable) + if (!gtkQtEnable) return; if ((state_type == GTK_STATE_PRELIGHT) || (state_type == GTK_STATE_ACTIVE) || (state_type == GTK_STATE_SELECTED)) diff --git a/src/qt_qt_wrapper.h b/src/qt_qt_wrapper.h index 743f463..969eeee 100644 --- a/src/qt_qt_wrapper.h +++ b/src/qt_qt_wrapper.h @@ -70,7 +70,7 @@ extern int isAlloy; extern int isDomino; extern int isPolyester; extern int openOfficeFix; -extern int gtkTQtDebug; +extern int gtkQtDebug; #ifdef __cplusplus } diff --git a/src/qt_rc_style.c b/src/qt_rc_style.c index bacf00e..9d9e4d3 100644 --- a/src/qt_rc_style.c +++ b/src/qt_rc_style.c @@ -4,8 +4,8 @@ -static void qtengine_rc_style_init (TQtEngineRcStyle *style); -static void qtengine_rc_style_class_init (TQtEngineRcStyleClass *klass); +static void qtengine_rc_style_init (QtEngineRcStyle *style); +static void qtengine_rc_style_class_init (QtEngineRcStyleClass *klass); static void qtengine_rc_style_finalize (GObject *object); static guint qtengine_rc_style_parse (GtkRcStyle *rc_style, GtkSettings *settings, @@ -24,25 +24,25 @@ void qtengine_rc_style_register_type (GTypeModule *module) { static const GTypeInfo object_info = { - sizeof (TQtEngineRcStyleClass), + sizeof (QtEngineRcStyleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) qtengine_rc_style_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (TQtEngineRcStyle), + sizeof (QtEngineRcStyle), 0, /* n_preallocs */ (GInstanceInitFunc) qtengine_rc_style_init, }; - qtengine_type_rc_style = g_type_module_register_type (module, GTK_TYPE_RC_STYLE, "TQtEngineRcStyle", &object_info, 0); + qtengine_type_rc_style = g_type_module_register_type (module, GTK_TYPE_RC_STYLE, "QtEngineRcStyle", &object_info, 0); } -static void qtengine_rc_style_init (TQtEngineRcStyle *style) +static void qtengine_rc_style_init (QtEngineRcStyle *style) { } -static void qtengine_rc_style_class_init (TQtEngineRcStyleClass *klass) +static void qtengine_rc_style_class_init (QtEngineRcStyleClass *klass) { GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); diff --git a/src/qt_rc_style.h b/src/qt_rc_style.h index f1ff906..1a4882b 100644 --- a/src/qt_rc_style.h +++ b/src/qt_rc_style.h @@ -1,23 +1,23 @@ #include -typedef struct _TQtEngineRcStyle TQtEngineRcStyle; -typedef struct _TQtEngineRcStyleClass TQtEngineRcStyleClass; +typedef struct _QtEngineRcStyle QtEngineRcStyle; +typedef struct _QtEngineRcStyleClass QtEngineRcStyleClass; extern GType qtengine_type_rc_style; #define TQTENGINE_TYPE_RC_STYLE qtengine_type_rc_style -#define TQTENGINE_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TQTENGINE_TYPE_RC_STYLE, TQtEngineRcStyle)) -#define TQTENGINE_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TQTENGINE_TYPE_RC_STYLE, TQtEngineRcStyleClass)) +#define TQTENGINE_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TQTENGINE_TYPE_RC_STYLE, QtEngineRcStyle)) +#define TQTENGINE_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TQTENGINE_TYPE_RC_STYLE, QtEngineRcStyleClass)) #define TQTENGINE_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TQTENGINE_TYPE_RC_STYLE)) #define TQTENGINE_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TQTENGINE_TYPE_RC_STYLE)) -#define TQTENGINE_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TQTENGINE_TYPE_RC_STYLE, TQtEngineRcStyleClass)) +#define TQTENGINE_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TQTENGINE_TYPE_RC_STYLE, QtEngineRcStyleClass)) -struct _TQtEngineRcStyle +struct _QtEngineRcStyle { GtkRcStyle parent_instance; }; -struct _TQtEngineRcStyleClass +struct _QtEngineRcStyleClass { GtkRcStyleClass parent_class; }; diff --git a/src/qt_style.h b/src/qt_style.h index 5cd920a..606f1bd 100644 --- a/src/qt_style.h +++ b/src/qt_style.h @@ -1,25 +1,25 @@ #include -typedef struct _TQtEngineStyle TQtEngineStyle; -typedef struct _TQtEngineStyleClass TQtEngineStyleClass; +typedef struct _QtEngineStyle QtEngineStyle; +typedef struct _QtEngineStyleClass QtEngineStyleClass; extern GType qtengine_type_style; #define TQTENGINE_TYPE_STYLE qtengine_type_style -#define TQTENGINE_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TQTENGINE_TYPE_STYLE, TQtEngineStyle)) -#define TQTENGINE_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TQTENGINE_TYPE_STYLE, TQtEngineStyleClass)) +#define TQTENGINE_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TQTENGINE_TYPE_STYLE, QtEngineStyle)) +#define TQTENGINE_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TQTENGINE_TYPE_STYLE, QtEngineStyleClass)) #define TQTENGINE_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TQTENGINE_TYPE_STYLE)) #define TQTENGINE_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TQTENGINE_TYPE_STYLE)) -#define TQTENGINE_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TQTENGINE_TYPE_STYLE, TQtEngineStyleClass)) +#define TQTENGINE_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TQTENGINE_TYPE_STYLE, QtEngineStyleClass)) -struct _TQtEngineStyle +struct _QtEngineStyle { GtkStyle parent_instance; GdkPixmap* menuBackground; }; -struct _TQtEngineStyleClass +struct _QtEngineStyleClass { GtkStyleClass parent_class; }; diff --git a/src/qt_theme_draw.c b/src/qt_theme_draw.c index cc97963..6ceae7e 100644 --- a/src/qt_theme_draw.c +++ b/src/qt_theme_draw.c @@ -26,8 +26,8 @@ #define min(x,y) ((x)<=(y)?(x):(y)) #endif -static void qtengine_style_init (TQtEngineStyle *style); -static void qtengine_style_class_init (TQtEngineStyleClass *klass); +static void qtengine_style_init (QtEngineStyle *style); +static void qtengine_style_class_init (QtEngineStyleClass *klass); static GtkNotebook *notebook = NULL; static int nb_num_pages = 0; @@ -81,7 +81,7 @@ draw_hline(GtkStyle* style, gint x2, gint y) { - if (gtkTQtDebug) + if (gtkQtDebug) printf("HLINE (%d,%d,%d) Widget: %s Detail: %s\n",x1,y1,y,gtk_widget_get_name(widget),detail); if (DETAIL("vscale")) @@ -102,7 +102,7 @@ draw_vline(GtkStyle* style, gint yDest, gint x) { - if (gtkTQtDebug) + if (gtkQtDebug) printf("VLINE (%d,%d,%d) Widget: %s Detail: %s\n",ySource ,yDest ,x,gtk_widget_get_name(widget),detail); @@ -135,7 +135,7 @@ draw_shadow(GtkStyle *style, sanitize_size(window, &width, &height); - if (gtkTQtDebug) + if (gtkQtDebug) printf("Shadow (%d,%d,%d,%d) Widget: %s Detail: %s\n",x,y,width,height,gtk_widget_get_name(widget),detail); @@ -159,9 +159,9 @@ draw_shadow(GtkStyle *style, } /* The remainder of this function was borrowed from the "Metal" theme/ - I don't really want to use TQt to draw these frames as there are too + I don't really want to use Qt to draw these frames as there are too many of them (it would slow down the theme engine even more). - TODO: Make them use the TQt color palette */ + TODO: Make them use the Qt color palette */ switch (shadow_type) { @@ -459,7 +459,7 @@ draw_arrow(GtkStyle* style, { sanitize_size(window, &width, &height); - if (gtkTQtDebug) + if (gtkQtDebug) printf("Arrow (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (DETAIL("hscrollbar") || DETAIL("vscrollbar")) @@ -615,7 +615,7 @@ draw_box(GtkStyle * style, int nbpages; sanitize_size(window, &width, &height); - if (gtkTQtDebug) + if (gtkQtDebug) printf("Box (%d,%d,%d,%d) Widget: %s Detail: %s\n",x,y,width,height,gtk_widget_get_name(widget),detail); if (GTK_IS_SCROLLBAR(widget)) @@ -782,7 +782,7 @@ draw_box(GtkStyle * style, Tabs and tabbarbase will be drawn properly according to the QT style But the tabs won't be aligned according to QT. GTK+ does not have an option for tqalignment of tabs. So if were to do this not only do we have to - calculate the x,y position of the tab ourselves, which is difficult in TQt unless + calculate the x,y position of the tab ourselves, which is difficult in Qt unless we are displaying the tab (can be done by subclassing TQTabBar/TQTabWidget) but also have to position the tab bar label ourselves in gtk. */ @@ -852,7 +852,7 @@ draw_flat_box(GtkStyle * style, { sanitize_size(window, &width, &height); - if (gtkTQtDebug) + if (gtkQtDebug) printf("Flat Box (%d,%d,%d,%d) Widget: %s Detail: %s %d %d\n",x,y,width,height,gtk_widget_get_name(widget),detail, state_type, GTK_STATE_SELECTED); if (DETAIL("tooltip")) @@ -908,7 +908,7 @@ draw_check(GtkStyle * style, gint width, gint height) { - if (gtkTQtDebug) + if (gtkQtDebug) printf("Check (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (GTK_IS_MENU_ITEM(widget)) @@ -945,7 +945,7 @@ draw_option(GtkStyle * style, gint width, gint height) { - if (gtkTQtDebug) + if (gtkQtDebug) printf("Option (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget))) @@ -979,7 +979,7 @@ draw_tab(GtkStyle * style, gint width, gint height) { - if (gtkTQtDebug) + if (gtkQtDebug) printf("Tab (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); @@ -1011,7 +1011,7 @@ draw_shadow_gap(GtkStyle * style, sanitize_size (window, &width, &height); shadow_type = get_shadow_type (style, detail, shadow_type); - if (gtkTQtDebug) + if (gtkQtDebug) printf("Shadow_Gap (%d,%d,%d,%d) Widget: %s Detail: %s\n",x,y,width,height,gtk_widget_get_name(widget),detail); switch (shadow_type) { @@ -1154,7 +1154,7 @@ draw_box_gap(GtkStyle* style, if (width<0 || height<0) return; /* Eclipse really can be this stupid! */ - if (gtkTQtDebug) + if (gtkQtDebug) printf("Box_gap (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (DETAIL("notebook")) @@ -1181,7 +1181,7 @@ draw_extension(GtkStyle * style, sanitize_size (window, &width, &height); - if (gtkTQtDebug) + if (gtkQtDebug) printf("Extension (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, @@ -1201,7 +1201,7 @@ draw_focus (GtkStyle *style, gint width, gint height) { - if (gtkTQtDebug) + if (gtkQtDebug) printf("Focus Rect (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); GtkWidget* tqparent = gtk_widget_get_parent(widget); @@ -1229,7 +1229,7 @@ draw_slider(GtkStyle * style, gint height, GtkOrientation orientation) { - if (gtkTQtDebug) + if (gtkQtDebug) printf("Slider (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); if (DETAIL("slider")) @@ -1270,7 +1270,7 @@ draw_handle(GtkStyle * style, sanitize_size(window, &width, &height); - if (gtkTQtDebug) + if (gtkQtDebug) printf("Handle (%d,%d,%d,%d) Widget: %s Detail: %s \n",x,y,width,height,gtk_widget_get_name(widget),detail, state_type); drawSplitter(window,style,state_type,orientation,x,y,width,height); @@ -1294,7 +1294,7 @@ void draw_layout (GtkStyle *style, GdkGC *gc; getTextColor(&color, state_type); - if (gtkTQtDebug) + if (gtkQtDebug) printf("Layout (%d,%d) Widget: %s Detail: %s %d \n",x,y,gtk_widget_get_name(widget),detail, state_type); if (DETAIL("accellabel") || DETAIL("label") || DETAIL("cellrenderertext")) @@ -1526,25 +1526,25 @@ qtengine_style_register_type (GTypeModule *module) { static const GTypeInfo object_info = { - sizeof (TQtEngineStyleClass), + sizeof (QtEngineStyleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) qtengine_style_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (TQtEngineStyle), + sizeof (QtEngineStyle), 0, /* n_preallocs */ (GInstanceInitFunc) qtengine_style_init, }; qtengine_type_style = g_type_module_register_type (module, GTK_TYPE_STYLE, - "TQtEngineStyle", + "QtEngineStyle", &object_info, 0); } static void -qtengine_style_init (TQtEngineStyle *style) +qtengine_style_init (QtEngineStyle *style) { } @@ -1880,7 +1880,7 @@ set_background (GtkStyle *style, GdkWindow *window, GtkStateType state_type) } static void -qtengine_style_class_init (TQtEngineStyleClass *klass) +qtengine_style_class_init (QtEngineStyleClass *klass) { GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);