Commit c0d896c8 authored by Glynn Foster's avatar Glynn Foster Committed by Glynn Foster

* drawer.c: * extern.c: * gnome-panel-screenshot.c: * menu.c: *

2001-11-26  Glynn Foster  <glynn.foster@sun.com>

	* applet.c: * drawer.c: * extern.c: * gnome-panel-screenshot.c:
	* gnome-run.c: * menu.c: * nothing.cP: * panel-util.c:
	* panel-widget.c: * panel.c: * panel_config.c: * session.c:
	* status-docklet.c: * status.c: * swallow.c:

	I see a glorious dream for the panel. Using no deprecated stuff
	for the 2.0 release. This brings us one step closer to that dream.
	Some more gtk_signal_* porting. Now there is only the weird stuff
	left that I don't know what to do with.
parent 387abdaa
2001-11-26 Glynn Foster <glynn.foster@sun.com>
* applet.c: * drawer.c: * extern.c: * gnome-panel-screenshot.c:
* gnome-run.c: * menu.c: * nothing.cP: * panel-util.c:
* panel-widget.c: * panel.c: * panel_config.c: * session.c:
* status-docklet.c: * status.c: * swallow.c:
I see a glorious dream for the panel. Using no deprecated stuff
for the 2.0 release. This brings us one step closer to that dream.
Some more gtk_signal_* porting. Now there is only the weird stuff
left that I don't know what to do with.
2001-11-26 Glynn Foster <glynn.foster@sun.com>
* launcher.c, session.c: Quick hack to get launchers on the panel
......
......@@ -355,9 +355,9 @@ setup_an_item(AppletUserMenu *menu,
int is_submenu)
{
menu->menuitem = gtk_menu_item_new ();
gtk_signal_connect (GTK_OBJECT (menu->menuitem), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
&menu->menuitem);
g_signal_connect (G_OBJECT (menu->menuitem), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&menu->menuitem);
if(menu->stock_item && *(menu->stock_item))
setup_menuitem (menu->menuitem,
gtk_image_new_from_stock (menu->stock_item,
......@@ -373,12 +373,12 @@ setup_an_item(AppletUserMenu *menu,
/*if an item not a submenu*/
if(!is_submenu) {
gtk_signal_connect(GTK_OBJECT(menu->menuitem), "activate",
(GtkSignalFunc) applet_callback_callback,
g_signal_connect(G_OBJECT(menu->menuitem), "activate",
G_CALLBACK (applet_callback_callback),
menu);
gtk_signal_connect(GTK_OBJECT (submenu), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
&menu->submenu);
g_signal_connect(G_OBJECT (submenu), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&menu->submenu);
/* if the item is a submenu and doesn't have it's menu
created yet*/
} else if(!menu->submenu) {
......@@ -388,8 +388,8 @@ setup_an_item(AppletUserMenu *menu,
if(menu->submenu) {
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu->menuitem),
menu->submenu);
gtk_signal_connect (GTK_OBJECT (menu->submenu), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
g_signal_connect (G_OBJECT (menu->submenu), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&menu->submenu);
}
......@@ -512,9 +512,9 @@ panel_applet_create_menu (AppletInfo *info,
setup_menuitem (menuitem, image , _("Remove from panel"));
gtk_signal_connect (GTK_OBJECT (menuitem),
g_signal_connect (G_OBJECT (menuitem),
"activate",
(GtkSignalFunc) remove_applet_callback,
G_CALLBACK (remove_applet_callback),
info);
gtk_menu_shell_append (GTK_MENU_SHELL (info->menu), menuitem);
......@@ -526,9 +526,9 @@ panel_applet_create_menu (AppletInfo *info,
*/
setup_menuitem (menuitem, NULL, _("Move"));
gtk_signal_connect (GTK_OBJECT (menuitem),
g_signal_connect (G_OBJECT (menuitem),
"activate",
(GtkSignalFunc) move_applet_callback,
G_CALLBACK (move_applet_callback),
info);
gtk_menu_shell_append (GTK_MENU_SHELL (info->menu), menuitem);
......@@ -559,9 +559,9 @@ panel_applet_create_menu (AppletInfo *info,
* connect the deactivate signal, so that we can "re-allow"
* autohide when the menu is deactivated.
*/
gtk_signal_connect (GTK_OBJECT (info->menu),
g_signal_connect (G_OBJECT (info->menu),
"deactivate",
GTK_SIGNAL_FUNC (applet_menu_deactivate),
G_CALLBACK (applet_menu_deactivate),
info);
}
......@@ -801,20 +801,20 @@ panel_applet_register (GtkWidget *applet,
}
if(BUTTON_IS_WIDGET (applet) || !GTK_WIDGET_NO_WINDOW(applet))
gtk_signal_connect(GTK_OBJECT(applet),
g_signal_connect(G_OBJECT(applet),
"button_press_event",
GTK_SIGNAL_FUNC(applet_button_press),
G_CALLBACK(applet_button_press),
info);
gtk_signal_connect(GTK_OBJECT(applet), "destroy",
GTK_SIGNAL_FUNC(applet_destroy),
g_signal_connect(G_OBJECT(applet), "destroy",
G_CALLBACK(applet_destroy),
info);
gtk_widget_show_all(applet);
/*gtk_signal_connect (GTK_OBJECT (applet),
/*g_signal_connect (G_OBJECT (applet),
"drag_request_event",
GTK_SIGNAL_FUNC(panel_dnd_drag_request),
G_CALLBACK(panel_dnd_drag_request),
info);
gtk_widget_dnd_drag_set (GTK_WIDGET(applet), TRUE,
......
......@@ -487,10 +487,10 @@ load_drawer_applet (int mypanel_id, const char *pixmap, const char *tooltip,
}
}
gtk_signal_connect_after(GTK_OBJECT(drawer->button),
"size_allocate",
G_CALLBACK(button_size_alloc),
drawer);
g_signal_connect_after (G_OBJECT(drawer->button),
"size_allocate",
G_CALLBACK (button_size_alloc),
drawer);
/* this doesn't make sense anymore */
if((BASEP_WIDGET(drawer->drawer)->state == BASEP_SHOWN) &&
......
......@@ -1063,10 +1063,10 @@ socket_unset_loading (GtkWidget *socket)
if (socket->parent) {
gtk_widget_set_usize (socket->parent, -1, -1);
gtk_signal_connect_after (GTK_OBJECT (socket),
"size_allocate",
G_CALLBACK (socket_size_allocate),
NULL);
g_signal_connect_after (G_OBJECT (socket),
"size_allocate",
G_CALLBACK (socket_size_allocate),
NULL);
}
}
......@@ -1089,10 +1089,10 @@ reserve_applet_spot (Extern ext,
gtk_widget_set_usize (ext->ebox, size, size);
gtk_signal_connect_after (GTK_OBJECT (ext->ebox),
"size_allocate",
G_CALLBACK (ebox_size_allocate),
ext);
g_signal_connect_after (G_OBJECT (ext->ebox),
"size_allocate",
G_CALLBACK (ebox_size_allocate),
ext);
gtk_widget_show (ext->ebox);
......
......@@ -638,17 +638,17 @@ setup_busy (gboolean busy)
/* block expose on the, since we don't want to redraw the preview
* in the draw. It'd make no sense and would just generate X traffic */
gtk_signal_handler_block_by_func
(GTK_OBJECT (preview),
GTK_SIGNAL_FUNC (on_preview_expose_event),
g_signal_handlers_block_by_func
(G_OBJECT (preview),
G_CALLBACK (on_preview_expose_event),
NULL);
gtk_widget_set_sensitive (toplevel, ! busy);
gtk_widget_draw (toplevel, NULL);
gtk_signal_handler_unblock_by_func
(GTK_OBJECT (preview),
GTK_SIGNAL_FUNC (on_preview_expose_event),
g_signal_handlers_unblock_by_func
(G_OBJECT (preview),
G_CALLBACK (on_preview_expose_event),
NULL);
gdk_flush ();
......
......@@ -406,10 +406,9 @@ browse(GtkWidget *w, GtkWidget *entry)
g_signal_connect (G_OBJECT (fsel->ok_button), "clicked",
G_CALLBACK (browse_ok), fsel);
gtk_signal_connect_object
(GTK_OBJECT (fsel->cancel_button), "clicked",
G_CALLBACK (gtk_widget_destroy),
GTK_OBJECT(fsel));
g_signal_connect_swapped (G_OBJECT (fsel->cancel_button), "clicked",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT(fsel));
gtk_signal_connect_object_while_alive
(GTK_OBJECT (entry), "destroy",
G_CALLBACK (gtk_widget_destroy),
......
......@@ -800,9 +800,9 @@ fake_mapped_fake(GtkWidget *w, FakeIcon *fake)
if(!load_icons_id)
load_icons_id = g_idle_add(load_icons_handler, NULL);
gtk_signal_disconnect_by_func(GTK_OBJECT(w),
G_CALLBACK(fake_mapped_fake),
fake);
g_signal_disconnect_by_func (G_OBJECT(w),
G_CALLBACK (fake_mapped_fake),
fake);
toplevel = gtk_widget_get_toplevel(w);
gtk_signal_connect_while_alive(GTK_OBJECT(toplevel), "map",
......@@ -1731,10 +1731,10 @@ show_item_menu (GtkWidget *item, GdkEventButton *bevent, ShowItemMenu *sim)
if (access (tmp, W_OK) != 0)
gtk_widget_set_sensitive(menuitem,FALSE);
g_free (tmp);
gtk_signal_connect_object (GTK_OBJECT (menuitem),
"activate",
G_CALLBACK (gtk_menu_shell_deactivate),
GTK_OBJECT (item->parent));
g_signal_connect_object (G_OBJECT (menuitem),
"activate",
G_CALLBACK (gtk_menu_shell_deactivate),
G_OBJECT (item->parent));
if ( ! sim->applet) {
menuitem = gtk_menu_item_new ();
......@@ -1742,15 +1742,14 @@ show_item_menu (GtkWidget *item, GdkEventButton *bevent, ShowItemMenu *sim)
_("Put into run dialog"));
gtk_menu_shell_append (GTK_MENU_SHELL (sim->menu),
menuitem);
gtk_signal_connect
(GTK_OBJECT(menuitem), "activate",
G_CALLBACK(add_to_run_dialog),
(gpointer)sim->item_loc);
gtk_signal_connect_object
(GTK_OBJECT(menuitem),
g_signal_connect (G_OBJECT(menuitem), "activate",
G_CALLBACK(add_to_run_dialog),
(gpointer)sim->item_loc);
g_signal_connect_swapped
(G_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
GTK_OBJECT(item->parent));
G_OBJECT(item->parent));
}
if (ii != NULL) {
......@@ -1774,23 +1773,21 @@ show_item_menu (GtkWidget *item, GdkEventButton *bevent, ShowItemMenu *sim)
g_free (title);
gtk_menu_shell_append (GTK_MENU_SHELL (sim->menu),
menuitem);
gtk_signal_connect
(GTK_OBJECT(menuitem), "activate",
G_CALLBACK(show_help_on),
(gpointer)sim->item_loc);
gtk_signal_connect_object
(GTK_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
GTK_OBJECT(item->parent));
g_signal_connect (G_OBJECT(menuitem), "activate",
G_CALLBACK(show_help_on),
(gpointer)sim->item_loc);
g_signal_connect_swapped (G_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
G_OBJECT(item->parent));
}
menuitem = gtk_menu_item_new ();
/*when activated we must pop down the first menu*/
gtk_signal_connect_object(GTK_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
GTK_OBJECT(item->parent));
g_signal_connect_object (G_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
G_OBJECT(item->parent));
g_signal_connect (G_OBJECT(menuitem),
"activate",
G_CALLBACK(edit_dentry),
......@@ -1854,10 +1851,10 @@ show_item_menu (GtkWidget *item, GdkEventButton *bevent, ShowItemMenu *sim)
_("Add new item to this menu"));
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), menuitem);
/*when activated we must pop down the first menu*/
gtk_signal_connect_object (GTK_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
GTK_OBJECT(item->parent));
g_signal_connect_object (G_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
G_OBJECT(item->parent));
g_signal_connect (G_OBJECT(menuitem), "activate",
G_CALLBACK(add_new_app_to_menu),
sim->mf->menudir);
......@@ -1867,10 +1864,10 @@ show_item_menu (GtkWidget *item, GdkEventButton *bevent, ShowItemMenu *sim)
menuitem = gtk_menu_item_new ();
/*when activated we must pop down the first menu*/
gtk_signal_connect_object(GTK_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
GTK_OBJECT(item->parent));
g_signal_connect_object (G_OBJECT(menuitem),
"activate",
G_CALLBACK(gtk_menu_shell_deactivate),
G_OBJECT(item->parent));
g_signal_connect (G_OBJECT (menuitem),
"activate",
G_CALLBACK (edit_direntry),
......@@ -5301,8 +5298,8 @@ create_panel_menu (PanelWidget *panel, const char *menudir, gboolean main_menu,
G_CALLBACK (drag_data_get_cb),
NULL);
gtk_signal_connect_after (GTK_OBJECT (menu->button), "pressed",
G_CALLBACK (menu_button_pressed), menu);
g_signal_connect_after (G_OBJECT (menu->button), "pressed",
G_CALLBACK (menu_button_pressed), menu);
g_signal_connect (G_OBJECT (menu->button), "destroy",
G_CALLBACK (destroy_menu), menu);
gtk_widget_show(menu->button);
......
......@@ -209,8 +209,8 @@ config_event(GtkWidget *widget,GdkEvent *event,GtkNotebook *nbook)
goat_darea = gtk_drawing_area_new();
gtk_signal_connect_after(GTK_OBJECT(goat_darea),"realize",
GTK_SIGNAL_FUNC(goat_realize),NULL);
g_signal_connect_after (G_OBJECT(goat_darea),"realize",
G_CALLBACK (goat_realize),NULL);
gtk_widget_show(goat_darea);
goat_timeout = gtk_timeout_add(60,goat_timeout_func,NULL);
......
......@@ -1628,10 +1628,10 @@ background_page (PerPanelConfig *ppc)
ppc->backsel = gnome_color_picker_new();
/* This will make sure the selection dialog is set as a transient for
* the config dialog */
gtk_signal_connect_after (GTK_OBJECT (ppc->backsel),
"clicked",
G_CALLBACK (color_picker_clicked_signal),
NULL);
g_signal_connect_after (G_OBJECT (ppc->backsel),
"clicked",
G_CALLBACK (color_picker_clicked_signal),
NULL);
g_signal_connect (G_OBJECT(ppc->backsel),"color_set",
G_CALLBACK(color_set_cb), ppc);
......
......@@ -869,9 +869,9 @@ panel_error_dialog (const char *class,
gtk_widget_show_all (w);
panel_set_dialog_layer (w);
gtk_signal_connect_object (GTK_OBJECT (w), "response",
g_signal_connect_swapped (G_OBJECT (w), "response",
G_CALLBACK (gtk_widget_destroy),
GTK_OBJECT (w));
G_OBJECT (w));
return w;
}
......@@ -903,9 +903,9 @@ panel_info_dialog (const char *class,
gtk_widget_show_all (w);
panel_set_dialog_layer (w);
gtk_signal_connect_object (GTK_OBJECT (w), "response",
G_CALLBACK (gtk_widget_destroy),
GTK_OBJECT (w));
g_signal_connect_swapped (G_OBJECT (w), "response",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (w));
return w;
}
......
......@@ -1810,10 +1810,10 @@ panel_widget_new (gboolean packed,
else
panel->size = G_MAXINT;
gtk_signal_connect_after(GTK_OBJECT(panel),
"realize",
GTK_SIGNAL_FUNC(panel_widget_realize),
panel);
g_signal_connect_after (G_OBJECT(panel),
"realize",
G_CALLBACK (panel_widget_realize),
panel);
return GTK_WIDGET(panel);
}
......@@ -2311,8 +2311,10 @@ panel_widget_applet_event(GtkWidget *widget, GdkEvent *event, gpointer data)
/* don't propagate this event */
if (panel->currently_dragged_applet) {
gtk_signal_emit_stop_by_name
(GTK_OBJECT (widget), "event");
g_signal_stop_emission
(G_OBJECT (widget),
g_signal_lookup (G_OBJECT (widget), "event"),
0);
return TRUE;
}
......@@ -2328,7 +2330,7 @@ panel_widget_applet_event(GtkWidget *widget, GdkEvent *event, gpointer data)
case GDK_BUTTON_RELEASE:
if (panel->currently_dragged_applet) {
gtk_signal_emit_stop_by_name
g_signal_stop_emission
(GTK_OBJECT (widget), "event");
panel_widget_applet_drag_end(panel);
return TRUE;
......
......@@ -1558,24 +1558,24 @@ basep_pos_connect_signals (BasePWidget *basep)
}
if (ALIGNED_IS_WIDGET (basep))
gtk_signal_connect_object (G_OBJECT (basep->pos),
g_signal_connect_object (G_OBJECT (basep->pos),
"align_change",
G_CALLBACK (update_config_align),
G_OBJECT (basep));
else if (FLOATING_IS_WIDGET (basep))
gtk_signal_connect_object (G_OBJECT (basep->pos),
g_signal_connect_object (G_OBJECT (basep->pos),
"floating_coords_change",
G_CALLBACK (update_config_floating_pos),
G_OBJECT(basep));
else if (SLIDING_IS_WIDGET (basep)) {
gtk_signal_connect_object (GTK_OBJECT (basep->pos),
"anchor_change",
G_CALLBACK (update_config_anchor),
GTK_OBJECT(basep));
gtk_signal_connect_object (GTK_OBJECT (basep->pos),
"offset_change",
G_CALLBACK (update_config_offset),
GTK_OBJECT (basep));
g_signal_connect_object (G_OBJECT (basep->pos),
"anchor_change",
G_CALLBACK (update_config_anchor),
G_OBJECT(basep));
g_signal_connect_object (G_OBJECT (basep->pos),
"offset_change",
G_CALLBACK (update_config_offset),
G_OBJECT (basep));
}
}
......@@ -1682,7 +1682,7 @@ panel_setup(GtkWidget *panelw)
basep_pos_connect_signals (basep);
basep_widget_disable_buttons(basep);
gtk_signal_connect_after (G_OBJECT(panelw), "size_allocate",
g_signal_connect_after (G_OBJECT(panelw), "size_allocate",
G_CALLBACK(panelw_size_alloc),
NULL);
}
......@@ -1719,9 +1719,9 @@ panel_setup(GtkWidget *panelw)
if(GTK_WIDGET_REALIZED(GTK_WIDGET(panelw)))
panel_realize(GTK_WIDGET(panelw),NULL);
else
gtk_signal_connect_after(GTK_OBJECT(panelw), "realize",
G_CALLBACK(panel_realize),
NULL);
g_signal_connect_after(G_OBJECT(panelw), "realize",
G_CALLBACK(panel_realize),
NULL);
}
/*send state change to all the panels*/
......
......@@ -1628,10 +1628,10 @@ background_page (PerPanelConfig *ppc)
ppc->backsel = gnome_color_picker_new();
/* This will make sure the selection dialog is set as a transient for
* the config dialog */
gtk_signal_connect_after (GTK_OBJECT (ppc->backsel),
"clicked",
G_CALLBACK (color_picker_clicked_signal),
NULL);
g_signal_connect_after (G_OBJECT (ppc->backsel),
"clicked",
G_CALLBACK (color_picker_clicked_signal),
NULL);
g_signal_connect (G_OBJECT(ppc->backsel),"color_set",
G_CALLBACK(color_set_cb), ppc);
......
......@@ -268,9 +268,9 @@ session_save_timeout (gpointer data)
_("Continue waiting"),
2); /* FIXME: GNOME_STOCK_PIXMAP_TIMER */
gtk_signal_connect_after(GTK_OBJECT(ss_timeout_dlg), "realize",
GTK_SIGNAL_FUNC(timeout_dlg_realized),
NULL);
g_signal_connect_after (G_OBJECT(ss_timeout_dlg), "realize",
G_CALLBACK (timeout_dlg_realized),
NULL);
if (1 == gtk_dialog_run (GTK_DIALOG (ss_timeout_dlg))) {
ss_cookie++;
......
......@@ -243,14 +243,14 @@ try_getting_plug(StatusDocklet *docklet)
CORBA_exception_free(&ev);
gtk_object_set_data(GTK_OBJECT(docklet->plug), "status_docklet", docklet);
gtk_signal_connect(GTK_OBJECT(docklet->plug), "destroy",
GTK_SIGNAL_FUNC(plug_destroyed),
g_signal_connect(G_OBJECT(docklet->plug), "destroy",
G_CALLBACK (plug_destroyed),
NULL);
gtk_widget_show(docklet->plug);
gtk_signal_emit(GTK_OBJECT(docklet),
g_signal_emit(G_OBJECT(docklet),
status_docklet_signals[BUILD_PLUG_SIGNAL],
docklet->plug);
0, docklet->plug);
return TRUE;
}
......
......@@ -355,9 +355,9 @@ load_status_applet(PanelWidget *panel, int pos, gboolean exactpos)
gtk_container_add(GTK_CONTAINER(the_status->handle), fixed);
} else {
gtk_signal_connect_after (GTK_OBJECT(the_status->handle), "realize",
G_CALLBACK(reparent_fixed),
NULL);
g_signal_connect_after (G_OBJECT(the_status->handle), "realize",
G_CALLBACK(reparent_fixed),
NULL);
}
status_applet_update(the_status);
......
......@@ -129,10 +129,10 @@ before_remove (Swallow *swallow)
gtk_widget_set_usize(swallow->socket,
swallow->width, swallow->height);
gtk_signal_connect_after (GTK_OBJECT (swallow->socket),
"realize",
G_CALLBACK (socket_realized),
NULL);
g_signal_connect_after (G_OBJECT (swallow->socket),
"realize",
G_CALLBACK (socket_realized),
NULL);
g_signal_connect (G_OBJECT (swallow->socket), "destroy",
G_CALLBACK (socket_destroyed),
swallow);
......@@ -362,8 +362,8 @@ create_swallow_applet(const char *title, const char *path, int width, int height
swallow->socket = gtk_socket_new ();
if (width != 0 || height != 0)
gtk_widget_set_usize(swallow->socket, width, height);
gtk_signal_connect_after (GTK_OBJECT (swallow->socket), "realize",
G_CALLBACK (socket_realized), NULL);
g_signal_connect_after (G_OBJECT (swallow->socket), "realize",
G_CALLBACK (socket_realized), NULL);
g_signal_connect (G_OBJECT (swallow->socket), "destroy",
G_CALLBACK (socket_destroyed), swallow);
......
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