[metacity/cowbell] dump settings; fix button search to stop at sentinel
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [metacity/cowbell] dump settings; fix button search to stop at sentinel
- Date: Fri, 23 Oct 2009 18:10:31 +0000 (UTC)
commit 4a05f0e009b28770a8ecdd3a164d6229c1cae7c8
Author: Thomas Thurman <tthurman gnome org>
Date: Fri Oct 23 14:07:57 2009 -0400
dump settings; fix button search to stop at sentinel
src/ui/theme.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index e6c4f79..fb6e320 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -817,7 +817,7 @@ copper_class_for_button (int button)
return CC_UNSTICK;
default:
/* there is no way we should ever get here */
- meta_bug ("Unknown button type.");
+ meta_bug ("Unknown button type. %d", button);
return CC_MENU;
}
}
@@ -996,7 +996,7 @@ meta_theme_calc_geometry (MetaTheme *theme,
int button = button_layout->left_buttons[i];
if (button == META_BUTTON_FUNCTION_LAST)
- continue;
+ break;
/* so allocate it */
fgeom->areas[copper_class_for_button(button)].x = x;
@@ -1015,7 +1015,7 @@ meta_theme_calc_geometry (MetaTheme *theme,
int button = button_layout->right_buttons[i];
if (button == META_BUTTON_FUNCTION_LAST)
- continue;
+ break;
/* so allocate it */
x -= fgeom->areas[copper_class_for_button(button)].width;
@@ -1089,6 +1089,16 @@ meta_theme_calc_geometry (MetaTheme *theme,
fill_button_rect (&(fgeom->unabove_rect), CC_UNABOVE, fgeom);
fill_button_rect (&(fgeom->unstick_rect), CC_UNSTICK, fgeom);
+ for (i=0; i<CC_LAST; i++)
+ {
+ g_warning("%20s %8d %8d %8d %8d",
+ cowbell_human_names[i],
+ fgeom->areas[i].x,
+ fgeom->areas[i].y,
+ fgeom->areas[i].width,
+ fgeom->areas[i].height);
+ }
+
/****************************************************************/
/* Old code which needs replacing: */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]