Don't search entire row list twice for element being removed.
* gtk/gtkclist.c (real_remove_row):
Don't search entire row list twice for element being removed.
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
Replaced hand-coded implementation of g_list_insert with
call to g_list_insert.
* gtk/gtktooltips.c
(gtk_tooltips_destroy_data, gtk_tooltips_layout_text):
tooltipsdata->row test not-null test now properly encompasses
both g_list_* calls.
This commit is contained in:
14
ChangeLog
14
ChangeLog
@@ -1,3 +1,17 @@
|
||||
Wed Jan 20 21:52:51 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkclist.c (real_remove_row):
|
||||
Don't search entire row list twice for element being removed.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
|
||||
Replaced hand-coded implementation of g_list_insert with
|
||||
call to g_list_insert.
|
||||
|
||||
* gtk/gtktooltips.c
|
||||
(gtk_tooltips_destroy_data, gtk_tooltips_layout_text):
|
||||
tooltipsdata->row test not-null test now properly encompasses
|
||||
both g_list_* calls.
|
||||
|
||||
Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
Wed Jan 20 21:52:51 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkclist.c (real_remove_row):
|
||||
Don't search entire row list twice for element being removed.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
|
||||
Replaced hand-coded implementation of g_list_insert with
|
||||
call to g_list_insert.
|
||||
|
||||
* gtk/gtktooltips.c
|
||||
(gtk_tooltips_destroy_data, gtk_tooltips_layout_text):
|
||||
tooltipsdata->row test not-null test now properly encompasses
|
||||
both g_list_* calls.
|
||||
|
||||
Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
Wed Jan 20 21:52:51 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkclist.c (real_remove_row):
|
||||
Don't search entire row list twice for element being removed.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
|
||||
Replaced hand-coded implementation of g_list_insert with
|
||||
call to g_list_insert.
|
||||
|
||||
* gtk/gtktooltips.c
|
||||
(gtk_tooltips_destroy_data, gtk_tooltips_layout_text):
|
||||
tooltipsdata->row test not-null test now properly encompasses
|
||||
both g_list_* calls.
|
||||
|
||||
Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
Wed Jan 20 21:52:51 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkclist.c (real_remove_row):
|
||||
Don't search entire row list twice for element being removed.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
|
||||
Replaced hand-coded implementation of g_list_insert with
|
||||
call to g_list_insert.
|
||||
|
||||
* gtk/gtktooltips.c
|
||||
(gtk_tooltips_destroy_data, gtk_tooltips_layout_text):
|
||||
tooltipsdata->row test not-null test now properly encompasses
|
||||
both g_list_* calls.
|
||||
|
||||
Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
Wed Jan 20 21:52:51 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkclist.c (real_remove_row):
|
||||
Don't search entire row list twice for element being removed.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
|
||||
Replaced hand-coded implementation of g_list_insert with
|
||||
call to g_list_insert.
|
||||
|
||||
* gtk/gtktooltips.c
|
||||
(gtk_tooltips_destroy_data, gtk_tooltips_layout_text):
|
||||
tooltipsdata->row test not-null test now properly encompasses
|
||||
both g_list_* calls.
|
||||
|
||||
Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
Wed Jan 20 21:52:51 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkclist.c (real_remove_row):
|
||||
Don't search entire row list twice for element being removed.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
|
||||
Replaced hand-coded implementation of g_list_insert with
|
||||
call to g_list_insert.
|
||||
|
||||
* gtk/gtktooltips.c
|
||||
(gtk_tooltips_destroy_data, gtk_tooltips_layout_text):
|
||||
tooltipsdata->row test not-null test now properly encompasses
|
||||
both g_list_* calls.
|
||||
|
||||
Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
Wed Jan 20 21:52:51 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkclist.c (real_remove_row):
|
||||
Don't search entire row list twice for element being removed.
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
|
||||
Replaced hand-coded implementation of g_list_insert with
|
||||
call to g_list_insert.
|
||||
|
||||
* gtk/gtktooltips.c
|
||||
(gtk_tooltips_destroy_data, gtk_tooltips_layout_text):
|
||||
tooltipsdata->row test not-null test now properly encompasses
|
||||
both g_list_* calls.
|
||||
|
||||
Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
|
||||
|
||||
@@ -2824,6 +2824,7 @@ real_remove_row (GtkCList *clist,
|
||||
|
||||
/* get the row we're going to delete */
|
||||
list = g_list_nth (clist->row_list, row);
|
||||
g_assert (list != NULL);
|
||||
clist_row = list->data;
|
||||
|
||||
/* if we're removing a selected row, we have to make sure
|
||||
@@ -2837,10 +2838,12 @@ real_remove_row (GtkCList *clist,
|
||||
/* reset the row end pointer if we're removing at the
|
||||
* end of the list */
|
||||
clist->rows--;
|
||||
clist->row_list = g_list_remove (clist->row_list, clist_row);
|
||||
if (clist->row_list == list)
|
||||
clist->row_list = g_list_next (list);
|
||||
if (clist->row_list_end == list)
|
||||
clist->row_list_end = g_list_previous (list);
|
||||
g_list_remove (list, clist_row);
|
||||
|
||||
if (row == clist->rows)
|
||||
clist->row_list_end = list->prev;
|
||||
/*if (clist->focus_row >=0 &&
|
||||
(row <= clist->focus_row || clist->focus_row >= clist->rows))
|
||||
clist->focus_row--;*/
|
||||
|
||||
@@ -296,10 +296,6 @@ gtk_menu_shell_insert (GtkMenuShell *menu_shell,
|
||||
GtkWidget *child,
|
||||
gint position)
|
||||
{
|
||||
GList *tmp_list;
|
||||
GList *new_list;
|
||||
gint nchildren;
|
||||
|
||||
g_return_if_fail (menu_shell != NULL);
|
||||
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
|
||||
g_return_if_fail (child != NULL);
|
||||
@@ -318,29 +314,7 @@ gtk_menu_shell_insert (GtkMenuShell *menu_shell,
|
||||
gtk_widget_map (child);
|
||||
}
|
||||
|
||||
nchildren = g_list_length (menu_shell->children);
|
||||
if ((position < 0) || (position > nchildren))
|
||||
position = nchildren;
|
||||
|
||||
if (position == nchildren)
|
||||
{
|
||||
menu_shell->children = g_list_append (menu_shell->children, child);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp_list = g_list_nth (menu_shell->children, position);
|
||||
new_list = g_list_alloc ();
|
||||
new_list->data = child;
|
||||
|
||||
if (tmp_list->prev)
|
||||
tmp_list->prev->next = new_list;
|
||||
new_list->next = tmp_list;
|
||||
new_list->prev = tmp_list->prev;
|
||||
tmp_list->prev = new_list;
|
||||
|
||||
if (tmp_list == menu_shell->children)
|
||||
menu_shell->children = new_list;
|
||||
}
|
||||
menu_shell->children = g_list_insert (menu_shell->children, child, position);
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (menu_shell))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (menu_shell));
|
||||
|
||||
@@ -120,9 +120,10 @@ gtk_tooltips_destroy_data (GtkTooltipsData *tooltipsdata)
|
||||
{
|
||||
g_free (tooltipsdata->tip_text);
|
||||
g_free (tooltipsdata->tip_private);
|
||||
g_list_foreach (tooltipsdata->row, gtk_tooltips_free_string, 0);
|
||||
if (tooltipsdata->row)
|
||||
if (tooltipsdata->row) {
|
||||
g_list_foreach (tooltipsdata->row, gtk_tooltips_free_string, 0);
|
||||
g_list_free (tooltipsdata->row);
|
||||
}
|
||||
gtk_signal_disconnect_by_data (GTK_OBJECT (tooltipsdata->widget),
|
||||
(gpointer) tooltipsdata);
|
||||
gtk_object_remove_data (GTK_OBJECT (tooltipsdata->widget), tooltips_data_key);
|
||||
@@ -200,9 +201,10 @@ gtk_tooltips_layout_text (GtkTooltips *tooltips, GtkTooltipsData *data)
|
||||
if (!tooltips->tip_window)
|
||||
gtk_tooltips_force_window (tooltips);
|
||||
|
||||
g_list_foreach (data->row, gtk_tooltips_free_string, 0);
|
||||
if (data->row)
|
||||
if (data->row) {
|
||||
g_list_foreach (data->row, gtk_tooltips_free_string, 0);
|
||||
g_list_free (data->row);
|
||||
}
|
||||
data->row = 0;
|
||||
data->font = tooltips->tip_window->style->font;
|
||||
data->width = 0;
|
||||
|
||||
Reference in New Issue
Block a user