Commit ad9d2daf authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

const correct string parameter.

Fri Aug 17 17:30:34 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtktreemodel.c (gtk_tree_path_new_from_string): const correct
        string parameter.

        * gtk/gtkoptionmenu.c (gtk_option_menu_set_menu): connect to
        GtkMenuShell::selection_done, now that we have it, instead of
        ::deactivate so we're not tearing the menu apart and notify
        the user prematurely.

Thu Aug 16 05:22:01 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkwindow.c (gtk_window_move_resize): if we actually move our
        window, clear window->need_default_position to avoid infinite loops.
        some comment fixups and GTK_RESIZE_IMMEDIATE fixups.

Wed Aug 15 12:36:55 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_set_model): move all model setup
        code into this place. get rid of GTK_TREE_VIEW_MODEL_SETUP usage.
        (gtk_tree_view_set_property): don't cast possible NULL objects.
        (gtk_tree_view_destroy): reset the model to NULL.

        * gtk/gtktreeselection.c (gtk_tree_selection_finalize): chain
        parent_class handler.
parent aa9932da
Fri Aug 17 17:30:34 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): const correct
string parameter.
* gtk/gtkoptionmenu.c (gtk_option_menu_set_menu): connect to
GtkMenuShell::selection_done, now that we have it, instead of
::deactivate so we're not tearing the menu apart and notify
the user prematurely.
Thu Aug 16 05:22:01 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): if we actually move our
window, clear window->need_default_position to avoid infinite loops.
some comment fixups and GTK_RESIZE_IMMEDIATE fixups.
Wed Aug 15 12:36:55 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_model): move all model setup
code into this place. get rid of GTK_TREE_VIEW_MODEL_SETUP usage.
(gtk_tree_view_set_property): don't cast possible NULL objects.
(gtk_tree_view_destroy): reset the model to NULL.
* gtk/gtktreeselection.c (gtk_tree_selection_finalize): chain
parent_class handler.
2001-08-17 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/demos/gtk-demo/*: Remove all uses of deprecated functions.
......@@ -19,25 +45,25 @@
* gtk/stock-icons/dialog_error.png: maybe a little drastic ;)
* gtk/stock-icons/dialog_warning.png: need a hand?
* gtk/stock-icons/stock_add.png, stock_remove.png: I hope
the aa border gets chopped off ok
the aa border gets chopped off ok
* gtk/stock-icons/stock_colorselector.png: using the new hand
* gtk/stock-icons/stock_dnd_multiple.png: I'm not totally sure what
this one is for, but the old icon was butt ugly.
this one is for, but the old icon was butt ugly.
* gtk/stock-icons/stock*_insert_image.png: not sure if it belongs here
* gtk/stock-icons/stock*_insert_object.png: "
* gtk/stock-icons/stock_index.png: using new hand icon
* gtk/stock-icons/stock*_new.png: the document template being used
elsewhere too
elsewhere too
* gtk/stock-icons/stock*_print*.png: new print and print preview
icons (panel/menu)
icons (panel/menu)
* gtk/stock-icons/stock*_save*.png, stock*_revert.png: new save/revert
icons based on Tuomas' floppy image.
icons based on Tuomas' floppy image.
* gtk/stock-icons/stock*_search*.png: search and s'n'r icons for panel/menu
* gtk/stock-icons/stock*_stop.png: replacing the old 'x' button
* gtk/stock-icons/stock*_trash.png: based on Tuomas' trash icon
* gtk/stock-icons/stock*_undelete.png: "
* gtk/stock-icons/stock_preferences.png: I have a version with a
document base if the sliders are no good.
document base if the sliders are no good.
* gtk/stock-icons/stock_properties.png: properties
......
Fri Aug 17 17:30:34 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): const correct
string parameter.
* gtk/gtkoptionmenu.c (gtk_option_menu_set_menu): connect to
GtkMenuShell::selection_done, now that we have it, instead of
::deactivate so we're not tearing the menu apart and notify
the user prematurely.
Thu Aug 16 05:22:01 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): if we actually move our
window, clear window->need_default_position to avoid infinite loops.
some comment fixups and GTK_RESIZE_IMMEDIATE fixups.
Wed Aug 15 12:36:55 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_model): move all model setup
code into this place. get rid of GTK_TREE_VIEW_MODEL_SETUP usage.
(gtk_tree_view_set_property): don't cast possible NULL objects.
(gtk_tree_view_destroy): reset the model to NULL.
* gtk/gtktreeselection.c (gtk_tree_selection_finalize): chain
parent_class handler.
2001-08-17 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/demos/gtk-demo/*: Remove all uses of deprecated functions.
......@@ -19,25 +45,25 @@
* gtk/stock-icons/dialog_error.png: maybe a little drastic ;)
* gtk/stock-icons/dialog_warning.png: need a hand?
* gtk/stock-icons/stock_add.png, stock_remove.png: I hope
the aa border gets chopped off ok
the aa border gets chopped off ok
* gtk/stock-icons/stock_colorselector.png: using the new hand
* gtk/stock-icons/stock_dnd_multiple.png: I'm not totally sure what
this one is for, but the old icon was butt ugly.
this one is for, but the old icon was butt ugly.
* gtk/stock-icons/stock*_insert_image.png: not sure if it belongs here
* gtk/stock-icons/stock*_insert_object.png: "
* gtk/stock-icons/stock_index.png: using new hand icon
* gtk/stock-icons/stock*_new.png: the document template being used
elsewhere too
elsewhere too
* gtk/stock-icons/stock*_print*.png: new print and print preview
icons (panel/menu)
icons (panel/menu)
* gtk/stock-icons/stock*_save*.png, stock*_revert.png: new save/revert
icons based on Tuomas' floppy image.
icons based on Tuomas' floppy image.
* gtk/stock-icons/stock*_search*.png: search and s'n'r icons for panel/menu
* gtk/stock-icons/stock*_stop.png: replacing the old 'x' button
* gtk/stock-icons/stock*_trash.png: based on Tuomas' trash icon
* gtk/stock-icons/stock*_undelete.png: "
* gtk/stock-icons/stock_preferences.png: I have a version with a
document base if the sliders are no good.
document base if the sliders are no good.
* gtk/stock-icons/stock_properties.png: properties
......
Fri Aug 17 17:30:34 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): const correct
string parameter.
* gtk/gtkoptionmenu.c (gtk_option_menu_set_menu): connect to
GtkMenuShell::selection_done, now that we have it, instead of
::deactivate so we're not tearing the menu apart and notify
the user prematurely.
Thu Aug 16 05:22:01 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): if we actually move our
window, clear window->need_default_position to avoid infinite loops.
some comment fixups and GTK_RESIZE_IMMEDIATE fixups.
Wed Aug 15 12:36:55 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_model): move all model setup
code into this place. get rid of GTK_TREE_VIEW_MODEL_SETUP usage.
(gtk_tree_view_set_property): don't cast possible NULL objects.
(gtk_tree_view_destroy): reset the model to NULL.
* gtk/gtktreeselection.c (gtk_tree_selection_finalize): chain
parent_class handler.
2001-08-17 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/demos/gtk-demo/*: Remove all uses of deprecated functions.
......@@ -19,25 +45,25 @@
* gtk/stock-icons/dialog_error.png: maybe a little drastic ;)
* gtk/stock-icons/dialog_warning.png: need a hand?
* gtk/stock-icons/stock_add.png, stock_remove.png: I hope
the aa border gets chopped off ok
the aa border gets chopped off ok
* gtk/stock-icons/stock_colorselector.png: using the new hand
* gtk/stock-icons/stock_dnd_multiple.png: I'm not totally sure what
this one is for, but the old icon was butt ugly.
this one is for, but the old icon was butt ugly.
* gtk/stock-icons/stock*_insert_image.png: not sure if it belongs here
* gtk/stock-icons/stock*_insert_object.png: "
* gtk/stock-icons/stock_index.png: using new hand icon
* gtk/stock-icons/stock*_new.png: the document template being used
elsewhere too
elsewhere too
* gtk/stock-icons/stock*_print*.png: new print and print preview
icons (panel/menu)
icons (panel/menu)
* gtk/stock-icons/stock*_save*.png, stock*_revert.png: new save/revert
icons based on Tuomas' floppy image.
icons based on Tuomas' floppy image.
* gtk/stock-icons/stock*_search*.png: search and s'n'r icons for panel/menu
* gtk/stock-icons/stock*_stop.png: replacing the old 'x' button
* gtk/stock-icons/stock*_trash.png: based on Tuomas' trash icon
* gtk/stock-icons/stock*_undelete.png: "
* gtk/stock-icons/stock_preferences.png: I have a version with a
document base if the sliders are no good.
document base if the sliders are no good.
* gtk/stock-icons/stock_properties.png: properties
......
Fri Aug 17 17:30:34 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): const correct
string parameter.
* gtk/gtkoptionmenu.c (gtk_option_menu_set_menu): connect to
GtkMenuShell::selection_done, now that we have it, instead of
::deactivate so we're not tearing the menu apart and notify
the user prematurely.
Thu Aug 16 05:22:01 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): if we actually move our
window, clear window->need_default_position to avoid infinite loops.
some comment fixups and GTK_RESIZE_IMMEDIATE fixups.
Wed Aug 15 12:36:55 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_model): move all model setup
code into this place. get rid of GTK_TREE_VIEW_MODEL_SETUP usage.
(gtk_tree_view_set_property): don't cast possible NULL objects.
(gtk_tree_view_destroy): reset the model to NULL.
* gtk/gtktreeselection.c (gtk_tree_selection_finalize): chain
parent_class handler.
2001-08-17 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/demos/gtk-demo/*: Remove all uses of deprecated functions.
......@@ -19,25 +45,25 @@
* gtk/stock-icons/dialog_error.png: maybe a little drastic ;)
* gtk/stock-icons/dialog_warning.png: need a hand?
* gtk/stock-icons/stock_add.png, stock_remove.png: I hope
the aa border gets chopped off ok
the aa border gets chopped off ok
* gtk/stock-icons/stock_colorselector.png: using the new hand
* gtk/stock-icons/stock_dnd_multiple.png: I'm not totally sure what
this one is for, but the old icon was butt ugly.
this one is for, but the old icon was butt ugly.
* gtk/stock-icons/stock*_insert_image.png: not sure if it belongs here
* gtk/stock-icons/stock*_insert_object.png: "
* gtk/stock-icons/stock_index.png: using new hand icon
* gtk/stock-icons/stock*_new.png: the document template being used
elsewhere too
elsewhere too
* gtk/stock-icons/stock*_print*.png: new print and print preview
icons (panel/menu)
icons (panel/menu)
* gtk/stock-icons/stock*_save*.png, stock*_revert.png: new save/revert
icons based on Tuomas' floppy image.
icons based on Tuomas' floppy image.
* gtk/stock-icons/stock*_search*.png: search and s'n'r icons for panel/menu
* gtk/stock-icons/stock*_stop.png: replacing the old 'x' button
* gtk/stock-icons/stock*_trash.png: based on Tuomas' trash icon
* gtk/stock-icons/stock*_undelete.png: "
* gtk/stock-icons/stock_preferences.png: I have a version with a
document base if the sliders are no good.
document base if the sliders are no good.
* gtk/stock-icons/stock_properties.png: properties
......
Fri Aug 17 17:30:34 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): const correct
string parameter.
* gtk/gtkoptionmenu.c (gtk_option_menu_set_menu): connect to
GtkMenuShell::selection_done, now that we have it, instead of
::deactivate so we're not tearing the menu apart and notify
the user prematurely.
Thu Aug 16 05:22:01 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): if we actually move our
window, clear window->need_default_position to avoid infinite loops.
some comment fixups and GTK_RESIZE_IMMEDIATE fixups.
Wed Aug 15 12:36:55 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_model): move all model setup
code into this place. get rid of GTK_TREE_VIEW_MODEL_SETUP usage.
(gtk_tree_view_set_property): don't cast possible NULL objects.
(gtk_tree_view_destroy): reset the model to NULL.
* gtk/gtktreeselection.c (gtk_tree_selection_finalize): chain
parent_class handler.
2001-08-17 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/demos/gtk-demo/*: Remove all uses of deprecated functions.
......@@ -19,25 +45,25 @@
* gtk/stock-icons/dialog_error.png: maybe a little drastic ;)
* gtk/stock-icons/dialog_warning.png: need a hand?
* gtk/stock-icons/stock_add.png, stock_remove.png: I hope
the aa border gets chopped off ok
the aa border gets chopped off ok
* gtk/stock-icons/stock_colorselector.png: using the new hand
* gtk/stock-icons/stock_dnd_multiple.png: I'm not totally sure what
this one is for, but the old icon was butt ugly.
this one is for, but the old icon was butt ugly.
* gtk/stock-icons/stock*_insert_image.png: not sure if it belongs here
* gtk/stock-icons/stock*_insert_object.png: "
* gtk/stock-icons/stock_index.png: using new hand icon
* gtk/stock-icons/stock*_new.png: the document template being used
elsewhere too
elsewhere too
* gtk/stock-icons/stock*_print*.png: new print and print preview
icons (panel/menu)
icons (panel/menu)
* gtk/stock-icons/stock*_save*.png, stock*_revert.png: new save/revert
icons based on Tuomas' floppy image.
icons based on Tuomas' floppy image.
* gtk/stock-icons/stock*_search*.png: search and s'n'r icons for panel/menu
* gtk/stock-icons/stock*_stop.png: replacing the old 'x' button
* gtk/stock-icons/stock*_trash.png: based on Tuomas' trash icon
* gtk/stock-icons/stock*_undelete.png: "
* gtk/stock-icons/stock_preferences.png: I have a version with a
document base if the sliders are no good.
document base if the sliders are no good.
* gtk/stock-icons/stock_properties.png: properties
......
Fri Aug 17 17:30:34 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): const correct
string parameter.
* gtk/gtkoptionmenu.c (gtk_option_menu_set_menu): connect to
GtkMenuShell::selection_done, now that we have it, instead of
::deactivate so we're not tearing the menu apart and notify
the user prematurely.
Thu Aug 16 05:22:01 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): if we actually move our
window, clear window->need_default_position to avoid infinite loops.
some comment fixups and GTK_RESIZE_IMMEDIATE fixups.
Wed Aug 15 12:36:55 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_model): move all model setup
code into this place. get rid of GTK_TREE_VIEW_MODEL_SETUP usage.
(gtk_tree_view_set_property): don't cast possible NULL objects.
(gtk_tree_view_destroy): reset the model to NULL.
* gtk/gtktreeselection.c (gtk_tree_selection_finalize): chain
parent_class handler.
2001-08-17 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/demos/gtk-demo/*: Remove all uses of deprecated functions.
......@@ -19,25 +45,25 @@
* gtk/stock-icons/dialog_error.png: maybe a little drastic ;)
* gtk/stock-icons/dialog_warning.png: need a hand?
* gtk/stock-icons/stock_add.png, stock_remove.png: I hope
the aa border gets chopped off ok
the aa border gets chopped off ok
* gtk/stock-icons/stock_colorselector.png: using the new hand
* gtk/stock-icons/stock_dnd_multiple.png: I'm not totally sure what
this one is for, but the old icon was butt ugly.
this one is for, but the old icon was butt ugly.
* gtk/stock-icons/stock*_insert_image.png: not sure if it belongs here
* gtk/stock-icons/stock*_insert_object.png: "
* gtk/stock-icons/stock_index.png: using new hand icon
* gtk/stock-icons/stock*_new.png: the document template being used
elsewhere too
elsewhere too
* gtk/stock-icons/stock*_print*.png: new print and print preview
icons (panel/menu)
icons (panel/menu)
* gtk/stock-icons/stock*_save*.png, stock*_revert.png: new save/revert
icons based on Tuomas' floppy image.
icons based on Tuomas' floppy image.
* gtk/stock-icons/stock*_search*.png: search and s'n'r icons for panel/menu
* gtk/stock-icons/stock*_stop.png: replacing the old 'x' button
* gtk/stock-icons/stock*_trash.png: based on Tuomas' trash icon
* gtk/stock-icons/stock*_undelete.png: "
* gtk/stock-icons/stock_preferences.png: I have a version with a
document base if the sliders are no good.
document base if the sliders are no good.
* gtk/stock-icons/stock_properties.png: properties
......
Fri Aug 17 17:30:34 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): const correct
string parameter.
* gtk/gtkoptionmenu.c (gtk_option_menu_set_menu): connect to
GtkMenuShell::selection_done, now that we have it, instead of
::deactivate so we're not tearing the menu apart and notify
the user prematurely.
Thu Aug 16 05:22:01 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c (gtk_window_move_resize): if we actually move our
window, clear window->need_default_position to avoid infinite loops.
some comment fixups and GTK_RESIZE_IMMEDIATE fixups.
Wed Aug 15 12:36:55 2001 Tim Janik <timj@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_model): move all model setup
code into this place. get rid of GTK_TREE_VIEW_MODEL_SETUP usage.
(gtk_tree_view_set_property): don't cast possible NULL objects.
(gtk_tree_view_destroy): reset the model to NULL.
* gtk/gtktreeselection.c (gtk_tree_selection_finalize): chain
parent_class handler.
2001-08-17 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/demos/gtk-demo/*: Remove all uses of deprecated functions.
......@@ -19,25 +45,25 @@
* gtk/stock-icons/dialog_error.png: maybe a little drastic ;)
* gtk/stock-icons/dialog_warning.png: need a hand?
* gtk/stock-icons/stock_add.png, stock_remove.png: I hope
the aa border gets chopped off ok
the aa border gets chopped off ok
* gtk/stock-icons/stock_colorselector.png: using the new hand
* gtk/stock-icons/stock_dnd_multiple.png: I'm not totally sure what
this one is for, but the old icon was butt ugly.
this one is for, but the old icon was butt ugly.
* gtk/stock-icons/stock*_insert_image.png: not sure if it belongs here
* gtk/stock-icons/stock*_insert_object.png: "
* gtk/stock-icons/stock_index.png: using new hand icon
* gtk/stock-icons/stock*_new.png: the document template being used
elsewhere too
elsewhere too
* gtk/stock-icons/stock*_print*.png: new print and print preview
icons (panel/menu)
icons (panel/menu)
* gtk/stock-icons/stock*_save*.png, stock*_revert.png: new save/revert
icons based on Tuomas' floppy image.
icons based on Tuomas' floppy image.
* gtk/stock-icons/stock*_search*.png: search and s'n'r icons for panel/menu
* gtk/stock-icons/stock*_stop.png: replacing the old 'x' button
* gtk/stock-icons/stock*_trash.png: based on Tuomas' trash icon
* gtk/stock-icons/stock*_undelete.png: "
* gtk/stock-icons/stock_preferences.png: I have a version with a
document base if the sliders are no good.
document base if the sliders are no good.
* gtk/stock-icons/stock_properties.png: properties
......
......@@ -67,7 +67,7 @@ static gint gtk_option_menu_button_press (GtkWidget *widget,
GdkEventButton *event);
static gint gtk_option_menu_key_press (GtkWidget *widget,
GdkEventKey *event);
static void gtk_option_menu_deactivate (GtkMenuShell *menu_shell,
static void gtk_option_menu_selection_done (GtkMenuShell *menu_shell,
GtkOptionMenu *option_menu);
static void gtk_option_menu_update_contents (GtkOptionMenu *option_menu);
static void gtk_option_menu_remove_contents (GtkOptionMenu *option_menu);
......@@ -234,9 +234,9 @@ gtk_option_menu_set_menu (GtkOptionMenu *option_menu,
gtk_option_menu_calc_size (option_menu);
gtk_signal_connect (GTK_OBJECT (option_menu->menu), "deactivate",
(GtkSignalFunc) gtk_option_menu_deactivate,
option_menu);
gtk_signal_connect_after (GTK_OBJECT (option_menu->menu), "selection_done",
G_CALLBACK (gtk_option_menu_selection_done),
option_menu);
gtk_signal_connect_object (GTK_OBJECT (option_menu->menu), "size_request",
(GtkSignalFunc) gtk_option_menu_calc_size,
GTK_OBJECT (option_menu));
......@@ -611,8 +611,8 @@ gtk_option_menu_key_press (GtkWidget *widget,
}
static void
gtk_option_menu_deactivate (GtkMenuShell *menu_shell,
GtkOptionMenu *option_menu)
gtk_option_menu_selection_done (GtkMenuShell *menu_shell,
GtkOptionMenu *option_menu)
{
g_return_if_fail (menu_shell != NULL);
g_return_if_fail (GTK_IS_OPTION_MENU (option_menu));
......
......@@ -154,10 +154,10 @@ gtk_tree_path_new (void)
* Return value: A newly created #GtkTreePath, or NULL
**/
GtkTreePath *
gtk_tree_path_new_from_string (gchar *path)
gtk_tree_path_new_from_string (const gchar *path)
{
GtkTreePath *retval;
gchar *orig_path = path;
const gchar *orig_path = path;
gchar *ptr;
gint i;
......@@ -173,7 +173,7 @@ gtk_tree_path_new_from_string (gchar *path)
if (i < 0)
{
g_warning (G_STRLOC"Negative numbers in path %s passed to gtk_tree_path_new_from_string", orig_path);
g_warning (G_STRLOC ": Negative numbers in path %s passed to gtk_tree_path_new_from_string", orig_path);
gtk_tree_path_free (retval);
return NULL;
}
......@@ -181,7 +181,7 @@ gtk_tree_path_new_from_string (gchar *path)
break;
if (ptr == path || *ptr != ':')
{
g_warning (G_STRLOC"Invalid path %s passed to gtk_tree_path_new_from_string", orig_path);
g_warning (G_STRLOC ": Invalid path %s passed to gtk_tree_path_new_from_string", orig_path);
gtk_tree_path_free (retval);
return NULL;
}
......
......@@ -116,7 +116,7 @@ struct _GtkTreeModelIface
/* GtkTreePath operations */
GtkTreePath *gtk_tree_path_new (void);
GtkTreePath *gtk_tree_path_new_from_string (gchar *path);
GtkTreePath *gtk_tree_path_new_from_string (const gchar *path);
gchar *gtk_tree_path_to_string (GtkTreePath *path);
GtkTreePath *gtk_tree_path_new_root (void);
void gtk_tree_path_append_index (GtkTreePath *path,
......
......@@ -99,6 +99,9 @@ gtk_tree_selection_finalize (GObject *object)
{
if (GTK_TREE_SELECTION (object)->destroy)
(* GTK_TREE_SELECTION (object)->destroy) (GTK_TREE_SELECTION (object)->user_data);
/* chain parent_class' handler */
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/**
......
......@@ -853,13 +853,13 @@ gtk_tree_view_set_property (GObject *object,
switch (prop_id)
{
case PROP_MODEL:
gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (g_value_get_object (value)));
gtk_tree_view_set_model (tree_view, g_value_get_object (value));
break;
case PROP_HADJUSTMENT:
gtk_tree_view_set_hadjustment (tree_view, GTK_ADJUSTMENT (g_value_get_object (value)));
gtk_tree_view_set_hadjustment (tree_view, g_value_get_object (value));
break;
case PROP_VADJUSTMENT:
gtk_tree_view_set_vadjustment (tree_view, GTK_ADJUSTMENT (g_value_get_object (value)));
gtk_tree_view_set_vadjustment (tree_view, g_value_get_object (value));
break;
case PROP_HEADERS_VISIBLE:
gtk_tree_view_set_headers_visible (tree_view, g_value_get_boolean (value));
......@@ -868,7 +868,7 @@ gtk_tree_view_set_property (GObject *object,
gtk_tree_view_set_headers_clickable (tree_view, g_value_get_boolean (value));
break;
case PROP_EXPANDER_COLUMN:
gtk_tree_view_set_expander_column (tree_view, GTK_TREE_VIEW_COLUMN (g_value_get_object (value)));
gtk_tree_view_set_expander_column (tree_view, g_value_get_object (value));
break;
case PROP_REORDERABLE:
gtk_tree_view_set_reorderable (tree_view, g_value_get_boolean (value));
......@@ -939,9 +939,10 @@ gtk_tree_view_finalize (GObject *object)
static void
gtk_tree_view_destroy (GtkObject *object)
{
GtkTreeView *tree_view = (GtkTreeView *) object;
GtkTreeView *tree_view = GTK_TREE_VIEW (object);
GList *list;
gtk_tree_view_set_model (tree_view, NULL);
if (tree_view->priv->tree != NULL)
{
......@@ -1273,7 +1274,7 @@ gtk_tree_view_size_request_buttons (GtkTreeView *tree_view)
tree_view->priv->header_height = 1;
if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_MODEL_SETUP))
if (tree_view->priv->model)
{
for (list = tree_view->priv->columns; list; list = list->next)
{
......@@ -4701,53 +4702,6 @@ gtk_tree_view_get_arrow_xrange (GtkTreeView *tree_view,
}
}
static void
gtk_tree_view_setup_model (GtkTreeView *tree_view)
{
GtkTreePath *path;
GtkTreeIter iter;
tree_view->priv->tree = NULL;
g_signal_connect (tree_view->priv->model,
"range_changed",
(GCallback) gtk_tree_view_range_changed,
tree_view);
g_signal_connect (tree_view->priv->model,
"inserted",
(GCallback) gtk_tree_view_inserted,
tree_view);
g_signal_connect (tree_view->priv->model,
"has_child_toggled",
(GCallback) gtk_tree_view_has_child_toggled,
tree_view);
g_signal_connect (tree_view->priv->model,
"deleted",
(GCallback) gtk_tree_view_deleted,
tree_view);
g_signal_connect (tree_view->priv->model,
"reordered",
(GCallback) gtk_tree_view_reordered,
tree_view);
if (tree_view->priv->columns == NULL)
return;
path = gtk_tree_path_new_root ();
if (gtk_tree_model_get_iter (tree_view->priv->model, &iter, path))
{
tree_view->priv->tree = _gtk_rbtree_new ();
gtk_tree_view_build_tree (tree_view, tree_view->priv->tree, &iter, 1, FALSE, GTK_WIDGET_REALIZED (tree_view));
}
gtk_tree_path_free (path);
/* FIXME: do I need to do this? gtk_tree_view_create_buttons (tree_view); */
GTK_TREE_VIEW_SET_FLAG (tree_view, GTK_TREE_VIEW_MODEL_SETUP);
}
static gint
gtk_tree_view_insert_iter_height (GtkTreeView *tree_view,
GtkRBTree *tree,
......@@ -5012,10 +4966,6 @@ gtk_tree_view_check_dirty (GtkTreeView *tree_view)
GtkTreeViewColumn *column;
GtkTreeIter iter;
if (!GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_MODEL_SETUP) &&
tree_view->priv->model)
gtk_tree_view_setup_model (tree_view);
for (list = tree_view->priv->columns; list; list = list->next)
{
column = list->data;
......@@ -6160,58 +6110,73 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
if (model == tree_view->priv->model)
return;
if (model != NULL)
g_object_ref (model);
if (tree_view->priv->model != NULL)
{
if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_MODEL_SETUP))
if (tree_view->priv->model)
{
g_signal_handlers_disconnect_by_func (G_OBJECT (tree_view->priv->model),
gtk_tree_view_range_changed, tree_view);
g_signal_handlers_disconnect_by_func (G_OBJECT (tree_view->priv->model),
gtk_tree_view_inserted, tree_view);
g_signal_handlers_disconnect_by_func (G_OBJECT (tree_view->priv->model),
gtk_tree_view_has_child_toggled, tree_view);
g_signal_handlers_disconnect_by_func (G_OBJECT (tree_view->priv->model),
gtk_tree_view_deleted, tree_view);
g_signal_handlers_disconnect_by_func (G_OBJECT (tree_view->priv->model),
gtk_tree_view_reordered, tree_view);
if (tree_view->priv->tree)
{
g_signal_handlers_disconnect_matched (G_OBJECT (tree_view->priv->model),
G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
0, 0, NULL,
gtk_tree_view_range_changed, tree_view);
g_signal_handlers_disconnect_matched (G_OBJECT (tree_view->priv->model),
G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
0, 0, NULL,
gtk_tree_view_inserted, tree_view);
g_signal_handlers_disconnect_matched (G_OBJECT (tree_view->priv->model),
G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
0, 0, NULL,
gtk_tree_view_has_child_toggled, tree_view);
g_signal_handlers_disconnect_matched (G_OBJECT (tree_view->priv->model),
G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
0, 0, NULL,
gtk_tree_view_deleted, tree_view);
g_signal_handlers_disconnect_matched (G_OBJECT (tree_view->priv->model),
G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
0, 0, NULL,
gtk_tree_view_reordered, tree_view);
if (tree_view->priv->tree)
_gtk_rbtree_free (tree_view->priv->tree);
_gtk_rbtree_free (tree_view->priv->tree);
tree_view->priv->tree = NULL;
}
if (tree_view->priv->drag_dest_row)
gtk_tree_row_reference_free (tree_view->priv->drag_dest_row);
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_MODEL_SETUP);
{
gtk_tree_row_reference_free (tree_view->priv->drag_dest_row);
tree_view->priv->drag_dest_row = NULL;
}
g_object_unref (tree_view->priv->model);
}
tree_view->priv->model = model;
if (model == NULL)
if (tree_view->priv->model)
{
tree_view->priv->tree = NULL;
if (GTK_WIDGET_REALIZED (tree_view))
_gtk_tree_view_update_size (tree_view);
}
else if (GTK_WIDGET_REALIZED (tree_view))
{
gtk_tree_view_setup_model (tree_view);
_gtk_tree_view_update_size (tree_view);
GtkTreePath *path;
GtkTreeIter iter;
g_object_ref (tree_view->priv->model);
g_signal_connect (tree_view->priv->model,
"range_changed",
G_CALLBACK (gtk_tree_view_range_changed),
tree_view);
g_signal_connect (tree_view->priv->model,
"inserted",
G_CALLBACK (gtk_tree_view_inserted),
tree_view);
g_signal_connect (tree_view->priv->model,
"has_child_toggled",
G_CALLBACK (gtk_tree_view_has_child_toggled),
tree_view);
g_signal_connect (tree_view->priv->model,
"deleted",
G_CALLBACK (gtk_tree_view_deleted),
tree_view);
g_signal_connect (tree_view->priv->model,
"reordered",
G_CALLBACK (gtk_tree_view_reordered),
tree_view);
path = gtk_tree_path_new_root ();
if (gtk_tree_model_get_iter (tree_view->priv->model, &iter, path))
{
tree_view->priv->tree = _gtk_rbtree_new ();
gtk_tree_view_build_tree (tree_view, tree_view->priv->tree, &iter, 1, FALSE, GTK_WIDGET_REALIZED (tree_view));
}
gtk_tree_path_free (path);
/* FIXME: do I need to do this? gtk_tree_view_create_buttons (tree_view); */
}
if (GTK_WIDGET_REALIZED (tree_view))
_gtk_tree_view_update_size (tree_view);
g_object_notify (G_OBJECT (tree_view), "model");
}
......
......@@ -1318,8 +1318,6 @@ _gtk_window_reposition (GtkWindow *window,
gint x,
gint y)
{
GtkWindowGeometryInfo *info;
g_return_if_fail (GTK_IS_WINDOW (window));
gtk_window_move (window, x, y);
......@@ -3484,8 +3482,7 @@ gtk_window_move_resize (GtkWindow *window)
widget->allocation.height != new_request.height))
configure_request_size_changed = TRUE;
/*
* Position Constraints
/* Position Constraints
* ====================
*
* POS_CENTER_ALWAYS is conceptually a constraint rather than
......@@ -3619,7 +3616,9 @@ gtk_window_move_resize (GtkWindow *window)
gdk_window_set_geometry_hints (widget->window,
&new_geometry,
new_flags);