}
void
-hvclock_init(GtkWidget *dockwin, GtkWidget *iconwin)
+hvclock_init(GtkWidget *win)
{
- gtk_widget_add_events(dockwin, GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK);
- gtk_widget_add_events(iconwin, GDK_BUTTON_PRESS_MASK |
+ gtk_widget_add_events(win, GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK);
- g_signal_connect(G_OBJECT(dockwin), "expose-event",
- G_CALLBACK(hvclock_expose), NULL);
- g_signal_connect(G_OBJECT(iconwin), "expose-event",
+ g_signal_connect(G_OBJECT(win), "expose-event",
G_CALLBACK(hvclock_expose), NULL);
- g_signal_connect(G_OBJECT(dockwin), "button-press-event",
- G_CALLBACK(hvclock_button_release), NULL);
- g_signal_connect(G_OBJECT(iconwin), "button-press-event",
- G_CALLBACK(hvclock_button_release), NULL);
- g_signal_connect(G_OBJECT(dockwin), "button-release-event",
+ g_signal_connect(G_OBJECT(win), "button-press-event",
G_CALLBACK(hvclock_button_release), NULL);
- g_signal_connect(G_OBJECT(iconwin), "button-release-event",
+ g_signal_connect(G_OBJECT(win), "button-release-event",
G_CALLBACK(hvclock_button_release), NULL);
/* update the clock once a second */
- g_timeout_add(1000, hvclock_update, iconwin);
+ g_timeout_add(1000, hvclock_update, win);
- hvclock_redraw_canvas(iconwin);
+ hvclock_redraw_canvas(win);
}