Commit e3c6eb8b authored by Manish Vachharajani's avatar Manish Vachharajani

Merge panel changes in from GNOME_STABLE branch

parent 3a379751
Sun Dec 20 02:02:10 1998 George Lebl <jirka@5z.com>
* drawer.c: use icon entry
* panel.c: use motion notify events for moving insted of just a
timer, the logic here is the same as used for applet moving and
it should avoid crowding of more motion events together using
a timeout
Sun Dec 20 01:37:54 1998 George Lebl <jirka@5z.com>
* panel.c,applet.c: add a call to back_change when changing panels
so that we actually change the back on applets that can (printer
can)
* panel-widget.c: take out the old timeout based move as it's now
(and actually been for a while) possible to again use motion_notify
... though I use a timeout to avoid too many motions at once and
move at most every 100ms
Sat Dec 19 21:10:02 1998 George Lebl <jirka@5z.com>
* menu.c: when adding new panel try to find a spot that is empty,
add conversion or edge<->corner panel and move add drawer to
the main panel menu from the add panel submenu
* panel.c: don't put up panel menu on the left click, just on the
right click
* panel_config.c,panel_config_global.c,menu.c: capitalize only the
first letter in strings for consistency
Sat Dec 19 03:30:07 1998 George Lebl <jirka@5z.com>
* Makefile.am: install gnome-panel.h
Sat Dec 19 02:38:09 1998 George Lebl <jirka@5z.com>
* panel_config.c: cosmetic thingie fixed ...
Sat Dec 19 02:12:32 1998 George Lebl <jirka@5z.com>
* panel_config_global.c: changed disable animations to enable
animations
* session.c: made the "..." buttons off by default, happy now????
Sat Dec 19 01:55:10 1998 George Lebl <jirka@5z.com>
* menu.c: experimental Redhat menu reading code, #if 0'ed
out now until proven stable and functionally complete
* panel_config.c,drawer.c: changed negative checkboxes to positive
and made only AutoHide checkbox (not two radio boxes)
* applet-widget.c: fixed a bug with right click menus, now the
menus come up the same way all over (if you click they will stay).
this took some X hackery which is probably not 100% the
RightWay(tm) but it works (it bypasses corba and emulates a
button press on the socket with XSendEvent)
Wed Dec 16 14:54:09 1998 Owen Taylor <otaylor@redhat.com>
* applet.c button-widget.c button-widget.h panel-widget.c:
widget->window cannot be INPUT_ONLY. So, do the same
trick as we do for CheckButtons or Scales. Make
ButtonWidget NO_WINDOW, with an additional event_window
field.
1998-12-16 Jonathan Blandford <jrb@aware-of-vacuity.labs.redhat.com>
* menu.c (panel_lock): let's do the correct xscreensaver command
......
Sun Dec 20 02:02:10 1998 George Lebl <jirka@5z.com>
* drawer.c: use icon entry
* panel.c: use motion notify events for moving insted of just a
timer, the logic here is the same as used for applet moving and
it should avoid crowding of more motion events together using
a timeout
Sun Dec 20 01:37:54 1998 George Lebl <jirka@5z.com>
* panel.c,applet.c: add a call to back_change when changing panels
so that we actually change the back on applets that can (printer
can)
* panel-widget.c: take out the old timeout based move as it's now
(and actually been for a while) possible to again use motion_notify
... though I use a timeout to avoid too many motions at once and
move at most every 100ms
Sat Dec 19 21:10:02 1998 George Lebl <jirka@5z.com>
* menu.c: when adding new panel try to find a spot that is empty,
add conversion or edge<->corner panel and move add drawer to
the main panel menu from the add panel submenu
* panel.c: don't put up panel menu on the left click, just on the
right click
* panel_config.c,panel_config_global.c,menu.c: capitalize only the
first letter in strings for consistency
Sat Dec 19 03:30:07 1998 George Lebl <jirka@5z.com>
* Makefile.am: install gnome-panel.h
Sat Dec 19 02:38:09 1998 George Lebl <jirka@5z.com>
* panel_config.c: cosmetic thingie fixed ...
Sat Dec 19 02:12:32 1998 George Lebl <jirka@5z.com>
* panel_config_global.c: changed disable animations to enable
animations
* session.c: made the "..." buttons off by default, happy now????
Sat Dec 19 01:55:10 1998 George Lebl <jirka@5z.com>
* menu.c: experimental Redhat menu reading code, #if 0'ed
out now until proven stable and functionally complete
* panel_config.c,drawer.c: changed negative checkboxes to positive
and made only AutoHide checkbox (not two radio boxes)
* applet-widget.c: fixed a bug with right click menus, now the
menus come up the same way all over (if you click they will stay).
this took some X hackery which is probably not 100% the
RightWay(tm) but it works (it bypasses corba and emulates a
button press on the socket with XSendEvent)
Wed Dec 16 14:54:09 1998 Owen Taylor <otaylor@redhat.com>
* applet.c button-widget.c button-widget.h panel-widget.c:
widget->window cannot be INPUT_ONLY. So, do the same
trick as we do for CheckButtons or Scales. Make
ButtonWidget NO_WINDOW, with an additional event_window
field.
1998-12-16 Jonathan Blandford <jrb@aware-of-vacuity.labs.redhat.com>
* menu.c (panel_lock): let's do the correct xscreensaver command
......
......@@ -40,6 +40,7 @@ libpanel_applet_la_SOURCES = \
libpanel_appletinclude_HEADERS = \
applet-widget.h \
gnome-panel.h \
panel-types.h
libpanel_applet_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
......
#include <config.h>
#include <string.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <gnome.h>
#include <applet-widget.h>
......@@ -703,54 +706,48 @@ applet_widget_get_applet_count()
return applet_count;
}
/*button press event over the applet*/
static int
applet_bevent(GtkWidget *widget, GdkEventButton *bevent, GtkWidget *appw)
applet_event(GtkWidget *w,GdkEvent *event,GtkPlug *aw)
{
GtkWidget *w;
CORBA_Environment ev;
int retval = FALSE;
CORBA_exception_init(&ev);
if(GNOME_Panel__get_in_drag(panel_client, &ev)) {
gtk_signal_emit_stop_by_name(GTK_OBJECT(widget),
"button_press_event");
GNOME_PanelSpot_drag_stop(CD(appw)->pspot, &ev);
retval = TRUE;
} else if(bevent->button == 2) {
gtk_signal_emit_stop_by_name(GTK_OBJECT(widget),
"button_press_event");
if((w = gtk_grab_get_current()))
gtk_grab_remove(w);
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
gdk_pointer_ungrab(GDK_CURRENT_TIME);
gdk_flush();
GNOME_PanelSpot_drag_start(CD(appw)->pspot, &ev);
retval = TRUE;
} else if(bevent->button == 3) {
gtk_signal_emit_stop_by_name(GTK_OBJECT(widget),
"button_press_event");
if((w = gtk_grab_get_current()))
gtk_grab_remove(w);
GdkEventButton *bevent = (GdkEventButton *)event;
if(event->type == GDK_BUTTON_PRESS &&
(bevent->button == 3 || bevent->button == 2)) {
XButtonEvent ev;
GtkWidget *wi;
if((wi = gtk_grab_get_current()))
gtk_grab_remove(wi);
gdk_pointer_ungrab(GDK_CURRENT_TIME);
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
gdk_flush();
GNOME_PanelSpot_show_menu(CD(appw)->pspot, &ev);
retval = TRUE;
gtk_signal_emit_stop_by_name(GTK_OBJECT(w),
"event");
ev.type = ButtonPress;
ev.send_event = True;
ev.display = GDK_DISPLAY();
ev.window = GDK_WINDOW_XWINDOW(aw->socket_window);
ev.subwindow = None;
ev.time = bevent->time;
ev.x = bevent->x;
ev.y = bevent->y;
ev.x_root = bevent->x_root;
ev.y_root = bevent->y_root;
ev.state = bevent->state;
ev.button = bevent->button;
ev.same_screen = True;
XSendEvent(GDK_DISPLAY(),
GDK_WINDOW_XWINDOW(aw->socket_window),
True,NoEventMask,(XEvent *)&ev);
return TRUE;
}
CORBA_exception_free(&ev);
return retval;
return FALSE;
}
static void
bind_applet_events(GtkWidget *widget, gpointer data)
{
if (!GTK_WIDGET_NO_WINDOW(widget)) {
gtk_signal_connect(GTK_OBJECT(widget), "button_press_event",
(GtkSignalFunc) applet_bevent,
gtk_signal_connect(GTK_OBJECT(widget), "event",
(GtkSignalFunc) applet_event,
data);
}
......
......@@ -44,7 +44,6 @@ move_applet_callback(GtkWidget *widget, AppletInfo *info)
g_return_if_fail(panel!=NULL);
panel_widget_applet_drag_start(panel,info->widget);
panel_widget_applet_move_use_idle(panel);
}
/*destroy widgets and call the above cleanup function*/
......@@ -490,7 +489,7 @@ register_toy(GtkWidget *applet,
panel = PANEL_WIDGET(list->data);
}
if(!GTK_WIDGET_NO_WINDOW(applet))
if(IS_BUTTON_WIDGET (applet) || !GTK_WIDGET_NO_WINDOW(applet))
gtk_signal_connect(GTK_OBJECT(applet),
"button_press_event",
GTK_SIGNAL_FUNC(applet_button_press),
......@@ -512,6 +511,7 @@ register_toy(GtkWidget *applet,
applet_drag_types, 1);*/
orientation_change(info,panel);
back_change(info,panel);
return TRUE;
}
......@@ -16,6 +16,10 @@ static void button_widget_size_request (GtkWidget *widget,
static void button_widget_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void button_widget_realize (GtkWidget *widget);
static void button_widget_unrealize (GtkWidget *widget);
static void button_widget_map (GtkWidget *widget);
static void button_widget_unmap (GtkWidget *widget);
static int button_widget_button_press (GtkWidget *widget,
GdkEventButton *event);
static int button_widget_button_release(GtkWidget *widget,
......@@ -135,6 +139,9 @@ button_widget_class_init (ButtonWidgetClass *class)
class->unpressed = button_widget_unpressed;
widget_class->realize = button_widget_realize;
widget_class->unrealize = button_widget_unrealize;
widget_class->map = button_widget_map;
widget_class->unmap = button_widget_unmap;
widget_class->size_allocate = button_widget_size_allocate;
widget_class->size_request = button_widget_size_request;
widget_class->button_press_event = button_widget_button_press;
......@@ -149,10 +156,13 @@ button_widget_realize(GtkWidget *widget)
{
GdkWindowAttr attributes;
gint attributes_mask;
ButtonWidget *button_widget;
g_return_if_fail (widget != NULL);
g_return_if_fail (IS_BUTTON_WIDGET (widget));
button_widget = BUTTON_WIDGET (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
attributes.window_type = GDK_WINDOW_CHILD;
......@@ -170,11 +180,57 @@ button_widget_realize(GtkWidget *widget)
GDK_LEAVE_NOTIFY_MASK);
attributes_mask = GDK_WA_X | GDK_WA_Y;
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (widget->window, widget);
widget->window = gtk_widget_get_parent_window(widget);
gdk_window_ref(widget->window);
button_widget->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (button_widget->event_window, widget);
widget->style = gtk_style_attach (widget->style, widget->window);
}
static void
button_widget_unrealize (GtkWidget *widget)
{
ButtonWidget *button_widget;
g_return_if_fail (widget != NULL);
g_return_if_fail (IS_BUTTON_WIDGET (widget));
button_widget = BUTTON_WIDGET (widget);
gdk_window_set_user_data (button_widget->event_window, NULL);
gdk_window_destroy (button_widget->event_window);
button_widget->event_window = NULL;
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void
button_widget_map (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (IS_BUTTON_WIDGET (widget));
if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_MAPPED (widget))
gdk_window_show (BUTTON_WIDGET (widget)->event_window);
GTK_WIDGET_CLASS (parent_class)->map (widget);
}
static void
button_widget_unmap (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (IS_BUTTON_WIDGET (widget));
if (GTK_WIDGET_MAPPED (widget))
gdk_window_hide (BUTTON_WIDGET (widget)->event_window);
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
}
static int
button_widget_destroy(GtkWidget *w, gpointer data)
......@@ -327,9 +383,16 @@ button_widget_size_request(GtkWidget *widget, GtkRequisition *requisition)
static void
button_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
{
ButtonWidget *button_widget;
g_return_if_fail (widget != NULL);
g_return_if_fail (IS_BUTTON_WIDGET (widget));
button_widget = BUTTON_WIDGET (widget);
widget->allocation = *allocation;
if (GTK_WIDGET_REALIZED (widget))
gdk_window_move_resize (widget->window,
gdk_window_move_resize (button_widget->event_window,
allocation->x, allocation->y,
allocation->width, allocation->height);
}
......@@ -341,6 +404,8 @@ button_widget_init (ButtonWidget *button)
{
buttons = g_list_prepend(buttons,button);
GTK_WIDGET_SET_FLAGS (button, GTK_NO_WINDOW);
button->pixmap = NULL;
button->mask = NULL;
......
......@@ -23,6 +23,8 @@ struct _ButtonWidget
GdkPixmap *pixmap; /*this is the one we start from*/
GdkBitmap *mask;
GdkWindow *event_window;
guint pressed:1; /*true if the button is pressed*/
guint in_button:1;
......
......@@ -19,7 +19,7 @@ typedef struct _CornerWidget CornerWidget;
typedef struct _CornerWidgetClass CornerWidgetClass;
typedef enum {
CORNER_NE,
CORNER_NE=0,
CORNER_SE,
CORNER_SW,
CORNER_NW
......
......@@ -36,9 +36,9 @@ properties_apply_callback(GtkWidget *widget, int page, gpointer data)
{
Drawer *drawer = data;
GtkWidget *pixentry = gtk_object_get_data(GTK_OBJECT(widget),
"pixmap");
"pixmap");
GtkWidget *tipentry = gtk_object_get_data(GTK_OBJECT(widget),
"tooltip");
"tooltip");
char *s;
if (page != -1)
......@@ -48,7 +48,7 @@ properties_apply_callback(GtkWidget *widget, int page, gpointer data)
g_free(drawer->pixmap);
if(drawer->tooltip)
g_free(drawer->tooltip);
s = gnome_pixmap_entry_get_filename(GNOME_PIXMAP_ENTRY(pixentry));
s = gnome_icon_entry_get_filename(GNOME_ICON_ENTRY(pixentry));
if(!s || !*s) {
drawer->pixmap =
gnome_unconditional_pixmap_file ("panel-drawer.png");
......@@ -79,28 +79,28 @@ static int
properties_close_callback(GtkWidget *widget, gpointer data)
{
Drawer *drawer = data;
/*GtkWidget *pixentry = gtk_object_get_data(GTK_OBJECT(widget),"pixmap");
GtkWidget *gtkpixentry =
gnome_pixmap_entry_gtk_entry(GNOME_PIXMAP_ENTRY(pixentry));
GtkWidget *tipentry = gtk_object_get_data(GTK_OBJECT(widget),"tooltip");*/
gtk_object_set_data(GTK_OBJECT(drawer->button),
DRAWER_PROPERTIES,NULL);
/*gtk_signal_disconnect_by_data(GTK_OBJECT(gtkpixentry),widget);
gtk_signal_disconnect_by_data(GTK_OBJECT(tipentry),widget);*/
return FALSE;
}
static void
set_toggle_not (GtkWidget *widget, gpointer data)
set_toggle (GtkWidget *widget, gpointer data)
{
PerPanelConfig *ppc = gtk_object_get_user_data(GTK_OBJECT(widget));
int *the_toggle = data;
*the_toggle = !(GTK_TOGGLE_BUTTON(widget)->active);
*the_toggle = GTK_TOGGLE_BUTTON(widget)->active;
if (ppc->register_changes)
gnome_property_box_changed (GNOME_PROPERTY_BOX (ppc->config_window));
}
static void
set_sensitive_toggle (GtkWidget *widget, GtkWidget *widget2)
{
gtk_widget_set_sensitive(widget2,GTK_TOGGLE_BUTTON(widget)->active);
}
void
add_drawer_properties_page(PerPanelConfig *ppc, Drawer *drawer)
{
......@@ -121,8 +121,8 @@ add_drawer_properties_page(PerPanelConfig *ppc, Drawer *drawer)
drawer->tooltip, dialog);
gtk_object_set_data(GTK_OBJECT(dialog),"tooltip",w);
w = create_pixmap_entry(table, "icon", 1, _("Icon"), drawer->pixmap,
dialog,64,64);
w = create_icon_entry(table, "icon", 1, _("Icon"), drawer->pixmap,
dialog);
gtk_object_set_data(GTK_OBJECT(dialog),"pixmap",w);
f = gtk_frame_new(_("Applet appearance"));
......@@ -134,22 +134,29 @@ add_drawer_properties_page(PerPanelConfig *ppc, Drawer *drawer)
f = gtk_frame_new(_("Drawer handle"));
box_in = gtk_vbox_new(FALSE,5);
button = gtk_check_button_new_with_label (_("Disable hidebutton"));
/*we store this in w for later use!, so don't use w as temp from now
on*/
w = button = gtk_check_button_new_with_label (_("Enable hidebutton"));
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (!ppc->drawer_hidebutton)
if (ppc->drawer_hidebutton)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (set_toggle_not),
GTK_SIGNAL_FUNC (set_toggle),
&ppc->drawer_hidebutton);
gtk_box_pack_start (GTK_BOX (box_in), button, TRUE, FALSE,
CONFIG_PADDING_SIZE);
button = gtk_check_button_new_with_label (_("Disable hidebutton arrow"));
button = gtk_check_button_new_with_label (_("Enable hidebutton arrow"));
gtk_signal_connect (GTK_OBJECT (w), "toggled",
GTK_SIGNAL_FUNC (set_sensitive_toggle),
button);
if (!ppc->drawer_hidebutton)
gtk_widget_set_sensitive(button,FALSE);
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (!ppc->drawer_hidebutton_pixmap)
if (ppc->drawer_hidebutton_pixmap)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (set_toggle_not),
GTK_SIGNAL_FUNC (set_toggle),
&ppc->drawer_hidebutton_pixmap);
gtk_box_pack_start (GTK_BOX (box_in), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
......
......@@ -402,7 +402,7 @@ s_panel_add_applet_full(POA_GNOME_Panel *servant,
*globcfgpath = CORBA_string_dup(old_panel_cfg_path);
info->type = APPLET_EXTERN_RESERVED;
*wid=GDK_WINDOW_XWINDOW(socket->window);
printf("\nSOCKET XID: %lX\n\n", *wid);
printf("\nSOCKET XID: %lX\n\n", (long)*wid);
panelspot_servant = (POA_GNOME_PanelSpot *)ext;
acc = PortableServer_POA_servant_to_reference(thepoa, panelspot_servant, ev);
......@@ -662,7 +662,6 @@ s_panelspot_drag_start(POA_GNOME_PanelSpot *servant,
/*panel_widget_applet_drag_start(panel,info->widget);
panel_widget_applet_drag_end(panel);*/
panel_widget_applet_drag_start(panel,ext->info->widget);
panel_widget_applet_move_use_idle(panel);
}
static void
......
This diff is collapsed.
......@@ -206,16 +206,22 @@ config_event(GtkWidget *widget,GdkEvent *event,GtkNotebook *nbook)
}
static void
set_toggle_not (GtkWidget *widget, gpointer data)
set_toggle (GtkWidget *widget, gpointer data)
{
PerPanelConfig *ppc = gtk_object_get_user_data(GTK_OBJECT(widget));
int *the_toggle = data;
*the_toggle = !(GTK_TOGGLE_BUTTON(widget)->active);
*the_toggle = GTK_TOGGLE_BUTTON(widget)->active;
if (ppc->register_changes)
gnome_property_box_changed (GNOME_PROPERTY_BOX (ppc->config_window));
}
static void
set_sensitive_toggle (GtkWidget *widget, GtkWidget *widget2)
{
gtk_widget_set_sensitive(widget2,GTK_TOGGLE_BUTTON(widget)->active);
}
static void
snapped_set_pos (GtkWidget *widget, gpointer data)
{
......@@ -231,15 +237,15 @@ snapped_set_pos (GtkWidget *widget, gpointer data)
}
static void
snapped_set_mode (GtkWidget *widget, gpointer data)
snapped_set_auto_hide (GtkWidget *widget, gpointer data)
{
SnappedMode mode = (SnappedMode) data;
PerPanelConfig *ppc = gtk_object_get_user_data(GTK_OBJECT(widget));
if(!(GTK_TOGGLE_BUTTON(widget)->active))
return;
if(GTK_TOGGLE_BUTTON(widget)->active)
ppc->snapped_mode = SNAPPED_AUTO_HIDE;
else
ppc->snapped_mode = SNAPPED_EXPLICIT_HIDE;
ppc->snapped_mode = mode;
if (ppc->register_changes)
gnome_property_box_changed (GNOME_PROPERTY_BOX (ppc->config_window));
}
......@@ -252,7 +258,12 @@ snapped_notebook_page(PerPanelConfig *ppc)
GtkWidget *button;
GtkWidget *box;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *w;
/* main vbox */
vbox = gtk_vbox_new (FALSE, 0);
/* main hbox */
hbox = gtk_hbox_new (FALSE, CONFIG_PADDING_SIZE);
......@@ -333,7 +344,7 @@ snapped_notebook_page(PerPanelConfig *ppc)
}
/* Auto-hide/stayput frame */
frame = gtk_frame_new (_("Minimize Options"));
frame = gtk_frame_new (_("Minimize options"));
gtk_container_set_border_width(GTK_CONTAINER (frame), CONFIG_PADDING_SIZE);
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE,
CONFIG_PADDING_SIZE);
......@@ -343,53 +354,47 @@ snapped_notebook_page(PerPanelConfig *ppc)
gtk_container_set_border_width(GTK_CONTAINER (box), CONFIG_PADDING_SIZE);
gtk_container_add (GTK_CONTAINER (frame), box);
/* Stay Put */
button = gtk_radio_button_new_with_label (NULL, _("Explicitly Hide"));
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (ppc->snapped_mode == SNAPPED_EXPLICIT_HIDE)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (snapped_set_mode),
(gpointer)SNAPPED_EXPLICIT_HIDE);
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
/* Auto-hide */
button = gtk_radio_button_new_with_label (
gtk_radio_button_group (GTK_RADIO_BUTTON (button)),
_("Auto Hide"));
button = gtk_check_button_new_with_label(_("Auto hide"));
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (ppc->snapped_mode == SNAPPED_AUTO_HIDE)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (snapped_set_mode),
(gpointer)SNAPPED_AUTO_HIDE);
GTK_SIGNAL_FUNC (snapped_set_auto_hide),
NULL);
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
/* Hidebuttons disable */
button = gtk_check_button_new_with_label (_("Disable hidebuttons"));
/* Hidebuttons enable */
w = button = gtk_check_button_new_with_label (_("Enable hidebuttons"));
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (!ppc->snapped_hidebuttons)
if (ppc->snapped_hidebuttons)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (set_toggle_not),
GTK_SIGNAL_FUNC (set_toggle),
&ppc->snapped_hidebuttons);
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
/* Arrow disable */
button = gtk_check_button_new_with_label (_("Disable hidebutton arrows"));
/* Arrow enable */
button = gtk_check_button_new_with_label (_("Enable hidebutton arrows"));
gtk_signal_connect (GTK_OBJECT (w), "toggled",
GTK_SIGNAL_FUNC (set_sensitive_toggle),
button);
if (!ppc->snapped_hidebuttons)
gtk_widget_set_sensitive(button,FALSE);
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (!ppc->snapped_hidebutton_pixmaps)
if (ppc->snapped_hidebutton_pixmaps)
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (set_toggle_not),
GTK_SIGNAL_FUNC (set_toggle),
&ppc->snapped_hidebutton_pixmaps);
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE,
CONFIG_PADDING_SIZE);
return (hbox);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
return (vbox);
}
static void
......@@ -426,6 +431,7 @@ corner_notebook_page(PerPanelConfig *ppc)
{
GtkWidget *frame;
GtkWidget *button;
GtkWidget *w;
GtkWidget *box;
GtkWidget *hbox;
GtkWidget *vbox;
......@@ -449,7 +455,7 @@ corner_notebook_page(PerPanelConfig *ppc)
gtk_container_add (GTK_CONTAINER (frame), table);
/* North East Position */
ppc->t_button = gtk_radio_button_new_with_label (NULL, _("North East"));
ppc->t_button = gtk_radio_button_new_with_label (NULL, _("North east"));
gtk_object_set_user_data(GTK_OBJECT(ppc->t_button),ppc);
gtk_signal_connect (GTK_OBJECT (ppc->t_button), "toggled",
GTK_SIGNAL_FUNC (corner_set_pos),
......@@ -460,7 +466,7 @@ corner_notebook_page(PerPanelConfig *ppc)
/* Bottom Position */
ppc->b_button = gtk_radio_button_new_with_label (
gtk_radio_button_group (GTK_RADIO_BUTTON (ppc->t_button)),
_("South West"));
_("South west"));
gtk_object_set_user_data(GTK_OBJECT(ppc->b_button),ppc);
gtk_signal_connect (GTK_OBJECT (ppc->b_button), "toggled",
GTK_SIGNAL_FUNC (corner_set_pos),
......@@ -471,7 +477,7 @@ corner_notebook_page(PerPanelConfig *ppc)
/* North West Position */
ppc->l_button = gtk_radio_button_new_with_label (
gtk_radio_button_group (GTK_RADIO_BUTTON (ppc->t_button)),
_("North West"));
_("North west"));
gtk_object_set_user_data(GTK_OBJECT(ppc->l_button),ppc);
gtk_signal_connect (GTK_OBJECT (ppc->l_button), "toggled",
GTK_SIGNAL_FUNC (corner_set_pos),
......@@ -482,7 +488,7 @@ corner_notebook_page(PerPanelConfig *ppc)
/* South East Position */
ppc->r_button = gtk_radio_button_new_with_label (
gtk_radio_button_group (GTK_RADIO_BUTTON (ppc->t_button)),
_("South East"));
_("South east"));
gtk_object_set_user_data(GTK_OBJECT(ppc->r_button),ppc);
gtk_signal_connect (GTK_OBJECT (ppc->r_button), "toggled",
GTK_SIGNAL_FUNC (corner_set_pos),
......@@ -549,7 +555,7 @@ corner_notebook_page(PerPanelConfig *ppc)
CONFIG_PADDING_SIZE);
/* Hidebuttons frame */
frame = gtk_frame_new (_("Hidebutton Options"));
frame = gtk_frame_new (_("Hidebutton options"));
gtk_container_set_border_width(GTK_CONTAINER (frame), CONFIG_PADDING_SIZE);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE,
CONFIG_PADDING_SIZE);
......@@ -560,24 +566,29 @@ corner_notebook_page(PerPanelConfig *ppc)
gtk_container_add (GTK_CONTAINER (frame), box);
/* Hidebuttons disable */
button = gtk_check_button_new_with_label (_("Disable hidebuttons"));
/* Hidebuttons enable */
w = button = gtk_check_button_new_with_label (_("Enable hidebuttons"));
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
if (!ppc->corner_hidebuttons)
if (ppc->corner_hidebuttons)