2008-08-16 [colin] 3.5.0cvs60

* src/mainwindow.c
	* src/gtk/gtkcmclist.c
	* src/gtk/gtkcmclist.h
	* src/gtk/gtkcmctree.c
	* src/gtk/gtksctree.c
	* src/gtk/gtkutils.c
	* src/gtk/gtkvscrollbutton.c
		Fix Maemo build (OS2007)
This commit is contained in:
Colin Leroy 2008-08-16 17:59:20 +00:00
parent ee05233822
commit 4427165345
10 changed files with 124 additions and 12 deletions

View file

@ -1,3 +1,14 @@
2008-08-16 [colin] 3.5.0cvs60
* src/mainwindow.c
* src/gtk/gtkcmclist.c
* src/gtk/gtkcmclist.h
* src/gtk/gtkcmctree.c
* src/gtk/gtksctree.c
* src/gtk/gtkutils.c
* src/gtk/gtkvscrollbutton.c
Fix Maemo build (OS2007)
2008-08-14 [colin] 3.5.0cvs59
* src/folder.c

View file

@ -3471,3 +3471,4 @@
( cvs diff -u -r 1.395.2.381 -r 1.395.2.382 src/summaryview.c; cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/gtk/gtkcmclist.c; ) > 3.5.0cvs57.patchset
( cvs diff -u -r 1.94.2.183 -r 1.94.2.184 src/messageview.c; cvs diff -u -r 1.19.2.20 -r 1.19.2.21 src/messageview.h; cvs diff -u -r 1.83.2.142 -r 1.83.2.143 src/mimeview.c; ) > 3.5.0cvs58.patchset
( cvs diff -u -r 1.213.2.184 -r 1.213.2.185 src/folder.c; cvs diff -u -r 1.5.2.53 -r 1.5.2.54 src/gtk/pluginwindow.c; ) > 3.5.0cvs59.patchset
( cvs diff -u -r 1.274.2.266 -r 1.274.2.267 src/mainwindow.c; cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/gtk/gtkcmclist.c; cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/gtk/gtkcmclist.h; cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/gtk/gtkcmctree.c; cvs diff -u -r 1.1.4.48 -r 1.1.4.49 src/gtk/gtksctree.c; cvs diff -u -r 1.5.2.81 -r 1.5.2.82 src/gtk/gtkutils.c; cvs diff -u -r 1.5.2.14 -r 1.5.2.15 src/gtk/gtkvscrollbutton.c; ) > 3.5.0cvs60.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=5
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=59
EXTRA_VERSION=60
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -38,6 +38,9 @@
/* length of button_actions array */
#define MAX_BUTTON 5
/* the number rows memchunk expands at a time */
#define CMCLIST_OPTIMUM_SIZE 64
/* the width of the column resize windows */
#define DRAG_WIDTH 6
@ -1054,6 +1057,12 @@ gtk_cmclist_init (GtkCMCList *clist)
GTK_CMCLIST_SET_FLAG (clist, CMCLIST_DRAW_DRAG_LINE);
GTK_CMCLIST_SET_FLAG (clist, CMCLIST_USE_DRAG_ICONS);
#if !GLIB_CHECK_VERSION(2,10,0)
clist->row_mem_chunk = NULL;
clist->cell_mem_chunk = NULL;
#endif
clist->freeze_count = 0;
clist->rows = 0;
@ -1129,6 +1138,22 @@ gtk_cmclist_constructor (GType type,
construct_properties);
GtkCMCList *clist = GTK_CMCLIST (object);
#if !GLIB_CHECK_VERSION(2,10,0)
if (!clist->row_mem_chunk)
clist->row_mem_chunk = g_mem_chunk_new ("clist row mem chunk",
sizeof (GtkCMCListRow),
sizeof (GtkCMCListRow) *
CMCLIST_OPTIMUM_SIZE,
G_ALLOC_AND_FREE);
if (!clist->cell_mem_chunk)
clist->cell_mem_chunk = g_mem_chunk_new ("clist cell mem chunk",
sizeof (GtkCMCell) * clist->columns,
sizeof (GtkCMCell) * clist->columns *
CMCLIST_OPTIMUM_SIZE,
G_ALLOC_AND_FREE);
#endif
/* allocate memory for columns */
clist->column = columns_new (clist);
@ -1209,8 +1234,12 @@ gtk_cmclist_set_hadjustment (GtkCMCList *clist,
if (clist->hadjustment)
{
#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink (clist->hadjustment);
#else
gtk_object_ref (GTK_OBJECT (clist->hadjustment));
gtk_object_sink (GTK_OBJECT (clist->hadjustment));
#endif
g_signal_connect (G_OBJECT (clist->hadjustment), "changed",
G_CALLBACK( hadjustment_changed),
(gpointer) clist);
@ -1257,7 +1286,12 @@ gtk_cmclist_set_vadjustment (GtkCMCList *clist,
if (clist->vadjustment)
{
#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink (clist->vadjustment);
#else
gtk_object_ref (GTK_OBJECT (clist->vadjustment));
gtk_object_sink (GTK_OBJECT (clist->vadjustment));
#endif
g_signal_connect (GTK_OBJECT (clist->vadjustment), "changed",
G_CALLBACK(vadjustment_changed),
@ -4462,6 +4496,10 @@ gtk_cmclist_finalize (GObject *object)
columns_delete (clist);
#if !GLIB_CHECK_VERSION(2,10,0)
g_mem_chunk_destroy (clist->cell_mem_chunk);
g_mem_chunk_destroy (clist->row_mem_chunk);
#endif
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -6405,8 +6443,13 @@ row_new (GtkCMCList *clist)
int i;
GtkCMCListRow *clist_row;
#if GLIB_CHECK_VERSION(2,10,0)
clist_row = g_slice_new (GtkCMCListRow);
clist_row->cell = g_slice_alloc (sizeof (GtkCMCell) * clist->columns);
#else
clist_row = g_chunk_new (GtkCMCListRow, (GMemChunk *)clist->row_mem_chunk);
clist_row->cell = g_chunk_new (GtkCMCell, (GMemChunk *)clist->cell_mem_chunk);
#endif
for (i = 0; i < clist->columns; i++)
{
@ -6455,8 +6498,13 @@ row_delete (GtkCMCList *clist,
if (clist_row->destroy)
clist_row->destroy (clist_row->data);
#if GLIB_CHECK_VERSION(2,10,0)
g_slice_free1 (sizeof (GtkCMCell) * clist->columns, clist_row->cell);
g_slice_free (GtkCMCListRow, clist_row);
#else
g_mem_chunk_free ((GMemChunk *)clist->cell_mem_chunk, clist_row->cell);
g_mem_chunk_free ((GMemChunk *)clist->row_mem_chunk, clist_row);
#endif
}
/* FOCUS FUNCTIONS

View file

@ -149,9 +149,13 @@ struct _GtkCMCList
guint16 flags;
#if !GLIB_CHECK_VERSION(2,10,0)
GMemChunk *row_mem_chunk;
GMemChunk *cell_mem_chunk;
#else
gpointer reserved1;
gpointer reserved2;
#endif
guint freeze_count;
/* allocation rectangle after the conatiner_border_width

View file

@ -62,7 +62,11 @@ gtk_cmctree_pos_get_type (void)
{ GTK_CMCTREE_POS_AFTER, "GTK_CMCTREE_POS_AFTER", "after" },
{ 0, NULL, NULL }
};
#if GTK_CHECK_VERSION(2,10,0)
etype = g_enum_register_static (g_intern_static_string ("GtkCMCTreePos"), values);
#else
etype = g_enum_register_static ("GtkCMCTreePos", values);
#endif
}
return etype;
}
@ -78,7 +82,11 @@ gtk_cmctree_line_style_get_type (void)
{ GTK_CMCTREE_LINES_TABBED, "GTK_CMCTREE_LINES_TABBED", "tabbed" },
{ 0, NULL, NULL }
};
#if GTK_CHECK_VERSION(2,10,0)
etype = g_enum_register_static (g_intern_static_string ("GtkCMCTreeLineStyle"), values);
#else
etype = g_enum_register_static ("GtkCMCTreeLineStyle", values);
#endif
}
return etype;
}
@ -94,7 +102,11 @@ gtk_cmctree_expander_style_get_type (void)
{ GTK_CMCTREE_EXPANDER_CIRCULAR, "GTK_CMCTREE_EXPANDER_CIRCULAR", "circular" },
{ 0, NULL, NULL }
};
#if GTK_CHECK_VERSION(2,10,0)
etype = g_enum_register_static (g_intern_static_string ("GtkCMCTreeExpanderStyle"), values);
#else
etype = g_enum_register_static ("GtkCMCTreeExpanderStyle", values);
#endif
}
return etype;
}
@ -112,7 +124,11 @@ gtk_cmctree_expansion_type_get_type (void)
{ GTK_CMCTREE_EXPANSION_TOGGLE_RECURSIVE, "GTK_CMCTREE_EXPANSION_TOGGLE_RECURSIVE", "toggle-recursive" },
{ 0, NULL, NULL }
};
#if GTK_CHECK_VERSION(2,10,0)
etype = g_enum_register_static (g_intern_static_string ("GtkCMCTreeExpansionType"), values);
#else
etype = g_enum_register_static ("GtkCMCTreeExpansionType", values);
#endif
}
return etype;
}
@ -3288,8 +3304,13 @@ row_new (GtkCMCTree *ctree)
int i;
clist = GTK_CMCLIST (ctree);
#if GLIB_CHECK_VERSION(2,10,0)
ctree_row = g_slice_new (GtkCMCTreeRow);
ctree_row->row.cell = g_slice_alloc (sizeof (GtkCMCell) * clist->columns);
#else
ctree_row = g_chunk_new (GtkCMCTreeRow, (GMemChunk *)clist->row_mem_chunk);
ctree_row->row.cell = g_chunk_new (GtkCMCell, (GMemChunk *)clist->cell_mem_chunk);
#endif
for (i = 0; i < clist->columns; i++)
{
@ -3375,8 +3396,13 @@ row_delete (GtkCMCTree *ctree,
dnotify (ddata);
}
#if GLIB_CHECK_VERSION(2,10,0)
g_slice_free1 (sizeof (GtkCMCell) * clist->columns, ctree_row->row.cell);
g_slice_free (GtkCMCTreeRow, ctree_row);
g_slice_free (GtkCMCListRow, ctree_row);
#else
g_mem_chunk_free ((GMemChunk *)clist->cell_mem_chunk, ctree_row->row.cell);
g_mem_chunk_free ((GMemChunk *)clist->row_mem_chunk, ctree_row);
#endif
}
static void

View file

@ -2705,7 +2705,7 @@ srow_new (GtkCMCTree *ctree)
int i;
clist = GTK_CMCLIST (ctree);
#if GTK_CHECK_VERSION(2,9,0)
#if GLIB_CHECK_VERSION(2,10,0)
ctree_row = g_slice_new (GtkCMCTreeRow);
ctree_row->row.cell = g_slice_alloc (sizeof (GtkCMCell) * clist->columns);
#else
@ -2796,7 +2796,7 @@ srow_delete (GtkCMCTree *ctree,
dnotify (ddata);
}
#if GTK_CHECK_VERSION(2,9,0)
#if GLIB_CHECK_VERSION(2,10,0)
g_slice_free1 (sizeof (GtkCMCell) * clist->columns, ctree_row->row.cell);
g_slice_free (GtkCMCTreeRow, ctree_row);
#else

View file

@ -676,19 +676,34 @@ void gtkut_widget_init(void)
clist = gtk_cmclist_new(1);
g_object_ref(GTK_OBJECT(clist));
g_object_ref_sink(GTK_OBJECT(clist));
#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink (GTK_OBJECT(clist));
#else
gtk_object_ref (GTK_OBJECT(clist));
gtk_object_sink (GTK_OBJECT(clist));
#endif
gtkut_clist_bindings_add(clist);
g_object_unref(GTK_OBJECT(clist));
clist = gtk_cmctree_new(1, 0);
g_object_ref(GTK_OBJECT(clist));
g_object_ref_sink(GTK_OBJECT(clist));
#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink (GTK_OBJECT(clist));
#else
gtk_object_ref (GTK_OBJECT(clist));
gtk_object_sink (GTK_OBJECT(clist));
#endif
gtkut_clist_bindings_add(clist);
g_object_unref(GTK_OBJECT(clist));
clist = gtk_sctree_new_with_titles(1, 0, NULL);
g_object_ref(GTK_OBJECT(clist));
g_object_ref_sink(GTK_OBJECT(clist));
#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink (GTK_OBJECT(clist));
#else
gtk_object_ref (GTK_OBJECT(clist));
gtk_object_sink (GTK_OBJECT(clist));
#endif
gtkut_clist_bindings_add(clist);
g_object_unref(GTK_OBJECT(clist));
}

View file

@ -248,7 +248,12 @@ void gtk_vscrollbutton_set_adjustment(GtkVScrollbutton *scrollbutton,
scrollbutton->adjustment = adjustment;
g_object_ref(G_OBJECT(adjustment));
g_object_ref_sink(GTK_OBJECT(adjustment));
#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink (G_OBJECT(adjustment));
#else
gtk_object_ref (GTK_OBJECT (adjustment));
gtk_object_sink (GTK_OBJECT (adjustment));
#endif
}
}

View file

@ -742,7 +742,7 @@ static GtkRadioActionEntry mainwin_showhide_radio_entries[] = { /* toggle_toolba
{"View/ShowHide/Toolbar/Hide", NULL, N_("_Hide"), NULL, NULL, TOOLBAR_NONE }, /* radio TOOLBAR_NONE */
#endif
};
#ifndef GENERIC_UMPC
static GtkRadioActionEntry mainwin_layout_radio_entries[] = { /* set_layout_cb */
{"View/Layout/Standard", NULL, N_("_Standard"), NULL, NULL, NORMAL_LAYOUT }, /* radio NORMAL_LAYOUT */
{"View/Layout/ThreeColumns", NULL, N_("_Three columns"), NULL, NULL, VERTICAL_LAYOUT }, /* radio VERTICAL_LAYOUT */
@ -750,7 +750,7 @@ static GtkRadioActionEntry mainwin_layout_radio_entries[] = { /* set_layout_cb *
{"View/Layout/WideMessageList", NULL, N_("W_ide message list"), NULL, NULL, WIDE_MSGLIST_LAYOUT }, /* radio WIDE_MSGLIST_LAYOUT */
{"View/Layout/SmallScreen", NULL, N_("S_mall screen"), NULL, NULL, SMALL_LAYOUT }, /* radio SMALL_LAYOUT */
};
#endif
static GtkRadioActionEntry mainwin_sort_radio_entries[] = { /* sort_summary_cb */
{"View/Sort/Number", NULL, N_("by _Number"), NULL, NULL, SORT_BY_NUMBER }, /* radio SORT_BY_NUMBER */
{"View/Sort/Size", NULL, N_("by S_ize"), NULL, NULL, SORT_BY_SIZE }, /* radio SORT_BY_SIZE */
@ -1523,8 +1523,10 @@ MainWindow *main_window_create()
G_N_ELEMENTS(mainwin_toggle_entries), (gpointer)mainwin);
gtk_action_group_add_radio_actions(mainwin->action_group, mainwin_showhide_radio_entries,
G_N_ELEMENTS(mainwin_showhide_radio_entries), C_AUTO, G_CALLBACK(toggle_toolbar_cb), (gpointer)mainwin);
#ifndef GENERIC_UMPC
gtk_action_group_add_radio_actions(mainwin->action_group, mainwin_layout_radio_entries,
G_N_ELEMENTS(mainwin_layout_radio_entries), C_AUTO, G_CALLBACK(set_layout_cb), (gpointer)mainwin);
#endif
gtk_action_group_add_radio_actions(mainwin->action_group, mainwin_sort_radio_entries,
G_N_ELEMENTS(mainwin_sort_radio_entries), C_AUTO, G_CALLBACK(sort_summary_cb), (gpointer)mainwin);
gtk_action_group_add_radio_actions(mainwin->action_group, mainwin_sorttype_radio_entries,