mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Convert a couple of dialogs from the deprecated gnome_ok_dialog to a
gtk_message_dialog. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12006 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
800f10dc81
commit
15fc424514
@ -1,5 +1,11 @@
|
|||||||
2005-11-20 David Hampton <hampton@employees.org>
|
2005-11-20 David Hampton <hampton@employees.org>
|
||||||
|
|
||||||
|
* src/import-export/hbci/gnc-hbci-gettrans.c:
|
||||||
|
* src/import-export/hbci/hbci-interaction.c:
|
||||||
|
* src/import-export/hbci/gnc-hbci-getbalance.c: Convert a couple
|
||||||
|
of dialogs from the deprecated gnome_ok_dialog to a
|
||||||
|
gtk_message_dialog.
|
||||||
|
|
||||||
* src/import-export/import-account-matcher.c:
|
* src/import-export/import-account-matcher.c:
|
||||||
* src/import-export/generic-import.glade: Put the account tree
|
* src/import-export/generic-import.glade: Put the account tree
|
||||||
into a scrolled window so the dialog buttons don't get pushed
|
into a scrolled window so the dialog buttons don't get pushed
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gtk/gtk.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <aqbanking/banking.h>
|
#include <aqbanking/banking.h>
|
||||||
|
|
||||||
@ -198,6 +198,7 @@ gnc_hbci_getbalance_finish (GtkWidget *parent,
|
|||||||
gboolean dialogres;
|
gboolean dialogres;
|
||||||
double booked_value, noted_value;
|
double booked_value, noted_value;
|
||||||
gnc_numeric value;
|
gnc_numeric value;
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
response = AB_JobGetBalance_GetAccountStatus((AB_JOB*)job);
|
response = AB_JobGetBalance_GetAccountStatus((AB_JOB*)job);
|
||||||
if (!response) {
|
if (!response) {
|
||||||
@ -248,18 +249,23 @@ gnc_hbci_getbalance_finish (GtkWidget *parent,
|
|||||||
GNC_RND_ROUND);
|
GNC_RND_ROUND);
|
||||||
if ((noted_value == 0.0) && (booked_value == 0.0))
|
if ((noted_value == 0.0) && (booked_value == 0.0))
|
||||||
{
|
{
|
||||||
gnome_ok_dialog_parented
|
dialog = gtk_message_dialog_new(GTK_WINDOW(parent),
|
||||||
/* Translators: Strings from this file are really only
|
GTK_DIALOG_MODAL
|
||||||
* needed inside Germany (HBCI is not supported anywhere
|
| GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
* else). You may safely ignore strings from the
|
GTK_MESSAGE_INFO,
|
||||||
* import-export/hbci subdirectory in other countries.
|
GTK_BUTTONS_OK,
|
||||||
*/
|
/* Translators: Strings from this file are really only
|
||||||
(_("The downloaded HBCI Balance was zero.\n"
|
* needed inside Germany (HBCI is not supported anywhere
|
||||||
|
* else). You may safely ignore strings from the
|
||||||
|
* import-export/hbci subdirectory in other countries.
|
||||||
|
*/
|
||||||
|
_("The downloaded HBCI Balance was zero.\n"
|
||||||
"Either this is the correct balance, or your bank does not \n"
|
"Either this is the correct balance, or your bank does not \n"
|
||||||
"support Balance download in this HBCI version. In the latter \n"
|
"support Balance download in this HBCI version. In the latter \n"
|
||||||
"case you should choose a higher HBCI version number in the HBCI \n"
|
"case you should choose a higher HBCI version number in the HBCI \n"
|
||||||
"Setup. After that, try again to download the HBCI Balance.\n"),
|
"Setup. After that, try again to download the HBCI Balance.\n"));
|
||||||
GTK_WINDOW (parent));
|
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||||
|
gtk_widget_destroy(GTK_WIDGET(dialog));
|
||||||
dialogres = FALSE;
|
dialogres = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -283,9 +289,15 @@ gnc_hbci_getbalance_finish (GtkWidget *parent,
|
|||||||
if (gnc_numeric_equal(value, reconc_balance)) {
|
if (gnc_numeric_equal(value, reconc_balance)) {
|
||||||
const char *message3 = _("The booked balance is identical to the current \n"
|
const char *message3 = _("The booked balance is identical to the current \n"
|
||||||
"reconciled balance of the account.");
|
"reconciled balance of the account.");
|
||||||
char *msg = g_strdup_printf ("%s%s\n%s", message1, message2, message3);
|
dialog = gtk_message_dialog_new(GTK_WINDOW(parent),
|
||||||
gnome_ok_dialog_parented (msg, GTK_WINDOW (parent));
|
GTK_DIALOG_MODAL
|
||||||
g_free (msg);
|
| GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_MESSAGE_INFO,
|
||||||
|
GTK_BUTTONS_OK,
|
||||||
|
"%s%s\n%s",
|
||||||
|
message1, message2, message3);
|
||||||
|
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||||
|
gtk_widget_destroy(GTK_WIDGET(dialog));
|
||||||
dialogres = FALSE;
|
dialogres = FALSE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gtk/gtk.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include "gnc-hbci-gettrans.h"
|
#include "gnc-hbci-gettrans.h"
|
||||||
@ -194,19 +194,12 @@ gnc_hbci_gettrans_final(GtkWidget *parent,
|
|||||||
const AB_JOB *trans_job,
|
const AB_JOB *trans_job,
|
||||||
gboolean run_until_done)
|
gboolean run_until_done)
|
||||||
{
|
{
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
/* Now add the retrieved transactions to the gnucash account. */
|
/* Now add the retrieved transactions to the gnucash account. */
|
||||||
AB_TRANSACTION_LIST2 *trans_list;
|
AB_TRANSACTION_LIST2 *trans_list;
|
||||||
|
|
||||||
trans_list = AB_JobGetTransactions_GetTransactions(trans_job);
|
trans_list = AB_JobGetTransactions_GetTransactions(trans_job);
|
||||||
if (!trans_list) {
|
|
||||||
/* printf("gnc_hbci_gettrans_final: No transactions section. Response was:\n"); */
|
|
||||||
|
|
||||||
gnome_ok_dialog_parented
|
|
||||||
(_("The HBCI import returned no transactions for the selected time period."),
|
|
||||||
GTK_WINDOW (parent));
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trans_list && (AB_Transaction_List2_GetSize(trans_list) > 0)) {
|
if (trans_list && (AB_Transaction_List2_GetSize(trans_list) > 0)) {
|
||||||
struct trans_list_data data;
|
struct trans_list_data data;
|
||||||
GNCImportMainMatcher *importer_generic_gui =
|
GNCImportMainMatcher *importer_generic_gui =
|
||||||
@ -219,14 +212,18 @@ gnc_hbci_gettrans_final(GtkWidget *parent,
|
|||||||
|
|
||||||
if (run_until_done)
|
if (run_until_done)
|
||||||
return gnc_gen_trans_list_run (importer_generic_gui);
|
return gnc_gen_trans_list_run (importer_generic_gui);
|
||||||
|
return TRUE;
|
||||||
}
|
|
||||||
else {
|
|
||||||
gnome_ok_dialog_parented
|
|
||||||
(_("The HBCI import returned no transactions for the selected time period."),
|
|
||||||
GTK_WINDOW (parent));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialog = gtk_message_dialog_new(GTK_WINDOW(parent),
|
||||||
|
GTK_DIALOG_MODAL
|
||||||
|
| GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_MESSAGE_INFO,
|
||||||
|
GTK_BUTTONS_OK,
|
||||||
|
_("The HBCI import returned no transactions "
|
||||||
|
"for the selected time period."));
|
||||||
|
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||||
|
gtk_widget_destroy(GTK_WIDGET(dialog));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gtk/gtk.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -531,10 +531,17 @@ showBoxCB(AB_BANKING *ab, GWEN_TYPE_UINT32 flags,
|
|||||||
title = gnc_hbci_utf8ToLatin1(data, utf8title);
|
title = gnc_hbci_utf8ToLatin1(data, utf8title);
|
||||||
|
|
||||||
/* Create new dialog */
|
/* Create new dialog */
|
||||||
dialog = gnome_ok_dialog_parented (text, GTK_WINDOW (data->parent));
|
dialog = gtk_message_dialog_new(GTK_WINDOW(data->parent),
|
||||||
|
0,
|
||||||
|
GTK_MESSAGE_INFO,
|
||||||
|
GTK_BUTTONS_OK,
|
||||||
|
text);
|
||||||
|
|
||||||
if (title && (strlen(title) > 0))
|
if (title && (strlen(title) > 0))
|
||||||
gtk_window_set_title (GTK_WINDOW (dialog), title);
|
gtk_window_set_title (GTK_WINDOW (dialog), title);
|
||||||
gnome_dialog_close_hides (GNOME_DIALOG(dialog), TRUE);
|
|
||||||
|
g_signal_connect(G_OBJECT(dialog), "response",
|
||||||
|
(GCallback)gtk_widget_hide, NULL);
|
||||||
gtk_widget_show_all (dialog);
|
gtk_widget_show_all (dialog);
|
||||||
|
|
||||||
result = data->showbox_id;
|
result = data->showbox_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user