declare variables at the beginning of blocks, because it is nice to do so. and polite?
This commit is contained in:
parent
de383f35f7
commit
07fe0980be
2 changed files with 6 additions and 5 deletions
|
@ -676,13 +676,14 @@ void menu_frame_hide(ObMenuFrame *self)
|
||||||
|
|
||||||
void menu_frame_hide_all()
|
void menu_frame_hide_all()
|
||||||
{
|
{
|
||||||
|
GList *it;
|
||||||
|
|
||||||
if (config_submenu_show_delay) {
|
if (config_submenu_show_delay) {
|
||||||
/* remove any submenu open requests */
|
/* remove any submenu open requests */
|
||||||
ob_main_loop_timeout_remove(ob_main_loop,
|
ob_main_loop_timeout_remove(ob_main_loop,
|
||||||
menu_entry_frame_submenu_timeout);
|
menu_entry_frame_submenu_timeout);
|
||||||
}
|
}
|
||||||
GList *it = g_list_last(menu_frame_visible);
|
if ((it = g_list_last(menu_frame_visible)))
|
||||||
if (it)
|
|
||||||
menu_frame_hide(it->data);
|
menu_frame_hide(it->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -371,6 +371,9 @@ static void gradient_splitvertical(RrAppearance *a, gint w, gint h)
|
||||||
RrPixel32 current;
|
RrPixel32 current;
|
||||||
RrColor *primary_light, *secondary_light;
|
RrColor *primary_light, *secondary_light;
|
||||||
|
|
||||||
|
VARS(y1);
|
||||||
|
VARS(y3);
|
||||||
|
|
||||||
r = sf->primary->r;
|
r = sf->primary->r;
|
||||||
r += r >> 2;
|
r += r >> 2;
|
||||||
g = sf->primary->g;
|
g = sf->primary->g;
|
||||||
|
@ -393,10 +396,7 @@ static void gradient_splitvertical(RrAppearance *a, gint w, gint h)
|
||||||
if (b > 0xFF) b = 0xFF;
|
if (b > 0xFF) b = 0xFF;
|
||||||
secondary_light = RrColorNew(a->inst, r, g, b);
|
secondary_light = RrColorNew(a->inst, r, g, b);
|
||||||
|
|
||||||
VARS(y1);
|
|
||||||
SETUP(y1, primary_light, sf->primary, (h / 2) -1);
|
SETUP(y1, primary_light, sf->primary, (h / 2) -1);
|
||||||
|
|
||||||
VARS(y3);
|
|
||||||
SETUP(y3, sf->secondary, secondary_light, (h / 2) -1);
|
SETUP(y3, sf->secondary, secondary_light, (h / 2) -1);
|
||||||
|
|
||||||
for (y1 = h - 1; y1 > (h / 2) -1; --y1) { /* 0 -> h-1 */
|
for (y1 = h - 1; y1 > (h / 2) -1; --y1) { /* 0 -> h-1 */
|
||||||
|
|
Loading…
Reference in a new issue