Hello community,
here is the log from the commit of package qtcurve-gtk2
checked in at Mon Nov 27 18:31:14 CET 2006.
--------
--- KDE/qtcurve-gtk2/qtcurve-gtk2.changes 2006-11-24 17:04:06.000000000 +0100
+++ /mounts/work_src_done/STABLE/STABLE/qtcurve-gtk2/qtcurve-gtk2.changes 2006-11-27 16:59:43.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Nov 27 16:57:40 CET 2006 - wstephenson(a)suse.de
+
+- Fix crashes when leaving menubar on x86_64 machines (#223674)
+
+-------------------------------------------------------------------
New:
----
fix_braces_and_switch_compiler_warnings.diff
x86_64_shaped_cluebat.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qtcurve-gtk2.spec ++++++
--- /var/tmp/diff_new_pack.ZppZCa/_old 2006-11-27 18:29:48.000000000 +0100
+++ /var/tmp/diff_new_pack.ZppZCa/_new 2006-11-27 18:29:48.000000000 +0100
@@ -17,12 +17,14 @@
Group: System/GUI/KDE
Summary: QtCurve style for KDE
Version: 0.45.3
-Release: 12
+Release: 14
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: QtCurve-Gtk2-%{version}.tar.gz
Patch: fix-return-value.diff
Patch1: fix-cached-gc-crash.diff
Patch2: fixme.diff
+Patch3: fix_braces_and_switch_compiler_warnings.diff
+Patch4: x86_64_shaped_cluebat.diff
%if %suse_version > 1010
Recommends: qtcurve-kde
%endif
@@ -41,10 +43,12 @@
%patch
%patch1
%patch2
+%patch3
+%patch4
%build
-export CFLAGS="$RPM_OPT_FLAGS"
-export CXXFLAGS="$RPM_OPT_FLAGS"
+export CFLAGS="$RPM_OPT_FLAGS -O0"
+export CXXFLAGS="$RPM_OPT_FLAGS -O0"
./configure
%__make %{?jobs:-j %jobs}
@@ -72,6 +76,8 @@
/opt/gnome/share/themes/QtCurve
%changelog -n qtcurve-gtk2
+* Mon Nov 27 2006 - wstephenson(a)suse.de
+- Fix crashes when leaving menubar on x86_64 machines (#223674)
* Fri Nov 24 2006 - stbinner(a)suse.de
- remove unnecessary .la file (#223541)
* Fri Nov 24 2006 - stbinner(a)suse.de
++++++ fix_braces_and_switch_compiler_warnings.diff ++++++
--- gtk2/qt_settings.c
+++ gtk2/qt_settings.c
@@ -701,6 +701,7 @@
if(!found_slash)
pos=0; /* Perhaps no / */
if(pos>=0)
+ {
if(NULL!=strstr(cmdline, "gimp/2.0/plug-ins"))
strcpy(app_name, GIMP_PLUGIN);
else
@@ -708,6 +709,7 @@
strncpy(app_name, &cmdline[pos ? pos+1 : 0], MAX_APP_NAME_LEN);
app_name[MAX_APP_NAME_LEN]='\0';
}
+ }
}
close(procFile);
}
@@ -777,7 +779,9 @@
if(0==strcmp(line, CSS_FILE_STR))
add_css=FALSE;
else
+ {
if(0==strcmp(line, MENU_TEXT_STR))
+ {
if (add_menu_colors)
add_menu_colors=FALSE;
else
@@ -785,7 +789,8 @@
remove_menu_colors=TRUE;
write_line=FALSE;
}
-
+ }
+ }
if(write_line)
strcat(contents, line);
}
@@ -1027,6 +1032,7 @@
/* Check if we're firefox... */
if((app=getAppName()))
+ {
if((0==strcmp(app, "firefox-bin") || 0==strcmp(app, "thunderbird-bin") ||
0==strcmp(app, "swiftfox-bin") || 0==strcmp(app, "mozilla-thunderbird-bin")))
{
@@ -1059,6 +1065,7 @@
qtSettings.app=GTK_APP_GIMP;
/*else if(app==strstr(app, "gaim"))
qtSettings.app=GTK_APP_GAIM;*/
+ }
if(GTK_APP_MOZILLA==qtSettings.app)
{
@@ -1252,10 +1259,12 @@
tmpStr=(char *)realloc(tmpStr, strlen(constSbStrFormat)+1);
if(GTK_APP_OPEN_OFFICE==qtSettings.app)
+ {
if(SCROLLBAR_NONE==opts->scrollbarType)
opts->scrollbarType=SCROLLBAR_WINDOWS;
else if(SCROLLBAR_NEXT==opts->scrollbarType)
opts->scrollbarType=SCROLLBAR_KDE;
+ }
switch(opts->scrollbarType)
{
--- gtk2/qtcurve.c
+++ gtk2/qtcurve.c
@@ -360,6 +360,7 @@
static gboolean isOnToolbar(GtkWidget *widget, gboolean *horiz, int level)
{
if(widget)
+ {
if(GTK_IS_TOOLBAR(widget))
{
if(horiz)
@@ -368,6 +369,7 @@
}
else if(level<4)
return isOnToolbar(widget->parent, horiz, ++level);
+ }
return FALSE;
}
@@ -375,6 +377,7 @@
static gboolean isOnHandlebox(GtkWidget *widget, gboolean *horiz, int level)
{
if(widget)
+ {
if(GTK_IS_HANDLE_BOX(widget))
{
if(horiz)
@@ -386,6 +389,7 @@
}
else if(level<4)
return isOnHandlebox(widget->parent, horiz, ++level);
+ }
return FALSE;
}
@@ -443,20 +447,24 @@
static gboolean isOnComboEntry(GtkWidget *w, int level)
{
if(w)
+ {
if(GTK_IS_COMBO_BOX_ENTRY(w))
return TRUE;
else if(level<4)
return isOnComboEntry(w->parent, ++level);
+ }
return FALSE;
}
static gboolean isOnCombo(GtkWidget *w, int level)
{
if(w)
+ {
if(GTK_IS_COMBO_BOX(w))
return TRUE;
else if(level<4)
return isOnCombo(w->parent, ++level);
+ }
return FALSE;
}
@@ -484,10 +492,12 @@
static GtkMenuBar * isMenubar(GtkWidget *w, int level)
{
if(w)
+ {
if(GTK_IS_MENU_BAR(w))
return (GtkMenuBar*)w;
else if(level<3)
return isMenubar(w->parent, level++);
+ }
return NULL;
}
@@ -495,10 +505,12 @@
static gboolean isMenuitem(GtkWidget *w, int level)
{
if(w)
+ {
if(GTK_IS_MENU_ITEM(w))
return TRUE;
else if(level<3)
return isMenuitem(w->parent, level++);
+ }
return FALSE;
}
@@ -508,6 +520,7 @@
static gboolean isOnButton(GtkWidget *w, int level, gboolean *def)
{
if(w)
+ {
if(GTK_IS_BUTTON(w) &&(!(GTK_IS_RADIO_BUTTON(w) || GTK_IS_CHECK_BUTTON(w) ||
GTK_IS_OPTION_MENU(w))))
{
@@ -517,6 +530,7 @@
}
else if(level<3)
return isOnButton(w->parent, level++, def);
+ }
return FALSE;
}
@@ -622,6 +636,7 @@
static EStepper getStepper(GtkWidget *widget, int x, int y)
{
if(GTK_IS_RANGE(widget))
+ {
if(isStepperA(widget, x, y))
return QTC_STEPPER_A;
else if(isStepperB(widget, x, y))
@@ -630,6 +645,7 @@
return QTC_STEPPER_C;
else if(isStepperD(widget, x, y))
return QTC_STEPPER_D;
+ }
return QTC_STEPPER_NONE;
}
@@ -650,6 +666,7 @@
{
if(QTC_ROUNDED)
if(detail)
+ {
if(0==strcmp(detail, "slider"))
return SCROLLBAR_NONE==opts.scrollbarType ? ROUNDED_ALL : ROUNDED_NONE;
else if(0==strcmp(detail, "splitter") || 0==strcmp(detail, "optionmenu") ||
@@ -684,6 +701,7 @@
else
return ROUNDED_ALL;
}
+ }
return ROUNDED_NONE;
}
@@ -1201,6 +1219,7 @@
static guint pixbufCacheHashKey(gconstpointer k)
{
QtCPixKey *key=(QtCPixKey *)k;
+ /* FIXME compiler warning below! */
int hash=(key->pix<<24)+(key->col.red>>8)<<16 + (key->col.green>>8)<<8 + (key->col.blue>>8);
return g_int_hash(&hash);
@@ -1724,7 +1743,7 @@
}
else
{
- if(flags&DF_DO_FILL && width<=2 || height<=2)
+ if( ( flags&DF_DO_FILL && width<=2 ) || height<=2)
flags-=DF_DO_FILL;
bx++; by++; bh-=2; bw-=2;
}
@@ -1877,10 +1896,12 @@
debugDisplayWidget(widget, 3);
#endif
if(ROUNDED_ALL!=round && !highlight)
+ {
if(ROUNDED_RIGHT==round) /* RtoL */
x--;
else
width++;
+ }
if(APPEARANCE_FLAT!=opts.appearance || highlight)
midgc=QTC_SET_MID_COLOR(&style->base[state], &colors[3])
@@ -2005,8 +2026,8 @@
}
}
}
- if( GTK_STATE_PRELIGHT==state && (detail && 0==strcmp(detail, QTC_PANED)) ||
- (opts.crLabelHighlight && (GTK_IS_RADIO_BUTTON(widget) || GTK_IS_CHECK_BUTTON(widget))) )
+ if( ( GTK_STATE_PRELIGHT==state && (detail && 0==strcmp(detail, QTC_PANED) ) ) ||
+ ( (opts.crLabelHighlight && (GTK_IS_RADIO_BUTTON(widget) || GTK_IS_CHECK_BUTTON(widget))) ) )
drawAreaMod(style, window, GTK_STATE_PRELIGHT, area, NULL, opts.highlightFactor, x, y, width, height);
else
parent_class->draw_flat_box(style, window, state, shadow_type, area, widget, detail, x, y,
@@ -2032,10 +2053,12 @@
area, x, y, width, height);
if (DETAIL("dockitem") || paf)
+ {
if(GTK_ORIENTATION_HORIZONTAL==orientation)
orientation=GTK_ORIENTATION_VERTICAL;
else
orientation=GTK_ORIENTATION_HORIZONTAL;
+ }
if(detail && (!strcmp(detail, "paned") || !strcmp(detail+1, "paned")))
{
GdkGC **gcs=opts.coloredMouseOver && GTK_STATE_PRELIGHT==state
@@ -2193,6 +2216,9 @@
case GTK_ARROW_RIGHT:
for(i = 0, j = -1; i < width; i++, j++)
drawArrowVLine(window, gc, y + j, y + height - j - 1, x + i, i == 0);
+ case GTK_ARROW_NONE:
+ /* FIXME */
+ break;
}
else
switch(arrow_type)
@@ -2212,6 +2238,9 @@
case GTK_ARROW_RIGHT:
for(i = 0, j = 0; i < width; i++, j++)
gdk_draw_line(window, gc, x + i, y + j, x + i, y + height - j - 1);
+ case GTK_ARROW_NONE:
+ /* FIXME */
+ break;
}
if(area)
@@ -2230,6 +2259,7 @@
if(DETAIL("arrow"))
{
if(!isOnComboEntry(widget, 0) && !isOnCombo(widget, 0))
+ {
if(GTK_ARROW_DOWN==arrow_type || GTK_ARROW_UP==arrow_type)
drawArrow(window, style->text_gc[QTC_ARROW_STATE(state)], area, arrow_type,
x+((width - LARGE_ARR_WIDTH)>>1),
@@ -2238,6 +2268,7 @@
drawArrow(window, style->text_gc[QTC_ARROW_STATE(state)], area, arrow_type,
x+((width - LARGE_ARR_HEIGHT)>>1),
y+((height-LARGE_ARR_WIDTH)>>1), LARGE_ARR_HEIGHT, LARGE_ARR_WIDTH);
+ }
}
else
{
@@ -2261,10 +2292,12 @@
sanitizeSize(window, &width, &height);
if(isSpinButton)
+ {
if(GTK_ARROW_UP==arrow_type)
y-=1;
else if(!opts.vArrow && GTK_ARROW_DOWN==arrow_type)
y+=1;
+ }
if(isSpinButton)
{
@@ -2362,6 +2395,7 @@
sanitizeSize(window, &width, &height);
if(useButtonColor(detail))
+ {
if(slider|hscale|vscale && GTK_STATE_INSENSITIVE==state)
{
btn_gcs=qtcurveStyle->background_gc;
@@ -2377,6 +2411,7 @@
}
else
QTC_SET_BTN_COL_AND_GCS(slider, hscale|vscale, lvh)
+ }
g_return_if_fail(style != NULL);
g_return_if_fail(window != NULL);
@@ -2504,7 +2539,9 @@
: WIDGET_OTHER;
if(GTK_APP_MOZILLA!=qtSettings.app)
+ {
if(QTC_STEPPER_B==step)
+ {
if(horiz)
{
x--; width++;
@@ -2513,11 +2550,15 @@
{
y--; height++;
}
+ }
else if(QTC_STEPPER_C==step)
+ {
if(horiz)
width++;
else
height++;
+ }
+ }
if(GTK_APP_MOZILLA!=qtSettings.app && slider && SCROLLBAR_NONE==opts.scrollbarType &&
ROUNDED_NONE!=opts.round)
@@ -2590,6 +2631,7 @@
}
if((button || togglebutton) && GTK_WIDGET_HAS_DEFAULT(widget))
+ {
if(IND_CORNER==opts.defBtnIndicator)
{
int offset=sunken ? 4 : 3;
@@ -2629,6 +2671,7 @@
gdk_region_destroy(inner_region);
gdk_region_destroy(outer_region);
}
+ }
}
if(optionmenu)
@@ -2841,6 +2884,7 @@
}
if(rest_w>0 && rest_h>0)
+ {
if(APPEARANCE_FLAT==opts.appearance)
gdk_draw_rectangle(window, bgnd, TRUE, rest_x, rest_y, rest_w, rest_h);
else
@@ -2849,6 +2893,7 @@
ROUNDED_ALL, WIDGET_SLIDER_TROUGH,
BORDER_FLAT, DF_DO_CORNERS|DF_SUNKEN|DF_DO_FILL|DF_DO_BORDER|
(horiz ? 0 : DF_VERT));
+ }
}
else if(GTK_IS_PROGRESS_BAR(widget))
{
@@ -3470,7 +3515,7 @@
GdkColor new_colors[TOTAL_SHADES+1],
*btn_colors;
gboolean custom_c = FALSE;
- int ind_state=(list || !mnu && GTK_STATE_INSENSITIVE==state) ? state : GTK_STATE_NORMAL;
+ int ind_state=(list || ( !mnu && GTK_STATE_INSENSITIVE==state ) ) ? state : GTK_STATE_NORMAL;
if(QT_CUSTOM_COLOR_BUTTON(style))
{
@@ -4589,6 +4634,7 @@
*/
if(useButtonColor(detail))
+ {
if(scrollbar|hscale|vscale && GTK_STATE_INSENSITIVE==state)
btn_gcs=qtcurveStyle->background_gc;
else if(QT_CUSTOM_COLOR_BUTTON(style))
@@ -4601,6 +4647,7 @@
}
else
QTC_SET_BTN_GCS(scrollbar, hscale||vscale, FALSE)
+ }
FN_CHECK
sanitizeSize(window, &width, &height);
@@ -4683,6 +4730,7 @@
qtcurveStyle->background_gc, area, 0, 5, LINE_LARGE_DOTS==opts.toolbarSeparators);
return;
case LINE_NONE:
+ case LINE_SUNKEN:
return;
}
}
@@ -4747,6 +4795,7 @@
qtcurveStyle->background_gc, area, 0, 5, LINE_LARGE_DOTS==opts.toolbarSeparators);
return;
case LINE_NONE:
+ case LINE_SUNKEN:
return;
}
}
@@ -5113,14 +5162,17 @@
qtcurveStyle->defbtn_gc[0]=NULL;
if(IND_COLORED==opts.defBtnIndicator)
+ {
if(SHADE_SELECTED==opts.shadeSliders)
memcpy(qtcurveStyle->defbtn_gc, qtcurveStyle->slider_gc,
sizeof(GdkGC *)*(TOTAL_SHADES+1));
else
QTC_GEN_GCS(style, qtcurveStyle->defbtn, qtcurveStyle->defbtn_gc)
+ }
qtcurveStyle->mouseover_gc[0]=NULL;
if(opts.coloredMouseOver)
+ {
if(qtcurveStyle->defbtn_gc[0])
memcpy(qtcurveStyle->mouseover_gc, qtcurveStyle->defbtn_gc,
sizeof(GdkGC *)*(TOTAL_SHADES+1));
@@ -5129,6 +5181,7 @@
sizeof(GdkGC *)*(TOTAL_SHADES+1));
else
QTC_GEN_GCS(style, qtcurveStyle->mouseover, qtcurveStyle->mouseover_gc)
+ }
switch(opts.lvHeaderColor)
{
@@ -5261,6 +5314,7 @@
qtcurveStyle->sbslider_gc[0]=NULL;
if(IND_COLORED==opts.defBtnIndicator)
+ {
if(SHADE_SELECTED==opts.shadeSliders)
memcpy(qtcurveStyle->defbtn, qtcurveStyle->slider, sizeof(GdkColor)*(TOTAL_SHADES+1));
else
@@ -5271,8 +5325,10 @@
&qtcurveStyle->button[ORIGINAL_SHADE], &mid, 1.0);
shadeColors(&mid, qtcurveStyle->defbtn);
}
+ }
if(opts.coloredMouseOver)
+ {
if(IND_COLORED==opts.defBtnIndicator)
memcpy(qtcurveStyle->mouseover, qtcurveStyle->defbtn, sizeof(GdkColor)*(TOTAL_SHADES+1));
else if(SHADE_SELECTED==opts.shadeSliders)
@@ -5285,6 +5341,7 @@
&qtcurveStyle->button[ORIGINAL_SHADE], &mid, 1.0);
shadeColors(&mid, qtcurveStyle->mouseover);
}
+ }
switch(opts.lvHeaderColor)
{
++++++ x86_64_shaped_cluebat.diff ++++++
--- gtk2/qtcurve.c~ 2006-11-27 17:07:54.000000000 +0100
+++ gtk2/qtcurve.c 2006-11-27 17:20:19.000000000 +0100
@@ -1099,18 +1099,18 @@
}
#endif
-static int * lookupMenubarHash(void *hash, gboolean create)
+static GtkWidget **lookupMenubarHash(void *hash, gboolean create)
{
- int *rv=NULL;
+ GtkWidget **rv=NULL;
if(!menubarHashTable)
menubarHashTable=g_hash_table_new(g_direct_hash, g_direct_equal);
- rv=(int *)g_hash_table_lookup(menubarHashTable, hash);
+ rv=(GtkWidget **)g_hash_table_lookup(menubarHashTable, hash);
if(!rv && create)
{
- rv=(int *)malloc(sizeof(int));
+ rv=malloc(sizeof(GtkWidget *));
*rv=0;
g_hash_table_insert(menubarHashTable, hash, rv);
rv=g_hash_table_lookup(menubarHashTable, hash);
@@ -1127,7 +1127,7 @@
if(abs(last_x-event->motion.x_root)>4 || abs(last_y-event->motion.y_root)>4)
{
- int *item=lookupMenubarHash(widget, FALSE);
+ GtkWidget **item=lookupMenubarHash(widget, FALSE);
if(item)
{
@@ -1155,11 +1155,11 @@
children = children->next;
}
- if(children && (*item)!=(int)current)
+ if(children && (*item)!=current)
{
if(*item)
- gtk_widget_set_state((GtkWidget *)(*item), GTK_STATE_NORMAL);
- *item=(int)current;
+ gtk_widget_set_state(*item, GTK_STATE_NORMAL);
+ *item=current;
gtk_widget_set_state(current, GTK_STATE_PRELIGHT);
}
}
@@ -1167,16 +1167,16 @@
}
else if(GDK_LEAVE_NOTIFY==event->type)
{
- int *item=lookupMenubarHash(widget, FALSE);
+ GtkWidget **item=lookupMenubarHash(widget, FALSE);
if(item)
{
- if(*item && GTK_IS_MENU_ITEM((GtkWidget *)(*item)))
+ if(*item && GTK_IS_MENU_ITEM(*item))
{
- GtkMenuItem *mi=GTK_MENU_ITEM((GtkWidget *)(*item));
- if(GTK_STATE_PRELIGHT==((GtkWidget *)(*item))->state &&
+ GtkMenuItem *mi=GTK_MENU_ITEM((*item));
+ if(GTK_STATE_PRELIGHT==(*item)->state &&
mi->submenu && (!GTK_WIDGET_MAPPED (mi->submenu) ||
GTK_MENU (mi->submenu)->tearoff_active))
- gtk_widget_set_state((GtkWidget *)(*item), GTK_STATE_NORMAL);
+ gtk_widget_set_state(*item, GTK_STATE_NORMAL);
}
*item=0;
}
@@ -2426,7 +2426,7 @@
if(menubar && GTK_APP_MOZILLA!=qtSettings.app &&
(opts.menubarMouseOver || opts.shadeMenubarOnlyWhenActive))
{
- int *mbHash=lookupMenubarHash(widget, FALSE);
+ GtkWidget **mbHash=lookupMenubarHash(widget, FALSE);
GtkWindow *topLevel=GTK_WINDOW(gtk_widget_get_toplevel(widget));
if(!mbHash)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org