Commit e3ac43da authored by Morten Welinder's avatar Morten Welinder

Compilation: don't compile widgets separately.

This makes more code available to introspection and allows more parallel
compilation.
parent fd609b3a
...@@ -1191,7 +1191,6 @@ icons/256x256/Makefile ...@@ -1191,7 +1191,6 @@ icons/256x256/Makefile
icons/256x256/apps/Makefile icons/256x256/apps/Makefile
introspection/Makefile introspection/Makefile
src/Makefile src/Makefile
src/widgets/Makefile
src/tools/Makefile src/tools/Makefile
doc/Makefile doc/Makefile
plugins/Makefile plugins/Makefile
......
...@@ -16,6 +16,8 @@ INTROSPECTION_COMPILER_ARGS = \ ...@@ -16,6 +16,8 @@ INTROSPECTION_COMPILER_ARGS = \
SUBDIRS = tools SUBDIRS = tools
EXTRA_DIST =
lib_LTLIBRARIES = libspreadsheet.la lib_LTLIBRARIES = libspreadsheet.la
bin_PROGRAMS = bin_PROGRAMS =
...@@ -25,7 +27,6 @@ noinst_PROGRAMS = sstest ...@@ -25,7 +27,6 @@ noinst_PROGRAMS = sstest
noinst_HEADERS = dead-kittens.h compilation.h gnm-i18n.h noinst_HEADERS = dead-kittens.h compilation.h gnm-i18n.h
if WITH_GTK if WITH_GTK
SUBDIRS += widgets
bin_PROGRAMS += gnumeric bin_PROGRAMS += gnumeric
endif endif
...@@ -135,7 +136,7 @@ resource_ui_files = \ ...@@ -135,7 +136,7 @@ resource_ui_files = \
wilcoxon-mann-whitney.ui \ wilcoxon-mann-whitney.ui \
workbook-attr.ui workbook-attr.ui
dialog_sources = \ dialogs_sources = \
dialogs/dao-gui-utils.c \ dialogs/dao-gui-utils.c \
dialogs/dialog-about.c \ dialogs/dialog-about.c \
dialogs/dialog-advanced-filter.c \ dialogs/dialog-advanced-filter.c \
...@@ -206,7 +207,7 @@ dialog_sources = \ ...@@ -206,7 +207,7 @@ dialog_sources = \
dialogs/dialog-zoom.c \ dialogs/dialog-zoom.c \
dialogs/dialog-printer-setup.c dialogs/dialog-printer-setup.c
dialog_headers = \ dialogs_headers = \
dialogs/help.h \ dialogs/help.h \
dialogs/dao-gui-utils.h \ dialogs/dao-gui-utils.h \
dialogs/dialog-stf.h \ dialogs/dialog-stf.h \
...@@ -215,6 +216,49 @@ dialog_headers = \ ...@@ -215,6 +216,49 @@ dialog_headers = \
dialogs/dialogs.h \ dialogs/dialogs.h \
dialogs/tool-dialogs.h dialogs/tool-dialogs.h
widgets_sources = \
widgets/gnm-dao.c \
widgets/gnm-fontbutton.c \
widgets/gnm-format-sel.c \
widgets/gnm-notebook.c \
widgets/gnm-radiobutton.c \
widgets/gnm-cell-combo-view.c \
widgets/gnm-filter-combo-view.c \
widgets/gnm-validation-combo-view.c \
widgets/gnm-sheet-sel.c \
widgets/gnm-sheet-slicer-combo-view.c \
widgets/gnm-so-anchor-mode-chooser.c \
widgets/gnm-workbook-sel.c \
widgets/gnumeric-cell-renderer-text.c \
widgets/gnumeric-cell-renderer-expr-entry.c \
widgets/gnumeric-cell-renderer-toggle.c \
widgets/gnumeric-dashed-canvas-line.c \
widgets/gnumeric-expr-entry.c \
widgets/gnumeric-lazy-list.c \
widgets/gnumeric-text-view.c
widgets_headers = \
widgets/gnm-dao.h \
widgets/gnm-fontbutton.h \
widgets/gnm-format-sel.h \
widgets/gnm-notebook.h \
widgets/gnm-radiobutton.h \
widgets/gnm-cell-combo-view.h \
widgets/gnm-cell-combo-view-impl.h \
widgets/gnm-filter-combo-view.h \
widgets/gnm-validation-combo-view.h \
widgets/gnm-sheet-sel.h \
widgets/gnm-sheet-slicer-combo-view.h \
widgets/gnm-so-anchor-mode-chooser.h \
widgets/gnm-workbook-sel.h \
widgets/gnumeric-cell-renderer-text.h \
widgets/gnumeric-cell-renderer-expr-entry.h \
widgets/gnumeric-cell-renderer-toggle.h \
widgets/gnumeric-dashed-canvas-line.h \
widgets/gnumeric-expr-entry.h \
widgets/gnumeric-lazy-list.h \
widgets/gnumeric-text-view.h
# Another hint, see bugs #172211 and #172212: # Another hint, see bugs #172211 and #172212:
non-intermediate: gnm-marshalers.c gnmresources.c non-intermediate: gnm-marshalers.c gnmresources.c
...@@ -383,7 +427,13 @@ libspreadsheet_la_SOURCES = \ ...@@ -383,7 +427,13 @@ libspreadsheet_la_SOURCES = \
workbook.c \ workbook.c \
xml-sax-read.c \ xml-sax-read.c \
xml-sax-write.c \ xml-sax-write.c \
$(dialog_sources) $(dialogs_sources)
if WITH_GTK
libspreadsheet_la_SOURCES += $(widgets_sources)
else
EXTRA_DIST += $(widgets_sources)
endif
nodist_libspreadsheet_la_SOURCES = gnmresources.c gnmresources.h nodist_libspreadsheet_la_SOURCES = gnmresources.c gnmresources.h
...@@ -524,7 +574,8 @@ libspreadsheet_include_HEADERS = \ ...@@ -524,7 +574,8 @@ libspreadsheet_include_HEADERS = \
workbook.h \ workbook.h \
xml-io-version.h \ xml-io-version.h \
xml-sax.h \ xml-sax.h \
$(dialog_headers) $(dialogs_headers) \
$(widgets_headers)
gnumeric_SOURCES = \ gnumeric_SOURCES = \
io-context-gtk.c \ io-context-gtk.c \
...@@ -600,8 +651,7 @@ stamp-local.def: $(libspreadsheet_include_HEADERS) Makefile $(top_srcdir)/tools/ ...@@ -600,8 +651,7 @@ stamp-local.def: $(libspreadsheet_include_HEADERS) Makefile $(top_srcdir)/tools/
endif endif
gnumeric_app_libs = \ gnumeric_app_libs = \
tools/libtools.la \ tools/libtools.la
widgets/libwidgets.la
# Rules for the marshalers code: # Rules for the marshalers code:
...@@ -673,7 +723,7 @@ uninstall-hook: ...@@ -673,7 +723,7 @@ uninstall-hook:
# include conditional files to ensure everything gets distributed no matter # include conditional files to ensure everything gets distributed no matter
# what the build # what the build
EXTRA_DIST = \ EXTRA_DIST += \
gnm.gresource.xml \ gnm.gresource.xml \
pixmaps/line_pattern_dash_dot.png \ pixmaps/line_pattern_dash_dot.png \
pixmaps/line_pattern_dash_dot_dot.png \ pixmaps/line_pattern_dash_dot_dot.png \
...@@ -718,9 +768,7 @@ Gnm_@GNUMERIC_API_VER_@_gir_FILES = \ ...@@ -718,9 +768,7 @@ Gnm_@GNUMERIC_API_VER_@_gir_FILES = \
tools/scenarios.h \ tools/scenarios.h \
tools/gnm-solver.c \ tools/gnm-solver.c \
tools/gnm-solver.h \ tools/gnm-solver.h \
tools/tools.h \ tools/tools.h
widgets/gnumeric-expr-entry.c \
widgets/gnumeric-expr-entry.h
girdir = $(GIRDIR) girdir = $(GIRDIR)
......
Makefile.in
Makefile
.deps .deps
AM_CPPFLAGS = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I.. \
-DGNUMERIC_INTERNAL \
$(GNUMERIC_CFLAGS)
noinst_LTLIBRARIES = libwidgets.la
libwidgets_la_SOURCES = \
gnm-dao.c \
gnm-dao.h \
gnm-fontbutton.c \
gnm-fontbutton.h \
gnm-format-sel.c \
gnm-format-sel.h \
gnm-notebook.c \
gnm-radiobutton.c \
gnm-radiobutton.h \
gnm-cell-combo-view.c \
gnm-cell-combo-view.h \
gnm-cell-combo-view-impl.h \
gnm-filter-combo-view.c \
gnm-filter-combo-view.h \
gnm-validation-combo-view.c \
gnm-validation-combo-view.h \
gnm-sheet-sel.c \
gnm-sheet-sel.h \
gnm-sheet-slicer-combo-view.c \
gnm-sheet-slicer-combo-view.h \
gnm-so-anchor-mode-chooser.c \
gnm-so-anchor-mode-chooser.h \
gnm-workbook-sel.c \
gnm-workbook-sel.h \
gnumeric-cell-renderer-text.c \
gnumeric-cell-renderer-text.h \
gnumeric-cell-renderer-expr-entry.c \
gnumeric-cell-renderer-expr-entry.h \
gnumeric-cell-renderer-toggle.c \
gnumeric-cell-renderer-toggle.h \
gnumeric-dashed-canvas-line.c \
gnumeric-dashed-canvas-line.h \
gnumeric-expr-entry.c \
gnumeric-lazy-list.c \
gnumeric-lazy-list.h \
gnumeric-text-view.c \
gnumeric-text-view.h
libtools_la_includedir = $(includedir)/libspreadsheet-@GNUMERIC_API_VER@/spreadsheet/widgets
libtools_la_include_HEADERS = \
gnm-notebook.h \
gnumeric-expr-entry.h
...@@ -452,7 +452,7 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time) ...@@ -452,7 +452,7 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time)
**/ **/
SheetObjectView * SheetObjectView *
gnm_cell_combo_view_new (SheetObject *so, GType type, gnm_cell_combo_view_new (SheetObject *so, GType type,
SheetObjectViewContainer *container) SheetObjectViewContainer *container)
{ {
GnmPane *pane = GNM_PANE (container); GnmPane *pane = GNM_PANE (container);
GtkWidget *view_widget = gtk_button_new (); GtkWidget *view_widget = gtk_button_new ();
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "gnumeric.h" #include "gnumeric.h"
#include <glib-object.h> #include <glib-object.h>
SheetObjectView *gnm_cell_combo_view_new (SheetObject *so, GType t, SheetObjectView *gnm_cell_combo_view_new (SheetObject *so, GType type,
SheetObjectViewContainer *container); SheetObjectViewContainer *container);
void gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time); void gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time);
......
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /*
/**
* gnm-dao.c: Implements a widget to specify tool output location. * gnm-dao.c: Implements a widget to specify tool output location.
* *
* Copyright (c) 2003 Andreas J. Guelzow <aguelzow@taliesin.ca> * Copyright (c) 2003 Andreas J. Guelzow <aguelzow@taliesin.ca>
......
/** /*
* gnm-dao.h: Implements a widget to specify tool output location. * gnm-dao.h: Implements a widget to specify tool output location.
* *
* Copyright (c) 2003 Andreas J. Guelzow <aguelzow@taliesin.ca> * Copyright (c) 2003 Andreas J. Guelzow <aguelzow@taliesin.ca>
......
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /*
/**
* gnm-format-sel.c: Gnumeric extensions to the format selector widget * gnm-format-sel.c: Gnumeric extensions to the format selector widget
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -54,6 +53,11 @@ cb_generate_preview (GOFormatSel *gfs, PangoAttrList **attrs) ...@@ -54,6 +53,11 @@ cb_generate_preview (GOFormatSel *gfs, PangoAttrList **attrs)
} }
} }
/**
* gnm_format_sel_new:
*
* Returns: (transfer full): a new format selector
*/
GtkWidget * GtkWidget *
gnm_format_sel_new (void) gnm_format_sel_new (void)
{ {
......
/** /*
* gnm-format-sel.h: Some gnumeric specific utilities for the format selector * gnm-format-sel.h: Some gnumeric specific utilities for the format selector
* *
* Copyright (c) 2005 Jody Goldberg <jody@gnome.org> * Copyright (c) 2005 Jody Goldberg <jody@gnome.org>
......
/** /*
* gnm-notebook.c: Implements a button-only notebook. * gnm-notebook.c: Implements a button-only notebook.
* *
* Copyright (c) 2008 Morten Welinder <terra@gnome.org> * Copyright (c) 2008 Morten Welinder <terra@gnome.org>
...@@ -26,6 +26,16 @@ ...@@ -26,6 +26,16 @@
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/**
* gnm_notebook_get_nth_label: (skip)
*/
/**
* gnm_notebook_get_current_label: (skip)
*/
/* ------------------------------------------------------------------------- */
struct GnmNotebookButton_ { struct GnmNotebookButton_ {
/* /*
* We need to derive from GtkLabel mostly for theming reasons, * We need to derive from GtkLabel mostly for theming reasons,
......
/** /*
* gnm-notebook.h: Implements a button-only notebook. * gnm-notebook.h: Implements a button-only notebook.
* *
* Copyright (c) 2008 Morten Welinder <terra@gnome.org> * Copyright (c) 2008 Morten Welinder <terra@gnome.org>
......
/** /*
* gnm-radiobutton.c: Implements a special radiobutton * gnm-radiobutton.c: Implements a special radiobutton
* *
* Copyright (c) 2009 Morten Welinder <terra@gnome.org> * Copyright (c) 2009 Morten Welinder <terra@gnome.org>
...@@ -27,13 +27,18 @@ static void ...@@ -27,13 +27,18 @@ static void
gnm_radiobutton_class_init (GnmRadioButtonClass *class) gnm_radiobutton_class_init (GnmRadioButtonClass *class)
{ {
GtkButtonClass *button_class = GTK_BUTTON_CLASS (class); GtkButtonClass *button_class = GTK_BUTTON_CLASS (class);
GtkWidget *tb = gtk_toggle_button_new ();
button_class->clicked = GTK_BUTTON_GET_CLASS(tb)->clicked; if (gdk_screen_get_default ()) {
GtkWidget *tb = gtk_toggle_button_new ();
g_object_ref_sink (tb); button_class->clicked = GTK_BUTTON_GET_CLASS(tb)->clicked;
gtk_widget_destroy (tb);
g_object_unref (tb); g_object_ref_sink (tb);
gtk_widget_destroy (tb);
g_object_unref (tb);
} else {
// Introspection
}
} }
GSF_CLASS (GnmRadioButton, gnm_radiobutton, GSF_CLASS (GnmRadioButton, gnm_radiobutton,
......
/** /*
* gnm-radiobutton.h: Implements a special radiobutton. * gnm-radiobutton.h: Implements a special radiobutton.
* *
* Copyright (c) 2009 Morten Welinder <terra@gnome.org> * Copyright (c) 2009 Morten Welinder <terra@gnome.org>
......
/** /*
* gnm-sheet-sel.c: A selector for sheets. * gnm-sheet-sel.c: A selector for sheets.
* *
* Copyright (c) 2018 Morten Welinder * Copyright (c) 2018 Morten Welinder
...@@ -43,6 +43,11 @@ enum { ...@@ -43,6 +43,11 @@ enum {
static GOOptionMenuClass *gnm_sheet_sel_parent_class; static GOOptionMenuClass *gnm_sheet_sel_parent_class;
/**
* gnm_sheet_sel_set_sheet:
* @ss: #GnmSheetSel
* @sheet: (transfer none): #Sheet
*/
void void
gnm_sheet_sel_set_sheet (GnmSheetSel *ss, Sheet *sheet) gnm_sheet_sel_set_sheet (GnmSheetSel *ss, Sheet *sheet)
{ {
...@@ -76,6 +81,12 @@ gnm_sheet_sel_set_sheet (GnmSheetSel *ss, Sheet *sheet) ...@@ -76,6 +81,12 @@ gnm_sheet_sel_set_sheet (GnmSheetSel *ss, Sheet *sheet)
g_object_notify (G_OBJECT (ss), "sheet"); g_object_notify (G_OBJECT (ss), "sheet");
} }
/**
* gnm_sheet_sel_get_sheet:
* @ss: #GnmSheetSel
*
* Returns: (transfer none): Selected #Sheet
*/
Sheet * Sheet *
gnm_sheet_sel_get_sheet (GnmSheetSel *ss) gnm_sheet_sel_get_sheet (GnmSheetSel *ss)
{ {
...@@ -158,6 +169,11 @@ gnm_sheet_sel_new (void) ...@@ -158,6 +169,11 @@ gnm_sheet_sel_new (void)
return g_object_new (GNM_TYPE_SHEET_SEL, NULL); return g_object_new (GNM_TYPE_SHEET_SEL, NULL);
} }
/**
* gnm_sheet_sel_set_sheets:
* @ss: #GnmSheetSel
* @sheets: (element-type Sheet) (transfer none): sheets
*/
void void
gnm_sheet_sel_set_sheets (GnmSheetSel *ss, GSList *sheets) gnm_sheet_sel_set_sheets (GnmSheetSel *ss, GSList *sheets)
{ {
......
/** /*
* gnm-sheet-sel.h: A selector for sheets. * gnm-sheet-sel.h: A selector for sheets.
* *
* Copyright (c) 2018 Morten Welinder * Copyright (c) 2018 Morten Welinder
......
/** /*
* gnm-workbook-sel.c: A selector for workbooks. * gnm-workbook-sel.c: A selector for workbooks.
* *
* Copyright (c) 2018 Morten Welinder * Copyright (c) 2018 Morten Welinder
...@@ -42,6 +42,11 @@ enum { ...@@ -42,6 +42,11 @@ enum {
static GOOptionMenuClass *gnm_workbook_sel_parent_class; static GOOptionMenuClass *gnm_workbook_sel_parent_class;
/**
* gnm_workbook_sel_set_workbook:
* @wbs: #GnmWorkbookSel
* @wb: (transfer none): #Workbook
*/
void void
gnm_workbook_sel_set_workbook (GnmWorkbookSel *wbs, Workbook *wb) gnm_workbook_sel_set_workbook (GnmWorkbookSel *wbs, Workbook *wb)
{ {
...@@ -75,6 +80,12 @@ gnm_workbook_sel_set_workbook (GnmWorkbookSel *wbs, Workbook *wb) ...@@ -75,6 +80,12 @@ gnm_workbook_sel_set_workbook (GnmWorkbookSel *wbs, Workbook *wb)
g_object_notify (G_OBJECT (wbs), "workbook"); g_object_notify (G_OBJECT (wbs), "workbook");
} }
/**
* gnm_workbook_sel_get_workbook:
* @wbs: #GnmWorkbookSel
*
* Returns: (transfer none): Selected workbook
*/
Workbook * Workbook *
gnm_workbook_sel_get_workbook (GnmWorkbookSel *wbs) gnm_workbook_sel_get_workbook (GnmWorkbookSel *wbs)
{ {
......
/** /*
* gnm-workbook-sel.h: A selector for workbooks. * gnm-workbook-sel.h: A selector for workbooks.
* *
* Copyright (c) 2018 Morten Welinder * Copyright (c) 2018 Morten Welinder
......
...@@ -252,6 +252,9 @@ gnumeric_lazy_list_get_type (void) ...@@ -252,6 +252,9 @@ gnumeric_lazy_list_get_type (void)
return lazy_list_type; return lazy_list_type;
} }
/**
* gnumeric_lazy_list_new: (skip)
*/
GnumericLazyList * GnumericLazyList *
gnumeric_lazy_list_new (GnumericLazyListValueGetFunc get_value, gnumeric_lazy_list_new (GnumericLazyListValueGetFunc get_value,
gpointer user_data, gpointer user_data,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment