r18865 - gnucash/trunk/src - Fix circular dependency between gnome and gnome-utils introduced in r18842

Geert Janssens gjanssens at code.gnucash.org
Sun Mar 7 08:09:37 EST 2010


Author: gjanssens
Date: 2010-03-07 08:09:37 -0500 (Sun, 07 Mar 2010)
New Revision: 18865
Trac: http://svn.gnucash.org/trac/changeset/18865

Added:
   gnucash/trunk/src/gnome-utils/dialog-userpass.c
Removed:
   gnucash/trunk/src/gnome/dialog-userpass.c
Modified:
   gnucash/trunk/src/gnome-utils/Makefile.am
   gnucash/trunk/src/gnome/Makefile.am
Log:
Fix circular dependency between gnome and gnome-utils introduced in r18842

Modified: gnucash/trunk/src/gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome/Makefile.am	2010-03-07 13:06:03 UTC (rev 18864)
+++ gnucash/trunk/src/gnome/Makefile.am	2010-03-07 13:09:37 UTC (rev 18865)
@@ -37,7 +37,6 @@
   dialog-sx-from-trans.c \
   dialog-sx-since-last-run.c \
   dialog-tax-info.c \
-  dialog-userpass.c \
   druid-acct-period.c \
   druid-hierarchy.c \
   druid-merge.c \

Deleted: gnucash/trunk/src/gnome/dialog-userpass.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-userpass.c	2010-03-07 13:06:03 UTC (rev 18864)
+++ gnucash/trunk/src/gnome/dialog-userpass.c	2010-03-07 13:09:37 UTC (rev 18865)
@@ -1,88 +0,0 @@
-/********************************************************************\
- * dialog-userpass.c -- dialog for username/password entry          *
- * Copyright (C) 2001 Gnumatic, Inc.                                *
- * Author: Dave Peticolas <dave at krondo.com>                         *
- *                                                                  *
- * 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 the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
- * Boston, MA  02110-1301,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include <gnome.h>
-
-#include "dialog-utils.h"
-#include "gnc-ui.h"
-
-
-gboolean
-gnc_get_username_password (GtkWidget *parent,
-                           const char *heading,
-                           const char *initial_username,
-                           const char *initial_password,
-                           char **username,
-                           char **password)
-{
-    GtkWidget *dialog;
-    GtkWidget *heading_label;
-    GtkWidget *username_entry;
-    GtkWidget *password_entry;
-    GladeXML *xml;
-    gint result;
-
-    g_return_val_if_fail (username != NULL, FALSE);
-    g_return_val_if_fail (password != NULL, FALSE);
-
-    xml = gnc_glade_xml_new ("userpass.glade", "Username Password Dialog");
-
-    dialog = glade_xml_get_widget (xml, "Username Password Dialog");
-
-    if (parent)
-        gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
-
-    heading_label  = glade_xml_get_widget (xml, "heading_label");
-    username_entry = glade_xml_get_widget (xml, "username_entry");
-    password_entry = glade_xml_get_widget (xml, "password_entry");
-
-    if (heading)
-        gtk_label_set_text (GTK_LABEL (heading_label), heading);
-
-    if (initial_username)
-        gtk_entry_set_text (GTK_ENTRY (username_entry), initial_username);
-    gtk_editable_select_region (GTK_EDITABLE (username_entry), 0, -1);
-
-    if (initial_password)
-        gtk_entry_set_text (GTK_ENTRY (password_entry), initial_password);
-
-    result = gtk_dialog_run(GTK_DIALOG (dialog));
-    gtk_widget_hide(dialog);
-
-    if (result == GTK_RESPONSE_OK)
-    {
-        *username = gtk_editable_get_chars (GTK_EDITABLE (username_entry), 0, -1);
-        *password = gtk_editable_get_chars (GTK_EDITABLE (password_entry), 0, -1);
-
-        gtk_widget_destroy(dialog);
-        return TRUE;
-    }
-
-    *username = NULL;
-    *password = NULL;
-
-    gtk_widget_destroy(dialog);
-    return FALSE;
-}

Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am	2010-03-07 13:06:03 UTC (rev 18864)
+++ gnucash/trunk/src/gnome-utils/Makefile.am	2010-03-07 13:09:37 UTC (rev 18865)
@@ -39,6 +39,7 @@
   dialog-reset-warnings.c \
   dialog-totd.c \
   dialog-transfer.c \
+  dialog-userpass.c \
   dialog-utils.c \
   druid-utils.c \
   druid-gconf-setup.c \

Copied: gnucash/trunk/src/gnome-utils/dialog-userpass.c (from rev 18861, gnucash/trunk/src/gnome/dialog-userpass.c)
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-userpass.c	                        (rev 0)
+++ gnucash/trunk/src/gnome-utils/dialog-userpass.c	2010-03-07 13:09:37 UTC (rev 18865)
@@ -0,0 +1,88 @@
+/********************************************************************\
+ * dialog-userpass.c -- dialog for username/password entry          *
+ * Copyright (C) 2001 Gnumatic, Inc.                                *
+ * Author: Dave Peticolas <dave at krondo.com>                         *
+ *                                                                  *
+ * 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 the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+ * Boston, MA  02110-1301,  USA       gnu at gnu.org                   *
+\********************************************************************/
+
+#include "config.h"
+
+#include <gnome.h>
+
+#include "dialog-utils.h"
+#include "gnc-ui.h"
+
+
+gboolean
+gnc_get_username_password (GtkWidget *parent,
+                           const char *heading,
+                           const char *initial_username,
+                           const char *initial_password,
+                           char **username,
+                           char **password)
+{
+    GtkWidget *dialog;
+    GtkWidget *heading_label;
+    GtkWidget *username_entry;
+    GtkWidget *password_entry;
+    GladeXML *xml;
+    gint result;
+
+    g_return_val_if_fail (username != NULL, FALSE);
+    g_return_val_if_fail (password != NULL, FALSE);
+
+    xml = gnc_glade_xml_new ("userpass.glade", "Username Password Dialog");
+
+    dialog = glade_xml_get_widget (xml, "Username Password Dialog");
+
+    if (parent)
+        gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
+
+    heading_label  = glade_xml_get_widget (xml, "heading_label");
+    username_entry = glade_xml_get_widget (xml, "username_entry");
+    password_entry = glade_xml_get_widget (xml, "password_entry");
+
+    if (heading)
+        gtk_label_set_text (GTK_LABEL (heading_label), heading);
+
+    if (initial_username)
+        gtk_entry_set_text (GTK_ENTRY (username_entry), initial_username);
+    gtk_editable_select_region (GTK_EDITABLE (username_entry), 0, -1);
+
+    if (initial_password)
+        gtk_entry_set_text (GTK_ENTRY (password_entry), initial_password);
+
+    result = gtk_dialog_run(GTK_DIALOG (dialog));
+    gtk_widget_hide(dialog);
+
+    if (result == GTK_RESPONSE_OK)
+    {
+        *username = gtk_editable_get_chars (GTK_EDITABLE (username_entry), 0, -1);
+        *password = gtk_editable_get_chars (GTK_EDITABLE (password_entry), 0, -1);
+
+        gtk_widget_destroy(dialog);
+        return TRUE;
+    }
+
+    *username = NULL;
+    *password = NULL;
+
+    gtk_widget_destroy(dialog);
+    return FALSE;
+}



More information about the gnucash-changes mailing list