Commit b43e4959 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Fix bug #17076, so now there is a auto show delay. By default it is 0,

Tue Apr 17 13:20:07 2001  George Lebl <jirka@5z.com>

	* basep-widget.[ch], gnome-panep-properties.c, main.c, panel-util.c,
	  panel-widget.[ch], panel.c, panel_config_global.h, session.[ch]:
	  Fix bug #17076, so now there is a auto show delay.  By default it
	  is 0, which is the current behaviour.  Also changed the scale for
	  the autohide delay to be maximum of 3000 not 10000.  I mean who
	  wants the delay to be 10s.  This was making the setting hard to
	  do since the useful range was very thin.  Some other cleanups
	  and a warning fix.
parent e16646c9
Tue Apr 17 13:20:07 2001 George Lebl <jirka@5z.com>
* basep-widget.[ch], gnome-panep-properties.c, main.c, panel-util.c,
panel-widget.[ch], panel.c, panel_config_global.h, session.[ch]:
Fix bug #17076, so now there is a auto show delay. By default it
is 0, which is the current behaviour. Also changed the scale for
the autohide delay to be maximum of 3000 not 10000. I mean who
wants the delay to be 10s. This was making the setting hard to
do since the useful range was very thin. Some other cleanups
and a warning fix.
Mon Apr 09 18:02:27 2001 George Lebl <jirka@5z.com>
* icon-entry-hack.c: gah! add missing show for the icon entry hack
......
Tue Apr 17 13:20:07 2001 George Lebl <jirka@5z.com>
* basep-widget.[ch], gnome-panep-properties.c, main.c, panel-util.c,
panel-widget.[ch], panel.c, panel_config_global.h, session.[ch]:
Fix bug #17076, so now there is a auto show delay. By default it
is 0, which is the current behaviour. Also changed the scale for
the autohide delay to be maximum of 3000 not 10000. I mean who
wants the delay to be 10s. This was making the setting hard to
do since the useful range was very thin. Some other cleanups
and a warning fix.
Mon Apr 09 18:02:27 2001 George Lebl <jirka@5z.com>
* icon-entry-hack.c: gah! add missing show for the icon entry hack
......
......@@ -34,6 +34,7 @@ extern int pw_drawer_step;
extern int pw_auto_step;
extern int pw_minimized_size;
extern int pw_minimize_delay;
extern int pw_maximize_delay;
extern gboolean pw_disable_animations;
extern PanelMovementType pw_movement_type;
......@@ -482,7 +483,7 @@ basep_enter_notify (GtkWidget *widget,
basep->leave_notify_timer_tag = 0;
}
basep_widget_autoshow (basep);
basep_widget_queue_autoshow (basep);
}
if (global_config.autoraise)
......@@ -495,8 +496,8 @@ basep_enter_notify (GtkWidget *widget,
}
void
basep_widget_get_position(BasePWidget *basep, PanelOrientType hide_orient,
int *x, int *y, int w, int h)
basep_widget_get_position (BasePWidget *basep, PanelOrientType hide_orient,
int *x, int *y, int w, int h)
{
*x = *y = 0;
switch(hide_orient) {
......@@ -1614,23 +1615,24 @@ basep_widget_explicit_show (BasePWidget *basep)
panels_to_sync = TRUE;
}
void
basep_widget_autoshow (BasePWidget *basep)
gboolean
basep_widget_autoshow (gpointer data)
{
BasePWidget *basep = data;
static const char *supinfo[] = {"panel", "expand", NULL};
g_return_if_fail (IS_BASEP_WIDGET(basep));
g_return_val_if_fail (IS_BASEP_WIDGET(basep), FALSE);
if (basep->state == BASEP_MOVING) {
#ifdef PANEL_DEBUG
g_warning ("autoshow whilst moving");
#endif
return;
return TRUE;
}
if ( (basep->mode != BASEP_AUTO_HIDE) ||
(basep->state != BASEP_AUTO_HIDDEN))
return;
return TRUE;
if (GTK_WIDGET_REALIZED(basep)) {
BasePPosClass *klass = basep_widget_get_pos_class (basep);
......@@ -1663,9 +1665,49 @@ basep_widget_autoshow (BasePWidget *basep)
gtk_signal_emit (GTK_OBJECT(basep),
basep_widget_signals[STATE_CHANGE_SIGNAL],
BASEP_SHOWN);
basep->enter_notify_timer_tag = 0;
return FALSE;
}
void
basep_widget_queue_autoshow (BasePWidget *basep)
{
/* check if there's already a timeout set, and delete it if
* there was */
if (basep->state == BASEP_MOVING) {
#ifdef PANEL_DEBUG
g_print ("return 2");
#endif
return;
}
if (basep->enter_notify_timer_tag != 0) {
gtk_timeout_remove (basep->enter_notify_timer_tag);
#ifdef PANEL_DEBUG
g_print ("<timeout removed>\n");
#endif
}
if ((basep->mode != BASEP_AUTO_HIDE) ||
(basep->state == BASEP_SHOWN)) {
#ifdef PANEL_DEBUG
g_print ("return 1\n");
#endif
return;
}
if (pw_minimize_delay == 0) {
basep_widget_autoshow (basep);
} else {
/* set up our delay for popup. */
basep->enter_notify_timer_tag =
gtk_timeout_add (pw_maximize_delay,
basep_widget_autoshow, basep);
}
}
int
gboolean
basep_widget_autohide (gpointer data)
{
static const char *supinfo[] = {"panel", "collapse", NULL};
......@@ -1749,7 +1791,9 @@ basep_widget_queue_autohide(BasePWidget *basep)
/* check if there's already a timeout set, and delete it if
* there was */
if (basep->state == BASEP_MOVING) {
#ifdef PANEL_DEBUG
g_print ("return 2");
#endif
return;
}
......
......@@ -77,6 +77,7 @@ struct _BasePWidget
gboolean hidebuttons_enabled;
gboolean hidebutton_pixmaps_enabled;
int enter_notify_timer_tag;
int leave_notify_timer_tag;
gboolean autohide_inhibit;
int drawers_open;
......@@ -84,8 +85,6 @@ struct _BasePWidget
gboolean request_cube;
gboolean keep_in_screen;
guint32 autohide_complete;
gboolean compliant_wm;
/* drag offsets, where the panel was clicked when started
......@@ -223,10 +222,11 @@ void basep_widget_set_hidebuttons (BasePWidget *basep);
void basep_widget_update_winhints (BasePWidget *basep);
/*autohide*/
void basep_widget_autoshow (BasePWidget *basep);
int basep_widget_autohide (gpointer data);
gboolean basep_widget_autoshow (gpointer data);
gboolean basep_widget_autohide (gpointer data);
/*queue an autohide*/
void basep_widget_queue_autoshow (BasePWidget *basep);
void basep_widget_queue_autohide (BasePWidget *basep);
/*explicit hiding*/
......
......@@ -67,6 +67,7 @@ static GtkAdjustment *auto_hide_step_size;
static GtkAdjustment *explicit_hide_step_size;
static GtkAdjustment *drawer_step_size;
static GtkAdjustment *minimize_delay;
static GtkAdjustment *maximize_delay;
static GtkAdjustment *minimized_size;
......@@ -279,6 +280,8 @@ sync_animation_page_with_config(GlobalConfig *conf)
conf->drawer_step_size);
gtk_adjustment_set_value(minimize_delay,
conf->minimize_delay);
gtk_adjustment_set_value(maximize_delay,
conf->maximize_delay);
gtk_adjustment_set_value(minimized_size,
conf->minimized_size);
}
......@@ -294,6 +297,7 @@ sync_config_with_animation_page(GlobalConfig *conf)
conf->explicit_hide_step_size = explicit_hide_step_size->value;
conf->drawer_step_size = drawer_step_size->value;
conf->minimize_delay = minimize_delay->value;
conf->maximize_delay = maximize_delay->value;
conf->minimized_size = minimized_size->value;
}
......@@ -360,9 +364,15 @@ animation_notebook_page(void)
gtk_widget_show (frame_vbox);
/* Minimize Delay scale frame */
box = make_int_scale_box (_("Delay (ms)"),
box = make_int_scale_box (_("Hide delay (ms)"),
&minimize_delay,
30.0, 10000.0, 10.0);
30.0, 3000.0, 10.0);
gtk_box_pack_start (GTK_BOX (frame_vbox), box, TRUE, FALSE, 0);
/* Minimize Delay scale frame */
box = make_int_scale_box (_("Show delay (ms)"),
&maximize_delay,
0.0, 3000.0, 10.0);
gtk_box_pack_start (GTK_BOX (frame_vbox), box, TRUE, FALSE, 0);
/* Minimized size scale frame */
......@@ -1271,7 +1281,10 @@ loadup_vals (void)
global_config.drawer_step_size=gnome_config_get_int(buf->str);
g_string_sprintf (buf, "minimize_delay=%d", DEFAULT_MINIMIZE_DELAY);
global_config.minimize_delay=gnome_config_get_int (buf->str);
global_config.minimize_delay = gnome_config_get_int (buf->str);
g_string_sprintf (buf, "maximize_delay=%d", DEFAULT_MAXIMIZE_DELAY);
global_config.maximize_delay = gnome_config_get_int (buf->str);
g_string_sprintf (buf, "minimized_size=%d", DEFAULT_MINIMIZED_SIZE);
global_config.minimized_size=gnome_config_get_int (buf->str);
......@@ -1396,6 +1409,8 @@ write_config (GlobalConfig *conf)
conf->minimized_size);
gnome_config_set_int("minimize_delay",
conf->minimize_delay);
gnome_config_set_int("maximize_delay",
conf->maximize_delay);
gnome_config_set_int("movement_type",
(int)conf->movement_type);
gnome_config_set_bool("tooltips_enabled",
......@@ -1571,7 +1586,7 @@ main (int argc, char **argv)
argv, NULL, 0, NULL) < 0)
return 1;
gnome_window_icon_set_default_from_file (GNOME_ICONDIR"/gnome-panel.png");
loadup_vals();
loadup_vals ();
set_config (&loaded_config, &global_config);
......
......@@ -67,6 +67,7 @@ static GtkAdjustment *auto_hide_step_size;
static GtkAdjustment *explicit_hide_step_size;
static GtkAdjustment *drawer_step_size;
static GtkAdjustment *minimize_delay;
static GtkAdjustment *maximize_delay;
static GtkAdjustment *minimized_size;
......@@ -279,6 +280,8 @@ sync_animation_page_with_config(GlobalConfig *conf)
conf->drawer_step_size);
gtk_adjustment_set_value(minimize_delay,
conf->minimize_delay);
gtk_adjustment_set_value(maximize_delay,
conf->maximize_delay);
gtk_adjustment_set_value(minimized_size,
conf->minimized_size);
}
......@@ -294,6 +297,7 @@ sync_config_with_animation_page(GlobalConfig *conf)
conf->explicit_hide_step_size = explicit_hide_step_size->value;
conf->drawer_step_size = drawer_step_size->value;
conf->minimize_delay = minimize_delay->value;
conf->maximize_delay = maximize_delay->value;
conf->minimized_size = minimized_size->value;
}
......@@ -360,9 +364,15 @@ animation_notebook_page(void)
gtk_widget_show (frame_vbox);
/* Minimize Delay scale frame */
box = make_int_scale_box (_("Delay (ms)"),
box = make_int_scale_box (_("Hide delay (ms)"),
&minimize_delay,
30.0, 10000.0, 10.0);
30.0, 3000.0, 10.0);
gtk_box_pack_start (GTK_BOX (frame_vbox), box, TRUE, FALSE, 0);
/* Minimize Delay scale frame */
box = make_int_scale_box (_("Show delay (ms)"),
&maximize_delay,
0.0, 3000.0, 10.0);
gtk_box_pack_start (GTK_BOX (frame_vbox), box, TRUE, FALSE, 0);
/* Minimized size scale frame */
......@@ -1271,7 +1281,10 @@ loadup_vals (void)
global_config.drawer_step_size=gnome_config_get_int(buf->str);
g_string_sprintf (buf, "minimize_delay=%d", DEFAULT_MINIMIZE_DELAY);
global_config.minimize_delay=gnome_config_get_int (buf->str);
global_config.minimize_delay = gnome_config_get_int (buf->str);
g_string_sprintf (buf, "maximize_delay=%d", DEFAULT_MAXIMIZE_DELAY);
global_config.maximize_delay = gnome_config_get_int (buf->str);
g_string_sprintf (buf, "minimized_size=%d", DEFAULT_MINIMIZED_SIZE);
global_config.minimized_size=gnome_config_get_int (buf->str);
......@@ -1396,6 +1409,8 @@ write_config (GlobalConfig *conf)
conf->minimized_size);
gnome_config_set_int("minimize_delay",
conf->minimize_delay);
gnome_config_set_int("maximize_delay",
conf->maximize_delay);
gnome_config_set_int("movement_type",
(int)conf->movement_type);
gnome_config_set_bool("tooltips_enabled",
......@@ -1571,7 +1586,7 @@ main (int argc, char **argv)
argv, NULL, 0, NULL) < 0)
return 1;
gnome_window_icon_set_default_from_file (GNOME_ICONDIR"/gnome-panel.png");
loadup_vals();
loadup_vals ();
set_config (&loaded_config, &global_config);
......
......@@ -93,6 +93,189 @@ menu_age_timeout(gpointer data)
return TRUE;
}
/* Some important code copied from PonG */
/* some evilness follows */
typedef struct _Fish Fish;
struct _Fish {
int state;
int x, y, xs, ys;
GdkPixmap *fish[4];
GdkBitmap *fish_mask[4];
int handler;
GdkWindow *win;
};
Fish fish = {0};
static void
fish_kill (void)
{
int i;
for (i = 0; i < 4; i++) {
gdk_pixmap_unref (fish.fish[i]);
gdk_bitmap_unref (fish.fish_mask[i]);
}
gdk_window_destroy (fish.win);
gtk_timeout_remove (fish.handler);
memset (&fish, 0, sizeof (Fish));
}
/* I AAAAAM YOUUUUUUR FAAAAAAATTTTTHHHHHHHEEEEERRRRRR */
static gboolean
fish_move (gpointer data)
{
int orient, state;
gboolean change = TRUE;
fish.x += fish.xs;
fish.y += fish.ys;
if (fish.x <= -60 ||
fish.x >= gdk_screen_width ()) {
fish_kill ();
return FALSE;
}
if (fish.y <= 0 ||
fish.y >= gdk_screen_height () - 40 ||
rand() % 50 == 0)
fish.ys = -fish.ys;
fish.state ++;
if (fish.state % 4 == 0)
change = TRUE;
if (fish.state >= 8)
fish.state = 0;
state = fish.state >= 4 ? 1 : 0;
orient = fish.xs >= 0 ? 0 : 2;
if (change) {
gdk_window_set_back_pixmap (fish.win, fish.fish[orient + state], FALSE);
gdk_window_shape_combine_mask (fish.win, fish.fish_mask[orient + state], 0, 0);
gdk_window_clear (fish.win);
}
gdk_window_move (fish.win, fish.x, fish.y);
gdk_window_raise (fish.win);
return TRUE;
}
static void
fish_reverse (GdkPixbuf *gp)
{
guchar *pixels = gdk_pixbuf_get_pixels (gp);
int x, y;
int rs = gdk_pixbuf_get_rowstride (gp);
#define DOSWAP(x,y) tmp = x; x = y; y = tmp;
for (y = 0; y < 40; y++, pixels += rs) {
guchar *p = pixels;
guchar *p2 = pixels + 60*4 - 4;
for (x = 0; x < 30; x++, p+=4, p2-=4) {
guchar tmp;
DOSWAP (p[0], p2[0]);
DOSWAP (p[1], p2[1]);
DOSWAP (p[2], p2[2]);
DOSWAP (p[3], p2[3]);
}
}
#undef DOSWAP
}
static void
fish_unwater(GdkPixbuf *gp)
{
guchar *pixels = gdk_pixbuf_get_pixels (gp);
int x, y;
int rs = gdk_pixbuf_get_rowstride (gp);
for (y = 0; y < 40; y++, pixels += rs) {
guchar *p = pixels;
for (x = 0; x < 60; x++, p+=4) {
if (p[0] < 55 && p[1] > 100)
p[3] = 0;
}
}
}
/* the incredibly evil function */
static void
check_screen (void)
{
GdkWindowAttr attributes;
char *fish_file;
GdkPixbuf *gp, *tmp;
if (fish.win != NULL)
return;
fish_file = gnome_pixmap_file ("fish/fishanim.png");
if (fish_file == NULL)
return;
tmp = gdk_pixbuf_new_from_file (fish_file);
if (tmp == NULL)
return;
g_free (fish_file);
if (gdk_pixbuf_get_width (tmp) != 180 ||
gdk_pixbuf_get_height (tmp) != 40) {
gdk_pixbuf_unref (tmp);
return;
}
fish.state = 0;
gp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 60, 40);
gdk_pixbuf_copy_area (tmp, 60, 0, 60, 40, gp, 0, 0);
fish_unwater (gp);
gdk_pixbuf_render_pixmap_and_mask (gp, &fish.fish[2], &fish.fish_mask[2], 128);
fish_reverse (gp);
gdk_pixbuf_render_pixmap_and_mask (gp, &fish.fish[0], &fish.fish_mask[0], 128);
gdk_pixbuf_copy_area (tmp, 120, 0, 60, 40, gp, 0, 0);
fish_unwater (gp);
gdk_pixbuf_render_pixmap_and_mask (gp, &fish.fish[3], &fish.fish_mask[3], 128);
fish_reverse (gp);
gdk_pixbuf_render_pixmap_and_mask (gp, &fish.fish[1], &fish.fish_mask[1], 128);
gdk_pixbuf_unref (gp);
gdk_pixbuf_unref (tmp);
fish.x = -60;
fish.y = (rand() % (gdk_screen_height () - 40 - 2)) + 1;
fish.xs = 8;
fish.ys = (rand() % 2) + 1;
attributes.window_type = GDK_WINDOW_TEMP;
attributes.x = fish.x;
attributes.y = fish.y;
attributes.width = 60;
attributes.height = 40;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gdk_rgb_get_visual();
attributes.colormap = gdk_rgb_get_cmap();
attributes.event_mask = 0;
fish.win = gdk_window_new (NULL, &attributes,
GDK_WA_X | GDK_WA_Y |
GDK_WA_VISUAL | GDK_WA_COLORMAP);
gdk_window_set_back_pixmap (fish.win, fish.fish[0], FALSE);
gdk_window_shape_combine_mask (fish.win, fish.fish_mask[0], 0, 0);
gdk_window_show (fish.win);
fish.handler = gtk_timeout_add (150, fish_move, NULL);
}
static gboolean
check_screen_timeout (gpointer data)
{
if (((rand () >> 3) % 4000) == 666) {
check_screen ();
}
return TRUE;
}
static int
try_config_sync(gpointer data)
{
......@@ -200,8 +383,8 @@ main(int argc, char **argv)
gboolean duplicate;
gchar *real_global_path;
bindtextdomain(PACKAGE, GNOMELOCALEDIR);
textdomain(PACKAGE);
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
CORBA_exception_init(&ev);
orb = gnome_CORBA_init("panel", VERSION,
......@@ -247,10 +430,10 @@ main(int argc, char **argv)
? GNOME_RESTART_NEVER
: GNOME_RESTART_IMMEDIATELY);
gnome_client_set_priority(client,40);
gnome_client_set_priority (client, 40);
if (gnome_client_get_flags(client) & GNOME_CLIENT_RESTORED)
if (gnome_client_get_flags (client) & GNOME_CLIENT_RESTORED)
old_panel_cfg_path = g_strdup (gnome_client_get_config_prefix (client));
else
old_panel_cfg_path = g_strdup ("/panel.d/default/");
......@@ -271,53 +454,57 @@ main(int argc, char **argv)
gtk_signal_connect (GTK_OBJECT (client), "die",
GTK_SIGNAL_FUNC (panel_session_die), NULL);
panel_tooltips = gtk_tooltips_new();
panel_tooltips = gtk_tooltips_new ();
xstuff_init();
xstuff_init ();
gnome_win_hints_init ();
/* read, convert and remove old config */
convert_old_config();
convert_old_config ();
/* set the globals, it is important this is before
* init_user_applets */
load_up_globals();
load_up_globals ();
/* this is so the capplet gets the right defaults */
write_global_config();
write_global_config ();
gwmh_init ();
init_fr_chunks ();
init_menus();
init_menus ();
init_user_panels();
init_user_applets();
init_user_panels ();
init_user_applets ();
kill_free_drawers ();
load_tornoff();
load_tornoff ();
gnome_triggers_do("Session startup", NULL, "gnome", "login", NULL);
gnome_triggers_do ("Session startup", NULL, "gnome", "login", NULL);
/*add forbidden lists to ALL panels*/
g_slist_foreach(panels,(GFunc)panel_widget_add_forbidden,NULL);
g_slist_foreach (panels,
(GFunc)panel_widget_add_forbidden,
NULL);
/*this will make the drawers be hidden for closed panels etc ...*/
send_state_change();
send_state_change ();
/*attempt to sync the config every 10 seconds, only if a change was
indicated though*/
config_sync_timeout = gtk_timeout_add(10*1000, try_config_sync, NULL);
config_sync_timeout = gtk_timeout_add (10*1000, try_config_sync, NULL);
gtk_timeout_add(10*1000, menu_age_timeout, NULL);
/* add some timeouts */
gtk_timeout_add (10*1000, menu_age_timeout, NULL);
gtk_timeout_add (10*60*1000, check_screen_timeout, NULL);
/*load these as the last thing to prevent some races any races from
starting multiple goad_id's at once are libgnorba's problem*/
load_queued_externs();
load_queued_externs ();
status_applet_create_offscreen();
status_applet_create_offscreen ();
gtk_main ();
......
......@@ -11,6 +11,7 @@ struct _GlobalConfig {
int drawer_step_size;
int minimized_size;
int minimize_delay;
int maximize_delay;
gboolean tooltips_enabled;
/*gboolean show_small_icons;*/
gboolean show_dot_buttons;
......
......@@ -77,7 +77,7 @@ panel_kde_help_path (const char *docpath)
li = li->next) {
char *fullpath = g_strdup_printf ("%s/HTML/%s/%s",
KDE_DOCDIR,
li->data,
(char *)li->data,
docpath);
if (panel_file_exists (fullpath)) {
char *uri = g_strconcat ("ghelp:", fullpath, NULL);
......
......@@ -56,6 +56,7 @@ int pw_drawer_step = 20;
int pw_auto_step = 10;
int pw_minimized_size = 6;
int pw_minimize_delay = 300;
int pw_maximize_delay = 0;
gboolean pw_disable_animations = FALSE;
PanelMovementType pw_movement_type = PANEL_SWITCH_MOVE;
int pw_applet_padding = 3;
......@@ -2814,7 +2815,7 @@ panel_widget_change_params(PanelWidget *panel,
{
PanelOrientation oldorient;
int oldsz;
int change_back = FALSE;
gboolean change_back = FALSE;
g_return_if_fail(panel!=NULL);
g_return_if_fail(IS_PANEL_WIDGET(panel));
......@@ -2880,19 +2881,19 @@ panel_widget_change_params(PanelWidget *panel,
}
/* let the applets know we changed the background */
if(change_back) {
gtk_signal_emit(GTK_OBJECT(panel),
panel_widget_signals[BACK_CHANGE_SIGNAL],
panel->back_type,
panel->back_pixmap,
&panel->back_color);
if (change_back) {
gtk_signal_emit (GTK_OBJECT (panel),
panel_widget_signals[BACK_CHANGE_SIGNAL],
panel->back_type,
panel->back_pixmap,
&panel->back_color);
}
panel->no_padding_on_ends = no_padding_on_ends;
/* inhibit draws until we resize */
panel->inhibit_draw = TRUE;
gtk_widget_queue_resize(GTK_WIDGET(panel));
gtk_widget_queue_resize (GTK_WIDGET (panel));
}
void
......@@ -2914,36 +2915,40 @@ panel_widget_change_orient(PanelWidget *panel,
/*change global params*/
void
panel_widget_change_global(int explicit_step,
int auto_step,
int drawer_step,
int minimized_size,
int minimize_delay,
PanelMovementType move_type,
gboolean disable_animations,
int applet_padding,
int applet_border_padding)
{
if(explicit_step>0)
panel_widget_change_global (int explicit_step,
int auto_step,
int drawer_step,
int minimized_size,
int minimize_delay,
int maximize_delay,
PanelMovementType move_type,
gboolean disable_animations,
int applet_padding,
int applet_border_padding)
{
if (explicit_step > 0)
pw_explicit_step=explicit_step;
if(auto_step>0)
if (auto_step > 0)
pw_auto_step=auto_step;
if(drawer_step>0)
if (drawer_step > 0)
pw_drawer_step=drawer_step;
if(minimized_size>0)
if (minimized_size > 0)
pw_minimized_size=minimized_size;
if(minimize_delay>=0)
if (minimize_delay >= 0)
pw_minimize_delay=minimize_delay;
if (maximize_delay >= 0)
pw_maximize_delay=maximize_delay;
pw_movement_type = move_type;
pw_disable_animations = disable_animations;
/*change padding on all panels NOW*/
if((pw_applet_padding != applet_padding) || (pw_applet_border_padding != applet_border_padding)) {
if( (pw_applet_padding != applet_padding) ||
(pw_applet_border_padding != applet_border_padding)) {
GSList *li;
pw_applet_padding = applet_padding;
pw_applet_border_padding = applet_border_padding;
for(li=panels;li!=NULL;li=g_slist_next(li))
gtk_widget_queue_resize(li->data);
for (li = panels; li != NULL; li = li->next)
gtk_widget_queue_resize (li->data);
}
}
......@@ -2951,13 +2956,13 @@ panel_widget_change_global(int explicit_step,
color and w, and h to the area if the background is one color
only, otherwise normally return an rgb and set r, g, b to -1 */
void
panel_widget_get_applet_rgb_bg(PanelWidget *panel,
GtkWidget *applet,
guchar **rgb,
int *w, int *h,
int *rowstride,