Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37037908
en ru br
ALT Linux repos
S:3.0.5-alt1.2
D:2.5.2-alt1
5.0: 2.6.5-alt1
4.1: 2.6.4-alt2.M41.1
4.0: 2.5.2-alt2
3.0: 2.2.7-alt1

Other repositories
Upstream:1.4rc5

Group :: Office
RPM: abiword

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: abiword-2.4.0-libgnomedb.patch
Download


--- abiword-2.4.0~/abiword-plugins/tools/gda/unix/AbiGDA.cpp	2005-01-12 19:54:57 +0200
+++ abiword-2.4.0/abiword-plugins/tools/gda/unix/AbiGDA.cpp	2005-11-23 20:18:50 +0200
@@ -51,9 +51,9 @@
 
 #include <gtk/gtk.h>
 #include <libgda/libgda.h>
+#include <libgda/libgda.h>
 #include <libgnomedb/gnome-db-editor.h>
 #include <libgnomedb/gnome-db-login.h>
-#include <libgnomedb/gnome-db-util.h>
 
 static GdaClient * connection_pool = NULL;
 
@@ -63,6 +63,9 @@
 #define X_ReturnNoMemIfError(exp)	UT_return_val_if_fail(exp,UT_IE_NOMEMORY)
 #define X_CheckError(v)			UT_return_if_fail(v != UT_OK)
 
+GtkWidget * gnome_db_new_table_widget (gint rows, gint cols, gboolean homogenous);
+GtkWidget * gnome_db_new_label_widget (const gchar *text);
+
 /**
  * This class' purpose is to take (or generate) a GdaDataModel
  * and turn it into an AbiWord table. If we generate a DataModel
@@ -283,13 +286,18 @@
 	sql = editable_txt;
 	g_free (editable_txt);
 	
-	cnc = gda_client_open_connection (connection_pool, dsn_name.utf8_str(), user_name.utf8_str(), password.utf8_str(), GDA_CONNECTION_OPTIONS_READ_ONLY);
+	cnc = gda_client_open_connection (connection_pool, 
+											dsn_name.utf8_str(),
+											user_name.utf8_str(), 
+											password.utf8_str(), 
+											GDA_CONNECTION_OPTIONS_READ_ONLY, 
+											0);
 	if (!GDA_IS_CONNECTION (cnc))
 		return false;
 	
 	/* execute command */
 	cmd = gda_command_new (sql.utf8_str(), GDA_COMMAND_TYPE_SQL, (GdaCommandOptions)0);
-	recset = gda_connection_execute_single_command (cnc, cmd, NULL);
+	recset = gda_connection_execute_single_command (cnc, cmd, NULL,0);
 	gda_command_free (cmd);
 	
 	if (recset == NULL || !GDA_IS_DATA_MODEL (recset))
@@ -358,6 +366,30 @@
 	return ret;
 }
 
+GtkWidget * 
+gnome_db_new_table_widget (gint rows, gint cols, gboolean homogenous)
+{
+	GtkWidget *table;
+	table = gtk_table_new (rows, cols, homogenous);
+	gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+	gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+	gtk_widget_show (table);
+	return table;
+}
+
+GtkWidget *
+gnome_db_new_label_widget (const gchar *text)
+{
+	GtkWidget *label;
+
+	label = gtk_label_new_with_mnemonic (text);
+	gtk_label_set_selectable (GTK_LABEL (label), TRUE);
+	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+	gtk_widget_show (label);
+
+	return label;
+}
+    
 //
 // GDA_viewDataSources
 // -------------------
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin