Commit 4efd8c4e authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Some deprecated excorcism, fix some panel unique_id foo and some warning

Fri Dec 21 18:44:22 2001  George Lebl <jirka@5z.com>

	* Makefile.am, aligned-widget.c, applet.c, basep-widget.c,
	  button-widget.c, distribution.c, drawer-widget.c, drawer.c,
	  edge-widget.c, floating-widget.c, foobar-widget.c, foobar-widget.h,
	  gnome-panel-properties.c, gnome-run.c, menu.c, nothing.cP,
	  panel-config.c, panel-util.c, panel-widget.c, panel-widget.h,
	  panel.c, session.c, sliding-widget.c, status.c, tearoffitem.c:
	  Some deprecated excorcism, fix some panel unique_id foo and
	  some warning fixes etc...
parent eacb13f9
Fri Dec 21 18:44:22 2001 George Lebl <jirka@5z.com>
* Makefile.am, aligned-widget.c, applet.c, basep-widget.c,
button-widget.c, distribution.c, drawer-widget.c, drawer.c,
edge-widget.c, floating-widget.c, foobar-widget.c, foobar-widget.h,
gnome-panel-properties.c, gnome-run.c, menu.c, nothing.cP,
panel-config.c, panel-util.c, panel-widget.c, panel-widget.h,
panel.c, session.c, sliding-widget.c, status.c, tearoffitem.c:
Some deprecated excorcism, fix some panel unique_id foo and
some warning fixes etc...
2001-12-21 Glynn Foster <glynn.foster@sun.com>
* panel-gconf.c, session.c: Big heap of debug crap. It should
......
......@@ -27,6 +27,12 @@ INCLUDES = \
$(WARN_CFLAGS) \
$(NULL)
# we want this eventually
#-DGTK_DISABLE_DEPRECATED \
#-DGNOME_DISABLE_DEPRECATED \
#
bin_PROGRAMS = \
gnome-panel-2 \
gnome-panel-properties \
......
......@@ -394,8 +394,8 @@ aligned_widget_new (gchar *panel_id,
gboolean rotate_pixmap_bg,
GdkColor *back_color)
{
AlignedWidget *aligned = gtk_type_new (ALIGNED_TYPE_WIDGET);
AlignedPos *pos = gtk_type_new (ALIGNED_TYPE_POS);
AlignedWidget *aligned = g_object_new (ALIGNED_TYPE_WIDGET, NULL);
AlignedPos *pos = g_object_new (ALIGNED_TYPE_POS, NULL);
pos->align = align;
BASEP_WIDGET (aligned)->pos = BASEP_POS (pos);
......
......@@ -603,9 +603,9 @@ applet_menu_set_data_recursively (GtkMenu *menu,
GList *children;
GList *l;
gtk_object_set_data (GTK_OBJECT (menu), key, data);
g_object_set_data (G_OBJECT (menu), key, data);
children = gtk_container_children (GTK_CONTAINER (menu));
children = gtk_container_get_children (GTK_CONTAINER (menu));
for (l = children; l; l = l->next) {
GtkWidget *submenu = GTK_MENU_ITEM (l->data)->submenu;
......@@ -783,20 +783,20 @@ panel_applet_register (GtkWidget *applet,
info->data_destroy = data_destroy;
info->user_menu = NULL;
gtk_object_set_data (GTK_OBJECT (applet), "applet_info", info);
g_object_set_data (G_OBJECT (applet), "applet_info", info);
if (type == APPLET_DRAWER) {
Drawer *drawer = data;
PanelWidget *assoc_panel =
PANEL_WIDGET (BASEP_WIDGET (drawer->drawer)->panel);
gtk_object_set_data (GTK_OBJECT (applet),
PANEL_APPLET_ASSOC_PANEL_KEY, assoc_panel);
g_object_set_data (G_OBJECT (applet),
PANEL_APPLET_ASSOC_PANEL_KEY, assoc_panel);
assoc_panel->master_widget = applet;
}
gtk_object_set_data (GTK_OBJECT (applet),
PANEL_APPLET_FORBIDDEN_PANELS, NULL);
g_object_set_data (G_OBJECT (applet),
PANEL_APPLET_FORBIDDEN_PANELS, NULL);
if (type == APPLET_BONOBO) {
panel_applet_frame_get_expand_flags (PANEL_APPLET_FRAME (applet),
......@@ -877,7 +877,7 @@ panel_applet_get_position (AppletInfo *applet)
{
AppletData *applet_data;
applet_data = gtk_object_get_data (GTK_OBJECT (applet->widget), PANEL_APPLET_DATA);
applet_data = g_object_get_data (G_OBJECT (applet->widget), PANEL_APPLET_DATA);
return applet_data->pos;
}
......
......@@ -891,7 +891,7 @@ basep_widget_do_hiding(BasePWidget *basep, PanelOrient hide_orient,
}
gtk_widget_queue_resize(wid);
gtk_widget_draw(basep->table, NULL);
gtk_widget_queue_draw (basep->table);
}
void
......@@ -1028,9 +1028,9 @@ make_hidebutton(BasePWidget *basep,
w = gtk_button_new();
GTK_WIDGET_UNSET_FLAGS(w, GTK_CAN_DEFAULT|GTK_CAN_FOCUS);
if(horizontal)
gtk_widget_set_usize(w, 0, PANEL_MINIMUM_WIDTH);
gtk_widget_set_size_request (w, -1, PANEL_MINIMUM_WIDTH);
else
gtk_widget_set_usize(w, PANEL_MINIMUM_WIDTH, 0);
gtk_widget_set_size_request (w, PANEL_MINIMUM_WIDTH, -1);
pixmap_name = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
pixmaparrow, TRUE, NULL);
......@@ -1523,7 +1523,7 @@ basep_widget_construct (gchar *panel_id,
klass->get_pos (basep, &x, &y,
PANEL_MINIMUM_WIDTH,
PANEL_MINIMUM_WIDTH);
gtk_widget_set_uposition (GTK_WIDGET (basep), x, y);
gtk_window_move (GTK_WINDOW (basep), x, y);
return GTK_WIDGET (basep);
}
......
......@@ -924,7 +924,7 @@ button_widget_new(const char *filename,
g_return_val_if_fail(pobject >= 0, NULL);
g_return_val_if_fail(pobject < LAST_POBJECT, NULL);
button = BUTTON_WIDGET (gtk_type_new (button_widget_get_type ()));
button = BUTTON_WIDGET (g_object_new (button_widget_get_type (), NULL));
button->pixbuf = loadup_file (filename);
button->pixbuf_hc = make_hc_pixbuf (button->pixbuf);
......
......@@ -21,8 +21,6 @@
*
*/
static void cde_menu_init_func(void);
static DistributionInfo distribution_info [] = {
{ DISTRIBUTION_DEBIAN, "/etc/debian_version",
N_("Debian GNU/Linux"), N_("Debian menus"),
......@@ -101,9 +99,3 @@ get_distribution_info (void)
return cache;
}
static void
cde_menu_init_func(void)
{
fr_read_dir(NULL,"cdemenu:/", 0, 2);
}
......@@ -221,8 +221,8 @@ drawer_widget_close_drawer (DrawerWidget *drawer, GtkWidget *parentp)
static void
drawer_pos_hidebutton_click (BasePWidget *basep)
{
Drawer *drawer = gtk_object_get_data (GTK_OBJECT (basep),
DRAWER_PANEL_KEY);
Drawer *drawer = g_object_get_data (G_OBJECT (basep),
DRAWER_PANEL_KEY);
PanelWidget *panel = PANEL_WIDGET (drawer->button->parent);
GtkWidget *parent = panel->panel_parent;
......@@ -470,8 +470,8 @@ drawer_widget_new (gchar *panel_id,
DrawerPos *pos;
GtkOrientation porient;
drawer = gtk_type_new (DRAWER_TYPE_WIDGET);
drawer->pos = gtk_type_new (DRAWER_TYPE_POS);
drawer = g_object_new (DRAWER_TYPE_WIDGET, NULL);
drawer->pos = g_object_new (DRAWER_TYPE_POS, NULL);
pos = DRAWER_POS (drawer->pos);
pos->orient = orient;
......
......@@ -42,10 +42,10 @@ properties_apply_callback(gpointer data)
{
Drawer *drawer = data;
GtkWidget *pixentry = gtk_object_get_data(GTK_OBJECT(drawer->properties),
"pixmap");
GtkWidget *tipentry = gtk_object_get_data(GTK_OBJECT(drawer->properties),
"tooltip");
GtkWidget *pixentry = g_object_get_data (G_OBJECT (drawer->properties),
"pixmap");
GtkWidget *tipentry = g_object_get_data (G_OBJECT (drawer->properties),
"tooltip");
char *s;
const char *cs;
......@@ -141,7 +141,7 @@ add_drawer_properties_page (PerPanelConfig *ppc, GtkNotebook *prop_nbook, Drawer
drawer->tooltip,
(UpdateFunction)panel_config_register_changes,
ppc);
gtk_object_set_data(GTK_OBJECT(dialog),"tooltip",w);
g_object_set_data (G_OBJECT (dialog), "tooltip", w);
w = create_icon_entry(table, "icon", 0, 2, _("Icon"),
NULL, drawer->pixmap,
......@@ -407,8 +407,8 @@ drawer_setup(Drawer *drawer)
if(BASEP_WIDGET(drawer->drawer)->state != BASEP_SHOWN) {
GtkRequisition chreq;
gtk_widget_size_request(drawer->drawer, &chreq);
gtk_widget_set_uposition(drawer->drawer,
-chreq.width - 1, -chreq.height - 1);
gtk_window_move (GTK_WINDOW (drawer->drawer),
-chreq.width - 1, -chreq.height - 1);
}
gtk_widget_show(drawer->drawer);
}
......
......@@ -212,10 +212,10 @@ edge_widget_new (gchar *panel_id,
gboolean rotate_pixmap_bg,
GdkColor *back_color)
{
EdgeWidget *edgew = gtk_type_new (EDGE_TYPE_WIDGET);
EdgeWidget *edgew = g_object_new (EDGE_TYPE_WIDGET, NULL);
BasePWidget *basep = BASEP_WIDGET (edgew);
basep->pos = gtk_type_new (EDGE_TYPE_POS);
basep->pos = g_object_new (EDGE_TYPE_POS, NULL);
border_widget_construct (panel_id,
BORDER_WIDGET (basep),
......
......@@ -545,8 +545,8 @@ floating_widget_new (gchar *panel_id,
FloatingWidget *floating;
FloatingPos *pos;
floating = gtk_type_new (FLOATING_TYPE_WIDGET);
floating->pos = gtk_type_new (FLOATING_TYPE_POS);
floating = g_object_new (FLOATING_TYPE_WIDGET, NULL);
floating->pos = g_object_new (FLOATING_TYPE_POS, NULL);
pos = FLOATING_POS (floating->pos);
pos->x = x;
......
......@@ -870,7 +870,7 @@ append_task_menu (FoobarWidget *foo, GtkMenuShell *menu_bar)
gtk_widget_show (foo->task_item);
foo->task_bin = gtk_alignment_new (0.3, 0.5, 0.0, 0.0);
gtk_widget_set_usize (foo->task_bin, 25, 20);
gtk_widget_set_size_request (foo->task_bin, 25, 20);
gtk_widget_show (foo->task_bin);
gtk_container_add (GTK_CONTAINER (foo->task_item), foo->task_bin);
......@@ -1030,9 +1030,9 @@ foobar_widget_instance_init (FoobarWidget *foo)
g_signal_connect (G_OBJECT (foo), "delete_event",
G_CALLBACK (gtk_true), NULL);
gtk_widget_set_uposition (GTK_WIDGET (foo),
multiscreen_x (foo->screen),
multiscreen_y (foo->screen));
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);
......@@ -1091,7 +1091,7 @@ foobar_widget_instance_init (FoobarWidget *foo)
gtk_container_add (GTK_CONTAINER (foo->hbox), foo->panel);
gtk_object_set_data (GTK_OBJECT (menu_bar), "menu_panel", foo->panel);
g_object_set_data (G_OBJECT (menu_bar), "menu_panel", foo->panel);
#if 0
path = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
......@@ -1185,7 +1185,7 @@ foobar_widget_size_allocate (GtkWidget *w, GtkAllocation *alloc)
}
GtkWidget *
foobar_widget_new (gchar *panel_id, int screen)
foobar_widget_new (const char *panel_id, int screen)
{
FoobarWidget *foo;
......@@ -1194,11 +1194,11 @@ foobar_widget_new (gchar *panel_id, int screen)
if (foobar_widget_exists (screen))
return NULL;
foo = gtk_type_new (FOOBAR_TYPE_WIDGET);
foo = g_object_new (FOOBAR_TYPE_WIDGET, NULL);
/* Ugly hack to reset the unique id back to the original one */
if (panel_id != NULL)
panel_widget_set_new_id (PANEL_WIDGET (foo->panel));
panel_widget_set_id (PANEL_WIDGET (foo->panel), panel_id);
foo->screen = screen;
gtk_widget_set_uposition (GTK_WIDGET (foo),
......
......@@ -60,7 +60,7 @@ struct _FoobarWidgetClass
GType foobar_widget_get_type (void) G_GNUC_CONST;
GtkWidget * foobar_widget_new (gchar *panel_id, int screen);
GtkWidget * foobar_widget_new (const char *panel_id, int screen);
void foobar_widget_update_winhints (FoobarWidget *foo);
void foobar_widget_redo_window (FoobarWidget *foo);
......
......@@ -212,15 +212,6 @@ option_menu_changed (GtkWidget *widget, gpointer data)
gtk_option_menu_get_history(GTK_OPTION_MENU(widget)),NULL);
}
static void
spin_button_changed (GtkWidget *widget, gpointer data)
{
gchar *key = (gchar *)data;
gconf_client_set_int(gconf_client,key,
gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)),NULL);
}
static void
entry_changed (GtkWidget *widget, gpointer data)
{
......
......@@ -212,15 +212,6 @@ option_menu_changed (GtkWidget *widget, gpointer data)
gtk_option_menu_get_history(GTK_OPTION_MENU(widget)),NULL);
}
static void
spin_button_changed (GtkWidget *widget, gpointer data)
{
gchar *key = (gchar *)data;
gconf_client_set_int(gconf_client,key,
gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)),NULL);
}
static void
entry_changed (GtkWidget *widget, gpointer data)
{
......
......@@ -25,6 +25,7 @@
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <libgnome/libgnome.h>
#include <libgnomeui/libgnomeui.h>
......@@ -210,9 +211,9 @@ run_dialog_response (GtkWidget *w, int response, gpointer data)
goto return_and_close;
}
clist = gtk_object_get_data (GTK_OBJECT (run_dialog), "dentry_list");
terminal = GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT(w),
"terminal"));
clist = g_object_get_data (G_OBJECT (run_dialog), "dentry_list");
terminal = GTK_TOGGLE_BUTTON (g_object_get_data (G_OBJECT(w),
"terminal"));
if (gtk_object_get_data (GTK_OBJECT (run_dialog), "use_list")) {
char *name;
......@@ -256,7 +257,7 @@ run_dialog_response (GtkWidget *w, int response, gpointer data)
}
}
} else {
entry = GTK_ENTRY (gtk_object_get_data(GTK_OBJECT(w), "entry"));
entry = GTK_ENTRY (g_object_get_data (G_OBJECT (w), "entry"));
s = gtk_entry_get_text(entry);
......@@ -402,12 +403,12 @@ browse(GtkWidget *w, GtkWidget *entry)
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",
panel_signal_connect_object_while_alive
(G_OBJECT (entry), "destroy",
G_CALLBACK (gtk_widget_destroy),
GTK_OBJECT (fsel));
G_OBJECT (fsel));
gtk_window_position (GTK_WINDOW (fsel), GTK_WIN_POS_MOUSE);
gtk_window_set_position (GTK_WINDOW (fsel), GTK_WIN_POS_MOUSE);
gtk_window_present (GTK_WINDOW (fsel));
}
......@@ -465,8 +466,8 @@ sync_entry_to_list (GtkWidget *dialog)
if (blocked)
return;
clist = gtk_object_get_data (GTK_OBJECT (dialog), "dentry_list");
entry = gtk_object_get_data(GTK_OBJECT(dialog), "entry");
clist = g_object_get_data (G_OBJECT (dialog), "dentry_list");
entry = g_object_get_data (G_OBJECT (dialog), "entry");
unset_selected (dialog);
}
......@@ -479,13 +480,13 @@ sync_list_to_entry (GtkWidget *dialog)
GtkWidget *terminal_toggle;
gchar *name;
gtk_object_set_data (GTK_OBJECT (dialog),
"sync_entry_to_list_blocked",
GINT_TO_POINTER (TRUE));
g_object_set_data (G_OBJECT (dialog),
"sync_entry_to_list_blocked",
GINT_TO_POINTER (TRUE));
clist = gtk_object_get_data (GTK_OBJECT (dialog), "dentry_list");
entry = gtk_object_get_data (GTK_OBJECT (dialog), "entry");
terminal_toggle = gtk_object_get_data (GTK_OBJECT (dialog), "terminal");
clist = g_object_get_data (G_OBJECT (dialog), "dentry_list");
entry = g_object_get_data (G_OBJECT (dialog), "entry");
terminal_toggle = g_object_get_data (G_OBJECT (dialog), "terminal");
if (GTK_CLIST (clist)->selection) {
name = gtk_clist_get_row_data (GTK_CLIST (clist),
......@@ -602,17 +603,17 @@ create_advanced_contents (void)
gentry = gnome_entry_new ("gnome-run");
gtk_box_pack_start (GTK_BOX (hbox), gentry, TRUE, TRUE, 0);
/* 1/4 the width of the first screen should be a good value */
gtk_widget_set_usize (GTK_WIDGET (gentry),
multiscreen_width (0) / 4, -2);
gtk_widget_set_size_request (GTK_WIDGET (gentry),
multiscreen_width (0) / 4, -2);
entry = gnome_entry_gtk_entry (GNOME_ENTRY (gentry));
g_signal_connect (G_OBJECT (entry), "event",
G_CALLBACK (entry_event),
NULL);
g_signal_connect (G_OBJECT (entry), "destroy",
G_CALLBACK (kill_completion),
NULL);
G_CALLBACK (entry_event),
NULL);
g_signal_connect (G_OBJECT (entry), "destroy",
G_CALLBACK (kill_completion),
NULL);
gtk_window_set_focus (GTK_WINDOW (run_dialog), entry);
gtk_combo_set_use_arrows_always (GTK_COMBO (gentry), TRUE);
......@@ -640,12 +641,12 @@ create_advanced_contents (void)
gtk_box_pack_start (GTK_BOX (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),
"advanced",
vbox,
(GtkDestroyNotify) gtk_object_unref);
g_object_set_data_full (G_OBJECT (run_dialog),
"advanced",
vbox,
(GDestroyNotify) gtk_object_unref);
g_signal_connect (G_OBJECT (vbox),
"show",
......
......@@ -3056,17 +3056,15 @@ create_new_panel (GtkWidget *w, gpointer data)
GtkWidget *dialog;
gchar *s;
if (!foobar_widget_exists (screen)) {
char *panel_id;
const char *panel_id;
panel = foobar_widget_new (NULL, screen);
panel_id = g_strdup_printf ("%u",
(guint) PANEL_WIDGET (FOOBAR_WIDGET (panel)->panel)->unique_id);
panel_id = PANEL_WIDGET (FOOBAR_WIDGET (panel)->panel)->unique_id;
/* Don't translate the first part of this string */
s = panel_gconf_panel_profile_get_conditional_string (session_get_current_profile (),
panel_id,
"clock-format",
FALSE, _("%I:%M:%S %p"));
g_free (panel_id);
if (s != NULL)
foobar_widget_set_clock_format (FOOBAR_WIDGET (panel), s);
g_free (s);
......
#include "nothing.h"
#include <string.h>
/*code snippet, not to be compiled separately*/
static int goat_pages=0;
......
......@@ -11,6 +11,8 @@
#include <config.h>
#include <string.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libart_lgpl/art_misc.h>
#include <libart_lgpl/art_affine.h>
......@@ -677,7 +679,7 @@ make_misc_widget (PerPanelConfig *ppc, gboolean avoiding)
1, 1, 1);
ppc->screen_spin = button =
gtk_spin_button_new (GTK_ADJUSTMENT (range), 1, 0);
gtk_widget_set_usize (GTK_WIDGET (button), 65, 0);
gtk_widget_set_size_request (GTK_WIDGET (button), 65, 0);
gtk_object_set_user_data (GTK_OBJECT (button), ppc);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (button), ppc->screen);
g_signal_connect (G_OBJECT (button), "changed",
......@@ -1328,8 +1330,8 @@ set_back (GtkWidget *widget, gpointer data)
if (ppc->back_type == back_type)
return;
pixf = gtk_object_get_data (GTK_OBJECT (widget), "pix");
colf = gtk_object_get_data (GTK_OBJECT (widget), "col");
pixf = g_object_get_data (G_OBJECT (widget), "pix");
colf = g_object_get_data (G_OBJECT (widget), "col");
if (back_type == PANEL_BACK_NONE) {
gtk_widget_set_sensitive (pixf, FALSE);
......@@ -1389,9 +1391,9 @@ background_page (PerPanelConfig *ppc)
/*color frame*/
f = gtk_frame_new (_("Color"));
gtk_widget_set_sensitive (f, ppc->back_type == PANEL_BACK_COLOR);
gtk_object_set_data(GTK_OBJECT(ppc->pix),"col",f);
gtk_object_set_data(GTK_OBJECT(ppc->col),"col",f);
gtk_object_set_data(GTK_OBJECT(ppc->non),"col",f);
g_object_set_data (G_OBJECT (ppc->pix), "col", f);
g_object_set_data (G_OBJECT (ppc->col), "col", f);
g_object_set_data (G_OBJECT (ppc->non), "col", f);
gtk_container_set_border_width(GTK_CONTAINER (f), GNOME_PAD_SMALL);
gtk_box_pack_start (GTK_BOX (vbox), f, FALSE, FALSE, 0);
......@@ -1432,9 +1434,9 @@ background_page (PerPanelConfig *ppc)
gnome_pixmap_entry_set_preview_size (GNOME_PIXMAP_ENTRY (ppc->pix_entry),
0,50);
t = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (ppc->pix_entry));
gtk_signal_connect_while_alive (GTK_OBJECT (t), "changed",
G_CALLBACK (value_changed), ppc,
GTK_OBJECT (ppc->pix_entry));
panel_signal_connect_while_alive (G_OBJECT (t), "changed",
G_CALLBACK (value_changed), ppc,
G_OBJECT (ppc->pix_entry));
gtk_box_pack_start (GTK_BOX (box), ppc->pix_entry, FALSE, FALSE, 0);
gtk_entry_set_text (GTK_ENTRY (t),
......@@ -1446,12 +1448,12 @@ background_page (PerPanelConfig *ppc)
gtk_box_pack_start (GTK_BOX (box), noscale, FALSE, FALSE,0);
fit = gtk_radio_button_new_with_label (
gtk_radio_button_group(GTK_RADIO_BUTTON(noscale)),
gtk_radio_button_get_group(GTK_RADIO_BUTTON(noscale)),
_("Scale image (keep proportions)"));
gtk_box_pack_start (GTK_BOX (box), fit, FALSE, FALSE,0);
stretch = gtk_radio_button_new_with_label (
gtk_radio_button_group(GTK_RADIO_BUTTON(noscale)),
gtk_radio_button_get_group(GTK_RADIO_BUTTON(noscale)),
_("Stretch image (change proportions)"));
gtk_box_pack_start (GTK_BOX (box), stretch, FALSE, FALSE,0);
......@@ -1545,27 +1547,27 @@ update_config_type (BasePWidget *w)
if(EDGE_IS_WIDGET(w)) {
/* edge notebook page */
page = edge_notebook_page(ppc);
gtk_label_set(GTK_LABEL(ppc->type_tab_label),
_("Edge panel"));
gtk_label_set_text (GTK_LABEL (ppc->type_tab_label),
_("Edge panel"));
gtk_container_add(GTK_CONTAINER(ppc->type_tab), page);
} else if(ALIGNED_IS_WIDGET(w)) {
/* aligned notebook page */
page = aligned_notebook_page(ppc);
gtk_container_add(GTK_CONTAINER(ppc->type_tab), page);
gtk_label_set(GTK_LABEL(ppc->type_tab_label),
_("Aligned panel"));
gtk_label_set_text (GTK_LABEL (ppc->type_tab_label),
_("Aligned panel"));
} else if(SLIDING_IS_WIDGET(w)) {
/* sliding notebook page */
page = sliding_notebook_page(ppc);
gtk_container_add(GTK_CONTAINER(ppc->type_tab), page);
gtk_label_set(GTK_LABEL(ppc->type_tab_label),
_("Sliding panel"));
gtk_label_set_text (GTK_LABEL (ppc->type_tab_label),
_("Sliding panel"));
} else if(FLOATING_IS_WIDGET(w)) {
/* floating notebook page */
page = floating_notebook_page(ppc);
gtk_container_add(GTK_CONTAINER(ppc->type_tab), page);
gtk_label_set(GTK_LABEL(ppc->type_tab_label),
_("Floating panel"));
gtk_label_set_text (GTK_LABEL (ppc->type_tab_label),
_("Floating panel"));
}
gtk_widget_show_all (ppc->type_tab);
ppc->register_changes = TRUE;
......@@ -1575,8 +1577,8 @@ static void
window_response (GtkWidget *w, int response, gpointer data)
{
GtkWidget *notebook = data;
const char *help_path = gtk_object_get_data (GTK_OBJECT (w), "help_path");
const char *help_linkid = gtk_object_get_data (GTK_OBJECT (w), "help_linkid");
const char *help_path = g_object_get_data (G_OBJECT (w), "help_path");
const char *help_linkid = g_object_get_data (G_OBJECT (w), "help_linkid");
if (response == GTK_RESPONSE_HELP) {
int tab;
......@@ -1709,7 +1711,7 @@ panel_config (GtkWidget *panel)
BasePWidget *basep = BASEP_WIDGET(panel);
GtkWidget *applet = PANEL_WIDGET(basep->panel)->master_widget;
AppletInfo *info =
gtk_object_get_data(GTK_OBJECT(applet), "applet_info");
g_object_get_data (G_OBJECT (applet), "applet_info");
add_drawer_properties_page(ppc, GTK_NOTEBOOK (prop_nbook), info->data);
help_path = "drawers";
help_linkid = NULL;
......
......@@ -140,7 +140,7 @@ string_is_in_list(const GSList *list, const char *text)
static void
updated (GtkWidget *w, gpointer data)
{
UpdateFunction func = gtk_object_get_data (GTK_OBJECT (w), "update_function");
UpdateFunction func = g_object_get_data (G_OBJECT (w), "update_function");
func (data);
}
......@@ -178,7 +178,7 @@ create_text_entry(GtkWidget *table,
GNOME_PAD_SMALL, GNOME_PAD_SMALL);
if(func) {
gtk_object_set_data (GTK_OBJECT (t), "update_function", func);
g_object_set_data (G_OBJECT (t), "update_function", func);
g_signal_connect (G_OBJECT (t), "changed",
G_CALLBACK (updated),
data);
......@@ -1016,11 +1016,11 @@ panel_pop_window_busy (GtkWidget *window)
gtk_widget_set_sensitive (window, TRUE);
if (window->window != NULL)
gdk_window_set_cursor (window->window, NULL);
gtk_object_remove_data (GTK_OBJECT (window),
"Panel:WindowBusy");
g_object_set_data (G_OBJECT (window),
"Panel:WindowBusy", NULL);
} else {
gtk_object_set_data (GTK_OBJECT (window), "Panel:WindowBusy",
GINT_TO_POINTER (busy));
g_object_set_data (G_OBJECT (window), "Panel:WindowBusy",
GINT_TO_POINTER (busy));
}
}
......
......@@ -307,13 +307,13 @@ remove_panel_from_forbidden(PanelWidget *panel, PanelWidget *r)
if(!panel->master_widget)
return;
list = gtk_object_get_data(GTK_OBJECT(panel->master_widget),
PANEL_APPLET_FORBIDDEN_PANELS);
list = g_object_get_data (G_OBJECT(panel->master_widget),
PANEL_APPLET_FORBIDDEN_PANELS);
if(list) {
list = g_slist_remove(list,r);
gtk_object_set_data(GTK_OBJECT(panel->master_widget),
PANEL_APPLET_FORBIDDEN_PANELS,
list);
g_object_set_data (G_OBJECT(panel->master_widget),
PANEL_APPLET_FORBIDDEN_PANELS,
list);
}
parent_panel = panel->master_widget->parent;
if (parent_panel)
......@@ -334,14 +334,14 @@ add_panel_to_forbidden(PanelWidget *panel, PanelWidget *r)
if(!panel->master_widget)
return;
list = gtk_object_get_data(GTK_OBJECT(panel->master_widget),
PANEL_APPLET_FORBIDDEN_PANELS);
list = g_object_get_data (G_OBJECT(panel->master_widget),
PANEL_APPLET_FORBIDDEN_PANELS);
if(g_slist_find(list,r)==NULL) {
list = g_slist_prepend(list,r);
gtk_object_set_data(GTK_OBJECT(panel->master_widget),
PANEL_APPLET_FORBIDDEN_PANELS,
list);
g_object_set_data (G_OBJECT(panel->master_widget),
PANEL_APPLET_FORBIDDEN_PANELS,
list);
}
parent_panel = panel->master_widget->parent;
if (parent_panel)
......@@ -360,8 +360,8 @@ run_up_forbidden(PanelWidget *panel,
for(list = panel->applet_list;list!=NULL;list = g_list_next(list)) {
AppletData *ad = list->data;
PanelWidget *p =
gtk_object_get_data(GTK_OBJECT(ad->applet),
PANEL_APPLET_ASSOC_PANEL_KEY);
g_object_get_data (G_OBJECT(ad->applet),
PANEL_APPLET_ASSOC_PANEL_KEY);
if(p)
run_up_forbidden(p,runfunc);
}
......@@ -380,8 +380,8 @@ panel_widget_cadd(GtkContainer *container, GtkWidget *widget)
g_return_if_fail (GTK_IS_WIDGET (widget));
panel_widget_add(PANEL_WIDGET(container),widget,0);
p = gtk_object_get_data(GTK_OBJECT(widget),
PANEL_APPLET_ASSOC_PANEL_KEY);
p = g_object_get_data (G_OBJECT(widget),
PANEL_APPLET_ASSOC_PANEL_KEY);
if(p)
run_up_forbidden(p,add_panel_to_forbidden);
}
......@@ -400,8 +400,8 @@ panel_widget_cremove (GtkContainer *container, GtkWidget *widget)
panel = PANEL_WIDGET (container);
ad = gtk_object_get_data (GTK_OBJECT (widget), PANEL_APPLET_DATA);
p = gtk_object_get_data (GTK_OBJECT (widget),
ad = g_object_get_data (G_OBJECT (widget), PANEL_APPLET_DATA);
p = g_object_get_data (G_OBJECT (widget),
PANEL_APPLET_ASSOC_PANEL_KEY);
if (ad != NULL &&
......@@ -480,7 +480,7 @@ panel_widget_is_applet_stuck(PanelWidget *panel, GtkWidget *applet)
g_return_val_if_fail(applet!=NULL,FALSE);
g_return_val_if_fail(GTK_IS_WIDGET(applet),FALSE);
ad = gtk_object_get_data(GTK_OBJECT(applet), PANEL_APPLET_DATA);
ad = g_object_get_data (G_OBJECT(applet), PANEL_APPLET_DATA);
g_return_val_if_fail(ad!=NULL,FALSE);
......@@ -1846,7 +1846,7 @@ panel_widget_get_by_id (gchar *id)
}
void
panel_widget_set_id (PanelWidget *panel, gchar *id)
panel_widget_set_id (PanelWidget *panel, const char *id)