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

made icon settings configurable

Sat Aug 29 22:36:18 1998  George Lebl  <jirka@5z.com>

        * session.c,main.c,panel_config_global.c: made icon settings
          configurable

        * panel_config.c,session.c,menu.c,snapped-widget.[ch]: added
          a setting to disable hidebuttons on the snapped panel
parent f45fb9c7
Sat Aug 29 22:36:18 1998 George Lebl <jirka@5z.com>
* session.c,main.c,panel_config_global.c: made icon settings
configurable
* panel_config.c,session.c,menu.c,snapped-widget.[ch]: added
a setting to disable hidebuttons on the snapped panel
Sat Aug 29 16:04:37 1998 George Lebl <jirka@5z.com>
* corner-widget.c: fix initial position
......
Sat Aug 29 22:36:18 1998 George Lebl <jirka@5z.com>
* session.c,main.c,panel_config_global.c: made icon settings
configurable
* panel_config.c,session.c,menu.c,snapped-widget.[ch]: added
a setting to disable hidebuttons on the snapped panel
Sat Aug 29 16:04:37 1998 George Lebl <jirka@5z.com>
* corner-widget.c: fix initial position
......
......@@ -227,11 +227,6 @@ main(int argc, char **argv)
/*set the globals*/
load_up_globals();
/*FIXME: make this configurable*/
button_widget_load_tile(MENU_TILE,"tile-green-up.png","tile-green-down.png",2,2);
button_widget_load_tile(DRAWER_TILE,"tile-purple-up.png","tile-purple-down.png",2,2);
button_widget_load_tile(LAUNCHER_TILE,"tile-normal-up.png","tile-normal-down.png",2,2);
init_user_panels();
init_user_applets();
......
......@@ -1116,6 +1116,7 @@ create_new_panel(GtkWidget *w,gpointer data)
panel = snapped_widget_new(SNAPPED_BOTTOM,
SNAPPED_EXPLICIT_HIDE,
SNAPPED_SHOWN,
TRUE,
PANEL_BACK_NONE,
NULL,
TRUE,
......@@ -1482,8 +1483,9 @@ menu_button_pressed(GtkWidget *widget, gpointer data)
Menu *menu = data;
GdkEventButton *bevent = (GdkEventButton*)gtk_get_current_event();
GtkWidget *wpanel = get_panel_parent(menu->button);
int applet_id = gtk_object_get_data(GTK_OBJECT(menu->button),
"applet_id");
int applet_id =
GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(menu->button),
"applet_id"));
int main_menu = (strcmp (menu->path, ".") == 0);
check_and_reread(menu->menu,menu,main_menu);
......@@ -1586,8 +1588,8 @@ create_menu_applet(char *arguments, PanelOrientType orient,
if(!gnome_folder) {
gnome_folder = gnome_unconditional_pixmap_file
("gnome-folder.png");
gnome_folder =
gnome_unconditional_pixmap_file("gnome-folder.png");
if (!g_file_exists (gnome_folder)) {
g_free (gnome_folder);
gnome_folder = NULL;
......
#include "panel-widget.h"
#include "panel-types.h"
#ifndef PANEL_CONFIG_GLOBAL_H
#define PANEL_CONFIG_GLOBAL_H
......@@ -17,9 +18,12 @@ struct _GlobalConfig {
int disable_animations;
int applet_padding;
int tiles_enabled;
char *tile_up[LAST_TILE];
char *tile_down[LAST_TILE];
int tile_border[LAST_TILE];
int tile_depth[LAST_TILE];
};
void panel_config_global(void);
#endif /* PANEL_CONFIG_H */
......@@ -25,6 +25,7 @@ struct _PerPanelConfig {
/*snapped types*/
SnappedPos snapped_pos;
SnappedMode snapped_mode;
int snapped_hidebuttons;
/*corner types*/
CornerPos corner_pos;
......@@ -180,6 +181,7 @@ config_apply (GtkWidget *widget, int page, gpointer data)
ppc->snapped_pos,
ppc->snapped_mode,
SNAPPED_WIDGET(ppc->panel)->state,
ppc->snapped_hidebuttons,
ppc->back_type,
ppc->back_pixmap,
ppc->fit_pixmap_bg,
......@@ -206,6 +208,48 @@ config_apply (GtkWidget *widget, int page, gpointer data)
gtk_widget_queue_draw (ppc->panel);
}
/*thy evil easter egg*/
static int
config_event(GtkWidget *widget,GdkEvent *event,GtkNotebook *nbook)
{
GtkWidget *w;
char *file;
static int clicks=0;
static int pages=0;
GdkEventButton *bevent;
if(event->type != GDK_BUTTON_PRESS)
return FALSE;
bevent = (GdkEventButton *)event;
if(bevent->button != 3)
clicks = 0;
else
clicks++;
if(clicks<3)
return FALSE;
clicks = 0;
if(pages==0) {
file = gnome_unconditional_pixmap_file("gnome-gegl.png");
if (file && g_file_exists (file)) {
w = gnome_pixmap_new_from_file (file);
gtk_widget_show(w);
/*the GEGL shall not be translated*/
gtk_notebook_append_page (nbook, w,
gtk_label_new ("GEGL"));
gtk_notebook_set_page(nbook,-1);
pages = 1;
}
g_free(file);
} else {
gtk_notebook_set_page(nbook,-1);
}
return FALSE;
}
static void
snapped_set_pos (GtkWidget *widget, gpointer data)
{
......@@ -220,6 +264,17 @@ snapped_set_pos (GtkWidget *widget, gpointer data)
gnome_property_box_changed (GNOME_PROPERTY_BOX (ppc->config_window));
}
static void
snapped_set_hidebuttons (GtkWidget *widget, gpointer data)
{
SnappedPos pos = (SnappedPos) data;
PerPanelConfig *ppc = gtk_object_get_user_data(GTK_OBJECT(widget));
ppc->snapped_hidebuttons = !(GTK_TOGGLE_BUTTON(widget)->active);
if (ppc->register_changes)
gnome_property_box_changed (GNOME_PROPERTY_BOX (ppc->config_window));
}
static void
snapped_set_mode (GtkWidget *widget, gpointer data)
{
......@@ -357,6 +412,16 @@ snapped_notebook_page(PerPanelConfig *ppc)
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
/* Auto-hide */
button = gtk_check_button_new_with_label (_("Disable hidebuttons"));
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (!ppc->snapped_hidebuttons)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (snapped_set_hidebuttons), NULL);
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
return (hbox);
}
......@@ -744,6 +809,7 @@ panel_config(GtkWidget *panel)
PanelWidget *pw = PANEL_WIDGET(SNAPPED_WIDGET(panel)->panel);
ppc->snapped_pos = snapped->pos;
ppc->snapped_mode = snapped->mode;
ppc->snapped_hidebuttons = snapped->hidebuttons_enabled;
ppc->fit_pixmap_bg = pw->fit_pixmap_bg;
ppc->back_pixmap = g_strdup(pw->back_pixmap);
ppc->back_color = pw->back_color;
......@@ -769,6 +835,9 @@ panel_config(GtkWidget *panel)
/* main window */
ppc->config_window = gnome_property_box_new ();
gtk_widget_set_events(ppc->config_window,
gtk_widget_get_events(ppc->config_window) |
GDK_BUTTON_PRESS_MASK);
/*gtk_window_position(GTK_WINDOW(ppc->config_window), GTK_WIN_POS_CENTER);*/
gtk_window_set_policy(GTK_WINDOW(ppc->config_window), FALSE, FALSE, TRUE);
......@@ -812,6 +881,9 @@ panel_config(GtkWidget *panel)
gtk_signal_connect (GTK_OBJECT (ppc->config_window), "apply",
GTK_SIGNAL_FUNC (config_apply), ppc);
gtk_signal_connect (GTK_OBJECT (ppc->config_window), "event",
GTK_SIGNAL_FUNC (config_event),
prop_nbook);
ppc->register_changes = TRUE;
......
......@@ -25,6 +25,7 @@ struct _PerPanelConfig {
/*snapped types*/
SnappedPos snapped_pos;
SnappedMode snapped_mode;
int snapped_hidebuttons;
/*corner types*/
CornerPos corner_pos;
......@@ -180,6 +181,7 @@ config_apply (GtkWidget *widget, int page, gpointer data)
ppc->snapped_pos,
ppc->snapped_mode,
SNAPPED_WIDGET(ppc->panel)->state,
ppc->snapped_hidebuttons,
ppc->back_type,
ppc->back_pixmap,
ppc->fit_pixmap_bg,
......@@ -206,6 +208,48 @@ config_apply (GtkWidget *widget, int page, gpointer data)
gtk_widget_queue_draw (ppc->panel);
}
/*thy evil easter egg*/
static int
config_event(GtkWidget *widget,GdkEvent *event,GtkNotebook *nbook)
{
GtkWidget *w;
char *file;
static int clicks=0;
static int pages=0;
GdkEventButton *bevent;
if(event->type != GDK_BUTTON_PRESS)
return FALSE;
bevent = (GdkEventButton *)event;
if(bevent->button != 3)
clicks = 0;
else
clicks++;
if(clicks<3)
return FALSE;
clicks = 0;
if(pages==0) {
file = gnome_unconditional_pixmap_file("gnome-gegl.png");
if (file && g_file_exists (file)) {
w = gnome_pixmap_new_from_file (file);
gtk_widget_show(w);
/*the GEGL shall not be translated*/
gtk_notebook_append_page (nbook, w,
gtk_label_new ("GEGL"));
gtk_notebook_set_page(nbook,-1);
pages = 1;
}
g_free(file);
} else {
gtk_notebook_set_page(nbook,-1);
}
return FALSE;
}
static void
snapped_set_pos (GtkWidget *widget, gpointer data)
{
......@@ -220,6 +264,17 @@ snapped_set_pos (GtkWidget *widget, gpointer data)
gnome_property_box_changed (GNOME_PROPERTY_BOX (ppc->config_window));
}
static void
snapped_set_hidebuttons (GtkWidget *widget, gpointer data)
{
SnappedPos pos = (SnappedPos) data;
PerPanelConfig *ppc = gtk_object_get_user_data(GTK_OBJECT(widget));
ppc->snapped_hidebuttons = !(GTK_TOGGLE_BUTTON(widget)->active);
if (ppc->register_changes)
gnome_property_box_changed (GNOME_PROPERTY_BOX (ppc->config_window));
}
static void
snapped_set_mode (GtkWidget *widget, gpointer data)
{
......@@ -357,6 +412,16 @@ snapped_notebook_page(PerPanelConfig *ppc)
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
/* Auto-hide */
button = gtk_check_button_new_with_label (_("Disable hidebuttons"));
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (!ppc->snapped_hidebuttons)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (snapped_set_hidebuttons), NULL);
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
return (hbox);
}
......@@ -744,6 +809,7 @@ panel_config(GtkWidget *panel)
PanelWidget *pw = PANEL_WIDGET(SNAPPED_WIDGET(panel)->panel);
ppc->snapped_pos = snapped->pos;
ppc->snapped_mode = snapped->mode;
ppc->snapped_hidebuttons = snapped->hidebuttons_enabled;
ppc->fit_pixmap_bg = pw->fit_pixmap_bg;
ppc->back_pixmap = g_strdup(pw->back_pixmap);
ppc->back_color = pw->back_color;
......@@ -769,6 +835,9 @@ panel_config(GtkWidget *panel)
/* main window */
ppc->config_window = gnome_property_box_new ();
gtk_widget_set_events(ppc->config_window,
gtk_widget_get_events(ppc->config_window) |
GDK_BUTTON_PRESS_MASK);
/*gtk_window_position(GTK_WINDOW(ppc->config_window), GTK_WIN_POS_CENTER);*/
gtk_window_set_policy(GTK_WINDOW(ppc->config_window), FALSE, FALSE, TRUE);
......@@ -812,6 +881,9 @@ panel_config(GtkWidget *panel)
gtk_signal_connect (GTK_OBJECT (ppc->config_window), "apply",
GTK_SIGNAL_FUNC (config_apply), ppc);
gtk_signal_connect (GTK_OBJECT (ppc->config_window), "event",
GTK_SIGNAL_FUNC (config_event),
prop_nbook);
ppc->register_changes = TRUE;
......
......@@ -25,6 +25,11 @@ extern GList *panels;
static GtkWidget *aniframe[3];
static GtkWidget *tilefile[LAST_TILE];
static GtkWidget *tileborder[LAST_TILE];
static GtkWidget *entry_up[LAST_TILE];
static GtkWidget *entry_down[LAST_TILE];
static GtkWidget *config_window;
......@@ -50,18 +55,73 @@ set_toggle_button_value (GtkWidget *widget, gpointer data)
static void
config_apply (GtkWidget *widget, int page, gpointer data)
{
int i;
for(i=0;i<LAST_TILE;i++) {
g_free(global_config.tile_up[i]);
g_free(global_config.tile_down[i]);
}
memcpy(&global_config,&temp_config,sizeof(GlobalConfig));
for(i=0;i<LAST_TILE;i++) {
global_config.tile_up[i] =
g_strdup(gtk_entry_get_text(GTK_ENTRY(entry_up[i])));
global_config.tile_down[i] =
g_strdup(gtk_entry_get_text(GTK_ENTRY(entry_down[i])));
}
apply_global_config();
globals_to_sync = TRUE;
panel_config_sync();
}
/*thy evil easter egg*/
static int
config_event(GtkWidget *widget,GdkEvent *event,GtkNotebook *nbook)
{
GtkWidget *w;
char *file;
static int clicks=0;
static int pages=0;
GdkEventButton *bevent;
if(event->type != GDK_BUTTON_PRESS)
return FALSE;
bevent = (GdkEventButton *)event;
if(bevent->button != 3)
clicks = 0;
else
clicks++;
if(clicks<3)
return FALSE;
clicks = 0;
if(pages==0) {
file = gnome_unconditional_pixmap_file("gnome-gegl.png");
if (file && g_file_exists (file)) {
w = gnome_pixmap_new_from_file (file);
gtk_widget_show(w);
/*the GEGL shall not be translated*/
gtk_notebook_append_page (nbook, w,
gtk_label_new ("GEGL"));
gtk_notebook_set_page(nbook,-1);
pages = 1;
}
g_free(file);
} else {
gtk_notebook_set_page(nbook,-1);
}
return FALSE;
}
static void
int_scale_update (GtkAdjustment *adjustment, gpointer data)
{
int *val = data;
double scale_val = adjustment->value;
*val = (int) scale_val;
if(config_window)
......@@ -201,11 +261,28 @@ set_movement (GtkWidget *widget, gpointer data)
return FALSE;
}
static int
set_icon_button_value(GtkWidget *w, gpointer data)
{
int i;
int active = GTK_TOGGLE_BUTTON(w)->active;
for(i=0;i<3;i++) {
gtk_widget_set_sensitive(tilefile[i],active);
gtk_widget_set_sensitive(tileborder[i],active);
}
temp_config.tiles_enabled = active;
if(config_window)
gnome_property_box_changed (GNOME_PROPERTY_BOX (config_window));
return FALSE;
}
GtkWidget *
icon_notebook_page(void)
genicon_notebook_page(void)
{
GtkWidget *frame;
GtkWidget *button;
GtkWidget *w;
GtkWidget *box;
GtkWidget *vbox;
......@@ -225,13 +302,67 @@ icon_notebook_page(void)
gtk_container_add (GTK_CONTAINER (frame), box);
/* Enable tiles frame */
button = gtk_check_button_new_with_label (_("Tiles enabled"));
w = gtk_check_button_new_with_label (_("Tiles enabled"));
if (temp_config.tiles_enabled)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (set_toggle_button_value),
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (w), TRUE);
gtk_signal_connect (GTK_OBJECT (w), "toggled",
GTK_SIGNAL_FUNC (set_icon_button_value),
&(temp_config.tiles_enabled));
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE,
gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE,
CONFIG_PADDING_SIZE);
return (vbox);
}
GtkWidget *
icon_notebook_page(int i, GtkWidget *config_box)
{
GtkWidget *frame;
GtkWidget *w;
GtkWidget *table;
GtkWidget *vbox;
/* main vbox */
vbox = gtk_vbox_new (FALSE, CONFIG_PADDING_SIZE);
gtk_container_border_width(GTK_CONTAINER (vbox), CONFIG_PADDING_SIZE);
/* Image frame */
tilefile[i] = frame = gtk_frame_new (_("Image files"));
gtk_container_border_width(GTK_CONTAINER (frame), CONFIG_PADDING_SIZE);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE,
CONFIG_PADDING_SIZE);
gtk_widget_set_sensitive(frame,temp_config.tiles_enabled);
/* table for frame */
table = gtk_table_new(2,2,FALSE);
gtk_container_border_width(GTK_CONTAINER (table), CONFIG_PADDING_SIZE);
gtk_container_add (GTK_CONTAINER (frame), table);
/* image file entry widgets */
entry_up[i] = create_file_entry(table,"tile_file",0,
_("Tile filename (up)"),
global_config.tile_up[i],
config_box);
entry_down[i] = create_file_entry(table,"tile_file",1,
_("Tile filename (down)"),
global_config.tile_down[i],
config_box);
/* Minimized size scale frame */
tileborder[i] = w = make_int_scale_frame(_("Border width (tile only)"),
&(temp_config.tile_border[i]),
0.0,10.0);
gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE,
CONFIG_PADDING_SIZE);
gtk_widget_set_sensitive(w,temp_config.tiles_enabled);
/* Minimized size scale frame */
w = make_int_scale_frame(_("Depth (displacement when pressed)"),
&(temp_config.tile_depth[i]),
0.0,10.0);
gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE,
CONFIG_PADDING_SIZE);
return (vbox);
......@@ -349,19 +480,23 @@ misc_notebook_page(void)
frame = make_int_scale_frame(_("Applet Padding"),
&(temp_config.applet_padding),
0.0,10.0);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE,
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE,
CONFIG_PADDING_SIZE);
return (vbox);
}
void
panel_config_global(void)
{
GtkWidget *page;
GtkWidget *box;
GtkWidget *prop_nbook;
char *icon_titles[]={
_("Launcher icon"),
_("Drawer icon"),
_("Menu icon")};
int i;
/* return if the window is already up. */
if (config_window)
......@@ -371,6 +506,9 @@ panel_config_global(void)
/* main window */
box = gnome_property_box_new ();
gtk_widget_set_events(box,
gtk_widget_get_events(box) |
GDK_BUTTON_PRESS_MASK);
/*gtk_window_position(GTK_WINDOW(box), GTK_WIN_POS_CENTER);*/
gtk_window_set_policy(GTK_WINDOW(box), FALSE, FALSE, TRUE);
gtk_signal_connect(GTK_OBJECT(box), "destroy",
......@@ -386,13 +524,21 @@ panel_config_global(void)
/* Animation notebook page */
page = animation_notebook_page ();
gtk_notebook_append_page (GTK_NOTEBOOK(prop_nbook),
page, gtk_label_new (_("Animation settings")));
page, gtk_label_new (_("Animation")));
/* Icon notebook page */
page = icon_notebook_page ();
/* General icon notebook page */
page = genicon_notebook_page ();
gtk_notebook_append_page (GTK_NOTEBOOK(prop_nbook),
page, gtk_label_new (_("Icon settings")));
page, gtk_label_new (_("General icon settings")));
/* Specific icon notebook pages */
for(i = 0; i<LAST_TILE; i++) {
page = icon_notebook_page (i,box);
gtk_notebook_append_page (GTK_NOTEBOOK(prop_nbook),
page, gtk_label_new (icon_titles[i]));
}
/* Miscellaneous notebook page */
page = misc_notebook_page ();
gtk_notebook_append_page (GTK_NOTEBOOK(prop_nbook),
......@@ -400,7 +546,10 @@ panel_config_global(void)
gtk_signal_connect (GTK_OBJECT (box), "apply",
GTK_SIGNAL_FUNC (config_apply), NULL);
gtk_signal_connect (GTK_OBJECT (box), "event",
GTK_SIGNAL_FUNC (config_event),
prop_nbook);
config_window = box;
/* show main window */
......
#include "panel-widget.h"
#include "panel-types.h"
#ifndef PANEL_CONFIG_GLOBAL_H
#define PANEL_CONFIG_GLOBAL_H
......@@ -17,9 +18,12 @@ struct _GlobalConfig {
int disable_animations;
int applet_padding;
int tiles_enabled;
char *tile_up[LAST_TILE];
char *tile_down[LAST_TILE];
int tile_border[LAST_TILE];
int tile_depth[LAST_TILE];
};
void panel_config_global(void);
#endif /* PANEL_CONFIG_H */
......@@ -71,6 +71,7 @@ send_tooltips_state(int enabled)
void
apply_global_config(void)
{
int i;
panel_widget_change_global(global_config.explicit_hide_step_size,
global_config.auto_hide_step_size,
global_config.drawer_step_size,
......@@ -86,6 +87,12 @@ apply_global_config(void)
set_show_small_icons();
send_tooltips_state(global_config.tooltips_enabled);
button_widget_tile_enable(global_config.tiles_enabled);
for(i=0;i<LAST_TILE;i++) {
button_widget_load_tile(i, global_config.tile_up[i],
global_config.tile_down[i],
global_config.tile_border[i],
global_config.tile_depth[i]);
}
}
/*shouldn't this be in gnome-dentry?? :)*/
......@@ -304,6 +311,8 @@ save_panel_configuration(gpointer data, gpointer user_data)
gnome_config_set_int("pos", snapped->pos);
gnome_config_set_int("mode", snapped->mode);
gnome_config_set_int("state", snapped->state);
gnome_config_set_bool("hidebuttons_enabled",
snapped->hidebuttons_enabled);
break;
}
case CORNER_PANEL:
......@@ -430,6 +439,17 @@ do_session_save(GnomeClient *client,
global_config.applet_padding);
gnome_config_set_bool("tiles_enabled",
global_config.tiles_enabled);
for(i=0;i<LAST_TILE;i++) {
char buf[256];
g_snprintf(buf,256,"tile_up_%d",i);
gnome_config_set_string(buf,global_config.tile_up[i]);
g_snprintf(buf,256,"tile_down_%d",i);
gnome_config_set_string(buf,global_config.tile_down[i]);
g_snprintf(buf,256,"tile_border_%d",i);
gnome_config_set_int(buf,global_config.tile_border[i]);
g_snprintf(buf,256,"tile_depth_%d",i);
gnome_config_set_int(buf,global_config.tile_depth[i]);
}
}
gnome_config_pop_prefix ();
......@@ -712,6 +732,7 @@ init_user_panels(void)
panel = snapped_widget_new(SNAPPED_BOTTOM,
SNAPPED_EXPLICIT_HIDE,
SNAPPED_SHOWN,
TRUE,
PANEL_BACK_NONE,
NULL,
TRUE,
......@@ -760,6 +781,7 @@ init_user_panels(void)
SnappedPos pos;
SnappedMode mode;
SnappedState state;
int hidebuttons_enabled;
g_snprintf(buf,256,"pos=%d", SNAPPED_BOTTOM);
pos=gnome_config_get_int(buf);
......@@ -769,10 +791,14 @@ init_user_panels(void)
g_snprintf(buf,256,"state=%d", SNAPPED_SHOWN);
state=gnome_config_get_int(buf);
hidebuttons_enabled =
gnome_config_get_bool("hidebuttons_enabled=TRUE");
panel = snapped_widget_new(pos,
mode,
state,
hidebuttons_enabled,
back_type,
back_pixmap,
fit_pixmap_bg,
......@@ -841,6 +867,8 @@ void
load_up_globals(void)
{
char buf[256];
char *tile_def[]={"normal","purple","green"};
int i;
/*set up global options*/
......@@ -884,6 +912,21 @@ load_up_globals(void)
global_config.tiles_enabled =
gnome_config_get_bool("tiles_enabled=TRUE");
for(i=0;i<LAST_TILE;i++) {
g_free(global_config.tile_up[i]);
g_snprintf(buf,256,"tile_up_%d=tile-%s-up.png",i,tile_def[i]);
global_config.tile_up[i] = gnome_config_get_string(buf);
g_free(global_config.tile_down[i]);
g_snprintf(buf,256,"tile_down_%d=tile-%s-down.png",i,tile_def[i]);
global_config.tile_down[i] = gnome_config_get_string(buf);
g_snprintf(buf,256,"tile_border_%d=2",i);
global_config.tile_border[i] = gnome_config_get_int(buf);
g_snprintf(buf,256,"tile_depth_%d=2",i);
global_config.tile_depth[i] = gnome_config_get_int(buf);
}
gnome_config_pop_prefix();
......
......@@ -638,12 +638,19 @@ snapped_leave_notify(SnappedWidget *snapped,
static void
snapped_widget_set_hidebuttons(SnappedWidget *snapped)
{