~ubuntu-branches/ubuntu/natty/pygtk/natty-proposed

« back to all changes in this revision

Viewing changes to gtk/gtktreeview.override

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-06-22 16:49:42 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090622164942-19zeltp4z0u5iw72
Tags: 2.15.2-0ubuntu1
* New upstream version:
  - Rename gtk.Statusbar.remove() to gtk.Statusbar.remove_message
  - Allow pango.Context creation 
  - Make gtk.gdk.Pixbuf.add_alpha accept integers, retaining backward
    compatibility accepting also chars 
  - Protect window obj from GC in gtk.window_get_toplevels 
  - Plug huge number of memory leaks in Pango wrappers 
  - Add gtk.gdk.WINDOWING constant 
  - Wrap gdk_pixbuf_apply_embedded_orientation 
  - Modernize constructors of seven more types 
  - Don't free a string we don't own 
  - Some docs tweaking 
* debian/control.in:
  - set vcs location
* debian/patches/02_fix_get_application_info_crash.patch:
  - the change is in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
  gtk_tree_store_insert_with_values
73
73
  gtk_tree_store_insert_with_valuesv
74
74
%%
 
75
new-constructor GTK_TYPE_TREE_VIEW_COLUMN
 
76
%%
75
77
override gtk_tree_view_column_new kwargs
76
78
static int
77
79
_wrap_gtk_tree_view_column_new(PyGObject *self, PyObject*args, PyObject*kwargs)
94
96
            return -1;
95
97
        }
96
98
    }
97
 
    tvc = GTK_TREE_VIEW_COLUMN(
98
 
        g_object_new(pyg_type_from_object((PyObject *) self), NULL));
99
 
 
100
 
    if (title)
101
 
        gtk_tree_view_column_set_title(tvc, title);
 
99
 
 
100
    pygobject_construct(self, "title", title, NULL);
 
101
    tvc = GTK_TREE_VIEW_COLUMN(self->obj);
 
102
 
102
103
    if (cell)
103
104
        gtk_tree_view_column_pack_start(tvc, cell, TRUE);
 
105
 
104
106
    if (kwargs) {
105
107
        while (PyDict_Next(kwargs, &i, &key, &item)) {
106
108
            gchar *attr = PyString_AsString(key);
111
113
                           "%s must be an integer column number", attr);
112
114
                PyErr_SetString(PyExc_TypeError, err);
113
115
                g_object_unref(tvc);
 
116
                self->obj = NULL;
114
117
                return -1;
115
118
            }
116
119
 
123
126
                                               PyInt_AsLong(item));
124
127
        }
125
128
    }
126
 
    self->obj = (GObject *)tvc;
127
 
    pygobject_register_wrapper((PyObject *)self);
128
129
    return 0;
129
130
}
130
131
%%
1232
1233
%%
1233
1234
ignore gtk_list_store_newv
1234
1235
%%
 
1236
new-constructor GTK_TYPE_LIST_STORE
 
1237
%%
1235
1238
override gtk_list_store_new
1236
1239
static int
1237
1240
_wrap_gtk_list_store_new(PyGObject *self, PyObject *args)
1256
1259
            return -1;
1257
1260
        }
1258
1261
    }
1259
 
    self->obj = g_object_newv(pyg_type_from_object((PyObject *) self), 0, NULL);
 
1262
 
 
1263
    pygobject_construct(self, NULL);
1260
1264
    gtk_list_store_set_column_types(GTK_LIST_STORE(self->obj), len, column_types);
1261
1265
    g_free(column_types);
 
1266
 
1262
1267
    if (!self->obj) {
1263
1268
        PyErr_SetString(PyExc_RuntimeError,
1264
1269
                        "could not create GtkListStore object");
1265
1270
        return -1;
1266
1271
    }
1267
 
    pygobject_register_wrapper((PyObject *)self);
1268
1272
    return 0;
1269
1273
}
1270
1274
%%
1631
1635
%%
1632
1636
ignore gtk_tree_store_newv
1633
1637
%%
 
1638
new-constructor GTK_TYPE_TREE_STORE
 
1639
%%
1634
1640
override gtk_tree_store_new
1635
1641
static int
1636
1642
_wrap_gtk_tree_store_new(PyGObject *self, PyObject *args)
1655
1661
        }
1656
1662
    }
1657
1663
 
1658
 
    self->obj = g_object_newv(pyg_type_from_object((PyObject *) self), 0, NULL);
 
1664
    pygobject_construct(self, NULL);
1659
1665
    gtk_tree_store_set_column_types(GTK_TREE_STORE(self->obj), len, column_types);
 
1666
    g_free(column_types);
1660
1667
 
1661
 
    g_free(column_types);
1662
1668
    if (!self->obj) {
1663
1669
        PyErr_SetString(PyExc_RuntimeError,
1664
1670
                        "could not create GtkTreeStore object");
1665
1671
        return -1;
1666
1672
    }
1667
 
    pygobject_register_wrapper((PyObject *)self);
1668
1673
    return 0;
1669
1674
}
1670
1675
%%