mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Always provide a parent window. Split the accelerators out into a
separate argument. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gnucash-gnome2-dev@9485 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2003-10-12 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome/dialog-scheduledxaction.c:
|
||||
* src/gnome/dialog-sxsincelast.c:
|
||||
* src/gnome/gnc-embedded-window.[ch]: Always provide a parent
|
||||
window. Split the accelerators out into a separate argument.
|
||||
|
||||
2003-10-11 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/business/business-gnome/gnc-plugin-business.[ch]:
|
||||
|
||||
@@ -1526,7 +1526,8 @@ schedXact_editor_create_ledger( SchedXactionEditorDialog *sxed )
|
||||
gnc_sxed_menu_entries,
|
||||
gnc_sxed_menu_n_entries,
|
||||
"gnc-sxed-window-ui.xml",
|
||||
NULL, /* no accelerators */
|
||||
sxed->dialog,
|
||||
FALSE, /* no accelerators */
|
||||
sxed);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET(sxed->embed_window),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
@@ -3585,7 +3585,8 @@ create_autoCreate_ledger( sxSinceLastData *sxsld )
|
||||
gnc_sxsld_menu_entries,
|
||||
gnc_sxsld_menu_n_entries,
|
||||
"gnc-sxed-window-ui.xml",
|
||||
NULL, /* no accelerators */
|
||||
sxsld->sincelast_window,
|
||||
FALSE, /* no accelerators */
|
||||
sxsld);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(sxsld->ac_window),
|
||||
TRUE, TRUE, 0);
|
||||
@@ -3627,7 +3628,8 @@ create_created_ledger( sxSinceLastData *sxsld )
|
||||
gnc_sxsld_menu_entries,
|
||||
gnc_sxsld_menu_n_entries,
|
||||
"gnc-sxed-window-ui.xml",
|
||||
NULL, /* no accelerators */
|
||||
sxsld->sincelast_window,
|
||||
FALSE, /* no accelerators */
|
||||
sxsld);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(sxsld->created_window),
|
||||
TRUE, TRUE, 0);
|
||||
@@ -3734,7 +3736,8 @@ create_to_create_ledger( sxSinceLastData *sxsld )
|
||||
gnc_sxsld_menu_entries,
|
||||
gnc_sxsld_menu_n_entries,
|
||||
"gnc-sxed-to-create-window-ui.xml",
|
||||
NULL, /* no accelerators */
|
||||
sxsld->sincelast_window,
|
||||
FALSE, /* no accelerators */
|
||||
sxsld);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(sxsld->to_create_window),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
@@ -67,12 +67,11 @@ struct GncEmbeddedWindowPrivate
|
||||
EggActionGroup *action_group;
|
||||
|
||||
GncPluginPage *page;
|
||||
GtkWidget *parent_window;
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
static GQuark window_type = 0;
|
||||
|
||||
GType
|
||||
gnc_embedded_window_get_type (void)
|
||||
{
|
||||
@@ -160,8 +159,6 @@ gnc_embedded_window_class_init (GncEmbeddedWindowClass *klass)
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
window_type = g_quark_from_static_string ("gnc-embedded-window");
|
||||
|
||||
object_class->finalize = gnc_embedded_window_finalize;
|
||||
object_class->dispose = gnc_embedded_window_dispose;
|
||||
LEAVE(" ");
|
||||
@@ -265,7 +262,8 @@ gnc_embedded_window_new (const gchar *action_group_name,
|
||||
EggActionEntry *action_entries,
|
||||
gint n_action_entries,
|
||||
const gchar *ui_filename,
|
||||
GtkWindow *enclosing_win,
|
||||
GtkWidget *enclosing_win,
|
||||
gboolean add_accelerators,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncEmbeddedWindowPrivate *priv;
|
||||
@@ -274,9 +272,9 @@ gnc_embedded_window_new (const gchar *action_group_name,
|
||||
GError *error = NULL;
|
||||
guint merge_id;
|
||||
|
||||
ENTER("group %s, first %p, num %d, ui file %s, parent %p, user data %p",
|
||||
ENTER("group %s, first %p, num %d, ui file %s, parent %p, add accelerators %d, user data %p",
|
||||
action_group_name, action_entries, n_action_entries, ui_filename,
|
||||
enclosing_win, user_data);
|
||||
enclosing_win, add_accelerators, user_data);
|
||||
window = g_object_new (GNC_TYPE_EMBEDDED_WINDOW, NULL);
|
||||
priv = window->priv;
|
||||
|
||||
@@ -303,8 +301,9 @@ gnc_embedded_window_new (const gchar *action_group_name,
|
||||
}
|
||||
|
||||
/* Add accelerators (if wanted) */
|
||||
if (enclosing_win)
|
||||
gtk_window_add_accel_group (enclosing_win, window->ui_merge->accel_group);
|
||||
if (add_accelerators)
|
||||
gtk_window_add_accel_group (GTK_WINDOW(enclosing_win),
|
||||
window->ui_merge->accel_group);
|
||||
|
||||
egg_menu_merge_ensure_update (window->ui_merge);
|
||||
g_free(ui_fullname);
|
||||
|
||||
@@ -74,7 +74,8 @@ GncEmbeddedWindow * gnc_embedded_window_new (const gchar *action_group_name
|
||||
EggActionEntry *action_entries,
|
||||
gint n_action_entries,
|
||||
const gchar *ui_filename,
|
||||
GtkWindow *enclosing_win,
|
||||
GtkWidget *enclosing_win,
|
||||
gboolean add_accelerators,
|
||||
gpointer user_data);
|
||||
|
||||
void gnc_embedded_window_open_page (GncEmbeddedWindow *window,
|
||||
|
||||
Reference in New Issue
Block a user