Commit 0dbb29aa authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Yet more de-deprecation. Now all that's left is the clist stuff in

Sat Dec 22 13:44:25 2001  George Lebl <jirka@5z.com>

	* basep-widget.c, drawer-widget.c, drawer.c, extern.c,
	  foobar-widget.c, gnome-panel-properties.c,
	  gnome-panel-screenshot.c, gnome-run.c, launcher.c,
	  menu-properties.c, menu.c, nothing.cP, panel-config.c,
	  panel-util.c, panel.c, panel.h, status-docklet.c, status.c,
	  swallow.c, xstuff.c: Yet more de-deprecation.  Now all that's
	  left is the clist stuff in gnome-run, but jrb says he has a
	  new runbox in production so it seems pointless to spend time
	  on porting that now.
parent 4efd8c4e
Sat Dec 22 13:44:25 2001 George Lebl <jirka@5z.com>
* basep-widget.c, drawer-widget.c, drawer.c, extern.c,
foobar-widget.c, gnome-panel-properties.c,
gnome-panel-screenshot.c, gnome-run.c, launcher.c,
menu-properties.c, menu.c, nothing.cP, panel-config.c,
panel-util.c, panel.c, panel.h, status-docklet.c, status.c,
swallow.c, xstuff.c: Yet more de-deprecation. Now all that's
left is the clist stuff in gnome-run, but jrb says he has a
new runbox in production so it seems pointless to spend time
on porting that now.
Fri Dec 21 18:44:22 2001 George Lebl <jirka@5z.com>
* Makefile.am, aligned-widget.c, applet.c, basep-widget.c,
......
......@@ -122,7 +122,7 @@ basep_widget_class_init (BasePWidgetClass *klass)
GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
basep_widget_parent_class = gtk_type_class (gtk_window_get_type ());
basep_widget_parent_class = g_type_class_ref (gtk_window_get_type ());
klass->mode_change = basep_widget_mode_change;
klass->state_change = basep_widget_state_change;
......@@ -644,7 +644,7 @@ basep_pos_class_init (BasePPosClass *klass)
{
/*GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass);*/
basep_pos_parent_class = gtk_type_class(gtk_object_get_type ());
basep_pos_parent_class = g_type_class_ref (gtk_object_get_type ());
klass->get_hide_size = basep_pos_get_hide_size;
klass->get_hide_pos = basep_pos_get_hide_pos;
......@@ -997,10 +997,18 @@ basep_widget_do_showing(BasePWidget *basep, PanelOrient hide_orient,
/*drawing the entire table flickers, so don't
do it often*/
if(i++%10)
gtk_widget_draw(basep->panel, NULL);
else
gtk_widget_draw(basep->table, NULL);
/* FIXME: does it still flicker? */
if (i++ % 10) {
/* FIXME: is invalidation needed, and if so it should only be
* partial */
gdk_window_invalidate_rect (basep->panel->window,
NULL, TRUE);
gdk_window_process_updates (basep->panel->window, TRUE);
} else {
gdk_window_invalidate_rect (GTK_WIDGET (basep)->window,
NULL, TRUE);
gdk_window_process_updates (GTK_WIDGET (basep)->window, TRUE);
}
gdk_flush();
g_usleep (1000);
}
......@@ -1011,8 +1019,8 @@ basep_widget_do_showing(BasePWidget *basep, PanelOrient hide_orient,
basep_widget_set_ebox_orient(basep, -1);
}
gtk_widget_draw(basep->table, NULL);
gtk_widget_queue_resize(wid);
gtk_widget_queue_draw (basep->table);
gtk_widget_queue_resize (wid);
}
......@@ -1043,10 +1051,9 @@ make_hidebutton(BasePWidget *basep,
}
gtk_widget_show(pixmap);
gtk_container_add(GTK_CONTAINER(w),pixmap);
gtk_object_set_user_data(GTK_OBJECT(w), pixmap);
gtk_object_set_data(GTK_OBJECT(w), "gnome_disable_sound_events",
GINT_TO_POINTER(1));
gtk_container_add (GTK_CONTAINER (w), pixmap);
g_object_set_data (G_OBJECT (w), "gnome_disable_sound_events",
GINT_TO_POINTER (TRUE));
gtk_tooltips_set_tip (panel_tooltips, w,
_("Hide this panel"), NULL);
......@@ -1249,28 +1256,27 @@ basep_widget_instance_init (BasePWidget *basep)
}
static void
show_hidebutton_pixmap(GtkWidget *hidebutton, int show)
show_hidebutton_pixmap (GtkWidget *hidebutton, gboolean show)
{
GtkWidget *pixmap;
GtkWidget *pixmap = GTK_BIN (hidebutton)->child;
pixmap = gtk_object_get_user_data(GTK_OBJECT(hidebutton));
if (!pixmap) return;
if (pixmap == NULL)
return;
if (show)
gtk_widget_show(pixmap);
gtk_widget_show (pixmap);
else
gtk_widget_hide(pixmap);
gtk_widget_hide (pixmap);
}
static void
basep_widget_show_hidebutton_pixmaps(BasePWidget *basep)
basep_widget_show_hidebutton_pixmaps (BasePWidget *basep)
{
int show = basep->hidebutton_pixmaps_enabled;
show_hidebutton_pixmap(basep->hidebutton_n, show);
show_hidebutton_pixmap(basep->hidebutton_e, show);
show_hidebutton_pixmap(basep->hidebutton_w, show);
show_hidebutton_pixmap(basep->hidebutton_s, show);
gboolean show = basep->hidebutton_pixmaps_enabled;
show_hidebutton_pixmap (basep->hidebutton_n, show);
show_hidebutton_pixmap (basep->hidebutton_e, show);
show_hidebutton_pixmap (basep->hidebutton_w, show);
show_hidebutton_pixmap (basep->hidebutton_s, show);
}
void
......
......@@ -268,7 +268,7 @@ drawer_pos_get_pos(BasePWidget *basep,
GTK_WIDGET_REALIZED (panel->master_widget) &&
/*"allocated" data will be set on each allocation, until then,
don't show the actual panel*/
gtk_object_get_data(GTK_OBJECT(panel->master_widget),"allocated")) {
g_object_get_data (G_OBJECT (panel->master_widget), "allocated")) {
int bx, by, bw, bh;
int px, py, pw, ph;
GtkWidget *ppanel; /*parent panel*/
......
......@@ -92,7 +92,7 @@ properties_close_callback(GtkWidget *widget, gpointer data)
static void
set_toggle (GtkWidget *widget, gpointer data)
{
PerPanelConfig *ppc = gtk_object_get_user_data(GTK_OBJECT(widget));
PerPanelConfig *ppc = g_object_get_data (G_OBJECT (widget), "PerPanelConfig");
int *the_toggle = data;
*the_toggle = GTK_TOGGLE_BUTTON(widget)->active;
......@@ -147,7 +147,7 @@ add_drawer_properties_page (PerPanelConfig *ppc, GtkNotebook *prop_nbook, Drawer
NULL, drawer->pixmap,
(UpdateFunction)panel_config_register_changes,
ppc);
gtk_object_set_data(GTK_OBJECT(dialog), "pixmap", w);
g_object_set_data (G_OBJECT (dialog), "pixmap", w);
f = gtk_frame_new(_("Applet appearance"));
gtk_container_add(GTK_CONTAINER(f),table);
......@@ -160,7 +160,7 @@ add_drawer_properties_page (PerPanelConfig *ppc, GtkNotebook *prop_nbook, Drawer
/*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);
g_object_set_data (G_OBJECT (button), "PerPanelConfig", ppc);
if (ppc->hidebuttons)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
g_signal_connect (G_OBJECT (button), "toggled",
......@@ -174,7 +174,7 @@ add_drawer_properties_page (PerPanelConfig *ppc, GtkNotebook *prop_nbook, Drawer
button);
if (!ppc->hidebuttons)
gtk_widget_set_sensitive(button,FALSE);
gtk_object_set_user_data(GTK_OBJECT(button),ppc);
g_object_set_data (G_OBJECT (button), "PerPanelConfig", ppc);
if (ppc->hidebutton_pixmaps)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
g_signal_connect (G_OBJECT (button), "toggled",
......@@ -347,8 +347,8 @@ create_drawer_applet(GtkWidget * drawer_panel,
GTK_WIDGET_SET_FLAGS (drawer->button, GTK_NO_WINDOW);
g_signal_connect (G_OBJECT (drawer->button), "drag_data_get",
G_CALLBACK (drag_data_get_cb),
NULL);
G_CALLBACK (drag_data_get_cb),
NULL);
gtk_widget_show(drawer->button);
......@@ -363,8 +363,7 @@ create_drawer_applet(GtkWidget * drawer_panel,
g_signal_connect (G_OBJECT (drawer->button), "leave_notify_event",
G_CALLBACK (leave_notify_drawer), drawer);
gtk_object_set_user_data (GTK_OBJECT (drawer->button), drawer);
gtk_object_set_data (GTK_OBJECT (drawer_panel), DRAWER_PANEL_KEY, drawer);
g_object_set_data (G_OBJECT (drawer_panel), DRAWER_PANEL_KEY, drawer);
gtk_widget_queue_resize (GTK_WIDGET (drawer_panel));
return drawer;
......@@ -419,9 +418,9 @@ button_size_alloc(GtkWidget *widget, GtkAllocation *alloc, Drawer *drawer)
if(!GTK_WIDGET_REALIZED(widget))
return;
gtk_widget_queue_resize(drawer->drawer);
gtk_widget_queue_resize (drawer->drawer);
gtk_object_set_data(GTK_OBJECT(widget),"allocated",GINT_TO_POINTER(1));
g_object_set_data (G_OBJECT (widget), "allocated", GINT_TO_POINTER (TRUE));
}
Drawer *
......
......@@ -819,8 +819,8 @@ extern_before_remove (Extern ext)
if (ext->info->widget != NULL) {
AppletData *ad;
ad = gtk_object_get_data (GTK_OBJECT (ext->info->widget),
PANEL_APPLET_DATA);
ad = g_object_get_data (G_OBJECT (ext->info->widget),
PANEL_APPLET_DATA);
d->pos = ad->pos;
d->panel = g_slist_index (panels,
ext->info->widget->parent);
......@@ -1764,8 +1764,8 @@ s_panelspot_get_spot_pos(PortableServer_Servant servant,
g_assert(ext);
g_assert(ext->info);
ad = gtk_object_get_data(GTK_OBJECT(ext->info->widget),
PANEL_APPLET_DATA);
ad = g_object_get_data (G_OBJECT (ext->info->widget),
PANEL_APPLET_DATA);
if(!ad)
return -1;
return ad->pos;
......@@ -2185,8 +2185,8 @@ extern_save_applet (AppletInfo *info,
g_free (buf);
panel = PANEL_WIDGET (info->widget->parent);
ad = gtk_object_get_data (GTK_OBJECT (info->widget),
PANEL_APPLET_DATA);
ad = g_object_get_data (G_OBJECT (info->widget),
PANEL_APPLET_DATA);
panel_num = g_slist_index (panels, panel);
if (panel_num == -1) {
......@@ -2456,8 +2456,8 @@ extern_save_last_position (Extern ext, gboolean sync)
gnome_config_push_prefix (key);
g_free (key);
ad = gtk_object_get_data (GTK_OBJECT (ext->info->widget),
PANEL_APPLET_DATA);
ad = g_object_get_data (G_OBJECT (ext->info->widget),
PANEL_APPLET_DATA);
panel_num = g_slist_index (panels, ext->info->widget->parent);
......
......@@ -1033,8 +1033,8 @@ foobar_widget_instance_init (FoobarWidget *foo)
gtk_window_move (GTK_WINDOW (foo),
multiscreen_x (foo->screen),
multiscreen_y (foo->screen));
gtk_widget_set_usize (GTK_WIDGET (foo),
multiscreen_width (foo->screen), -2);
gtk_widget_set_size_request (GTK_WIDGET (foo),
multiscreen_width (foo->screen), -2);
foo->ebox = gtk_event_box_new ();
foo->hbox = gtk_hbox_new (FALSE, 0);
......@@ -1201,11 +1201,11 @@ foobar_widget_new (const char *panel_id, int screen)
panel_widget_set_id (PANEL_WIDGET (foo->panel), panel_id);
foo->screen = screen;
gtk_widget_set_uposition (GTK_WIDGET (foo),
multiscreen_x (foo->screen),
multiscreen_y (foo->screen));
gtk_widget_set_usize (GTK_WIDGET (foo),
multiscreen_width (foo->screen), -2);
gtk_window_move (GTK_WINDOW (foo),
multiscreen_x (foo->screen),
multiscreen_y (foo->screen));
gtk_widget_set_size_request (GTK_WIDGET (foo),
multiscreen_width (foo->screen), -2);
foobars = g_list_prepend (foobars, foo);
......@@ -1236,8 +1236,9 @@ foobar_widget_force_menu_remake (void)
foo = FOOBAR_WIDGET(li->data);
if (foo->programs != NULL)
gtk_object_set_data (GTK_OBJECT(foo->programs),
"need_reread", GINT_TO_POINTER(1));
g_object_set_data (G_OBJECT (foo->programs),
"need_reread",
GINT_TO_POINTER (TRUE));
}
}
......
......@@ -162,7 +162,11 @@ grab_button_pressed (GtkButton *button, gpointer data)
gdk_keyboard_grab (GDK_ROOT_PARENT(), FALSE, GDK_CURRENT_TIME);
gdk_window_add_filter (GDK_ROOT_PARENT(), grab_key_filter, data);
gtk_window_set_policy (GTK_WINDOW (grab_dialog), FALSE, FALSE, TRUE);
g_object_set (G_OBJECT (grab_dialog),
"allow_grow", FALSE,
"allow_shrink", FALSE,
"resizable", TRUE,
NULL);
gtk_window_set_position (GTK_WINDOW (grab_dialog), GTK_WIN_POS_CENTER);
gtk_window_set_modal (GTK_WINDOW (grab_dialog), TRUE);
......@@ -364,11 +368,13 @@ main (int argc, char **argv)
gtk_dialog_add_button (GTK_DIALOG(main_window),
GTK_STOCK_OK, GTK_RESPONSE_OK);
gtk_signal_connect(GTK_OBJECT(main_window), "response",
GTK_SIGNAL_FUNC(main_dialog_response), main_window);
g_signal_connect (G_OBJECT(main_window), "response",
GTK_CALLBACK (main_dialog_response),
main_window);
g_signal_connect(G_OBJECT(main_window), "destroy",
G_CALLBACK(gtk_main_quit),NULL);
g_signal_connect (G_OBJECT (main_window), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
gconf_client = gconf_client_get_default();
......@@ -386,7 +392,7 @@ main (int argc, char **argv)
gtk_box_pack_start (GTK_BOX(GTK_DIALOG(main_window)->vbox),
label,TRUE,TRUE,0);
gtk_widget_set_usize(main_window,350,350);
gtk_widget_set_size_request (main_window, 350, 350);
}
else
{
......
......@@ -162,7 +162,11 @@ grab_button_pressed (GtkButton *button, gpointer data)
gdk_keyboard_grab (GDK_ROOT_PARENT(), FALSE, GDK_CURRENT_TIME);
gdk_window_add_filter (GDK_ROOT_PARENT(), grab_key_filter, data);
gtk_window_set_policy (GTK_WINDOW (grab_dialog), FALSE, FALSE, TRUE);
g_object_set (G_OBJECT (grab_dialog),
"allow_grow", FALSE,
"allow_shrink", FALSE,
"resizable", TRUE,
NULL);
gtk_window_set_position (GTK_WINDOW (grab_dialog), GTK_WIN_POS_CENTER);
gtk_window_set_modal (GTK_WINDOW (grab_dialog), TRUE);
......@@ -364,11 +368,13 @@ main (int argc, char **argv)
gtk_dialog_add_button (GTK_DIALOG(main_window),
GTK_STOCK_OK, GTK_RESPONSE_OK);
gtk_signal_connect(GTK_OBJECT(main_window), "response",
GTK_SIGNAL_FUNC(main_dialog_response), main_window);
g_signal_connect (G_OBJECT(main_window), "response",
GTK_CALLBACK (main_dialog_response),
main_window);
g_signal_connect(G_OBJECT(main_window), "destroy",
G_CALLBACK(gtk_main_quit),NULL);
g_signal_connect (G_OBJECT (main_window), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
gconf_client = gconf_client_get_default();
......@@ -386,7 +392,7 @@ main (int argc, char **argv)
gtk_box_pack_start (GTK_BOX(GTK_DIALOG(main_window)->vbox),
label,TRUE,TRUE,0);
gtk_widget_set_usize(main_window,350,350);
gtk_widget_set_size_request (main_window, 350, 350);
}
else
{
......
......@@ -644,7 +644,7 @@ setup_busy (gboolean busy)
NULL);
gtk_widget_set_sensitive (toplevel, ! busy);
gtk_widget_draw (toplevel, NULL);
gtk_widget_queue_draw (toplevel, NULL);
g_signal_handlers_unblock_by_func
(G_OBJECT (preview),
......@@ -1023,8 +1023,12 @@ main (int argc, char *argv[])
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
gnome_init_with_popt_table ("gnome-panel-screenshot", VERSION,
argc, argv, opts, 0, NULL);
gnome_program_init ("gnome-panel-screenshot", VERSION,
LIBGNOMEUI_MODULE,
argc, argv,
GNOME_PARAM_POPT_TABLE, opts,
GNOME_PROGRAM_STANDARD_PROPERTIES,
NULL);
glade_gnome_init();
client = gnome_master_client ();
gnome_client_set_restart_style (client, GNOME_RESTART_NEVER);
......@@ -1088,7 +1092,7 @@ main (int argc, char *argv[])
save_entry = glade_xml_get_widget (xml, "save_entry");
gtk_window_set_default_size (GTK_WINDOW (toplevel), width * 2, -1);
gtk_widget_set_usize (preview, width, height);
gtk_widget_set_size_request (preview, width, height);
gtk_aspect_frame_set (GTK_ASPECT_FRAME (frame), 0.5, 0.5,
gdk_pixbuf_get_width (screenshot)/
(gfloat) gdk_pixbuf_get_height (screenshot),
......
......@@ -215,7 +215,7 @@ run_dialog_response (GtkWidget *w, int response, gpointer data)
terminal = GTK_TOGGLE_BUTTON (g_object_get_data (G_OBJECT(w),
"terminal"));
if (gtk_object_get_data (GTK_OBJECT (run_dialog), "use_list")) {
if (g_object_get_data (G_OBJECT (run_dialog), "use_list")) {
char *name;
if (GTK_CLIST (clist)->selection == NULL)
......@@ -365,17 +365,17 @@ return_and_close:
}
static void
browse_ok(GtkWidget *widget, GtkFileSelection *fsel)
browse_ok (GtkWidget *widget, GtkFileSelection *fsel)
{
const char *fname;
GtkWidget *entry;
g_return_if_fail(GTK_IS_FILE_SELECTION(fsel));
g_return_if_fail (GTK_IS_FILE_SELECTION (fsel));
entry = gtk_object_get_user_data(GTK_OBJECT(fsel));
entry = g_object_get_data (G_OBJECT (fsel), "entry");
fname = gtk_file_selection_get_filename(fsel);
if(fname != NULL) {
fname = gtk_file_selection_get_filename (fsel);
if (fname != NULL) {
const char *s = gtk_entry_get_text (GTK_ENTRY (entry));
if (string_empty (s)) {
gtk_entry_set_text (GTK_ENTRY (entry), fname);
......@@ -385,24 +385,24 @@ browse_ok(GtkWidget *widget, GtkFileSelection *fsel)
g_free (str);
}
}
gtk_widget_destroy(GTK_WIDGET(fsel));
gtk_widget_destroy (GTK_WIDGET (fsel));
}
static void
browse(GtkWidget *w, GtkWidget *entry)
browse (GtkWidget *w, GtkWidget *entry)
{
GtkFileSelection *fsel;
fsel = GTK_FILE_SELECTION(gtk_file_selection_new(_("Browse...")));
gtk_window_set_transient_for (GTK_WINDOW (fsel),
GTK_WINDOW (run_dialog));
gtk_object_set_user_data(GTK_OBJECT(fsel), entry);
g_object_set_data (G_OBJECT (fsel), "entry", entry);
g_signal_connect (G_OBJECT (fsel->ok_button), "clicked",
G_CALLBACK (browse_ok), fsel);
g_signal_connect_swapped (G_OBJECT (fsel->cancel_button), "clicked",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT(fsel));
G_OBJECT (fsel));
panel_signal_connect_object_while_alive
(G_OBJECT (entry), "destroy",
G_CALLBACK (gtk_widget_destroy),
......@@ -461,8 +461,8 @@ sync_entry_to_list (GtkWidget *dialog)
GtkWidget *entry;
gboolean blocked;
blocked = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (dialog),
"sync_entry_to_list_blocked"));
blocked = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (dialog),
"sync_entry_to_list_blocked"));
if (blocked)
return;
......@@ -521,12 +521,12 @@ sync_list_to_entry (GtkWidget *dialog)
}
}
gtk_object_set_data (GTK_OBJECT (dialog),
"sync_entry_to_list_blocked",
GINT_TO_POINTER (FALSE));
g_object_set_data (G_OBJECT (dialog),
"sync_entry_to_list_blocked",
GINT_TO_POINTER (FALSE));
gtk_object_set_data (GTK_OBJECT (dialog), "use_list",
GINT_TO_POINTER (TRUE));
g_object_set_data (G_OBJECT (dialog), "use_list",
GINT_TO_POINTER (TRUE));
}
static void
......@@ -559,9 +559,9 @@ create_toggle_advanced_button (const char *label)
G_CALLBACK (toggle_contents),
run_dialog);
gtk_object_set_data (GTK_OBJECT (run_dialog),
"advanced_toggle_label",
GTK_BIN (button)->child);
g_object_set_data (G_OBJECT (run_dialog),
"advanced_toggle_label",
GTK_BIN (button)->child);
return align;
}
......@@ -617,7 +617,7 @@ create_advanced_contents (void)
gtk_window_set_focus (GTK_WINDOW (run_dialog), entry);
gtk_combo_set_use_arrows_always (GTK_COMBO (gentry), TRUE);
gtk_object_set_data (GTK_OBJECT (run_dialog), "entry", entry);
g_object_set_data (G_OBJECT (run_dialog), "entry", entry);
g_signal_connect (G_OBJECT (entry), "activate",
G_CALLBACK (activate_run),
......@@ -637,7 +637,7 @@ create_advanced_contents (void)
FALSE, FALSE, GNOME_PAD_SMALL);
w = gtk_check_button_new_with_label(_("Run in terminal"));
gtk_object_set_data (GTK_OBJECT (run_dialog), "terminal", w);
g_object_set_data (G_OBJECT (run_dialog), "terminal", w);
gtk_box_pack_start (GTK_BOX (vbox), w,
FALSE, FALSE, GNOME_PAD_SMALL);
......@@ -646,12 +646,12 @@ create_advanced_contents (void)
g_object_set_data_full (G_OBJECT (run_dialog),
"advanced",
vbox,
(GDestroyNotify) gtk_object_unref);
(GDestroyNotify) g_object_unref);
g_signal_connect (G_OBJECT (vbox),
"show",
G_CALLBACK (advanced_contents_shown),
run_dialog);
"show",
G_CALLBACK (advanced_contents_shown),
run_dialog);
return vbox;
}
......@@ -701,8 +701,8 @@ simple_contents_shown (GtkWidget *vbox,
GtkWidget *clist;
char *prev_name;
clist = gtk_object_get_data (GTK_OBJECT (dialog), "dentry_list");
advanced = gtk_object_get_data (GTK_OBJECT (dialog), "advanced");
clist = g_object_get_data (G_OBJECT (dialog), "dentry_list");
advanced = g_object_get_data (G_OBJECT (dialog), "advanced");
if (advanced) {
/* If we have advanced contents containing a command,
......@@ -865,11 +865,11 @@ unset_selected (GtkWidget *dialog)
GtkWidget *clist;
char *text;
label = gtk_object_get_data (GTK_OBJECT (dialog), "label");
gpixmap = gtk_object_get_data (GTK_OBJECT (dialog), "pixmap");
desc_label = gtk_object_get_data (GTK_OBJECT (dialog), "desc_label");
entry = gtk_object_get_data (GTK_OBJECT (dialog), "entry");
clist = gtk_object_get_data (GTK_OBJECT (dialog), "dentry_list");
label = g_object_get_data (G_OBJECT (dialog), "label");
gpixmap = g_object_get_data (G_OBJECT (dialog), "pixmap");
desc_label = g_object_get_data (G_OBJECT (dialog), "desc_label");
entry = g_object_get_data (G_OBJECT (dialog), "entry");
clist = g_object_get_data (G_OBJECT (dialog), "dentry_list");
if (entry != NULL) {
text = gtk_editable_get_chars (GTK_EDITABLE (entry),
......@@ -901,8 +901,8 @@ unset_selected (GtkWidget *dialog)
unset_pixmap (gpixmap);
gtk_object_set_data (GTK_OBJECT (dialog), "use_list",
GPOINTER_TO_INT (FALSE));
g_object_set_data (G_OBJECT (dialog), "use_list",
GPOINTER_TO_INT (FALSE));
gtk_clist_set_selection_mode (GTK_CLIST (clist),
GTK_SELECTION_SINGLE);
......@@ -929,9 +929,9 @@ select_row_handler (GtkCList *clist,
gtk_clist_set_selection_mode (GTK_CLIST (clist),
GTK_SELECTION_BROWSE);
label = gtk_object_get_data (GTK_OBJECT (dialog), "label");
gpixmap = gtk_object_get_data (GTK_OBJECT (dialog), "pixmap");
desc_label = gtk_object_get_data (GTK_OBJECT (dialog), "desc_label");
label = g_object_get_data (G_OBJECT (dialog), "label");
gpixmap = g_object_get_data (G_OBJECT (dialog), "pixmap");
desc_label = g_object_get_data (G_OBJECT (dialog), "desc_label");
name = gtk_clist_get_row_data (GTK_CLIST (clist),
row);
......@@ -992,7 +992,7 @@ create_simple_contents (void)
titles[0] = _("Available Programs");
titles[1] = _("Description");
clist = gtk_clist_new_with_titles (1 /* 2 */, titles);
gtk_object_set_data (GTK_OBJECT (run_dialog), "dentry_list", clist);
g_object_set_data (G_OBJECT (run_dialog), "dentry_list", clist);
gtk_clist_set_selection_mode (GTK_CLIST (clist),
GTK_SELECTION_SINGLE);
......@@ -1029,17 +1029,17 @@ create_simple_contents (void)
pixmap = gtk_image_new ();
gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0);
gtk_object_set_data (GTK_OBJECT (run_dialog), "pixmap", pixmap);
g_object_set_data (G_OBJECT (run_dialog), "pixmap", pixmap);
label = gtk_label_new ("");
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_object_set_data (GTK_OBJECT (run_dialog), "desc_label", label);
g_object_set_data (G_OBJECT (run_dialog), "desc_label", label);
#if 0
label = gtk_label_new ("");
gtk_object_set_data (GTK_OBJECT (run_dialog), "label", label);
g_object_set_data (G_OBJECT (run_dialog), "label", label);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
#endif
......@@ -1049,12 +1049,12 @@ create_simple_contents (void)
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (run_dialog)->vbox), w,
FALSE, FALSE, GNOME_PAD_SMALL);
gtk_object_ref (GTK_OBJECT (vbox));
g_object_ref (G_OBJECT (vbox));
gtk_object_set_data_full (GTK_OBJECT (run_dialog),
"simple",
vbox,
(GtkDestroyNotify) gtk_object_unref);
g_object_set_data_full (G_OBJECT (run_dialog),
"simple",
vbox,
(GtkDestroyNotify) g_object_unref);
g_signal_connect (G_OBJECT (vbox),
"show",
......@@ -1078,13 +1078,13 @@ update_contents (GtkWidget *dialog)
GtkWidget *clist;
use_advanced = gnome_config_get_bool ("/panel/State/"ADVANCED_DIALOG_KEY"=false");
advanced_toggle = gtk_object_get_data (GTK_OBJECT (dialog),
"advanced_toggle_label");
advanced_toggle = g_object_get_data (G_OBJECT (dialog),
"advanced_toggle_label");
clist = gtk_object_get_data (GTK_OBJECT (dialog), "dentry_list");
clist = g_object_get_data (G_OBJECT (dialog), "dentry_list");
if (use_advanced) {
advanced = gtk_object_get_data (GTK_OBJECT (dialog), "advanced");
advanced = g_object_get_data (G_OBJECT (dialog), "advanced");
if (advanced && advanced->parent == NULL) {
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
......@@ -1104,7 +1104,7 @@ update_contents (GtkWidget *dialog)
NULL);
} else {
advanced = gtk_object_get_data (GTK_OBJECT (dialog), "advanced");
advanced = g_object_get_data (G_OBJECT (dialog), "advanced");
if (advanced && advanced->parent != NULL)
gtk_container_remove (GTK_CONTAINER (advanced->parent), advanced);
......@@ -1150,8 +1150,11 @@ show_run_dialog (void)
/* This is lame in advanced mode, but if you change it on mode
* toggle it creates weird effects, so always use this policy
*/
gtk_window_set_policy (GTK_WINDOW (run_dialog),
FALSE, TRUE, FALSE);
g_object_set (G_OBJECT (run_dialog),
"allow_grow", FALSE,
"allow_shrink", TRUE,
"resizable", FALSE,
NULL);
/* Get some reasonable height in simple list mode */
if (!use_advanced)
......@@ -1165,14 +1168,14 @@ show_run_dialog (void)
g_signal_connect(G_OBJECT(run_dialog), "destroy",
G_CALLBACK(gtk_widget_destroyed),
&run_dialog);
gtk_window_position(GTK_WINDOW(run_dialog), GTK_WIN_POS_MOUSE);
gtk_window_set_position (GTK_WINDOW (run_dialog), GTK_WIN_POS_MOUSE);
gtk_window_set_wmclass (GTK_WINDOW (run_dialog), "run_dialog", "Panel");
gtk_dialog_set_default_response (GTK_DIALOG (run_dialog),
RUN_BUTTON);
g_signal_connect (G_OBJECT (run_dialog), "response",
G_CALLBACK (run_dialog_response), NULL);
G_CALLBACK (run_dialog_response), NULL);
create_simple_contents ();
create_advanced_contents ();
......@@ -1194,7 +1197,7 @@ show_run_dialog_with_text (const char *text)
return;
}
entry = gtk_object_get_data(GTK_OBJECT(run_dialog), "entry");
entry = g_object_get_data (G_OBJECT (run_dialog), "entry");
gtk_entry_set_text(GTK_ENTRY(entry), text);
}
......@@ -409,8 +409,6 @@ create_launcher (const char *parameters, GnomeDesktopItem *ditem)
G_CALLBACK(destroy_launcher),
launcher);
gtk_object_set_user_data(GTK_OBJECT(launcher->button), launcher);
launcher->ditem = ditem;
return launcher;
......@@ -559,7 +557,11 @@ create_properties_dialog (Launcher *launcher)
gtk_window_set_wmclass (GTK_WINDOW (dialog),
"launcher_properties", "Panel");
gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, FALSE, TRUE);
g_object_set (G_OBJECT (dialog),
"allow_grow", FALSE,
"allow_shrink", FALSE,
"resizable", TRUE,
NULL);
if (launcher->revert_ditem != NULL)
gnome_desktop_item_unref (launcher->revert_ditem);
......@@ -640,9 +642,9 @@ static void
really_add_launcher (GtkWidget *dialog, int response, gpointer data)