rename the following methods:

tqparent parent
tqmask mask


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gtk-qt-engine@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent d64f4816a5
commit d7fee1a2ef

@ -65,10 +65,10 @@ K_EXPORT_COMPONENT_FACTORY( kcm_gtk, KcmGtkFactory("gtk"))*/
extern "C" extern "C"
{ {
KCModule *create_kcmgtk( TQWidget * tqparent, const char * name ) KCModule *create_kcmgtk( TQWidget * parent, const char * name )
{ {
KGlobal::locale()->insertCatalogue( "gtkqtengine" ); KGlobal::locale()->insertCatalogue( "gtkqtengine" );
return new KcmGtk( tqparent, "kcmgtk" ); return new KcmGtk( parent, "kcmgtk" );
} }
} }
@ -156,8 +156,8 @@ TQFont GtkRcParser::parseFont(TQString fontString)
return ret; return ret;
} }
KcmGtk::KcmGtk(TQWidget *tqparent, const char *name, const TQStringList&) KcmGtk::KcmGtk(TQWidget *parent, const char *name, const TQStringList&)
: KCModule(tqparent, name), : KCModule(parent, name),
myAboutData(0), myAboutData(0),
emacsDetailsDialog(NULL), emacsDetailsDialog(NULL),
searchPathsDialog(NULL) searchPathsDialog(NULL)

@ -57,7 +57,7 @@ class KcmGtk: public KCModule
static const TQString GTK_TQT_RC_FILE; static const TQString GTK_TQT_RC_FILE;
public: public:
KcmGtk( TQWidget *tqparent=0, const char *name=0, const TQStringList& = TQStringList() ); KcmGtk( TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() );
~KcmGtk(); ~KcmGtk();
virtual void load(); virtual void load();

@ -1756,11 +1756,11 @@ GdkGC* alternateBackgroundGc(GtkStyle* style)
gdk_colormap_alloc_color(style->colormap, &altBackColor, FALSE, TRUE); gdk_colormap_alloc_color(style->colormap, &altBackColor, FALSE, TRUE);
GdkGCValues gc_values; GdkGCValues gc_values;
GdkGCValuesMask gc_values_tqmask; GdkGCValuesMask gc_values_mask;
gc_values_tqmask = GDK_GC_FOREGROUND; gc_values_mask = GDK_GC_FOREGROUND;
gc_values.foreground = altBackColor; gc_values.foreground = altBackColor;
altBackGC = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); altBackGC = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
return altBackGC; return altBackGC;
} }
@ -2137,7 +2137,7 @@ void addIconThemeDir(const TQString& theme)
// Add this theme to the list // Add this theme to the list
iconThemeDirs.append(icondir); iconThemeDirs.append(icondir);
// Do it again for any tqparent themes // Do it again for any parent themes
TQStringList parents = iconInheritsDirs(icondir); TQStringList parents = iconInheritsDirs(icondir);
for ( TQStringList::Iterator it=parents.begin() ; it!=parents.end(); ++it) for ( TQStringList::Iterator it=parents.begin() ; it!=parents.end(); ++it)
addIconThemeDir((*it).stripWhiteSpace()); addIconThemeDir((*it).stripWhiteSpace());

