[gnome-commander] Replaced obsoleted gtk_object_ref() with g_object_ref() 1/5
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Replaced obsoleted gtk_object_ref() with g_object_ref() 1/5
- Date: Tue, 3 Aug 2010 16:00:22 +0000 (UTC)
commit 3583e653a90e984a190003dae75fcf8d06b04c16
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Tue Aug 3 17:50:45 2010 +0200
Replaced obsoleted gtk_object_ref() with g_object_ref() 1/5
libgcmd/libgcmd-widget-factory.cc | 54 ++++++++++++++++++------------------
1 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/libgcmd/libgcmd-widget-factory.cc b/libgcmd/libgcmd-widget-factory.cc
index 44e36fa..1e26386 100644
--- a/libgcmd/libgcmd-widget-factory.cc
+++ b/libgcmd/libgcmd-widget-factory.cc
@@ -57,7 +57,7 @@ GtkWidget *lookup_widget (GtkWidget *widget, const gchar *widget_name)
GtkWidget *create_frame (GtkWidget *parent, const gchar *text, gint spacing)
{
GtkWidget *frame = gtk_frame_new (text);
- gtk_widget_ref (frame);
+ g_object_ref (frame);
g_object_set_data_full (G_OBJECT (parent), "spaced_frame", frame, g_object_unref);
gtk_container_set_border_width (GTK_CONTAINER (frame), spacing);
gtk_widget_show (frame);
@@ -84,7 +84,7 @@ GtkWidget *create_space_frame (GtkWidget *parent, gint space)
GtkWidget *create_table (GtkWidget *parent, gint rows, gint cols)
{
GtkWidget *table = gtk_table_new (rows, cols, FALSE);
- gtk_widget_ref (table);
+ g_object_ref (table);
g_object_set_data_full (G_OBJECT (parent), "table", table, g_object_unref);
gtk_widget_show (table);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
@@ -97,7 +97,7 @@ GtkWidget *create_table (GtkWidget *parent, gint rows, gint cols)
GtkWidget *create_vbox (GtkWidget *parent, gboolean h, gint s)
{
GtkWidget *vbox = gtk_vbox_new (h, s);
- gtk_widget_ref (vbox);
+ g_object_ref (vbox);
g_object_set_data_full (G_OBJECT (parent), "vbox", vbox, g_object_unref);
gtk_widget_show (vbox);
@@ -108,7 +108,7 @@ GtkWidget *create_vbox (GtkWidget *parent, gboolean h, gint s)
GtkWidget *create_hbox (GtkWidget *parent, gboolean h, gint s)
{
GtkWidget *hbox = gtk_hbox_new (h, s);
- gtk_widget_ref (hbox);
+ g_object_ref (hbox);
g_object_set_data_full (G_OBJECT (parent), "hbox", hbox, g_object_unref);
gtk_widget_show (hbox);
@@ -121,7 +121,7 @@ GtkWidget *create_label (GtkWidget *parent, const gchar *text)
GtkWidget *label;
label = gtk_label_new (text);
- gtk_widget_ref (label);
+ g_object_ref (label);
g_object_set_data_full (G_OBJECT (parent), "label", label, g_object_unref);
gtk_widget_show (label);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
@@ -145,7 +145,7 @@ GtkWidget *create_bold_label (GtkWidget *parent, const gchar *text)
GtkWidget *create_hsep (GtkWidget *parent)
{
GtkWidget *sep = gtk_hseparator_new ();
- gtk_widget_ref (sep);
+ g_object_ref (sep);
g_object_set_data_full (G_OBJECT (parent), "sep", sep, g_object_unref);
gtk_widget_show (sep);
return sep;
@@ -155,7 +155,7 @@ GtkWidget *create_hsep (GtkWidget *parent)
GtkWidget *create_vsep (GtkWidget *parent)
{
GtkWidget *sep = gtk_vseparator_new ();
- gtk_widget_ref (sep);
+ g_object_ref (sep);
g_object_set_data_full (G_OBJECT (parent), "sep", sep, g_object_unref);
gtk_widget_show (sep);
return sep;
@@ -201,7 +201,7 @@ GtkWidget *create_named_button_with_data (GtkWidget *parent, const gchar *label,
gtk_widget_add_accelerator (w, "clicked", accel_group,
key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
gtk_window_add_accel_group (GTK_WINDOW (parent), accel_group);
- gtk_widget_ref (w);
+ g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
gtk_widget_show (w);
if (func)
@@ -214,7 +214,7 @@ GtkWidget *create_named_button_with_data (GtkWidget *parent, const gchar *label,
GtkWidget * create_named_stock_button_with_data (GtkWidget *parent, gconstpointer stock, const gchar *name, GtkSignalFunc func, gpointer data)
{
GtkWidget *w = gtk_button_new_from_stock ((const gchar *) stock);
- gtk_widget_ref (w);
+ g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
gtk_widget_show (w);
if (func)
@@ -226,7 +226,7 @@ GtkWidget * create_named_stock_button_with_data (GtkWidget *parent, gconstpointe
GtkWidget *create_entry (GtkWidget *parent, const gchar *name, const gchar *value)
{
GtkWidget *w = gtk_entry_new ();
- gtk_widget_ref (w);
+ g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
if (value)
gtk_entry_set_text (GTK_ENTRY (w), value);
@@ -238,7 +238,7 @@ GtkWidget *create_entry (GtkWidget *parent, const gchar *name, const gchar *valu
GtkWidget *create_check (GtkWidget *parent, const gchar *text, const gchar *name)
{
GtkWidget *btn = gtk_check_button_new_with_label (text);
- gtk_widget_ref (btn);
+ g_object_ref (btn);
g_object_set_data_full (G_OBJECT (parent), name, btn, g_object_unref);
gtk_widget_show (btn);
@@ -249,7 +249,7 @@ GtkWidget *create_check (GtkWidget *parent, const gchar *text, const gchar *name
GtkWidget *create_radio (GtkWidget *parent, GSList *group, const gchar *text, const gchar *name)
{
GtkWidget *btn = gtk_radio_button_new_with_label (group, text);
- gtk_widget_ref (btn);
+ g_object_ref (btn);
g_object_set_data_full (G_OBJECT (parent), name, btn, g_object_unref);
gtk_widget_show (btn);
@@ -264,7 +264,7 @@ GtkWidget *create_spin (GtkWidget *parent, const gchar *name, gint min, gint max
adj = gtk_adjustment_new (value, min, max, 1, 10, 10);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
- gtk_widget_ref (spin);
+ g_object_ref (spin);
g_object_set_data_full (G_OBJECT (parent), name, spin, g_object_unref);
gtk_widget_show (spin);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
@@ -276,7 +276,7 @@ GtkWidget *create_spin (GtkWidget *parent, const gchar *name, gint min, gint max
GtkWidget *create_color_button (GtkWidget *parent, const gchar *name)
{
GtkWidget *w = gtk_color_button_new ();
- gtk_widget_ref (w);
+ g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
gtk_widget_show (w);
return w;
@@ -286,7 +286,7 @@ GtkWidget *create_color_button (GtkWidget *parent, const gchar *name)
GtkWidget *create_icon_entry (GtkWidget *parent, const gchar *name, const gchar *icon_path)
{
GtkWidget *icon_entry = gnome_icon_entry_new (NULL, NULL);
- gtk_widget_ref (icon_entry);
+ g_object_ref (icon_entry);
g_object_set_data_full (G_OBJECT (parent), name, icon_entry, g_object_unref);
gtk_widget_show (icon_entry);
if (icon_path)
@@ -299,7 +299,7 @@ GtkWidget *create_scale (GtkWidget *parent, const gchar *name, gint value, gint
{
GtkWidget *scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (value, min, max, 0, 0, 0)));
- gtk_widget_ref (scale);
+ g_object_ref (scale);
g_object_set_data_full (G_OBJECT (parent), name, scale, g_object_unref);
gtk_widget_show (scale);
gtk_scale_set_digits (GTK_SCALE (scale), 0);
@@ -313,12 +313,12 @@ GtkWidget *create_file_entry (GtkWidget *parent, const gchar *name, const gchar
GtkWidget *fentry, *entry;
fentry = gnome_file_entry_new (NULL, NULL);
- gtk_widget_ref (fentry);
+ g_object_ref (fentry);
g_object_set_data_full (G_OBJECT (parent), "fileentry", fentry, g_object_unref);
gtk_widget_show (fentry);
entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (fentry));
- gtk_widget_ref (entry);
+ g_object_ref (entry);
g_object_set_data_full (G_OBJECT (parent), name, entry, g_object_unref);
if (value)
gtk_entry_set_text (GTK_ENTRY (entry), value);
@@ -333,13 +333,13 @@ GtkWidget *create_clist (GtkWidget *parent, const gchar *name, gint cols, gint r
GtkWidget *sw, *clist;
sw = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_ref (sw);
+ g_object_ref (sw);
g_object_set_data_full (G_OBJECT (parent), "sw", sw, g_object_unref);
gtk_widget_show (sw);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
clist = gtk_clist_new (cols);
- gtk_widget_ref (clist);
+ g_object_ref (clist);
gtk_object_set_data (GTK_OBJECT (sw), "clist", clist);
g_object_set_data_full (G_OBJECT (parent), name, clist, g_object_unref);
gtk_widget_show (clist);
@@ -366,7 +366,7 @@ void create_clist_column (GtkWidget *sw, gint col, gint width, const gchar *labe
GtkWidget *create_vbuttonbox (GtkWidget *parent)
{
GtkWidget *w = gtk_vbutton_box_new ();
- gtk_widget_ref (w);
+ g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), "vbuttonbox", w, g_object_unref);
gtk_widget_show (w);
gtk_button_box_set_layout (GTK_BUTTON_BOX (w), GTK_BUTTONBOX_START);
@@ -378,7 +378,7 @@ GtkWidget *create_vbuttonbox (GtkWidget *parent)
GtkWidget *create_hbuttonbox (GtkWidget *parent)
{
GtkWidget *w = gtk_hbutton_box_new ();
- gtk_widget_ref (w);
+ g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), "hbuttonbox", w, g_object_unref);
gtk_widget_show (w);
gtk_box_set_spacing (GTK_BOX (w), 12);
@@ -389,7 +389,7 @@ GtkWidget *create_hbuttonbox (GtkWidget *parent)
GtkWidget *create_combo (GtkWidget *parent)
{
GtkWidget *combo = gtk_combo_new ();
- gtk_widget_ref (combo);
+ g_object_ref (combo);
g_object_set_data_full (G_OBJECT (parent), "combo", combo, g_object_unref);
gtk_widget_show (combo);
return combo;
@@ -399,7 +399,7 @@ GtkWidget *create_combo (GtkWidget *parent)
GtkWidget *create_option_menu (GtkWidget *parent, const gchar **items)
{
GtkWidget *optmenu = gtk_option_menu_new ();
- gtk_widget_ref (optmenu);
+ g_object_ref (optmenu);
g_object_set_data_full (G_OBJECT (parent), "optmenu", optmenu, g_object_unref);
gtk_widget_show (optmenu);
@@ -428,7 +428,7 @@ const gchar *get_combo_text (GtkWidget *combo)
GtkWidget *create_progress_bar (GtkWidget *parent)
{
GtkWidget *w = gtk_progress_bar_new ();
- gtk_widget_ref (w);
+ g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), "progress_bar", w, g_object_unref);
gtk_widget_show (w);
gtk_progress_set_show_text (GTK_PROGRESS (w), TRUE);
@@ -439,7 +439,7 @@ GtkWidget *create_progress_bar (GtkWidget *parent)
GtkWidget *create_pixmap (GtkWidget *parent, GdkPixmap *pm, GdkBitmap *mask)
{
GtkWidget *w = gtk_pixmap_new (pm, mask);
- gtk_widget_ref (w);
+ g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), "pixmap", w, g_object_unref);
gtk_widget_show (w);
return w;
@@ -449,7 +449,7 @@ GtkWidget *create_pixmap (GtkWidget *parent, GdkPixmap *pm, GdkBitmap *mask)
GtkWidget *create_sw (GtkWidget *parent)
{
GtkWidget *scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_ref (scrolledwindow);
+ g_object_ref (scrolledwindow);
g_object_set_data_full (G_OBJECT (parent), "scrolledwindow", scrolledwindow, g_object_unref);
gtk_widget_show (scrolledwindow);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]