Some more proper typing instead of using pointers:
2006-09-24 Michael Natterer <mitch@gimp.org> Some more proper typing instead of using pointers: * libgimpconfig/gimpconfig-params.h: added macro GIMP_CONFIG_INSTALL_PROP_BOXED(). * app/core/gimpcontainer.c: made "children-type" a GParamSpecGType. * app/widgets/gimpcontrollerinfo.c: made "mapping" a GParamSpecBoxed and use g_hash_table_unref() instead of destroy(). * app/widgets/gimppdbdialog.c: made "select-type" a GParamSpecGType. * app/dialogs/module-dialog.c * app/widgets/gimpcolordisplayeditor.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c: use proper object types, boxed types and G_TYPE_GTYPE instead of G_TYPE_POINTER for various list stores and signal signatues.
This commit is contained in:
committed by
Michael Natterer
parent
4f415c13e4
commit
8e04fb1b82
@ -151,8 +151,9 @@ module_dialog_new (Gimp *gimp)
|
||||
gtk_widget_show (listbox);
|
||||
|
||||
dialog->list = gtk_list_store_new (NUM_COLUMNS,
|
||||
G_TYPE_STRING, G_TYPE_BOOLEAN,
|
||||
G_TYPE_POINTER);
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_BOOLEAN,
|
||||
GIMP_TYPE_MODULE);
|
||||
tv = gtk_tree_view_new_with_model (GTK_TREE_MODEL (dialog->list));
|
||||
g_object_unref (dialog->list);
|
||||
|
||||
@ -274,6 +275,9 @@ dialog_select_callback (GtkTreeSelection *sel,
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (dialog->list), &iter,
|
||||
MODULE_COLUMN, &module, -1);
|
||||
|
||||
if (module)
|
||||
g_object_unref (module);
|
||||
|
||||
if (dialog->last_update == module)
|
||||
return;
|
||||
|
||||
@ -307,6 +311,8 @@ dialog_autoload_toggled (GtkCellRendererToggle *celltoggle,
|
||||
|
||||
if (module)
|
||||
{
|
||||
g_object_unref (module);
|
||||
|
||||
gimp_module_set_load_inhibit (module, active);
|
||||
|
||||
dialog->gimp->write_modulerc = TRUE;
|
||||
@ -383,6 +389,9 @@ dialog_info_remove (GimpModuleDB *db,
|
||||
MODULE_COLUMN, &module,
|
||||
-1);
|
||||
|
||||
if (module)
|
||||
g_object_unref (module);
|
||||
|
||||
if (module == mod)
|
||||
{
|
||||
gtk_list_store_remove (dialog->list, &iter);
|
||||
|
||||
Reference in New Issue
Block a user