AM_GLIB_GNU_GETTEXT
# Checks for libraries.
-PKG_CHECK_MODULES(GDAEXGRID, [libgdaex >= 0.5.0])
+PKG_CHECK_MODULES(GDAEXGRID, [libgdaex >= 0.5.0
+ libzakutilsgtk])
AC_SUBST(GDAEXGRID_CFLAGS)
AC_SUBST(GDAEXGRID_LIBS)
AC_SUBST(REPTOOL_LIBS)
fi
-PKG_CHECK_EXISTS(libsolipa >= 0.4.0, [LIBSOLIPA_FOUND=yes], [LIBSOLIPA_FOUND=no])
-
-AM_CONDITIONAL(LIBSOLIPA_FOUND, test $LIBSOLIPA_FOUND = yes)
-
-if test $LIBSOLIPA_FOUND = yes; then
-PKG_CHECK_MODULES(SOLIPA, libsolipa >= 0.4.0)
-
-AC_SUBST(SOLIPA_CFLAGS)
-AC_SUBST(SOLIPA_LIBS)
-fi
-
# Checks for header files.
AC_HEADER_STDC
Name: @PACKAGE_NAME@
Description: A grid (Gtk)widget based on libgda.
Version: @PACKAGE_VERSION@
-Requires: libgdaex >= 0.5.0
-Libs: -L${libdir} -lgdaexgrid
+Requires: libgdaex >= 0.5.0 libzakutilsgtk
+Libs: -L${libdir} -lgdaexgrid -lzakutilsgtk
Cflags: -I${includedir}
$(REPTOOL_LIBS)
endif
-if LIBSOLIPA_FOUND
-AM_CPPFLAGS += \
- $(SOLIPA_CFLAGS) \
- -DSOLIPA_FOUND=1
-
-LIBS += \
- $(SOLIPA_LIBS)
-endif
-
lib_LTLIBRARIES = libgdaexgrid.la
libgdaexgrid_la_SOURCES = grid.c \
#include <windows.h>
#endif
-#if defined (REPTOOL_FOUND) || defined (SOLIPA_FOUND)
- #include <gdk/gdk.h>
-#endif
+#include <gdk/gdk.h>
#ifdef REPTOOL_FOUND
#include <libreptool/libreptool.h>
GValue *value,
GParamSpec *pspec);
-#if defined (REPTOOL_FOUND) || defined (SOLIPA_FOUND)
static gboolean gdaex_grid_on_key_release_event (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data);
-#endif
#ifdef REPTOOL_FOUND
static void gdaex_grid_on_print_menu_activate (GtkMenuItem *menuitem,
gpointer user_data);
#endif
-#ifdef SOLIPA_FOUND
static void gdaex_grid_on_export_menu_activate (GtkMenuItem *menuitem,
gpointer user_data);
-#endif
static gboolean gdaex_grid_on_button_press_event (GtkWidget *widget,
GdkEventButton *event,
GtkWidget *menu;
GtkTreeSelection *selection;
-#ifdef SOLIPA_FOUND
- Solipa *solipa;
-#endif
-
gchar *app_textdomain;
};
return gdaex_grid_fill_from_sqlbuilder_with_missing_func (grid, gdaex, builder, NULL, NULL, error);
}
-#ifdef SOLIPA_FOUND
-/**
- * gdaex_grid_set_solipa:
- * @grid: a #GdaExGrid object.
- * @solipa: a #Solipa object.
- *
- * Sets the #Solipa object.
- */
-void
-gdaex_grid_set_solipa (GdaExGrid *grid, Solipa *solipa)
-{
- GdaExGridPrivate *priv;
-
- g_return_if_fail (GDAEX_IS_GRID (grid));
-
- priv = GDAEX_GRID_GET_PRIVATE (grid);
-
- priv->solipa = solipa;
-}
-#endif
-
/* PRIVATE */
static void
gdaex_grid_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
"activate", G_CALLBACK (gdaex_grid_on_print_menu_activate), (gpointer)grid);
#endif
-#ifdef SOLIPA_FOUND
mitem = gtk_menu_item_new_with_mnemonic (_("_Export..."));
gtk_menu_shell_append (GTK_MENU_SHELL (priv->menu), mitem);
gtk_widget_show (mitem);
g_signal_connect (mitem,
"activate", G_CALLBACK (gdaex_grid_on_export_menu_activate), (gpointer)grid);
-#endif
}
#ifdef REPTOOL_FOUND
return GTK_TREE_VIEW (priv->view);
}
-#if defined (REPTOOL_FOUND) || defined (SOLIPA_FOUND)
static gboolean
gdaex_grid_on_key_release_event (GtkWidget *widget,
GdkEventKey *event,
}
#endif
-#ifdef SOLIPA_FOUND
case GDK_KEY_F11:
{
if (event->state & GDK_CONTROL_MASK)
}
break;
}
-#endif
default:
break;
return FALSE;
}
-#endif
#ifdef REPTOOL_FOUND
static void
}
#endif
-#ifdef SOLIPA_FOUND
static void
gdaex_grid_on_export_menu_activate (GtkMenuItem *menuitem,
gpointer user_data)
priv = GDAEX_GRID_GET_PRIVATE (user_data);
- if (!IS_SOLIPA (priv->solipa))
- {
- g_warning ("No Solipa object found");
- return;
- }
-
if (priv->columns->len)
{
gstr = g_string_new ("");
gchar **columns_title = g_strsplit (gstr->str + 1, "|", -1);
- solipa_gtktreemodel_to_csv_gui (priv->solipa, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (priv->view))), priv->model,
- columns_title, g_strv_length (columns_title));
+ zak_utils_gtk_treemodel_to_csv_gui (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (priv->view))), priv->model,
+ columns_title, g_strv_length (columns_title));
g_strfreev (columns_title);
return;
}
}
-#endif
static gboolean
gdaex_grid_on_button_press_event (GtkWidget *widget,
/*
* grid.h
*
- * Copyright (C) 2010-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2019 Andrea Zagli <azagli@libero.it>
*
* This file is part of libgdaexgrid.
*
#include <glib.h>
#include <glib-object.h>
-#ifdef SOLIPA_FOUND
- #include <libsolipa/libsolipa.h>
-#endif
+#include <libzakutilsgtk/libzakutilsgtk.h>
#include <libgdaex/libgdaex.h>
#include "gridcolumn.h"
typedef void (*GdaExGridFillListStoreMissingFunc) (GtkTreeStore *tstore, GtkTreeIter *iter, gpointer user_data);
gboolean gdaex_grid_fill_from_sql_with_missing_func_with_sel (GdaExGrid *grid,
- GdaEx *gdaex,
- const gchar *sql,
- GdaExGridFillListStoreMissingFunc missing_func, gpointer user_data,
- GHashTable *ht_sel,
- GError **error);
+ GdaEx *gdaex,
+ const gchar *sql,
+ GdaExGridFillListStoreMissingFunc missing_func, gpointer user_data,
+ GHashTable *ht_sel,
+ GError **error);
gboolean gdaex_grid_fill_from_datamodel_with_missing_func_with_sel (GdaExGrid *grid,
- GdaDataModel *dm,
- GdaExGridFillListStoreMissingFunc missing_func, gpointer user_data,
- GHashTable *ht_sel,
- GError **error);
+ GdaDataModel *dm,
+ GdaExGridFillListStoreMissingFunc missing_func, gpointer user_data,
+ GHashTable *ht_sel,
+ GError **error);
gboolean gdaex_grid_fill_from_sqlbuilder_with_missing_func_with_sel (GdaExGrid *grid,
- GdaEx *gdaex,
- GdaExSqlBuilder *sqlbuilder,
- GdaExGridFillListStoreMissingFunc missing_func, gpointer user_data,
- GHashTable *ht_sel,
- GError **error);
+ GdaEx *gdaex,
+ GdaExSqlBuilder *sqlbuilder,
+ GdaExGridFillListStoreMissingFunc missing_func, gpointer user_data,
+ GHashTable *ht_sel,
+ GError **error);
gboolean gdaex_grid_fill_from_sql_with_missing_func (GdaExGrid *grid,
GdaEx *gdaex,
gboolean gdaex_grid_fill_from_datamodel (GdaExGrid *grid, GdaDataModel *dm, GError **error);
gboolean gdaex_grid_fill_from_sqlbuilder (GdaExGrid *grid, GdaEx *gdaex, GdaExSqlBuilder *builder, GError **error);
-#ifdef SOLIPA_FOUND
-void gdaex_grid_set_solipa (GdaExGrid *grid, Solipa *solipa);
-#endif
-
G_END_DECLS
-I$(top_srcdir)/src \
-DTESTSDIR="\"@abs_builddir@\""
-if LIBSOLIPA_FOUND
-AM_CPPFLAGS += \
- $(SOLIPA_CFLAGS) \
- -DSOLIPA_FOUND=1
-
-LIBS += \
- $(SOLIPA_LIBS)
-endif
-
if LIBREPTOOL_FOUND
AM_CPPFLAGS += \
$(REPTOOL_CFLAGS)
/*
- * Copyright (C) 2011-2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2011-2019 Andrea Zagli <azagli@libero.it>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
grid = gdaex_grid_new ();
gdaex_grid_set_title (grid, "The grid title");
-#ifdef SOLIPA_FOUND
- gdaex_grid_set_solipa (grid, solipa_new ());
-#endif
-
gcol = gdaex_grid_column_new ("ID", "id", G_TYPE_INT, TRUE, FALSE, FALSE, FALSE, -1);
gdaex_grid_add_column (grid, gcol);
/*
- * Copyright (C) 2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2016-2019 Andrea Zagli <azagli@libero.it>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
grid = gdaex_grid_new ();
gdaex_grid_set_title (grid, "The grid title");
-#ifdef SOLIPA_FOUND
- gdaex_grid_set_solipa (grid, solipa_new ());
-#endif
-
gcol = gdaex_grid_column_new ("ID", "id", G_TYPE_INT, TRUE, FALSE, FALSE, FALSE, -1);
gdaex_grid_add_column (grid, gcol);