mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[dialog-payment] instead of tooltip, render in gtklabel
The warning icon is used to show blocking and non-blocking warnings in a payment. Increase visibility by showing the warning as a gtklabel instead of a tooltip.
This commit is contained in:
@@ -81,6 +81,7 @@ struct _payment_window
|
||||
GtkWidget * dialog;
|
||||
|
||||
GtkWidget * payment_warning;
|
||||
GtkWidget * conflict_message;
|
||||
GtkWidget * ok_button;
|
||||
GtkWidget * num_entry;
|
||||
GtkWidget * memo_entry;
|
||||
@@ -288,7 +289,7 @@ update_cleanup:
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(pw->print_check), pw->print_check_state);
|
||||
|
||||
/* Check if there are issues preventing a successful payment */
|
||||
gtk_widget_set_tooltip_text (pw->payment_warning, conflict_msg);
|
||||
gtk_label_set_text (GTK_LABEL(pw->conflict_message), conflict_msg);
|
||||
gtk_widget_set_sensitive (pw->ok_button, allow_payment);
|
||||
if (conflict_msg)
|
||||
{
|
||||
@@ -1192,6 +1193,7 @@ new_payment_window (GtkWindow *parent, QofBook *book, InitialPaymentInfo *tx_inf
|
||||
|
||||
/* Grab the widgets and build the dialog */
|
||||
pw->payment_warning = GTK_WIDGET (gtk_builder_get_object (builder, "payment_warning"));
|
||||
pw->conflict_message = GTK_WIDGET (gtk_builder_get_object (builder, "conflict_message"));
|
||||
pw->ok_button = GTK_WIDGET (gtk_builder_get_object (builder, "okbutton"));
|
||||
pw->num_entry = GTK_WIDGET (gtk_builder_get_object (builder, "num_entry"));
|
||||
pw->memo_entry = GTK_WIDGET (gtk_builder_get_object (builder, "memo_entry"));
|
||||
|
||||
@@ -108,18 +108,6 @@
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="payment_warning">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">dialog-warning</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
<property name="secondary">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -761,6 +749,38 @@ In case of an over-payment or if no invoice was selected, GnuCash will automatic
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="table4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="column_spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="payment_warning">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">dialog-warning</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="conflict_message">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
|
||||
Reference in New Issue
Block a user