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> Sat Aug 29 16:04:37 1998 George Lebl <jirka@5z.com>
* corner-widget.c: fix initial position * 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> Sat Aug 29 16:04:37 1998 George Lebl <jirka@5z.com>
* corner-widget.c: fix initial position * corner-widget.c: fix initial position
......
...@@ -227,11 +227,6 @@ main(int argc, char **argv) ...@@ -227,11 +227,6 @@ main(int argc, char **argv)
/*set the globals*/ /*set the globals*/
load_up_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_panels();
init_user_applets(); init_user_applets();
......
...@@ -1116,6 +1116,7 @@ create_new_panel(GtkWidget *w,gpointer data) ...@@ -1116,6 +1116,7 @@ create_new_panel(GtkWidget *w,gpointer data)
panel = snapped_widget_new(SNAPPED_BOTTOM, panel = snapped_widget_new(SNAPPED_BOTTOM,
SNAPPED_EXPLICIT_HIDE, SNAPPED_EXPLICIT_HIDE,
SNAPPED_SHOWN, SNAPPED_SHOWN,
TRUE,
PANEL_BACK_NONE, PANEL_BACK_NONE,
NULL, NULL,
TRUE, TRUE,
...@@ -1482,8 +1483,9 @@ menu_button_pressed(GtkWidget *widget, gpointer data) ...@@ -1482,8 +1483,9 @@ menu_button_pressed(GtkWidget *widget, gpointer data)
Menu *menu = data; Menu *menu = data;
GdkEventButton *bevent = (GdkEventButton*)gtk_get_current_event(); GdkEventButton *bevent = (GdkEventButton*)gtk_get_current_event();
GtkWidget *wpanel = get_panel_parent(menu->button); GtkWidget *wpanel = get_panel_parent(menu->button);
int applet_id = gtk_object_get_data(GTK_OBJECT(menu->button), int applet_id =
"applet_id"); GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(menu->button),
"applet_id"));
int main_menu = (strcmp (menu->path, ".") == 0); int main_menu = (strcmp (menu->path, ".") == 0);
check_and_reread(menu->menu,menu,main_menu); check_and_reread(menu->menu,menu,main_menu);
...@@ -1586,8 +1588,8 @@ create_menu_applet(char *arguments, PanelOrientType orient, ...@@ -1586,8 +1588,8 @@ create_menu_applet(char *arguments, PanelOrientType orient,
if(!gnome_folder) { if(!gnome_folder) {
gnome_folder = gnome_unconditional_pixmap_file gnome_folder =
("gnome-folder.png"); gnome_unconditional_pixmap_file("gnome-folder.png");
if (!g_file_exists (gnome_folder)) { if (!g_file_exists (gnome_folder)) {
g_free (gnome_folder); g_free (gnome_folder);
gnome_folder = NULL; gnome_folder = NULL;
......
#include "panel-widget.h" #include "panel-widget.h"
#include "panel-types.h"
#ifndef PANEL_CONFIG_GLOBAL_H #ifndef PANEL_CONFIG_GLOBAL_H
#define PANEL_CONFIG_GLOBAL_H #define PANEL_CONFIG_GLOBAL_H
...@@ -17,9 +18,12 @@ struct _GlobalConfig { ...@@ -17,9 +18,12 @@ struct _GlobalConfig {
int disable_animations; int disable_animations;
int applet_padding; int applet_padding;
int tiles_enabled; 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); void panel_config_global(void);
#endif /* PANEL_CONFIG_H */ #endif /* PANEL_CONFIG_H */
...@@ -25,6 +25,7 @@ struct _PerPanelConfig { ...@@ -25,6 +25,7 @@ struct _PerPanelConfig {
/*snapped types*/ /*snapped types*/
SnappedPos snapped_pos; SnappedPos snapped_pos;
SnappedMode snapped_mode; SnappedMode snapped_mode;
int snapped_hidebuttons;
/*corner types*/ /*corner types*/
CornerPos corner_pos; CornerPos corner_pos;
...@@ -180,6 +181,7 @@ config_apply (GtkWidget *widget, int page, gpointer data) ...@@ -180,6 +181,7 @@ config_apply (GtkWidget *widget, int page, gpointer data)
ppc->snapped_pos, ppc->snapped_pos,
ppc->snapped_mode, ppc->snapped_mode,
SNAPPED_WIDGET(ppc->panel)->state, SNAPPED_WIDGET(ppc->panel)->state,
ppc->snapped_hidebuttons,
ppc->back_type, ppc->back_type,
ppc->back_pixmap, ppc->back_pixmap,
ppc->fit_pixmap_bg, ppc->fit_pixmap_bg,
...@@ -206,6 +208,48 @@ config_apply (GtkWidget *widget, int page, gpointer data) ...@@ -206,6 +208,48 @@ config_apply (GtkWidget *widget, int page, gpointer data)
gtk_widget_queue_draw (ppc->panel); 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 static void
snapped_set_pos (GtkWidget *widget, gpointer data) snapped_set_pos (GtkWidget *widget, gpointer data)
{ {
...@@ -220,6 +264,17 @@ 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)); 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 static void
snapped_set_mode (GtkWidget *widget, gpointer data) snapped_set_mode (GtkWidget *widget, gpointer data)
{ {
...@@ -357,6 +412,16 @@ snapped_notebook_page(PerPanelConfig *ppc) ...@@ -357,6 +412,16 @@ snapped_notebook_page(PerPanelConfig *ppc)
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE); 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); return (hbox);
} }
...@@ -744,6 +809,7 @@ panel_config(GtkWidget *panel) ...@@ -744,6 +809,7 @@ panel_config(GtkWidget *panel)
PanelWidget *pw = PANEL_WIDGET(SNAPPED_WIDGET(panel)->panel); PanelWidget *pw = PANEL_WIDGET(SNAPPED_WIDGET(panel)->panel);
ppc->snapped_pos = snapped->pos; ppc->snapped_pos = snapped->pos;
ppc->snapped_mode = snapped->mode; ppc->snapped_mode = snapped->mode;
ppc->snapped_hidebuttons = snapped->hidebuttons_enabled;
ppc->fit_pixmap_bg = pw->fit_pixmap_bg; ppc->fit_pixmap_bg = pw->fit_pixmap_bg;
ppc->back_pixmap = g_strdup(pw->back_pixmap); ppc->back_pixmap = g_strdup(pw->back_pixmap);
ppc->back_color = pw->back_color; ppc->back_color = pw->back_color;
...@@ -769,6 +835,9 @@ panel_config(GtkWidget *panel) ...@@ -769,6 +835,9 @@ panel_config(GtkWidget *panel)
/* main window */ /* main window */
ppc->config_window = gnome_property_box_new (); 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_position(GTK_WINDOW(ppc->config_window), GTK_WIN_POS_CENTER);*/
gtk_window_set_policy(GTK_WINDOW(ppc->config_window), FALSE, FALSE, TRUE); gtk_window_set_policy(GTK_WINDOW(ppc->config_window), FALSE, FALSE, TRUE);
...@@ -812,6 +881,9 @@ panel_config(GtkWidget *panel) ...@@ -812,6 +881,9 @@ panel_config(GtkWidget *panel)
gtk_signal_connect (GTK_OBJECT (ppc->config_window), "apply", gtk_signal_connect (GTK_OBJECT (ppc->config_window), "apply",
GTK_SIGNAL_FUNC (config_apply), ppc); 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; ppc->register_changes = TRUE;
......
...@@ -25,6 +25,7 @@ struct _PerPanelConfig { ...@@ -25,6 +25,7 @@ struct _PerPanelConfig {
/*snapped types*/ /*snapped types*/
SnappedPos snapped_pos; SnappedPos snapped_pos;
SnappedMode snapped_mode; SnappedMode snapped_mode;
int snapped_hidebuttons;
/*corner types*/ /*corner types*/
CornerPos corner_pos; CornerPos corner_pos;
...@@ -180,6 +181,7 @@ config_apply (GtkWidget *widget, int page, gpointer data) ...@@ -180,6 +181,7 @@ config_apply (GtkWidget *widget, int page, gpointer data)
ppc->snapped_pos, ppc->snapped_pos,
ppc->snapped_mode, ppc->snapped_mode,
SNAPPED_WIDGET(ppc->panel)->state, SNAPPED_WIDGET(ppc->panel)->state,
ppc->snapped_hidebuttons,
ppc->back_type, ppc->back_type,
ppc->back_pixmap, ppc->back_pixmap,
ppc->fit_pixmap_bg, ppc->fit_pixmap_bg,
...@@ -206,6 +208,48 @@ config_apply (GtkWidget *widget, int page, gpointer data) ...@@ -206,6 +208,48 @@ config_apply (GtkWidget *widget, int page, gpointer data)
gtk_widget_queue_draw (ppc->panel); 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 static void
snapped_set_pos (GtkWidget *widget, gpointer data) snapped_set_pos (GtkWidget *widget, gpointer data)
{ {
...@@ -220,6 +264,17 @@ 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)); 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 static void
snapped_set_mode (GtkWidget *widget, gpointer data) snapped_set_mode (GtkWidget *widget, gpointer data)
{ {
...@@ -357,6 +412,16 @@ snapped_notebook_page(PerPanelConfig *ppc) ...@@ -357,6 +412,16 @@ snapped_notebook_page(PerPanelConfig *ppc)
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE); 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); return (hbox);
} }
...@@ -744,6 +809,7 @@ panel_config(GtkWidget *panel) ...@@ -744,6 +809,7 @@ panel_config(GtkWidget *panel)
PanelWidget *pw = PANEL_WIDGET(SNAPPED_WIDGET(panel)->panel); PanelWidget *pw = PANEL_WIDGET(SNAPPED_WIDGET(panel)->panel);
ppc->snapped_pos = snapped->pos; ppc->snapped_pos = snapped->pos;
ppc->snapped_mode = snapped->mode; ppc->snapped_mode = snapped->mode;
ppc->snapped_hidebuttons = snapped->hidebuttons_enabled;
ppc->fit_pixmap_bg = pw->fit_pixmap_bg; ppc->fit_pixmap_bg = pw->fit_pixmap_bg;
ppc->back_pixmap = g_strdup(pw->back_pixmap); ppc->back_pixmap = g_strdup(pw->back_pixmap);
ppc->back_color = pw->back_color; ppc->back_color = pw->back_color;
...@@ -769,6 +835,9 @@ panel_config(GtkWidget *panel) ...@@ -769,6 +835,9 @@ panel_config(GtkWidget *panel)
/* main window */ /* main window */
ppc->config_window = gnome_property_box_new (); 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_position(GTK_WINDOW(ppc->config_window), GTK_WIN_POS_CENTER);*/
gtk_window_set_policy(GTK_WINDOW(ppc->config_window), FALSE, FALSE, TRUE); gtk_window_set_policy(GTK_WINDOW(ppc->config_window), FALSE, FALSE, TRUE);
...@@ -812,6 +881,9 @@ panel_config(GtkWidget *panel) ...@@ -812,6 +881,9 @@ panel_config(GtkWidget *panel)
gtk_signal_connect (GTK_OBJECT (ppc->config_window), "apply", gtk_signal_connect (GTK_OBJECT (ppc->config_window), "apply",
GTK_SIGNAL_FUNC (config_apply), ppc); 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; ppc->register_changes = TRUE;
......
...@@ -25,6 +25,11 @@ extern GList *panels; ...@@ -25,6 +25,11 @@ extern GList *panels;
static GtkWidget *aniframe[3]; 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; static GtkWidget *config_window;
...@@ -50,18 +55,73 @@ set_toggle_button_value (GtkWidget *widget, gpointer data) ...@@ -50,18 +55,73 @@ set_toggle_button_value (GtkWidget *widget, gpointer data)
static void static void
config_apply (GtkWidget *widget, int page, gpointer data) 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)); 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(); apply_global_config();
globals_to_sync = TRUE; globals_to_sync = TRUE;
panel_config_sync(); 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 static void
int_scale_update (GtkAdjustment *adjustment, gpointer data) int_scale_update (GtkAdjustment *adjustment, gpointer data)
{ {
int *val = data; int *val = data;
double scale_val = adjustment->value; double scale_val = adjustment->value;
*val = (int) scale_val; *val = (int) scale_val;
if(config_window) if(config_window)
...@@ -201,11 +261,28 @@ set_movement (GtkWidget *widget, gpointer data) ...@@ -201,11 +261,28 @@ set_movement (GtkWidget *widget, gpointer data)
return FALSE; 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 * GtkWidget *
icon_notebook_page(void) genicon_notebook_page(void)
{ {
GtkWidget *frame; GtkWidget *frame;
GtkWidget *button; GtkWidget *w;
GtkWidget *box; GtkWidget *box;
GtkWidget *vbox; GtkWidget *vbox;
...@@ -225,13 +302,67 @@ icon_notebook_page(void) ...@@ -225,13 +302,67 @@ icon_notebook_page(void)
gtk_container_add (GTK_CONTAINER (frame), box); gtk_container_add (GTK_CONTAINER (frame), box);
/* Enable tiles frame */ /* 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) if (temp_config.tiles_enabled)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (w), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled", gtk_signal_connect (GTK_OBJECT (w), "toggled",
GTK_SIGNAL_FUNC (set_toggle_button_value), GTK_SIGNAL_FUNC (set_icon_button_value),
&(temp_config.tiles_enabled)); &(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); CONFIG_PADDING_SIZE);
return (vbox); return (vbox);
...@@ -349,19 +480,23 @@ misc_notebook_page(void) ...@@ -349,19 +480,23 @@ misc_notebook_page(void)
frame = make_int_scale_frame(_("Applet Padding"), frame = make_int_scale_frame(_("Applet Padding"),
&(temp_config.applet_padding), &(temp_config.applet_padding),
0.0,10.0); 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); CONFIG_PADDING_SIZE);
return (vbox); return (vbox);
} }
void void
panel_config_global(void) panel_config_global(void)
{ {
GtkWidget *page; GtkWidget *page;
GtkWidget *box; GtkWidget *box;
GtkWidget *prop_nbook; GtkWidget *prop_nbook;
char *icon_titles[]={
_("Launcher icon"),
_("Drawer icon"),
_("Menu icon")};
int i;
/* return if the window is already up. */ /* return if the window is already up. */
if (config_window) if (config_window)
...@@ -371,6 +506,9 @@ panel_config_global(void) ...@@ -371,6 +506,9 @@ panel_config_global(void)
/* main window */ /* main window */
box = gnome_property_box_new (); 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_position(GTK_WINDOW(box), GTK_WIN_POS_CENTER);*/
gtk_window_set_policy(GTK_WINDOW(box), FALSE, FALSE, TRUE); gtk_window_set_policy(GTK_WINDOW(box), FALSE, FALSE, TRUE);
gtk_signal_connect(GTK_OBJECT(box), "destroy", gtk_signal_connect(GTK_OBJECT(box), "destroy",
...@@ -386,13 +524,21 @@ panel_config_global(void) ...@@ -386,13 +524,21 @@ panel_config_global(void)
/* Animation notebook page */ /* Animation notebook page */
page = animation_notebook_page (); page = animation_notebook_page ();
gtk_notebook_append_page (GTK_NOTEBOOK(prop_nbook), gtk_notebook_append_page (GTK_NOTEBOOK(prop_nbook),
page, gtk_label_new (_("Animation settings"))); page, gtk_label_new (_("Animation")));
/* Icon notebook page */ /* General icon notebook page */
page = icon_notebook_page (); page = genicon_notebook_page ();
gtk_notebook_append_page (GTK_NOTEBOOK(prop_nbook), 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);