[Gnucash-changes] 2004-05-30 Joshua Sled <jsled@asynchronous.org> *
Joshua Sled
jsled at cvs.gnucash.org
Sun May 30 16:46:35 EDT 2004
Log Message:
-----------
2004-05-30 Joshua Sled <jsled at asynchronous.org>
* src/gnome-utils/gnc-mdi-utils.c (gnc_mdi_show_progress): Proxy
progress-display call through to gnc-window code.
(gnc_ui_get_toplevel): Re-implement gnc_ui_get_toplevel in a
less-correct but valid way.
* src/report/report-gnome/gnc-plugin-page-report.c
(gnc_plugin_page_report_create_widget): Set the top-level window
so progress-render calls work during report render-time.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash:
ChangeLog
GNOME2_STATUS
gnucash/src/gnome:
gnc-main-window.h
gnc-window.c
gnucash/src/gnome-utils:
Makefile.am
gnc-mdi-utils.c
gnucash/src/report/report-gnome:
gnc-plugin-page-report.c
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.128
retrieving revision 1.1487.2.129
diff -LChangeLog -LChangeLog -u -r1.1487.2.128 -r1.1487.2.129
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,13 @@
+2004-05-30 Joshua Sled <jsled at asynchronous.org>
+
+ * src/gnome-utils/gnc-mdi-utils.c (gnc_mdi_show_progress): Proxy
+ progress-display call through to gnc-window code.
+ (gnc_ui_get_toplevel): Re-implement gnc_ui_get_toplevel in a
+ less-correct but valid way.
+ * src/report/report-gnome/gnc-plugin-page-report.c
+ (gnc_plugin_page_report_create_widget): Set the top-level window
+ so progress-render calls work during report render-time.
+
2004-05-24 Derek Atkins <derek at ihtfp.com>
* src/gnome/dialog-new-user.c:
Index: GNOME2_STATUS
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/Attic/GNOME2_STATUS,v
retrieving revision 1.1.2.20
retrieving revision 1.1.2.21
diff -LGNOME2_STATUS -LGNOME2_STATUS -u -r1.1.2.20 -r1.1.2.21
--- GNOME2_STATUS
+++ GNOME2_STATUS
@@ -120,6 +120,8 @@
- Save/restore in unknown state; believed to crash on re-start.
+ - Clicking on links in html pane causes crash.
+
IMPORTING
HBCI - Needs new http support. [gnet]
Index: gnc-main-window.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-main-window.h,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -Lsrc/gnome/gnc-main-window.h -Lsrc/gnome/gnc-main-window.h -u -r1.1.2.9 -r1.1.2.10
--- src/gnome/gnc-main-window.h
+++ src/gnome/gnc-main-window.h
@@ -26,7 +26,7 @@
#ifndef __GNC_MAIN_WINDOW_H
#define __GNC_MAIN_WINDOW_H
-#include <gtk/gtkwindow.h>
+#include <gtk/gtk.h>
#include "egg-menu-merge.h"
Index: gnc-window.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-window.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/gnome/gnc-window.c -Lsrc/gnome/gnc-window.c -u -r1.1.2.2 -r1.1.2.3
--- src/gnome/gnc-window.c
+++ src/gnome/gnc-window.c
@@ -26,10 +26,12 @@
#include <gtk/gtk.h>
+#include "gnc-trace.h"
#include "gnc-file.h"
#include "gnc-plugin-page.h"
#include "gnc-window.h"
+static short module = MOD_TEST;
GType
gnc_window_get_type (void)
@@ -148,12 +150,16 @@
GtkWidget *progressbar;
window = progress_bar_hack_window;
- if (window == NULL)
+ if (window == NULL) {
+ DEBUG( "no [progress_bar_hack]window" );
return;
+ }
progressbar = gnc_window_get_progressbar (window);
- if (progressbar == NULL)
+ if (progressbar == NULL) {
+ DEBUG( "no progressbar in hack-window" );
return;
+ }
if (percentage < 0) {
gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progressbar), NULL);
Index: gnc-mdi-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-mdi-utils.c,v
retrieving revision 1.18.4.10
retrieving revision 1.18.4.11
diff -Lsrc/gnome-utils/gnc-mdi-utils.c -Lsrc/gnome-utils/gnc-mdi-utils.c -u -r1.18.4.10 -r1.18.4.11
--- src/gnome-utils/gnc-mdi-utils.c
+++ src/gnome-utils/gnc-mdi-utils.c
@@ -36,6 +36,7 @@
#include "gnc-session.h"
#include "gnc-ui-util.h"
#include "gnc-ui.h"
+#include "gnc-window.h"
#define GNC_MDI_CM_CLASS "gnc-mdi"
@@ -65,38 +66,15 @@
gncUIWidget
gnc_ui_get_toplevel (void)
{
-#if 0
- GList *containers = gtk_window_list_toplevels ();
- GList *containerstop = containers;
+ GtkWidget *toRet;
- GnomeApp *app = NULL;
-
- for (; containers; containers = containers->next)
- {
- GtkWidget *w = containers->data;
- GNCMDIInfo *gnc_mdi;
-
- if (!GNOME_IS_APP (w))
- continue;
-
- app = GNOME_APP (w);
-
- gnc_mdi = g_object_get_data (G_OBJECT (w), "gnc_mdi");
- if (!gnc_mdi)
- continue;
-
- app = gnome_mdi_get_active_window (gnc_mdi->mdi);
-
- break;
- }
- g_list_free (containerstop);
-
- if (app)
- return GTK_WIDGET (app);
-
-#endif // 0
-
- return NULL;
+ GList *containers = gtk_window_list_toplevels();
+ if ( g_list_length( containers ) == 0 )
+ return NULL;
+ // otherwise, return the first one...
+ toRet = GTK_WIDGET(containers->data);
+ g_list_free( containers );
+ return toRet;
}
gboolean
@@ -138,7 +116,7 @@
void
gnc_mdi_show_progress (const char *message, double percentage)
{
- PERR( "FIXME: show progress." );
+ gnc_window_show_progress( message, percentage );
}
typedef struct {
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Makefile.am,v
retrieving revision 1.48.2.19
retrieving revision 1.48.2.20
diff -Lsrc/gnome-utils/Makefile.am -Lsrc/gnome-utils/Makefile.am -u -r1.48.2.19 -r1.48.2.20
--- src/gnome-utils/Makefile.am
+++ src/gnome-utils/Makefile.am
@@ -9,6 +9,7 @@
-DDATADIR=\"${GNC_SHAREDIR}\" \
-DLIBDIR=\"${GNC_LIBDIR}\" \
-I${top_srcdir}/src/gnc-module \
+ -I${top_srcdir}/src/gnome \
-I${top_srcdir}/src/engine \
-I${top_srcdir}/src/backend/file \
-I${top_srcdir}/src/network-utils \
Index: gnc-plugin-page-report.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/Attic/gnc-plugin-page-report.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Lsrc/report/report-gnome/gnc-plugin-page-report.c -Lsrc/report/report-gnome/gnc-plugin-page-report.c -u -r1.1.2.3 -r1.1.2.4
--- src/report/report-gnome/gnc-plugin-page-report.c
+++ src/report/report-gnome/gnc-plugin-page-report.c
@@ -32,16 +32,17 @@
#include <g-wrap-wct.h>
#include <libguile.h>
-#include "gnc-component-manager.h"
#include "egg-menu-merge.h"
-#include "gnc-plugin-page-report.h"
-#include "messages.h"
-#include "gnc-html.h"
+#include "gnc-component-manager.h"
+#include "gnc-engine-util.h"
#include "gnc-html-history.h"
+#include "gnc-html.h"
+#include "gnc-plugin-page-report.h"
#include "gnc-report.h"
-#include "gnc-ui.h"
#include "gnc-ui-util.h"
-#include "gnc-engine-util.h"
+#include "gnc-ui.h"
+#include "gnc-window.h"
+#include "messages.h"
#include "option-util.h"
#define WINDOW_REPORT_CM_CLASS "window-report"
@@ -62,8 +63,6 @@
static void gnc_plugin_page_report_finalize (GObject *object);
static void gnc_plugin_page_report_setup( GncPluginPage *ppage );
-//static void gnc_plugin_page_report_set_report_id( GncPluginPageReport *page, int reportId );
-
static GtkWidget* gnc_plugin_page_report_create_widget( GncPluginPage *plugin_page );
static void gnc_plugin_page_report_destroy_widget( GncPluginPage *plugin_page );
static void gnc_plugin_page_report_merge_actions( GncPluginPage *plugin_page, EggMenuMerge *merge );
@@ -296,7 +295,10 @@
type = gnc_html_parse_url( report->html, child_name, &url_location, &url_label);
DEBUG( "passing id_name=[%s] child_name=[%s] type=[%s], location=[%s], label=[%s]",
id_name, child_name, type, url_location, url_label );
+
+ gnc_window_set_progressbar_window( GNC_WINDOW(gnc_ui_get_toplevel()) );
gnc_html_show_url(report->html, type, url_location, url_label, 0);
+ gnc_window_set_progressbar_window( NULL );
gtk_signal_connect(GTK_OBJECT(report->container), "draw",
GTK_SIGNAL_FUNC(gnc_plugin_page_report_draw_cb), report);
@@ -513,7 +515,9 @@
}
win->need_reload = FALSE;
+ gnc_window_set_progressbar_window( GNC_WINDOW(gnc_ui_get_toplevel()) );
gnc_html_reload(win->html);
+ gnc_window_set_progressbar_window( NULL );
LEAVE( "reload forced" );
}
@@ -521,7 +525,7 @@
static void
gnc_plugin_page_report_refresh (gpointer data)
{
- // FIXME
+ // FIXME?
DEBUG( "report-refresh called" );
return;
}
@@ -529,7 +533,7 @@
static void
gnc_plugin_page_report_set_fwd_button(GncPluginPageReportPrivate * win, int enabled)
{
-#if 0 /* as it says -- broken code. */
+#if 0
GnomeApp * app = win->mc->app;
GnomeUIInfo * info;
@@ -546,7 +550,7 @@
static void
gnc_plugin_page_report_set_back_button(GncPluginPageReportPrivate * win, int enabled)
{
-#if 0 /* as is says: broken */
+#if 0
GnomeApp * app = win->mc->app;
GnomeUIInfo * info;
@@ -626,18 +630,6 @@
// FIXME: ui-unmerge
}
-#if 0
-static void
-gnc_plugin_page_report_set_report_id( GncPluginPageReport *page, int reportId )
-{
- GncPluginPageReportPrivate *priv;
- priv = page->priv;
- priv->reportId = reportId;
- DEBUG( "setting reportid = %d / %d",
- reportId, priv->reportId );
-}
-#endif /* 0 */
-
static void
gnc_plugin_page_report_init ( GncPluginPageReport *plugin_page )
{
@@ -694,11 +686,10 @@
{
GncPluginPageReport *plugin_page;
+ DEBUG( "report id = %d", reportId );
plugin_page = g_object_new( GNC_TYPE_PLUGIN_PAGE_REPORT,
"report_id", reportId, NULL );
DEBUG( "plugin_page: %p", plugin_page );
- //gnc_plugin_page_report_set_report_id( plugin_page, reportId );
- //gnc_plugin_page_report_setup( plugin_page );
DEBUG( "set %d on page %p", reportId, plugin_page );
return GNC_PLUGIN_PAGE( plugin_page );
}
More information about the gnucash-changes
mailing list