mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #677859 - Depreciated functions in Gtk+2.24
Replaces functions related to widget visibility. Additionally there are some more replacements in the area's handled in the previous two commits. Patch by Robert Fewell git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22217 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0bc041acf8
commit
d7729b3140
@ -497,7 +497,7 @@ billterms_term_refresh (BillTermsWindow *btw)
|
|||||||
|
|
||||||
if (!btw->current_term)
|
if (!btw->current_term)
|
||||||
{
|
{
|
||||||
gtk_widget_hide_all (btw->term_vbox);
|
gtk_widget_hide (btw->term_vbox);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,10 +423,10 @@ gnc_dialog_date_acct_parented (GtkWidget *parent, const char *message,
|
|||||||
|
|
||||||
gtk_widget_show_all (ddc->dialog);
|
gtk_widget_show_all (ddc->dialog);
|
||||||
|
|
||||||
gtk_widget_hide_all (GTK_WIDGET(gtk_builder_get_object (builder, "postdate_label")));
|
gtk_widget_hide (GTK_WIDGET(gtk_builder_get_object (builder, "postdate_label")));
|
||||||
gtk_widget_hide_all (GTK_WIDGET(gtk_builder_get_object (builder, "post_date_box")));
|
gtk_widget_hide (GTK_WIDGET(gtk_builder_get_object (builder, "post_date_box")));
|
||||||
gtk_widget_hide_all (GTK_WIDGET(gtk_builder_get_object (builder, "memo_entry")));
|
gtk_widget_hide (GTK_WIDGET(gtk_builder_get_object (builder, "memo_entry")));
|
||||||
gtk_widget_hide_all (GTK_WIDGET(gtk_builder_get_object (builder, "memo_label")));
|
gtk_widget_hide (GTK_WIDGET(gtk_builder_get_object (builder, "memo_label")));
|
||||||
|
|
||||||
ddc->retval = FALSE;
|
ddc->retval = FALSE;
|
||||||
while (gtk_dialog_run (GTK_DIALOG (ddc->dialog)) == GTK_RESPONSE_OK)
|
while (gtk_dialog_run (GTK_DIALOG (ddc->dialog)) == GTK_RESPONSE_OK)
|
||||||
|
@ -1652,13 +1652,13 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
|
|||||||
|
|
||||||
/* Hide the project frame for customer invoices */
|
/* Hide the project frame for customer invoices */
|
||||||
if (iw->owner.type == GNC_OWNER_CUSTOMER)
|
if (iw->owner.type == GNC_OWNER_CUSTOMER)
|
||||||
gtk_widget_hide_all (iw->proj_frame);
|
gtk_widget_hide (iw->proj_frame);
|
||||||
|
|
||||||
/* Hide the "job" label and entry for employee invoices */
|
/* Hide the "job" label and entry for employee invoices */
|
||||||
if (iw->owner.type == GNC_OWNER_EMPLOYEE)
|
if (iw->owner.type == GNC_OWNER_EMPLOYEE)
|
||||||
{
|
{
|
||||||
gtk_widget_hide_all (iw->job_label);
|
gtk_widget_hide (iw->job_label);
|
||||||
gtk_widget_hide_all (iw->job_box);
|
gtk_widget_hide (iw->job_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
acct_entry = GTK_WIDGET (gtk_builder_get_object (iw->builder, "acct_entry"));
|
acct_entry = GTK_WIDGET (gtk_builder_get_object (iw->builder, "acct_entry"));
|
||||||
@ -1753,25 +1753,25 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
|
|||||||
if (is_posted == TRUE)
|
if (is_posted == TRUE)
|
||||||
{
|
{
|
||||||
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide3"));
|
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide3"));
|
||||||
gtk_widget_hide_all (hide);
|
gtk_widget_hide (hide);
|
||||||
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide4"));
|
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide4"));
|
||||||
gtk_widget_hide_all (hide);
|
gtk_widget_hide (hide);
|
||||||
|
|
||||||
}
|
}
|
||||||
else /* ! posted */
|
else /* ! posted */
|
||||||
{
|
{
|
||||||
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "posted_label"));
|
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "posted_label"));
|
||||||
gtk_widget_hide_all (hide);
|
gtk_widget_hide (hide);
|
||||||
gtk_widget_hide_all (iw->posted_date_hbox);
|
gtk_widget_hide (iw->posted_date_hbox);
|
||||||
|
|
||||||
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "acct_label"));
|
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "acct_label"));
|
||||||
gtk_widget_hide_all (hide);
|
gtk_widget_hide (hide);
|
||||||
gtk_widget_hide_all (acct_entry);
|
gtk_widget_hide (acct_entry);
|
||||||
|
|
||||||
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide1"));
|
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide1"));
|
||||||
gtk_widget_hide_all (hide);
|
gtk_widget_hide (hide);
|
||||||
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide2"));
|
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide2"));
|
||||||
gtk_widget_hide_all (hide);
|
gtk_widget_hide (hide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1792,7 +1792,7 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gtk_widget_hide_all (iw->to_charge_frame);
|
gtk_widget_hide (iw->to_charge_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_posted)
|
if (is_posted)
|
||||||
@ -2415,7 +2415,7 @@ gnc_invoice_window_new_invoice (InvoiceDialogType dialog_type, QofBook *bookp,
|
|||||||
gtk_widget_hide (iw->type_label);
|
gtk_widget_hide (iw->type_label);
|
||||||
break;
|
break;
|
||||||
case MOD_INVOICE:
|
case MOD_INVOICE:
|
||||||
gtk_widget_hide_all (iw->type_hbox);
|
gtk_widget_hide (iw->type_hbox);
|
||||||
gtk_widget_show (iw->type_label);
|
gtk_widget_show (iw->type_label);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -203,6 +203,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="active_check">
|
<object class="GtkCheckButton" id="active_check">
|
||||||
<property name="label" translatable="yes">Active</property>
|
<property name="label" translatable="yes">Active</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
@ -403,7 +404,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">False</property>
|
||||||
<property name="position">3</property>
|
<property name="position">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@ -672,6 +673,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="helpbutton">
|
<object class="GtkButton" id="helpbutton">
|
||||||
<property name="label">gtk-help</property>
|
<property name="label">gtk-help</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
@ -689,6 +691,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="cancelbutton">
|
<object class="GtkButton" id="cancelbutton">
|
||||||
<property name="label">gtk-cancel</property>
|
<property name="label">gtk-cancel</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
@ -706,6 +709,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="okbutton">
|
<object class="GtkButton" id="okbutton">
|
||||||
<property name="label">gtk-ok</property>
|
<property name="label">gtk-ok</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
@ -826,6 +830,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkRadioButton" id="dialog_invoice_type">
|
<object class="GtkRadioButton" id="dialog_invoice_type">
|
||||||
<property name="label" translatable="yes">Invoice</property>
|
<property name="label" translatable="yes">Invoice</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
@ -844,6 +849,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkRadioButton" id="dialog_creditnote_type">
|
<object class="GtkRadioButton" id="dialog_creditnote_type">
|
||||||
<property name="label" translatable="yes">Credit Note</property>
|
<property name="label" translatable="yes">Credit Note</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
@ -1269,6 +1275,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="cancelbutton1">
|
<object class="GtkButton" id="cancelbutton1">
|
||||||
<property name="label">gtk-cancel</property>
|
<property name="label">gtk-cancel</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
@ -1285,6 +1292,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="okbutton1">
|
<object class="GtkButton" id="okbutton1">
|
||||||
<property name="label">gtk-ok</property>
|
<property name="label">gtk-ok</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
@ -1362,6 +1370,7 @@ Are you sure you want to unpost it?</property>
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkRadioButton" id="yes_tt_reset">
|
<object class="GtkRadioButton" id="yes_tt_reset">
|
||||||
<property name="label" translatable="yes">Yes, reset the Tax Tables</property>
|
<property name="label" translatable="yes">Yes, reset the Tax Tables</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
@ -1379,6 +1388,7 @@ Are you sure you want to unpost it?</property>
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkRadioButton" id="no_tt_reset">
|
<object class="GtkRadioButton" id="no_tt_reset">
|
||||||
<property name="label" translatable="yes">No, keep them as they are</property>
|
<property name="label" translatable="yes">No, keep them as they are</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
|
@ -65,63 +65,62 @@ enum search_cols
|
|||||||
|
|
||||||
struct _GNCSearchWindow
|
struct _GNCSearchWindow
|
||||||
{
|
{
|
||||||
GtkWidget * dialog;
|
GtkWidget *dialog;
|
||||||
GtkWidget * grouping_combo;
|
GtkWidget *grouping_combo;
|
||||||
GtkWidget * match_all_label;
|
GtkWidget *match_all_label;
|
||||||
GtkWidget * criteria_table;
|
GtkWidget *criteria_table;
|
||||||
GtkWidget * result_hbox;
|
GtkWidget *result_hbox;
|
||||||
|
|
||||||
/* The "results" sub-window widgets */
|
/* The "results" sub-window widgets */
|
||||||
GtkWidget * result_list;
|
GtkWidget *result_list;
|
||||||
gpointer selected_item;
|
gpointer selected_item;
|
||||||
GList *selected_item_list;
|
GList *selected_item_list;
|
||||||
|
|
||||||
/* The search_type radio-buttons */
|
/* The search_type radio-buttons */
|
||||||
GtkWidget * new_rb;
|
GtkWidget *new_rb;
|
||||||
GtkWidget * narrow_rb;
|
GtkWidget *narrow_rb;
|
||||||
GtkWidget * add_rb;
|
GtkWidget *add_rb;
|
||||||
GtkWidget * del_rb;
|
GtkWidget *del_rb;
|
||||||
|
GtkWidget *active_only_check;
|
||||||
GtkWidget * active_only_check;
|
|
||||||
|
|
||||||
/* The Select button */
|
/* The Select button */
|
||||||
GtkWidget * select_button;
|
GtkWidget *select_button;
|
||||||
|
|
||||||
/* The close/cancel buttons */
|
/* The close/cancel buttons */
|
||||||
GtkWidget * close_button;
|
GtkWidget *close_button;
|
||||||
GtkWidget * cancel_button;
|
GtkWidget *cancel_button;
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
GNCSearchResultCB result_cb;
|
GNCSearchResultCB result_cb;
|
||||||
GNCSearchNewItemCB new_item_cb;
|
GNCSearchNewItemCB new_item_cb;
|
||||||
GNCSearchCallbackButton *buttons;
|
GNCSearchCallbackButton *buttons;
|
||||||
GNCSearchFree free_cb;
|
GNCSearchFree free_cb;
|
||||||
gpointer user_data;
|
gpointer user_data;
|
||||||
|
|
||||||
GNCSearchSelectedCB selected_cb;
|
GNCSearchSelectedCB selected_cb;
|
||||||
gpointer select_arg;
|
gpointer select_arg;
|
||||||
gboolean allow_clear;
|
gboolean allow_clear;
|
||||||
|
|
||||||
/* What we're searching for, and how */
|
/* What we're searching for, and how */
|
||||||
const gchar * type_label;
|
const gchar *type_label;
|
||||||
QofIdTypeConst search_for;
|
QofIdTypeConst search_for;
|
||||||
GNCSearchType grouping; /* Match Any, Match All */
|
GNCSearchType grouping; /* Match Any, Match All */
|
||||||
const QofParam * get_guid; /* Function to GetGUID from the object */
|
const QofParam *get_guid; /* Function to GetGUID from the object */
|
||||||
int search_type; /* New, Narrow, Add, Delete */
|
int search_type; /* New, Narrow, Add, Delete */
|
||||||
|
|
||||||
/* Our query status */
|
/* Our query status */
|
||||||
QofQuery * q;
|
QofQuery *q;
|
||||||
QofQuery * start_q; /* The query to start from, if any */
|
QofQuery *start_q; /* The query to start from, if any */
|
||||||
|
|
||||||
/* The list of criteria */
|
/* The list of criteria */
|
||||||
GNCSearchParam * last_param;
|
GNCSearchParam *last_param;
|
||||||
GList * params_list; /* List of GNCSearchParams */
|
GList *params_list; /* List of GNCSearchParams */
|
||||||
GList * display_list; /* List of GNCSearchParams for Display */
|
GList *display_list; /* List of GNCSearchParams for Display */
|
||||||
gint num_cols; /* Number of Display Columns */
|
gint num_cols; /* Number of Display Columns */
|
||||||
GList * crit_list; /* list of crit_data */
|
GList *crit_list; /* list of crit_data */
|
||||||
|
|
||||||
gint component_id;
|
gint component_id;
|
||||||
const gchar * gconf_section;
|
const gchar *gconf_section;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _crit_data
|
struct _crit_data
|
||||||
@ -378,9 +377,9 @@ gnc_search_dialog_display_results (GNCSearchWindow *sw)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
match_combo_changed (GtkComboBox *combo_box, GNCSearchWindow *sw)
|
match_combo_changed (GtkComboBoxText *combo_box, GNCSearchWindow *sw)
|
||||||
{
|
{
|
||||||
sw->grouping = gtk_combo_box_get_active(combo_box);
|
sw->grouping = gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -957,13 +956,13 @@ type_label_to_new_button(const gchar* type_label)
|
|||||||
static void
|
static void
|
||||||
gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
|
gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
|
||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *label, *add, *box;
|
GtkWidget *label, *add, *box;
|
||||||
GtkComboBox *combo_box;
|
GtkComboBoxText *combo_box;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkWidget *new_item_button;
|
GtkWidget *new_item_button;
|
||||||
const char * type_label;
|
const char *type_label;
|
||||||
gboolean active;
|
gboolean active;
|
||||||
|
|
||||||
builder = gtk_builder_new();
|
builder = gtk_builder_new();
|
||||||
gnc_builder_add_from_file (builder, "dialog-search.glade", "Search Dialog");
|
gnc_builder_add_from_file (builder, "dialog-search.glade", "Search Dialog");
|
||||||
@ -996,11 +995,11 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
|
|||||||
gtk_widget_show (add);
|
gtk_widget_show (add);
|
||||||
|
|
||||||
/* Set the match-type menu */
|
/* Set the match-type menu */
|
||||||
sw->grouping_combo = gtk_combo_box_new_text();
|
sw->grouping_combo = gtk_combo_box_text_new();
|
||||||
combo_box = GTK_COMBO_BOX(sw->grouping_combo);
|
combo_box = GTK_COMBO_BOX_TEXT(sw->grouping_combo);
|
||||||
gtk_combo_box_append_text(combo_box, _("all criteria are met"));
|
gtk_combo_box_text_append_text(combo_box, _("all criteria are met"));
|
||||||
gtk_combo_box_append_text(combo_box, _("any criteria are met"));
|
gtk_combo_box_text_append_text(combo_box, _("any criteria are met"));
|
||||||
gtk_combo_box_set_active(combo_box, sw->grouping);
|
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), sw->grouping);
|
||||||
g_signal_connect(combo_box, "changed", G_CALLBACK (match_combo_changed), sw);
|
g_signal_connect(combo_box, "changed", G_CALLBACK (match_combo_changed), sw);
|
||||||
|
|
||||||
box = GTK_WIDGET(gtk_builder_get_object (builder, "type_menu_box"));
|
box = GTK_WIDGET(gtk_builder_get_object (builder, "type_menu_box"));
|
||||||
|
@ -84,7 +84,7 @@ static guint general_search_signals[LAST_SIGNAL];
|
|||||||
/**
|
/**
|
||||||
* gnc_general_search_get_type:
|
* gnc_general_search_get_type:
|
||||||
*
|
*
|
||||||
* Returns the GtkType for the GNCGeneralSearch widget
|
* Returns the GType for the GNCGeneralSearch widget
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
gnc_general_search_get_type (void)
|
gnc_general_search_get_type (void)
|
||||||
@ -121,7 +121,7 @@ gnc_general_search_class_init (GNCGeneralSearchClass *klass)
|
|||||||
|
|
||||||
object_class = (GtkObjectClass*) klass;
|
object_class = (GtkObjectClass*) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (gtk_hbox_get_type ());
|
parent_class = g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
general_search_signals[SELECTION_CHANGED] =
|
general_search_signals[SELECTION_CHANGED] =
|
||||||
g_signal_new("changed",
|
g_signal_new("changed",
|
||||||
|
@ -310,7 +310,7 @@ gnc_reset_warnings_add_one (RWDialog *rw_dialog, GConfEntry *entry, GtkWidget *b
|
|||||||
gtk_widget_set_name(checkbox, entry->key);
|
gtk_widget_set_name(checkbox, entry->key);
|
||||||
g_signal_connect_swapped(G_OBJECT(checkbox), "toggled",
|
g_signal_connect_swapped(G_OBJECT(checkbox), "toggled",
|
||||||
(GCallback)gnc_reset_warnings_update_widgets, rw_dialog);
|
(GCallback)gnc_reset_warnings_update_widgets, rw_dialog);
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(box), checkbox);
|
gtk_box_pack_start(GTK_BOX(box), checkbox, TRUE, TRUE, 0);
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ gnc_xfer_dialog_key_press_cb (GtkWidget *widget,
|
|||||||
if ((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter))
|
if ((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter))
|
||||||
{
|
{
|
||||||
toplevel = gtk_widget_get_toplevel (widget);
|
toplevel = gtk_widget_get_toplevel (widget);
|
||||||
if (GTK_WIDGET_TOPLEVEL(toplevel) && GTK_IS_WINDOW(toplevel))
|
if (gtk_widget_is_toplevel(toplevel) && GTK_IS_WINDOW(toplevel))
|
||||||
{
|
{
|
||||||
gtk_window_activate_default(GTK_WINDOW(toplevel));
|
gtk_window_activate_default(GTK_WINDOW(toplevel));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -742,7 +742,7 @@ gnc_clist_add_check (GtkCList *list)
|
|||||||
g_signal_connect (object, "destroy",
|
g_signal_connect (object, "destroy",
|
||||||
G_CALLBACK (check_destroy), check_info);
|
G_CALLBACK (check_destroy), check_info);
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (GTK_WIDGET (list)))
|
if (gtk_widget_get_realized (GTK_WIDGET (list)))
|
||||||
check_realize (GTK_WIDGET (list), check_info);
|
check_realize (GTK_WIDGET (list), check_info);
|
||||||
|
|
||||||
return check_info;
|
return check_info;
|
||||||
@ -761,7 +761,7 @@ gnc_clist_set_check (GtkCList *list, int row, int col, gboolean checked)
|
|||||||
if (!check_info)
|
if (!check_info)
|
||||||
check_info = gnc_clist_add_check (list);
|
check_info = gnc_clist_add_check (list);
|
||||||
|
|
||||||
if (!GTK_WIDGET_REALIZED (GTK_WIDGET (list)))
|
if (!gtk_widget_get_realized (GTK_WIDGET (list)))
|
||||||
{
|
{
|
||||||
GNCCListCheckNode *node;
|
GNCCListCheckNode *node;
|
||||||
|
|
||||||
@ -945,8 +945,8 @@ gnc_dialog_run (GtkDialog *dialog, const gchar *gconf_key)
|
|||||||
: _("Don't tell me again this _session."));
|
: _("Don't tell me again this _session."));
|
||||||
gtk_widget_show(perm);
|
gtk_widget_show(perm);
|
||||||
gtk_widget_show(temp);
|
gtk_widget_show(temp);
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(dialog->vbox), perm);
|
gtk_box_pack_start(GTK_BOX(dialog->vbox), perm, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(dialog->vbox), temp);
|
gtk_box_pack_start(GTK_BOX(dialog->vbox), temp, TRUE, TRUE, 0);
|
||||||
g_signal_connect(perm, "clicked", G_CALLBACK(gnc_perm_button_cb), temp);
|
g_signal_connect(perm, "clicked", G_CALLBACK(gnc_perm_button_cb), temp);
|
||||||
|
|
||||||
/* OK. Present the dialog. */
|
/* OK. Present the dialog. */
|
||||||
|
@ -70,7 +70,7 @@ static GtkEntryClass *parent_class;
|
|||||||
/**
|
/**
|
||||||
* gnc_amount_edit_get_type:
|
* gnc_amount_edit_get_type:
|
||||||
*
|
*
|
||||||
* Returns the GtkType for the GNCAmountEdit widget
|
* Returns the GType for the GNCAmountEdit widget
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
gnc_amount_edit_get_type (void)
|
gnc_amount_edit_get_type (void)
|
||||||
|
@ -81,7 +81,7 @@ static GtkHBoxClass *parent_class;
|
|||||||
/**
|
/**
|
||||||
* gnc_date_edit_get_type:
|
* gnc_date_edit_get_type:
|
||||||
*
|
*
|
||||||
* Returns the GtkType for the GNCDateEdit widget
|
* Returns the GType for the GNCDateEdit widget
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
gnc_date_edit_get_type (void)
|
gnc_date_edit_get_type (void)
|
||||||
@ -314,7 +314,7 @@ gnc_date_edit_popup (GNCDateEdit *gde)
|
|||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gde->date_button),
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gde->date_button),
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
if (!GTK_WIDGET_HAS_FOCUS (gde->calendar))
|
if (!gtk_widget_has_focus (gde->calendar))
|
||||||
gtk_widget_grab_focus (gde->calendar);
|
gtk_widget_grab_focus (gde->calendar);
|
||||||
|
|
||||||
if (!popup_grab_on_window ((GTK_WIDGET(gde->cal_popup))->window,
|
if (!popup_grab_on_window ((GTK_WIDGET(gde->cal_popup))->window,
|
||||||
@ -356,7 +356,7 @@ gnc_date_edit_button_pressed (GtkWidget *widget,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GTK_WIDGET_HAS_FOCUS (gde->date_button))
|
if (!gtk_widget_has_focus (gde->date_button))
|
||||||
gtk_widget_grab_focus (gde->date_button);
|
gtk_widget_grab_focus (gde->date_button);
|
||||||
|
|
||||||
gde->popup_in_progress = TRUE;
|
gde->popup_in_progress = TRUE;
|
||||||
@ -1175,12 +1175,12 @@ gnc_date_edit_set_flags (GNCDateEdit *gde, GNCDateEditFlags flags)
|
|||||||
!= (old_flags & GNC_DATE_EDIT_WEEK_STARTS_ON_MONDAY))
|
!= (old_flags & GNC_DATE_EDIT_WEEK_STARTS_ON_MONDAY))
|
||||||
{
|
{
|
||||||
if (flags & GNC_DATE_EDIT_WEEK_STARTS_ON_MONDAY)
|
if (flags & GNC_DATE_EDIT_WEEK_STARTS_ON_MONDAY)
|
||||||
gtk_calendar_display_options
|
gtk_calendar_set_display_options
|
||||||
(GTK_CALENDAR (gde->calendar),
|
(GTK_CALENDAR (gde->calendar),
|
||||||
(GTK_CALENDAR (gde->calendar)->display_flags
|
(GTK_CALENDAR (gde->calendar)->display_flags
|
||||||
| GTK_CALENDAR_WEEK_START_MONDAY));
|
| GTK_CALENDAR_WEEK_START_MONDAY));
|
||||||
else
|
else
|
||||||
gtk_calendar_display_options
|
gtk_calendar_set_display_options
|
||||||
(GTK_CALENDAR (gde->calendar),
|
(GTK_CALENDAR (gde->calendar),
|
||||||
(GTK_CALENDAR (gde->calendar)->display_flags
|
(GTK_CALENDAR (gde->calendar)->display_flags
|
||||||
& ~GTK_CALENDAR_WEEK_START_MONDAY));
|
& ~GTK_CALENDAR_WEEK_START_MONDAY));
|
||||||
|
@ -96,7 +96,7 @@ static GtkHBoxClass *parent_class;
|
|||||||
/**
|
/**
|
||||||
* gnc_date_format_get_type:
|
* gnc_date_format_get_type:
|
||||||
*
|
*
|
||||||
* Returns the GtkType for the GNCDateFormat widget
|
* Returns the GType for the GNCDateFormat widget
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
gnc_date_format_get_type (void)
|
gnc_date_format_get_type (void)
|
||||||
|
@ -522,7 +522,7 @@ _gnc_dense_cal_set_month(GncDenseCal *dcal, GDateMonth mon, gboolean redraw)
|
|||||||
g_timer_start(t);
|
g_timer_start(t);
|
||||||
recompute_extents(dcal);
|
recompute_extents(dcal);
|
||||||
g_debug("recompute_extents: %f", g_timer_elapsed(t, NULL) * 1000.);
|
g_debug("recompute_extents: %f", g_timer_elapsed(t, NULL) * 1000.);
|
||||||
if (redraw && GTK_WIDGET_REALIZED(dcal))
|
if (redraw && gtk_widget_get_realized(GTK_WIDGET(dcal)))
|
||||||
{
|
{
|
||||||
g_timer_start(t);
|
g_timer_start(t);
|
||||||
recompute_x_y_scales(dcal);
|
recompute_x_y_scales(dcal);
|
||||||
@ -552,7 +552,7 @@ _gnc_dense_cal_set_year(GncDenseCal *dcal, guint year, gboolean redraw)
|
|||||||
dcal->year = year;
|
dcal->year = year;
|
||||||
recompute_first_of_month_offset(dcal);
|
recompute_first_of_month_offset(dcal);
|
||||||
recompute_extents(dcal);
|
recompute_extents(dcal);
|
||||||
if (redraw && GTK_WIDGET_REALIZED(dcal))
|
if (redraw && gtk_widget_get_realized(GTK_WIDGET(dcal)))
|
||||||
{
|
{
|
||||||
recompute_x_y_scales(dcal);
|
recompute_x_y_scales(dcal);
|
||||||
gnc_dense_cal_draw_to_buffer(dcal);
|
gnc_dense_cal_draw_to_buffer(dcal);
|
||||||
@ -599,7 +599,7 @@ gnc_dense_cal_set_num_months(GncDenseCal *dcal, guint num_months)
|
|||||||
dcal->numMonths = num_months;
|
dcal->numMonths = num_months;
|
||||||
recompute_extents(dcal);
|
recompute_extents(dcal);
|
||||||
recompute_mark_storage(dcal);
|
recompute_mark_storage(dcal);
|
||||||
if (GTK_WIDGET_REALIZED(dcal))
|
if (gtk_widget_get_realized(GTK_WIDGET(dcal)))
|
||||||
{
|
{
|
||||||
recompute_x_y_scales(dcal);
|
recompute_x_y_scales(dcal);
|
||||||
gnc_dense_cal_draw_to_buffer(dcal);
|
gnc_dense_cal_draw_to_buffer(dcal);
|
||||||
@ -645,7 +645,7 @@ gnc_dense_cal_dispose (GObject *object)
|
|||||||
return;
|
return;
|
||||||
dcal->disposed = TRUE;
|
dcal->disposed = TRUE;
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED(dcal->transPopup))
|
if (gtk_widget_get_realized(GTK_WIDGET(dcal->transPopup)))
|
||||||
{
|
{
|
||||||
gtk_widget_hide(GTK_WIDGET(dcal->transPopup));
|
gtk_widget_hide(GTK_WIDGET(dcal->transPopup));
|
||||||
gtk_widget_destroy(GTK_WIDGET(dcal->transPopup));
|
gtk_widget_destroy(GTK_WIDGET(dcal->transPopup));
|
||||||
@ -864,7 +864,7 @@ gnc_dense_cal_expose(GtkWidget *widget,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
dcal = GNC_DENSE_CAL(user_data);
|
dcal = GNC_DENSE_CAL(user_data);
|
||||||
gc = widget->style->fg_gc[GTK_WIDGET_STATE(widget)];
|
gc = widget->style->fg_gc[gtk_widget_get_state(widget)];
|
||||||
gdk_draw_drawable(GDK_DRAWABLE(GTK_WIDGET(dcal->cal_drawing_area)->window),
|
gdk_draw_drawable(GDK_DRAWABLE(GTK_WIDGET(dcal->cal_drawing_area)->window),
|
||||||
gc, GDK_DRAWABLE(dcal->drawbuf),
|
gc, GDK_DRAWABLE(dcal->drawbuf),
|
||||||
0, 0, 0, 0, -1, -1);
|
0, 0, 0, 0, -1, -1);
|
||||||
@ -909,7 +909,7 @@ gnc_dense_cal_draw_to_buffer(GncDenseCal *dcal)
|
|||||||
GList *mcList, *mcListIter;
|
GList *mcList, *mcListIter;
|
||||||
|
|
||||||
gc = gdk_gc_new(GTK_WIDGET(dcal)->window);
|
gc = gdk_gc_new(GTK_WIDGET(dcal)->window);
|
||||||
gdk_gc_copy(gc, widget->style->fg_gc[GTK_WIDGET_STATE(widget)]);
|
gdk_gc_copy(gc, widget->style->fg_gc[gtk_widget_get_state(widget)]);
|
||||||
|
|
||||||
/* reset all of the month position offsets. */
|
/* reset all of the month position offsets. */
|
||||||
for (i = 0; i < 12; i++)
|
for (i = 0; i < 12; i++)
|
||||||
|
@ -58,7 +58,7 @@ static guint general_select_signals[LAST_SIGNAL];
|
|||||||
/**
|
/**
|
||||||
* gnc_general_select_get_type:
|
* gnc_general_select_get_type:
|
||||||
*
|
*
|
||||||
* Returns the GtkType for the GNCGeneralSelect widget
|
* Returns the GType for the GNCGeneralSelect widget
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
gnc_general_select_get_type (void)
|
gnc_general_select_get_type (void)
|
||||||
|
@ -332,7 +332,6 @@ gnc_choose_radio_option_dialog(GtkWidget *parent,
|
|||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
button_name, GTK_RESPONSE_OK,
|
button_name, GTK_RESPONSE_OK,
|
||||||
NULL);
|
NULL);
|
||||||
gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);
|
|
||||||
|
|
||||||
/* default to ok */
|
/* default to ok */
|
||||||
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
|
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
|
||||||
|
@ -121,7 +121,7 @@ static void gnc_main_window_update_all_menu_items (void);
|
|||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
static void gnc_main_window_add_widget (GtkUIManager *merge, GtkWidget *widget, GncMainWindow *window);
|
static void gnc_main_window_add_widget (GtkUIManager *merge, GtkWidget *widget, GncMainWindow *window);
|
||||||
static void gnc_main_window_switch_page (GtkNotebook *notebook, GtkNotebookPage *notebook_page, gint pos, GncMainWindow *window);
|
static void gnc_main_window_switch_page (GtkNotebook *notebook, gpointer *notebook_page, gint pos, GncMainWindow *window);
|
||||||
static void gnc_main_window_page_reordered (GtkNotebook *notebook, GtkWidget *child, guint pos, GncMainWindow *window);
|
static void gnc_main_window_page_reordered (GtkNotebook *notebook, GtkWidget *child, guint pos, GncMainWindow *window);
|
||||||
static void gnc_main_window_plugin_added (GncPlugin *manager, GncPlugin *plugin, GncMainWindow *window);
|
static void gnc_main_window_plugin_added (GncPlugin *manager, GncPlugin *plugin, GncMainWindow *window);
|
||||||
static void gnc_main_window_plugin_removed (GncPlugin *manager, GncPlugin *plugin, GncMainWindow *window);
|
static void gnc_main_window_plugin_removed (GncPlugin *manager, GncPlugin *plugin, GncMainWindow *window);
|
||||||
@ -3533,7 +3533,7 @@ gnc_main_window_show_summarybar (GncMainWindow *window, GtkAction *action)
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
gnc_main_window_switch_page (GtkNotebook *notebook,
|
gnc_main_window_switch_page (GtkNotebook *notebook,
|
||||||
GtkNotebookPage *notebook_page,
|
gpointer *notebook_page,
|
||||||
gint pos,
|
gint pos,
|
||||||
GncMainWindow *window)
|
GncMainWindow *window)
|
||||||
{
|
{
|
||||||
|
@ -533,7 +533,7 @@ gnc_query_list_get_needed_height (GNCQueryList *list, gint num_rows)
|
|||||||
g_return_val_if_fail (list != NULL, 0);
|
g_return_val_if_fail (list != NULL, 0);
|
||||||
g_return_val_if_fail (IS_GNC_QUERY_LIST(list), 0);
|
g_return_val_if_fail (IS_GNC_QUERY_LIST(list), 0);
|
||||||
|
|
||||||
if (!GTK_WIDGET_REALIZED (list))
|
if (!gtk_widget_get_realized (GTK_WIDGET(list)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
clist = GTK_CLIST (list);
|
clist = GTK_CLIST (list);
|
||||||
|
@ -968,7 +968,7 @@ on_final_account_prepare (hierarchy_data *data)
|
|||||||
GNC_TREE_VIEW_COLUMN_DATA_NONE,
|
GNC_TREE_VIEW_COLUMN_DATA_NONE,
|
||||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||||
NULL);
|
NULL);
|
||||||
renderers = gtk_tree_view_column_get_cell_renderers(column);
|
renderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column));
|
||||||
g_object_set(G_OBJECT(renderer), "xalign", 1.0, (char*)NULL);
|
g_object_set(G_OBJECT(renderer), "xalign", 1.0, (char*)NULL);
|
||||||
gtk_tree_view_column_set_cell_data_func(column, GTK_CELL_RENDERER(renderers->data),
|
gtk_tree_view_column_set_cell_data_func(column, GTK_CELL_RENDERER(renderers->data),
|
||||||
use_existing_account_data_func, (gpointer)data, NULL);
|
use_existing_account_data_func, (gpointer)data, NULL);
|
||||||
|
@ -482,7 +482,7 @@ gnc_progress_dialog_pause(GNCProgressDialog *progress)
|
|||||||
|
|
||||||
suffix = g_strconcat(" ", _("(paused)"), NULL);
|
suffix = g_strconcat(" ", _("(paused)"), NULL);
|
||||||
|
|
||||||
if (progress->sub_label && GTK_WIDGET_VISIBLE(progress->sub_label))
|
if (progress->sub_label && gtk_widget_get_visible(progress->sub_label))
|
||||||
{
|
{
|
||||||
const gchar *txt = gtk_label_get_text(GTK_LABEL(progress->sub_label));
|
const gchar *txt = gtk_label_get_text(GTK_LABEL(progress->sub_label));
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ gnc_progress_dialog_pause(GNCProgressDialog *progress)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (progress->primary_label &&
|
else if (progress->primary_label &&
|
||||||
GTK_WIDGET_VISIBLE(progress->primary_label))
|
gtk_widget_get_visible(progress->primary_label))
|
||||||
{
|
{
|
||||||
const gchar *txt = gtk_label_get_text(GTK_LABEL(progress->primary_label));
|
const gchar *txt = gtk_label_get_text(GTK_LABEL(progress->primary_label));
|
||||||
|
|
||||||
@ -763,7 +763,7 @@ gnc_progress_dialog_finish(GNCProgressDialog *progress)
|
|||||||
gtk_widget_set_sensitive(progress->ok_button, TRUE);
|
gtk_widget_set_sensitive(progress->ok_button, TRUE);
|
||||||
gtk_widget_set_sensitive(progress->cancel_button, FALSE);
|
gtk_widget_set_sensitive(progress->cancel_button, FALSE);
|
||||||
|
|
||||||
if (GTK_WIDGET_VISIBLE(progress->primary_label))
|
if (gtk_widget_get_visible(progress->primary_label))
|
||||||
gnc_progress_dialog_set_heading(progress, _("Complete"));
|
gnc_progress_dialog_set_heading(progress, _("Complete"));
|
||||||
|
|
||||||
if (!progress->title_set)
|
if (!progress->title_set)
|
||||||
|
@ -1250,7 +1250,7 @@ gnc_ui_scheduled_xaction_editor_dialog_create (SchedXaction *sx,
|
|||||||
|
|
||||||
/* Do not call show_all here. Screws up the gtkuimanager code */
|
/* Do not call show_all here. Screws up the gtkuimanager code */
|
||||||
gtk_widget_show(sxed->dialog);
|
gtk_widget_show(sxed->dialog);
|
||||||
gtk_notebook_set_page(GTK_NOTEBOOK(sxed->notebook), 0);
|
gtk_notebook_set_current_page(GTK_NOTEBOOK(sxed->notebook), 0);
|
||||||
|
|
||||||
/* Refresh the cal and the ledger */
|
/* Refresh the cal and the ledger */
|
||||||
gtk_widget_queue_resize( GTK_WIDGET( sxed->example_cal ) );
|
gtk_widget_queue_resize( GTK_WIDGET( sxed->example_cal ) );
|
||||||
@ -1708,7 +1708,7 @@ static void
|
|||||||
_open_editors(GtkDialog *dialog, gint response_code, gpointer data)
|
_open_editors(GtkDialog *dialog, gint response_code, gpointer data)
|
||||||
{
|
{
|
||||||
acct_deletion_handler_data *adhd = (acct_deletion_handler_data *)data;
|
acct_deletion_handler_data *adhd = (acct_deletion_handler_data *)data;
|
||||||
gtk_widget_hide_all(adhd->dialog);
|
gtk_widget_hide(adhd->dialog);
|
||||||
{
|
{
|
||||||
GList *sx_iter;
|
GList *sx_iter;
|
||||||
for (sx_iter = adhd->affected_sxes; sx_iter; sx_iter = sx_iter->next)
|
for (sx_iter = adhd->affected_sxes; sx_iter; sx_iter = sx_iter->next)
|
||||||
|
@ -943,9 +943,9 @@ set_ok_sensitivity(GtkWidget *dialog)
|
|||||||
trans_mas_cnt = gnc_account_sel_get_num_account(GNC_ACCOUNT_SEL(trans_mas));
|
trans_mas_cnt = gnc_account_sel_get_num_account(GNC_ACCOUNT_SEL(trans_mas));
|
||||||
|
|
||||||
sensitive = (((NULL == sa_mas) ||
|
sensitive = (((NULL == sa_mas) ||
|
||||||
(!GTK_WIDGET_IS_SENSITIVE(sa_mas) || sa_mas_cnt)) &&
|
(!gtk_widget_is_sensitive(sa_mas) || sa_mas_cnt)) &&
|
||||||
((NULL == trans_mas) ||
|
((NULL == trans_mas) ||
|
||||||
(!GTK_WIDGET_IS_SENSITIVE(trans_mas) || trans_mas_cnt)));
|
(!gtk_widget_is_sensitive(trans_mas) || trans_mas_cnt)));
|
||||||
|
|
||||||
button = g_object_get_data(G_OBJECT(dialog), DELETE_DIALOG_OK_BUTTON);
|
button = g_object_get_data(G_OBJECT(dialog), DELETE_DIALOG_OK_BUTTON);
|
||||||
gtk_widget_set_sensitive(button, sensitive);
|
gtk_widget_set_sensitive(button, sensitive);
|
||||||
@ -1170,11 +1170,11 @@ gnc_plugin_page_account_tree_cmd_delete_account (GtkAction *action, GncPluginPag
|
|||||||
g_free(acct_name);
|
g_free(acct_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (trans_mas && GTK_WIDGET_IS_SENSITIVE(trans_mas))
|
if (trans_mas && gtk_widget_is_sensitive(trans_mas))
|
||||||
ta = gnc_account_sel_get_account(GNC_ACCOUNT_SEL(trans_mas));
|
ta = gnc_account_sel_get_account(GNC_ACCOUNT_SEL(trans_mas));
|
||||||
if (sa_mas && GTK_WIDGET_IS_SENSITIVE(sa_mas))
|
if (sa_mas && gtk_widget_is_sensitive(sa_mas))
|
||||||
saa = gnc_account_sel_get_account(GNC_ACCOUNT_SEL(sa_mas));
|
saa = gnc_account_sel_get_account(GNC_ACCOUNT_SEL(sa_mas));
|
||||||
if (sa_trans_mas && GTK_WIDGET_IS_SENSITIVE(sa_trans_mas))
|
if (sa_trans_mas && gtk_widget_is_sensitive(sa_trans_mas))
|
||||||
sta = gnc_account_sel_get_account(GNC_ACCOUNT_SEL(sa_trans_mas));
|
sta = gnc_account_sel_get_account(GNC_ACCOUNT_SEL(sa_trans_mas));
|
||||||
gtk_widget_destroy(dialog);
|
gtk_widget_destroy(dialog);
|
||||||
g_list_free(filter);
|
g_list_free(filter);
|
||||||
|
@ -399,7 +399,7 @@ gnc_reconcile_list_get_needed_height (GNCReconcileList *list, gint num_rows)
|
|||||||
g_return_val_if_fail (list != NULL, 0);
|
g_return_val_if_fail (list != NULL, 0);
|
||||||
g_return_val_if_fail (GNC_IS_RECONCILE_LIST(list), 0);
|
g_return_val_if_fail (GNC_IS_RECONCILE_LIST(list), 0);
|
||||||
|
|
||||||
if (!GTK_WIDGET_REALIZED (list))
|
if (!gtk_widget_get_realized (GTK_WIDGET(list)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return gnc_query_list_get_needed_height (GNC_QUERY_LIST(list), num_rows);
|
return gnc_query_list_get_needed_height (GNC_QUERY_LIST(list), num_rows);
|
||||||
|
@ -1245,7 +1245,7 @@ impl_webkit_print( GncHtml* self, const gchar* jobname, gboolean export_pdf )
|
|||||||
if ( error != NULL )
|
if ( error != NULL )
|
||||||
{
|
{
|
||||||
GtkWidget* window = gtk_widget_get_toplevel( GTK_WIDGET(priv->web_view) );
|
GtkWidget* window = gtk_widget_get_toplevel( GTK_WIDGET(priv->web_view) );
|
||||||
GtkWidget* dialog = gtk_message_dialog_new( GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : NULL,
|
GtkWidget* dialog = gtk_message_dialog_new( gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : NULL,
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
GTK_MESSAGE_ERROR,
|
GTK_MESSAGE_ERROR,
|
||||||
GTK_BUTTONS_CLOSE,
|
GTK_BUTTONS_CLOSE,
|
||||||
|
@ -299,7 +299,7 @@ gnc_ab_trans_dialog_new(GtkWidget *parent, AB_ACCOUNT *ab_acc,
|
|||||||
|
|
||||||
/* Amount edit */
|
/* Amount edit */
|
||||||
td->amount_edit = gnc_amount_edit_new();
|
td->amount_edit = gnc_amount_edit_new();
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(amount_hbox), td->amount_edit);
|
gtk_box_pack_start(GTK_BOX(amount_hbox), td->amount_edit, TRUE, TRUE, 0);
|
||||||
gnc_amount_edit_set_evaluate_on_enter(GNC_AMOUNT_EDIT(td->amount_edit),
|
gnc_amount_edit_set_evaluate_on_enter(GNC_AMOUNT_EDIT(td->amount_edit),
|
||||||
TRUE);
|
TRUE);
|
||||||
gnc_amount_edit_set_fraction(GNC_AMOUNT_EDIT(td->amount_edit),
|
gnc_amount_edit_set_fraction(GNC_AMOUNT_EDIT(td->amount_edit),
|
||||||
|
@ -793,7 +793,7 @@ show_progress(GncGWENGui *gui, Progress *progress)
|
|||||||
gtk_entry_set_text(GTK_ENTRY(entry), current->title);
|
gtk_entry_set_text(GTK_ENTRY(entry), current->title);
|
||||||
if (new_box)
|
if (new_box)
|
||||||
gui->other_entries_box = box = gtk_vbox_new(TRUE, 6);
|
gui->other_entries_box = box = gtk_vbox_new(TRUE, 6);
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(box), entry);
|
gtk_box_pack_start(GTK_BOX(box), entry, TRUE, TRUE, 0);
|
||||||
gtk_widget_show(entry);
|
gtk_widget_show(entry);
|
||||||
if (new_box)
|
if (new_box)
|
||||||
{
|
{
|
||||||
|
@ -82,8 +82,8 @@ typedef struct
|
|||||||
GtkCheckButton *sep_buttons[SEP_NUM_OF_TYPES]; /**< Checkbuttons for common separators */
|
GtkCheckButton *sep_buttons[SEP_NUM_OF_TYPES]; /**< Checkbuttons for common separators */
|
||||||
GtkCheckButton *custom_cbutton; /**< The checkbutton for a custom separator */
|
GtkCheckButton *custom_cbutton; /**< The checkbutton for a custom separator */
|
||||||
GtkEntry *custom_entry; /**< The entry for custom separators */
|
GtkEntry *custom_entry; /**< The entry for custom separators */
|
||||||
GtkComboBox *date_format_combo; /**< The widget for selecting the date format */
|
GtkComboBoxText *date_format_combo; /**< The Combo Text widget for selecting the date format */
|
||||||
GtkComboBox *currency_format_combo; /**< The widget for selecting the currency format */
|
GtkComboBoxText *currency_format_combo; /**< The Combo Text widget for selecting the currency format */
|
||||||
GtkTreeView *treeview; /**< The treeview containing the data */
|
GtkTreeView *treeview; /**< The treeview containing the data */
|
||||||
GtkTreeView *ctreeview; /**< The treeview containing the column types */
|
GtkTreeView *ctreeview; /**< The treeview containing the column types */
|
||||||
GtkLabel *instructions_label; /**< The instructions label */
|
GtkLabel *instructions_label; /**< The instructions label */
|
||||||
@ -358,7 +358,8 @@ void csv_import_trans_auto_cb (GtkWidget *cb, gpointer user_data )
|
|||||||
*/
|
*/
|
||||||
static GtkCellRenderer* gnc_csv_preview_get_cell_renderer(CsvImportTrans* info, int col)
|
static GtkCellRenderer* gnc_csv_preview_get_cell_renderer(CsvImportTrans* info, int col)
|
||||||
{
|
{
|
||||||
GList* renderers = gtk_tree_view_column_get_cell_renderers(gtk_tree_view_get_column(info->treeview, col));
|
GList* renderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(gtk_tree_view_get_column(info->treeview, col)));
|
||||||
|
|
||||||
GtkCellRenderer* cell = GTK_CELL_RENDERER(renderers->data);
|
GtkCellRenderer* cell = GTK_CELL_RENDERER(renderers->data);
|
||||||
g_list_free(renderers);
|
g_list_free(renderers);
|
||||||
return cell;
|
return cell;
|
||||||
@ -515,9 +516,9 @@ static void encoding_selected(GOCharmapSel* selector, const char* encoding,
|
|||||||
* @param format_selector The combo box for selecting date formats
|
* @param format_selector The combo box for selecting date formats
|
||||||
* @param info The display of the data being imported
|
* @param info The display of the data being imported
|
||||||
*/
|
*/
|
||||||
static void date_format_selected(GtkComboBox* format_selector, CsvImportTrans* info)
|
static void date_format_selected(GtkComboBoxText* format_selector, CsvImportTrans* info)
|
||||||
{
|
{
|
||||||
info->parse_data->date_format = gtk_combo_box_get_active(format_selector);
|
info->parse_data->date_format = gtk_combo_box_get_active(GTK_COMBO_BOX(format_selector));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -525,9 +526,9 @@ static void date_format_selected(GtkComboBox* format_selector, CsvImportTrans* i
|
|||||||
* @param currency_selector The combo box for selecting currency formats
|
* @param currency_selector The combo box for selecting currency formats
|
||||||
* @param info The display of the data being imported
|
* @param info The display of the data being imported
|
||||||
*/
|
*/
|
||||||
static void currency_format_selected(GtkComboBox* currency_selector, CsvImportTrans* info)
|
static void currency_format_selected(GtkComboBoxText* currency_selector, CsvImportTrans* info)
|
||||||
{
|
{
|
||||||
info->parse_data->currency_format = gtk_combo_box_get_active(currency_selector);
|
info->parse_data->currency_format = gtk_combo_box_get_active(GTK_COMBO_BOX(currency_selector));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -871,7 +872,7 @@ static void column_type_changed(GtkCellRenderer* renderer, gchar* path,
|
|||||||
/* The column in the treeview we are looking at */
|
/* The column in the treeview we are looking at */
|
||||||
GtkTreeViewColumn* col = gtk_tree_view_get_column(info->ctreeview, i);
|
GtkTreeViewColumn* col = gtk_tree_view_get_column(info->ctreeview, i);
|
||||||
/* The list of renderers for col */
|
/* The list of renderers for col */
|
||||||
GList* rend_list = gtk_tree_view_column_get_cell_renderers(col);
|
GList* rend_list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(col));
|
||||||
/* rend_list has only one entry, which we put in col_renderer. */
|
/* rend_list has only one entry, which we put in col_renderer. */
|
||||||
col_renderer = rend_list->data;
|
col_renderer = rend_list->data;
|
||||||
g_list_free(rend_list);
|
g_list_free(rend_list);
|
||||||
@ -1242,7 +1243,7 @@ static void gnc_csv_preview_update_assist(CsvImportTrans* info)
|
|||||||
|
|
||||||
/* Set the date format to what's in the combo box (since we don't
|
/* Set the date format to what's in the combo box (since we don't
|
||||||
* necessarily know if this will always be the same). */
|
* necessarily know if this will always be the same). */
|
||||||
info->parse_data->date_format = gtk_combo_box_get_active(info->date_format_combo);
|
info->parse_data->date_format = gtk_combo_box_get_active(GTK_COMBO_BOX(info->date_format_combo));
|
||||||
|
|
||||||
/* It's now been filled with some stuff. */
|
/* It's now been filled with some stuff. */
|
||||||
info->not_empty = TRUE;
|
info->not_empty = TRUE;
|
||||||
@ -1735,12 +1736,12 @@ csv_import_trans_assistant_create (CsvImportTrans *info)
|
|||||||
info->instructions_image = GTK_IMAGE(gtk_builder_get_object (builder, "instructions_image"));
|
info->instructions_image = GTK_IMAGE(gtk_builder_get_object (builder, "instructions_image"));
|
||||||
|
|
||||||
/* Add in the date format combo box and hook it up to an event handler. */
|
/* Add in the date format combo box and hook it up to an event handler. */
|
||||||
info->date_format_combo = GTK_COMBO_BOX(gtk_combo_box_new_text());
|
info->date_format_combo = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
|
||||||
for (i = 0; i < num_date_formats; i++)
|
for (i = 0; i < num_date_formats; i++)
|
||||||
{
|
{
|
||||||
gtk_combo_box_append_text(info->date_format_combo, _(date_format_user[i]));
|
gtk_combo_box_text_append_text(info->date_format_combo, _(date_format_user[i]));
|
||||||
}
|
}
|
||||||
gtk_combo_box_set_active(info->date_format_combo, 0);
|
gtk_combo_box_set_active(GTK_COMBO_BOX(info->date_format_combo), 0);
|
||||||
g_signal_connect(G_OBJECT(info->date_format_combo), "changed",
|
g_signal_connect(G_OBJECT(info->date_format_combo), "changed",
|
||||||
G_CALLBACK(date_format_selected), (gpointer)info);
|
G_CALLBACK(date_format_selected), (gpointer)info);
|
||||||
|
|
||||||
@ -1750,13 +1751,13 @@ csv_import_trans_assistant_create (CsvImportTrans *info)
|
|||||||
gtk_widget_show_all(GTK_WIDGET(date_format_container));
|
gtk_widget_show_all(GTK_WIDGET(date_format_container));
|
||||||
|
|
||||||
/* Add in the currency format combo box and hook it up to an event handler. */
|
/* Add in the currency format combo box and hook it up to an event handler. */
|
||||||
info->currency_format_combo = GTK_COMBO_BOX(gtk_combo_box_new_text());
|
info->currency_format_combo = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
|
||||||
for (i = 0; i < num_currency_formats; i++)
|
for (i = 0; i < num_currency_formats; i++)
|
||||||
{
|
{
|
||||||
gtk_combo_box_append_text(info->currency_format_combo, _(currency_format_user[i]));
|
gtk_combo_box_text_append_text(info->currency_format_combo, _(currency_format_user[i]));
|
||||||
}
|
}
|
||||||
/* Default will the locale */
|
/* Default will the locale */
|
||||||
gtk_combo_box_set_active(info->currency_format_combo, 0);
|
gtk_combo_box_set_active(GTK_COMBO_BOX(info->currency_format_combo), 0);
|
||||||
g_signal_connect(G_OBJECT(info->currency_format_combo), "changed",
|
g_signal_connect(G_OBJECT(info->currency_format_combo), "changed",
|
||||||
G_CALLBACK(currency_format_selected), (gpointer)info);
|
G_CALLBACK(currency_format_selected), (gpointer)info);
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ gnc_item_edit_draw_info (GncItemEdit *item_edit, int x, int y, TextDrawInfo *inf
|
|||||||
attr->end_index = end_byte_pos;
|
attr->end_index = end_byte_pos;
|
||||||
pango_attr_list_insert (attr_list, attr);
|
pango_attr_list_insert (attr_list, attr);
|
||||||
|
|
||||||
color = GTK_WIDGET_HAS_FOCUS(item_edit->sheet) ? 0x0 : 0x7fff;
|
color = gtk_widget_has_focus(GTK_WIDGET(item_edit->sheet)) ? 0x0 : 0x7fff;
|
||||||
attr = pango_attr_background_new (color, color, color);
|
attr = pango_attr_background_new (color, color, color);
|
||||||
attr->start_index = start_byte_pos;
|
attr->start_index = start_byte_pos;
|
||||||
attr->end_index = end_byte_pos;
|
attr->end_index = end_byte_pos;
|
||||||
|
@ -229,9 +229,6 @@ gnc_item_list_autosize (GncItemList *item_list)
|
|||||||
g_return_val_if_fail(item_list != NULL, 0);
|
g_return_val_if_fail(item_list != NULL, 0);
|
||||||
g_return_val_if_fail(IS_GNC_ITEM_LIST(item_list), 0);
|
g_return_val_if_fail(IS_GNC_ITEM_LIST(item_list), 0);
|
||||||
|
|
||||||
#if 0
|
|
||||||
return gtk_clist_columns_autosize (item_list->clist);
|
|
||||||
#endif
|
|
||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1391,7 +1391,7 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
|
|||||||
if (sheet->button == 3)
|
if (sheet->button == 3)
|
||||||
sheet->button = 0;
|
sheet->button = 0;
|
||||||
|
|
||||||
if (!GTK_WIDGET_HAS_FOCUS(widget))
|
if (!gtk_widget_has_focus(widget))
|
||||||
gtk_widget_grab_focus(widget);
|
gtk_widget_grab_focus(widget);
|
||||||
|
|
||||||
button_1 = FALSE;
|
button_1 = FALSE;
|
||||||
@ -2702,8 +2702,8 @@ gnucash_sheet_init (GnucashSheet *sheet)
|
|||||||
{
|
{
|
||||||
GnomeCanvas *canvas = GNOME_CANVAS (sheet);
|
GnomeCanvas *canvas = GNOME_CANVAS (sheet);
|
||||||
|
|
||||||
GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_FOCUS);
|
gtk_widget_set_can_focus (GTK_WIDGET(canvas), TRUE);
|
||||||
GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_DEFAULT);
|
gtk_widget_set_can_default (GTK_WIDGET(canvas), TRUE);
|
||||||
|
|
||||||
sheet->top_block = 1;
|
sheet->top_block = 1;
|
||||||
sheet->bottom_block = 1;
|
sheet->bottom_block = 1;
|
||||||
@ -2888,8 +2888,8 @@ gnucash_register_init (GnucashRegister *g_reg)
|
|||||||
{
|
{
|
||||||
GtkTable *table = GTK_TABLE(g_reg);
|
GtkTable *table = GTK_TABLE(g_reg);
|
||||||
|
|
||||||
GTK_WIDGET_UNSET_FLAGS (table, GTK_CAN_FOCUS);
|
gtk_widget_set_can_focus (GTK_WIDGET(table), FALSE);
|
||||||
GTK_WIDGET_UNSET_FLAGS (table, GTK_CAN_DEFAULT);
|
gtk_widget_set_can_default (GTK_WIDGET(table), FALSE);
|
||||||
|
|
||||||
gtk_table_set_homogeneous (table, FALSE);
|
gtk_table_set_homogeneous (table, FALSE);
|
||||||
gtk_table_resize (table, 3, 2);
|
gtk_table_resize (table, 3, 2);
|
||||||
@ -3007,14 +3007,14 @@ gnucash_register_new (Table *table)
|
|||||||
* user. */
|
* user. */
|
||||||
box = gtk_hbox_new(FALSE, 0);
|
box = gtk_hbox_new(FALSE, 0);
|
||||||
gtk_widget_set_no_show_all(GTK_WIDGET(box), TRUE);
|
gtk_widget_set_no_show_all(GTK_WIDGET(box), TRUE);
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(box),
|
gtk_box_pack_start(GTK_BOX(box),
|
||||||
GNUCASH_SHEET(sheet)->header_color);
|
GNUCASH_SHEET(sheet)->header_color, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(box),
|
gtk_box_pack_start(GTK_BOX(box),
|
||||||
GNUCASH_SHEET(sheet)->primary_color);
|
GNUCASH_SHEET(sheet)->primary_color, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(box),
|
gtk_box_pack_start(GTK_BOX(box),
|
||||||
GNUCASH_SHEET(sheet)->secondary_color);
|
GNUCASH_SHEET(sheet)->secondary_color, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(box),
|
gtk_box_pack_start(GTK_BOX(box),
|
||||||
GNUCASH_SHEET(sheet)->split_color);
|
GNUCASH_SHEET(sheet)->split_color, TRUE, TRUE, 0);
|
||||||
|
|
||||||
gtk_table_attach (GTK_TABLE(widget), box,
|
gtk_table_attach (GTK_TABLE(widget), box,
|
||||||
0, 1, 4, 5,
|
0, 1, 4, 5,
|
||||||
|
Loading…
Reference in New Issue
Block a user