mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Give the dialogs a gtk2 look. Add accelerator keys. Use the gtk
dialog functions. Take care of some resizing problems. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12013 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
660fd805d5
commit
c1fdaee255
@ -1,5 +1,10 @@
|
||||
2005-11-21 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/report/report-gnome/report.glade:
|
||||
* src/report/report-gnome/dialog-column-view.c: Give the dialogs a
|
||||
gtk2 look. Add accelerator keys. Use the gtk dialog functions.
|
||||
Take care of some resizing problems.
|
||||
|
||||
* src/import-export/import-main-matcher.c:
|
||||
* src/register/register-gnome/gnucash-sheet.c: Use gtk version of
|
||||
various functions instead of gnome versions. Rest of the file was
|
||||
|
@ -169,9 +169,6 @@ update_display_lists(gnc_column_view_edit * view) {
|
||||
}
|
||||
gtk_clist_select_row(view->contents, row, 0);
|
||||
gtk_clist_thaw(view->contents);
|
||||
|
||||
gnc_clist_columns_autosize (view->available);
|
||||
gnc_clist_columns_autosize (view->contents);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -231,7 +228,16 @@ gnc_column_view_edit_options(SCM options, SCM view) {
|
||||
|
||||
r->optwin = gnc_options_dialog_new(NULL);
|
||||
|
||||
xml = gnc_glade_xml_new ("report.glade", "view_contents_hbox");
|
||||
/* Hide the generic dialog page list. */
|
||||
{
|
||||
GtkWidget *dialog, *page_list;
|
||||
|
||||
dialog = gnc_options_dialog_widget(r->optwin);
|
||||
page_list = gnc_glade_lookup_widget (dialog, "page_list");
|
||||
gtk_widget_hide(page_list);
|
||||
}
|
||||
|
||||
xml = gnc_glade_xml_new ("report.glade", "view_contents_table");
|
||||
|
||||
glade_xml_signal_connect_data
|
||||
(xml, "gnc_column_view_edit_add_cb",
|
||||
@ -253,7 +259,7 @@ gnc_column_view_edit_options(SCM options, SCM view) {
|
||||
(xml, "gnc_column_view_edit_size_cb",
|
||||
GTK_SIGNAL_FUNC (gnc_column_view_edit_size_cb), r);
|
||||
|
||||
editor = glade_xml_get_widget (xml, "view_contents_hbox");
|
||||
editor = glade_xml_get_widget (xml, "view_contents_table");
|
||||
r->available = GTK_CLIST (glade_xml_get_widget (xml, "available_list"));
|
||||
r->contents = GTK_CLIST (glade_xml_get_widget (xml, "contents_list"));
|
||||
r->options = options;
|
||||
@ -264,6 +270,11 @@ gnc_column_view_edit_options(SCM options, SCM view) {
|
||||
r->contents_list = SCM_EOL;
|
||||
r->odb = gnc_option_db_new(r->options);
|
||||
|
||||
gtk_clist_set_column_auto_resize(r->available, 0, TRUE);
|
||||
gtk_clist_set_column_auto_resize(r->contents, 0, TRUE);
|
||||
gtk_clist_set_column_auto_resize(r->contents, 1, TRUE);
|
||||
gtk_clist_set_column_auto_resize(r->contents, 2, TRUE);
|
||||
|
||||
gnc_build_options_dialog_contents(r->optwin, r->odb);
|
||||
|
||||
gtk_notebook_append_page(GTK_NOTEBOOK(gnc_options_dialog_notebook
|
||||
@ -291,7 +302,7 @@ gnc_column_view_edit_options(SCM options, SCM view) {
|
||||
gnc_options_dialog_set_close_cb(r->optwin,
|
||||
gnc_column_view_edit_close_cb, r);
|
||||
|
||||
gtk_widget_show_all(gnc_options_dialog_widget(r->optwin));
|
||||
gtk_widget_show(gnc_options_dialog_widget(r->optwin));
|
||||
return gnc_options_dialog_widget(r->optwin);
|
||||
}
|
||||
}
|
||||
@ -490,9 +501,10 @@ gnc_column_view_edit_size_cb(GtkButton * button, gpointer user_data) {
|
||||
(float)scm_num2int(SCM_CADDR(current),
|
||||
SCM_ARG1, __FUNCTION__));
|
||||
|
||||
dlg_ret = gnome_dialog_run_and_close(GNOME_DIALOG(dlg));
|
||||
dlg_ret = gtk_dialog_run(GTK_DIALOG(dlg));
|
||||
gtk_widget_hide(dlg);
|
||||
|
||||
if(dlg_ret == 0) {
|
||||
if(dlg_ret == GTK_RESPONSE_OK) {
|
||||
current = SCM_LIST4(SCM_CAR(current),
|
||||
scm_int2num(gtk_spin_button_get_value_as_int
|
||||
(GTK_SPIN_BUTTON(colspin))),
|
||||
@ -507,5 +519,6 @@ gnc_column_view_edit_size_cb(GtkButton * button, gpointer user_data) {
|
||||
gnc_options_dialog_changed (r->optwin);
|
||||
update_display_lists(r);
|
||||
}
|
||||
gtk_widget_destroy(dlg);
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user