@ -18,7 +18,7 @@
#define DETAIL(xx) ((detail) && (!strcmp(xx, detail))) #define DETAIL(xx) ((detail) && (!strcmp(xx, detail)))
#define DETAILHAS(xx) ((detail) && (strstr(detail, xx))) #define DETAILHAS(xx) ((detail) && (strstr(detail, xx)))
#define PARENT(xx) ((tqparent) && (!strcmp(xx, gtk_widget_get_name(tqparent)))) #define PARENT(xx) ((parent) && (!strcmp(xx, gtk_widget_get_name(parent))))
#ifndef max #ifndef max
#define max(x,y) ((x)>=(y)?(x):(y)) #define max(x,y) ((x)>=(y)?(x):(y))
#endif #endif
@ -474,7 +474,7 @@ draw_arrow(GtkStyle* style,
if (DETAIL("arrow")) if (DETAIL("arrow"))
{ {
GdkPixbuf *gpix; GdkPixbuf *gpix;
GtkWidget* tqparent; GtkWidget* parent;
if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget))) if (gdk_window_is_viewable(gtk_widget_get_parent_window(widget)))
{ {
gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height); gpix = gdk_pixbuf_get_from_drawable(NULL, gtk_widget_get_parent_window(widget),NULL, x, y, 0, 0, width, height);
@ -482,8 +482,8 @@ draw_arrow(GtkStyle* style,
g_object_unref(gpix); g_object_unref(gpix);
} }
tqparent = gtk_widget_get_parent(widget); parent = gtk_widget_get_parent(widget);
drawArrow(window,style, GTK_WIDGET_STATE(tqparent), arrow_type, x, y, width, height); drawArrow(window,style, GTK_WIDGET_STATE(parent), arrow_type, x, y, width, height);
return; return;
} }
/* if (DETAIL("menuitem")) /* if (DETAIL("menuitem"))
@ -700,11 +700,11 @@ draw_box(GtkStyle * style,
} }
if (DETAIL("button")) if (DETAIL("button"))
{ {
GtkWidget *tqparent; GtkWidget *parent;
int toolbutton = 0; int toolbutton = 0;
tqparent = gtk_widget_get_parent(widget); parent = gtk_widget_get_parent(widget);
if (tqparent && (GTK_IS_CLIST(tqparent) || GTK_IS_LIST(tqparent) || GTK_IS_TREE_VIEW(tqparent))) if (parent && (GTK_IS_CLIST(parent) || GTK_IS_LIST(parent) || GTK_IS_TREE_VIEW(parent)))
{ {
drawListHeader(window,style,state_type,x,y,width,height); drawListHeader(window,style,state_type,x,y,width,height);
return; return;
@ -714,12 +714,12 @@ draw_box(GtkStyle * style,
* toolbar in gtk */ * toolbar in gtk */
while (1) while (1)
{ {
if (GTK_IS_WIDGET(tqparent)) if (GTK_IS_WIDGET(parent))
{ {
#ifdef HAVE_BONOBO #ifdef HAVE_BONOBO
if (GTK_IS_TOOLBAR(tqparent) || BONOBO_IS_UI_TOOLBAR(tqparent)) if (GTK_IS_TOOLBAR(parent) || BONOBO_IS_UI_TOOLBAR(parent))
#else #else
if (GTK_IS_TOOLBAR(tqparent)) if (GTK_IS_TOOLBAR(parent))
#endif #endif
{ {
toolbutton = 1; toolbutton = 1;
@ -728,10 +728,10 @@ draw_box(GtkStyle * style,
} }
else else
break; break;
tqparent = gtk_widget_get_parent(tqparent); parent = gtk_widget_get_parent(parent);
} }
tqparent = gtk_widget_get_parent(widget); parent = gtk_widget_get_parent(widget);
if (toolbutton) if (toolbutton)
drawToolButton(window,style,state_type,x,y,width,height); drawToolButton(window,style,state_type,x,y,width,height);
@ -744,9 +744,9 @@ draw_box(GtkStyle * style,
int defaultButton = GTK_WIDGET_HAS_FOCUS(widget); int defaultButton = GTK_WIDGET_HAS_FOCUS(widget);
GtkWindow* toplevel; GtkWindow* toplevel;
if (isBaghira && GTK_IS_BOX(tqparent) && (g_list_length(GTK_BOX(tqparent)->children) == 2)) if (isBaghira && GTK_IS_BOX(parent) && (g_list_length(GTK_BOX(parent)->children) == 2))
{ {
child1 = g_list_first((GTK_BOX(tqparent)->children)); child1 = g_list_first((GTK_BOX(parent)->children));
child = ((GtkBoxChild *)child1->data)->widget; child = ((GtkBoxChild *)child1->data)->widget;
if (GTK_IS_ENTRY(child)) if (GTK_IS_ENTRY(child))
{ {
@ -754,7 +754,7 @@ draw_box(GtkStyle * style,
return; return;
} }
child1 = g_list_last((GTK_BOX(tqparent)->children)); child1 = g_list_last((GTK_BOX(parent)->children));
child = ((GtkBoxChild *)child1->data)->widget; child = ((GtkBoxChild *)child1->data)->widget;
if (GTK_IS_ENTRY(child)) if (GTK_IS_ENTRY(child))
{ {
@ -859,17 +859,17 @@ draw_flat_box(GtkStyle * style,
{ {
GdkColor tooltipColor; GdkColor tooltipColor;
GdkGCValues gc_values; GdkGCValues gc_values;
GdkGCValuesMask gc_values_tqmask; GdkGCValuesMask gc_values_mask;
GdkGC* tooltipGc; GdkGC* tooltipGc;
tooltipColor.red = 255*257; tooltipColor.red = 255*257;
tooltipColor.green = 255*257; tooltipColor.green = 255*257;
tooltipColor.blue = 220*257; tooltipColor.blue = 220*257;
gdk_colormap_alloc_color(style->colormap, &tooltipColor, FALSE, TRUE); gdk_colormap_alloc_color(style->colormap, &tooltipColor, FALSE, TRUE);
gc_values_tqmask = GDK_GC_FOREGROUND; gc_values_mask = GDK_GC_FOREGROUND;
gc_values.foreground = tooltipColor; gc_values.foreground = tooltipColor;
tooltipGc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); tooltipGc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gdk_draw_rectangle(window, tooltipGc, TRUE, x, y, width, height); gdk_draw_rectangle(window, tooltipGc, TRUE, x, y, width, height);
gdk_draw_rectangle(window, style->black_gc, FALSE, x, y, width - 1, height - 1); gdk_draw_rectangle(window, style->black_gc, FALSE, x, y, width - 1, height - 1);
@ -1204,11 +1204,11 @@ draw_focus (GtkStyle *style,
if (gtkQtDebug) if (gtkQtDebug)
printf("Focus Rect (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail); 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); GtkWidget* parent = gtk_widget_get_parent(widget);
if (GTK_IS_CHECK_BUTTON(widget) || if (GTK_IS_CHECK_BUTTON(widget) ||
GTK_IS_RADIO_BUTTON(widget) || GTK_IS_RADIO_BUTTON(widget) ||
(tqparent && (GTK_IS_CLIST(tqparent) || GTK_IS_LIST(tqparent) || GTK_IS_TREE_VIEW(tqparent)))) (parent && (GTK_IS_CLIST(parent) || GTK_IS_LIST(parent) || GTK_IS_TREE_VIEW(parent))))
{ {
drawFocusRect(window, style, x, y, width, height); drawFocusRect(window, style, x, y, width, height);
} }
@ -1237,11 +1237,11 @@ draw_slider(GtkStyle * style,
GtkAdjustment* adj = gtk_range_get_adjustment(GTK_RANGE(widget)); GtkAdjustment* adj = gtk_range_get_adjustment(GTK_RANGE(widget));
int widgetX, widgetY; int widgetX, widgetY;
GtkWidget* tqparent = widget; GtkWidget* parent = widget;
while (gtk_widget_get_parent(tqparent) != NULL) while (gtk_widget_get_parent(parent) != NULL)
tqparent = gtk_widget_get_parent(tqparent); parent = gtk_widget_get_parent(parent);
gtk_widget_translate_coordinates(widget, tqparent, 0, 0, &widgetX, &widgetY); gtk_widget_translate_coordinates(widget, parent, 0, 0, &widgetX, &widgetY);
if (orientation == GTK_ORIENTATION_VERTICAL) if (orientation == GTK_ORIENTATION_VERTICAL)
drawScrollBarSlider(window, style, state_type, orientation, adj, x-1, y, width+2, height, y-widgetY, widget->allocation.height); drawScrollBarSlider(window, style, state_type, orientation, adj, x-1, y, width+2, height, y-widgetY, widget->allocation.height);
@ -1300,13 +1300,13 @@ void draw_layout (GtkStyle *style,
if (DETAIL("accellabel") || DETAIL("label") || DETAIL("cellrenderertext")) if (DETAIL("accellabel") || DETAIL("label") || DETAIL("cellrenderertext"))
{ {
GtkWidget* tqparent = gtk_widget_get_parent(widget); GtkWidget* parent = gtk_widget_get_parent(widget);
GtkWidget* tqparent1 = gtk_widget_get_parent(tqparent); GtkWidget* parent1 = gtk_widget_get_parent(parent);
/* printf("tqparent's names are %s->%s->%s\n", gtk_widget_get_name(widget), gtk_widget_get_name(tqparent), gtk_widget_get_name(tqparent1)); */ /* printf("parent's names are %s->%s->%s\n", gtk_widget_get_name(widget), gtk_widget_get_name(parent), gtk_widget_get_name(parent1)); */
/* In baghira -- even highlight the menu bar items */ /* In baghira -- even highlight the menu bar items */
if ((GTK_IS_MENU_ITEM(tqparent) && (!GTK_IS_MENU_BAR(tqparent1) || isBaghira || isPolyester)) || GTK_IS_TREE_VIEW(widget)) if ((GTK_IS_MENU_ITEM(parent) && (!GTK_IS_MENU_BAR(parent1) || isBaghira || isPolyester)) || GTK_IS_TREE_VIEW(widget))
{ {
PangoAttrList *layoutattr; PangoAttrList *layoutattr;
@ -1743,7 +1743,7 @@ static void
gtk_style_real_realize (GtkStyle *style) gtk_style_real_realize (GtkStyle *style)
{ {
GdkGCValues gc_values; GdkGCValues gc_values;
GdkGCValuesMask gc_values_tqmask; GdkGCValuesMask gc_values_mask;
gint i; gint i;
@ -1771,13 +1771,13 @@ gtk_style_real_realize (GtkStyle *style)
style->white.blue = 0xffff; style->white.blue = 0xffff;
gdk_colormap_alloc_color (style->colormap, &style->white, FALSE, TRUE); gdk_colormap_alloc_color (style->colormap, &style->white, FALSE, TRUE);
gc_values_tqmask = GDK_GC_FOREGROUND; gc_values_mask = GDK_GC_FOREGROUND;
gc_values.foreground = style->black; gc_values.foreground = style->black;
style->black_gc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->black_gc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gc_values.foreground = style->white; gc_values.foreground = style->white;
style->white_gc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->white_gc = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++)
{ {
@ -1808,28 +1808,28 @@ gtk_style_real_realize (GtkStyle *style)
style->text_aa[i].red, style->text_aa[i].green, style->text_aa[i].blue); style->text_aa[i].red, style->text_aa[i].green, style->text_aa[i].blue);
gc_values.foreground = style->fg[i]; gc_values.foreground = style->fg[i];
style->fg_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->fg_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gc_values.foreground = style->bg[i]; gc_values.foreground = style->bg[i];
style->bg_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->bg_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gc_values.foreground = style->light[i]; gc_values.foreground = style->light[i];
style->light_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->light_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gc_values.foreground = style->dark[i]; gc_values.foreground = style->dark[i];
style->dark_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->dark_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gc_values.foreground = style->mid[i]; gc_values.foreground = style->mid[i];
style->mid_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->mid_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gc_values.foreground = style->text[i]; gc_values.foreground = style->text[i];
style->text_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->text_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gc_values.foreground = style->base[i]; gc_values.foreground = style->base[i];
style->base_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->base_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
gc_values.foreground = style->text_aa[i]; gc_values.foreground = style->text_aa[i];
style->text_aa_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_tqmask); style->text_aa_gc[i] = (GdkGC*) gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
} }
} }
@ -1849,9 +1849,9 @@ set_background (GtkStyle *style, GdkWindow *window, GtkStateType state_type)
GdkPixmap* pix_test; GdkPixmap* pix_test;
/* What kind of horrible person would store a pointer to a widget here... */ /* What kind of horrible person would store a pointer to a widget here... */
void* tqparent = 0; void* parent = 0;
gdk_window_get_user_data(window, &tqparent); gdk_window_get_user_data(window, &parent);
if (GTK_IS_MENU((GtkWidget*) tqparent)) if (GTK_IS_MENU((GtkWidget*) parent))
{ {
pix_test = TQTENGINE_STYLE(style)->menuBackground; pix_test = TQTENGINE_STYLE(style)->menuBackground;
} }

Loading…
Cancel
Save