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

prevent infinite loop with background pixmap setting, but this needs more

Tue Jan 30 22:30:26 2001  George Lebl <jirka@5z.com>

	* panel_config.c: prevent infinite loop with background pixmap
	  setting, but this needs more work

	* basep-widget.c: follow style_set signal and reset styles on the
	  subwidgets to follow theme

	* panel.c: make sure button #3 gets through on panels, so that menu
	  gets displayed
parent b610e383
Tue Jan 30 22:30:26 2001 George Lebl <jirka@5z.com>
* panel_config.c: prevent infinite loop with background pixmap
setting, but this needs more work
* basep-widget.c: follow style_set signal and reset styles on the
subwidgets to follow theme
* panel.c: make sure button #3 gets through on panels, so that menu
gets displayed
Thu Jan 25 04:10:03 2001 George Lebl <jirka@5z.com>
* panel.c: 1st button click on the panel space also starts a panel
......
Tue Jan 30 22:30:26 2001 George Lebl <jirka@5z.com>
* panel_config.c: prevent infinite loop with background pixmap
setting, but this needs more work
* basep-widget.c: follow style_set signal and reset styles on the
subwidgets to follow theme
* panel.c: make sure button #3 gets through on panels, so that menu
gets displayed
Thu Jan 25 04:10:03 2001 George Lebl <jirka@5z.com>
* panel.c: 1st button click on the panel space also starts a panel
......
......@@ -42,6 +42,7 @@ static void basep_pos_class_init (BasePPosClass *klass);
static void basep_pos_init (BasePPos *pos);
static gboolean basep_leave_notify (GtkWidget *widget, GdkEventCrossing *event);
static gboolean basep_enter_notify (GtkWidget *widget, GdkEventCrossing *event);
static void basep_style_set (GtkWidget *widget, GtkStyle *previous_style);
static void basep_widget_destroy (GtkObject *o);
......@@ -334,6 +335,7 @@ basep_widget_class_init (BasePWidgetClass *klass)
widget_class->realize = basep_widget_realize;
widget_class->enter_notify_event = basep_enter_notify;
widget_class->leave_notify_event = basep_leave_notify;
widget_class->style_set = basep_style_set;
object_class->destroy = basep_widget_destroy;
}
......@@ -450,7 +452,10 @@ basep_leave_notify (GtkWidget *widget,
basep_widget_queue_autohide (basep);
return FALSE;
if (GTK_WIDGET_CLASS (basep_widget_parent_class)->leave_notify_event)
return GTK_WIDGET_CLASS (basep_widget_parent_class)->leave_notify_event (widget, event);
else
return FALSE;
}
static gboolean
......@@ -477,7 +482,10 @@ basep_enter_notify (GtkWidget *widget,
if (global_config.autoraise)
gdk_window_raise (GTK_WIDGET(basep)->window);
return FALSE;
if (GTK_WIDGET_CLASS (basep_widget_parent_class)->enter_notify_event)
return GTK_WIDGET_CLASS (basep_widget_parent_class)->enter_notify_event (widget, event);
else
return FALSE;
}
void
......@@ -1106,20 +1114,47 @@ basep_update_frame (BasePWidget *basep)
}
static void
basep_back_change(PanelWidget *panel,
PanelBackType type,
char *pixmap,
GdkColor *color,
BasePWidget *basep)
basep_back_change (PanelWidget *panel,
PanelBackType type,
char *pixmap,
GdkColor *color,
BasePWidget *basep)
{
basep_update_frame (basep);
set_frame_colors(panel,
basep->frame,
basep->hidebutton_n,
basep->hidebutton_e,
basep->hidebutton_w,
basep->hidebutton_s);
set_frame_colors (panel,
basep->frame,
basep->hidebutton_n,
basep->hidebutton_e,
basep->hidebutton_w,
basep->hidebutton_s);
}
static void
basep_style_set (GtkWidget *widget, GtkStyle *previous_style)
{
BasePWidget *basep;
PanelWidget *panel;
g_return_if_fail (widget != NULL);
g_return_if_fail (IS_BASEP_WIDGET (widget));
basep = BASEP_WIDGET (widget);
g_return_if_fail (basep->panel != NULL);
g_return_if_fail (IS_PANEL_WIDGET (basep->panel));
panel = PANEL_WIDGET (basep->panel);
if (GTK_WIDGET_CLASS (basep_widget_parent_class)->style_set)
GTK_WIDGET_CLASS (basep_widget_parent_class)->style_set (widget, previous_style);
set_frame_colors (panel,
basep->frame,
basep->hidebutton_n,
basep->hidebutton_e,
basep->hidebutton_w,
basep->hidebutton_s);
}
static void
......
......@@ -328,6 +328,7 @@ update_config_back (PanelWidget *pw)
GtkWidget *t, *item = NULL;
int history = 0;
PerPanelConfig *ppc;
char *text;
g_return_if_fail (pw);
g_return_if_fail (IS_PANEL_WIDGET(pw));
......@@ -354,9 +355,14 @@ update_config_back (PanelWidget *pw)
history = 1;
break;
case PANEL_BACK_PIXMAP:
t=gnome_pixmap_entry_gtk_entry(GNOME_PIXMAP_ENTRY(ppc->pix_entry));
gtk_entry_set_text (GTK_ENTRY (t),
sure_string (pw->back_pixmap));
t = gnome_pixmap_entry_gtk_entry
(GNOME_PIXMAP_ENTRY (ppc->pix_entry));
text = gtk_entry_get_text (GTK_ENTRY (t));
if (strcmp (sure_string (pw->back_pixmap),
text) != 0) {
gtk_entry_set_text (GTK_ENTRY (t),
sure_string (pw->back_pixmap));
}
item = ppc->pix;
history = 2;
break;
......
......@@ -770,7 +770,7 @@ panel_event(GtkWidget *widget, GdkEvent *event, PanelData *pd)
case GDK_BUTTON_PRESS:
bevent = (GdkEventButton *) event;
switch(bevent->button) {
case 3: /* fall through */
case 3:
if(!panel_applet_in_drag) {
GtkWidget *menu;
......@@ -839,7 +839,9 @@ panel_widget_event (GtkWidget *widget, GdkEvent *event, GtkWidget *panelw)
if (event->type == GDK_BUTTON_PRESS) {
GdkEventButton *bevent = (GdkEventButton *) event;
return panel_initiate_move (panelw, bevent->time);
if (bevent->button == 1 ||
bevent->button == 2)
return panel_initiate_move (panelw, bevent->time);
}
return FALSE;
......
......@@ -328,6 +328,7 @@ update_config_back (PanelWidget *pw)
GtkWidget *t, *item = NULL;
int history = 0;
PerPanelConfig *ppc;
char *text;
g_return_if_fail (pw);
g_return_if_fail (IS_PANEL_WIDGET(pw));
......@@ -354,9 +355,14 @@ update_config_back (PanelWidget *pw)
history = 1;
break;
case PANEL_BACK_PIXMAP:
t=gnome_pixmap_entry_gtk_entry(GNOME_PIXMAP_ENTRY(ppc->pix_entry));
gtk_entry_set_text (GTK_ENTRY (t),
sure_string (pw->back_pixmap));
t = gnome_pixmap_entry_gtk_entry
(GNOME_PIXMAP_ENTRY (ppc->pix_entry));
text = gtk_entry_get_text (GTK_ENTRY (t));
if (strcmp (sure_string (pw->back_pixmap),
text) != 0) {
gtk_entry_set_text (GTK_ENTRY (t),
sure_string (pw->back_pixmap));
}
item = ppc->pix;
history = 2;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment