[Gnucash-changes] 2005-04-22 Joshua Sled <jsled@asynchronous.org> *
src/scm/main.scm
Joshua Sled
jsled at cvs.gnucash.org
Fri Apr 22 17:35:17 EDT 2005
Log Message:
-----------
2005-04-22 Joshua Sled <jsled at asynchronous.org>
* src/scm/main.scm (gnc:main): Expose and use functionality to
update the main-window title after init-file load, plus collateral
changes.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash:
ChangeLog
GNOME2_STATUS
gnucash/src/gnome:
gnc-main-window.c
gnc-main-window.h
gw-gnc-spec.scm
top-level.c
gnucash/src/scm:
main.scm
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.192
retrieving revision 1.1487.2.193
diff -LChangeLog -LChangeLog -u -r1.1487.2.192 -r1.1487.2.193
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,9 @@
+2005-04-22 Joshua Sled <jsled at asynchronous.org>
+
+ * src/scm/main.scm (gnc:main): Expose and use functionality to
+ update the main-window title after init-file load, plus collateral
+ changes.
+
2005-04-16 Derek Atkins <derek at ihtfp.com>
* configure.in: Downgrade glib dep to 2.4.0 so it builds on FC3.
Index: GNOME2_STATUS
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/Attic/GNOME2_STATUS,v
retrieving revision 1.1.2.44
retrieving revision 1.1.2.45
diff -LGNOME2_STATUS -LGNOME2_STATUS -u -r1.1.2.44 -r1.1.2.45
--- GNOME2_STATUS
+++ GNOME2_STATUS
@@ -71,6 +71,9 @@
- Window size/position not being saved or used.
+ - We used to do this via Gnome MDI support, but now we will need to
+ manage it ourselves. :/
+
- Weird pango_layout_set_text "string not UTF-8" issues reported by Neil Williams:
- http://lists.gnucash.org/pipermail/gnucash-devel/2005-March/012797.html
@@ -79,9 +82,6 @@
- Main Window
- - Initially-loaded file name not in window title; subsequent file-loads
- correct set window-title text correctly.
-
- Summary Bar
- Summarybar restored into GncMainWindow UI; summary-select list does not
Index: gnc-main-window.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-main-window.h,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -Lsrc/gnome/gnc-main-window.h -Lsrc/gnome/gnc-main-window.h -u -r1.1.2.11 -r1.1.2.12
--- src/gnome/gnc-main-window.h
+++ src/gnome/gnc-main-window.h
@@ -94,6 +94,8 @@
const gchar *group_name);
void gnc_main_window_update_title (GncMainWindow *window);
+void gnc_main_window_set_progressbar_window( GncMainWindow *window );
+
G_END_DECLS
#endif /* __GNC_MAIN_WINDOW_H */
Index: gnc-main-window.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-main-window.c,v
retrieving revision 1.1.2.36
retrieving revision 1.1.2.37
diff -Lsrc/gnome/gnc-main-window.c -Lsrc/gnome/gnc-main-window.c -u -r1.1.2.36 -r1.1.2.37
--- src/gnome/gnc-main-window.c
+++ src/gnome/gnc-main-window.c
@@ -842,10 +842,10 @@
new_merge_id = gtk_ui_manager_new_merge_id( window->ui_merge );
gtk_ui_manager_add_ui( window->ui_merge, new_merge_id,
- //"/menubar/Actions",
- //"/menubar/Actions/ActionsPlaceholder",
- // "/menubar/AdditionalMenusPlaceholder/AReportAction",
- "/menubar/AdditionalMenusPlaceholder",
+ // "/menubar/Actions", no
+ // "/menubar/Actions/ActionsPlaceholder", no
+ // "/menubar/AdditionalMenusPlaceholder/AReportAction", no
+ "/menubar/AdditionalMenusPlaceholder", // winnah!
"BarAction",
"BarAction", GTK_UI_MANAGER_MENUITEM, FALSE );
gtk_ui_manager_ensure_update( window->ui_merge );
@@ -1370,3 +1370,11 @@
iface->get_statusbar = gnc_main_window_get_statusbar;
iface->get_progressbar = gnc_main_window_get_progressbar;
}
+
+void
+gnc_main_window_set_progressbar_window (GncMainWindow *window)
+{
+ GncWindow *gncwin;
+ gncwin = GNC_WINDOW(window);
+ gnc_window_set_progressbar_window(gncwin);
+}
Index: top-level.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/top-level.c,v
retrieving revision 1.140.4.14
retrieving revision 1.140.4.15
diff -Lsrc/gnome/top-level.c -Lsrc/gnome/top-level.c -u -r1.140.4.14 -r1.140.4.15
--- src/gnome/top-level.c
+++ src/gnome/top-level.c
@@ -403,9 +403,9 @@
// return ( main_window . command_line )
{
- SCM gncWindowType;
- gncWindowType = scm_c_eval_string("<gnc:Window*>");
- ret = scm_cons( gw_wcp_assimilate_ptr(main_window, gncWindowType), ret );
+ SCM gncMainWindowType;
+ gncMainWindowType = scm_c_eval_string("<gnc:MainWindow*>");
+ ret = scm_cons( gw_wcp_assimilate_ptr(main_window, gncMainWindowType), ret );
}
}
Index: gw-gnc-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gw-gnc-spec.scm,v
retrieving revision 1.14.4.6
retrieving revision 1.14.4.7
diff -Lsrc/gnome/gw-gnc-spec.scm -Lsrc/gnome/gw-gnc-spec.scm -u -r1.14.4.6 -r1.14.4.7
--- src/gnome/gw-gnc-spec.scm
+++ src/gnome/gw-gnc-spec.scm
@@ -166,6 +166,22 @@
(gw:wrap-function
ws
+ 'gnc:main-window-set-progressbar-window
+ '<gw:void>
+ "gnc_main_window_set_progressbar_window"
+ '((<gnc:MainWindow*> window))
+ "Set the progressbar window from the given GncMainWindow; does the cast. :p")
+
+ (gw:wrap-function
+ ws
+ 'gnc:main-window-update-title
+ '<gw:void>
+ "gnc_main_window_update_title"
+ '((<gnc:MainWindow*> window))
+ "Update the window title based on whatever is loaded in the current session.")
+
+ (gw:wrap-function
+ ws
'gnc:totd-dialog-create-and-run
'<gw:void>
"gnc_totd_dialog_create_and_run"
Index: main.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main.scm,v
retrieving revision 1.109.2.11
retrieving revision 1.109.2.12
diff -Lsrc/scm/main.scm -Lsrc/scm/main.scm -u -r1.109.2.11 -r1.109.2.12
--- src/scm/main.scm
+++ src/scm/main.scm
@@ -622,9 +622,9 @@
;; We're not in batch mode; we can go ahead and do the normal thing.
(begin
(gnc:hook-add-dangler gnc:*ui-shutdown-hook* gnc:gui-finish)
- (let* ((init-pair (gnc:gui-init gnc:*command-line-remaining*))
- (main-window (car init-pair)))
- (set! gnc:*command-line-remaining* (cdr init-pair))
+ (let* ((init-window-cons-rest (gnc:gui-init gnc:*command-line-remaining*))
+ (main-window (car init-window-cons-rest)))
+ (set! gnc:*command-line-remaining* (cdr init-window-cons-rest))
(if (and
(not (gnc:account-file-to-load))
(not (string? (gnc:history-get-last)))
@@ -635,8 +635,11 @@
(gnc:new-user-dialog))
(begin
(gnc:destroy-splash-screen)
- (gnc:window-set-progressbar-window main-window)
- (gnc:load-account-file)))
+ (gnc:main-window-set-progressbar-window main-window)
+ (gnc:load-account-file)
+ ))
+ ;; no matter how or what we loaded, ensure the main-window title is valid...
+ (gnc:main-window-update-title main-window)
(gnc:hook-run-danglers gnc:*ui-post-startup-hook*)
(gnc:start-ui-event-loop)
(gnc:hook-remove-dangler gnc:*ui-shutdown-hook* gnc:gui-finish)))
More information about the gnucash-changes
mailing list