diff options
author | Havoc Pennington <hp@redhat.com> | 2001-03-16 20:12:40 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-03-16 20:12:40 +0000 |
commit | 52658cd3dc2ec01fe9cfcb5f9253b00febc8e039 (patch) | |
tree | 8e6c0e02a5385ef57bc341284d4c4bbc7e467d7d /gtk | |
parent | e7a21a2eec40ddb38e4b27b4fe818dbd20351259 (diff) | |
download | gdk-pixbuf-52658cd3dc2ec01fe9cfcb5f9253b00febc8e039.tar.gz |
Applied patch from Nils Barth (bug # 51041) to replace "gint" with
2001-03-16 Havoc Pennington <hp@redhat.com>
* Applied patch from Nils Barth (bug # 51041) to
replace "gint" with "gboolean" and 0/1 with TRUE/FALSE
in various places.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkaccelgroup.c | 2 | ||||
-rw-r--r-- | gtk/gtkaccellabel.c | 32 | ||||
-rw-r--r-- | gtk/gtkadjustment.c | 2 | ||||
-rw-r--r-- | gtk/gtkarg.c | 2 | ||||
-rw-r--r-- | gtk/gtkarg.h | 2 | ||||
-rw-r--r-- | gtk/gtkarrow.c | 2 | ||||
-rw-r--r-- | gtk/gtkbutton.c | 10 | ||||
-rw-r--r-- | gtk/gtkcalendar.c | 18 | ||||
-rw-r--r-- | gtk/gtkcalendar.h | 6 | ||||
-rw-r--r-- | gtk/gtkcombo.c | 20 | ||||
-rw-r--r-- | gtk/gtkcombo.h | 12 | ||||
-rw-r--r-- | gtk/gtkctree.c | 52 | ||||
-rw-r--r-- | gtk/gtkctree.h | 8 | ||||
-rw-r--r-- | gtk/gtkmain.c | 8 | ||||
-rw-r--r-- | gtk/gtkmain.h | 16 | ||||
-rw-r--r-- | gtk/gtkmenuitem.c | 8 | ||||
-rw-r--r-- | gtk/gtkmenuitem.h | 4 | ||||
-rw-r--r-- | gtk/gtkpixmap.c | 2 | ||||
-rw-r--r-- | gtk/gtkpixmap.h | 2 | ||||
-rw-r--r-- | gtk/gtkplug.h | 2 | ||||
-rw-r--r-- | gtk/gtkprogress.c | 12 | ||||
-rw-r--r-- | gtk/gtkprogress.h | 4 | ||||
-rw-r--r-- | gtk/gtkselection.c | 12 | ||||
-rw-r--r-- | gtk/gtkselection.h | 22 | ||||
-rw-r--r-- | gtk/gtktext.c | 16 | ||||
-rw-r--r-- | gtk/gtktext.h | 8 | ||||
-rw-r--r-- | gtk/gtktoolbar.c | 2 | ||||
-rw-r--r-- | gtk/gtktoolbar.h | 2 | ||||
-rw-r--r-- | gtk/gtktree.c | 4 | ||||
-rw-r--r-- | gtk/gtktree.h | 2 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 4 | ||||
-rw-r--r-- | gtk/gtkwidget.h | 4 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 10 | ||||
-rw-r--r-- | gtk/gtkwindow.h | 10 |
34 files changed, 161 insertions, 161 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index c5343508b..ac9606fb6 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -64,7 +64,7 @@ static GMemChunk *accel_entries_mem_chunk = NULL; /* --- functions --- */ -static gint +static gboolean gtk_accel_entries_equal (gconstpointer a, gconstpointer b) { diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c index 4f313f52d..c872677d8 100644 --- a/gtk/gtkaccellabel.c +++ b/gtk/gtkaccellabel.c @@ -39,21 +39,21 @@ enum { ARG_ACCEL_WIDGET }; -static void gtk_accel_label_class_init (GtkAccelLabelClass *klass); -static void gtk_accel_label_init (GtkAccelLabel *accel_label); -static void gtk_accel_label_set_arg (GtkObject *object, - GtkArg *arg, - guint arg_id); -static void gtk_accel_label_get_arg (GtkObject *object, - GtkArg *arg, - guint arg_id); -static void gtk_accel_label_destroy (GtkObject *object); -static void gtk_accel_label_finalize (GObject *object); -static void gtk_accel_label_size_request (GtkWidget *widget, - GtkRequisition *requisition); -static gint gtk_accel_label_expose_event (GtkWidget *widget, - GdkEventExpose *event); -static gboolean gtk_accel_label_refetch_idle (GtkAccelLabel *accel_label); +static void gtk_accel_label_class_init (GtkAccelLabelClass *klass); +static void gtk_accel_label_init (GtkAccelLabel *accel_label); +static void gtk_accel_label_set_arg (GtkObject *object, + GtkArg *arg, + guint arg_id); +static void gtk_accel_label_get_arg (GtkObject *object, + GtkArg *arg, + guint arg_id); +static void gtk_accel_label_destroy (GtkObject *object); +static void gtk_accel_label_finalize (GObject *object); +static void gtk_accel_label_size_request (GtkWidget *widget, + GtkRequisition *requisition); +static gboolean gtk_accel_label_expose_event (GtkWidget *widget, + GdkEventExpose *event); +static gboolean gtk_accel_label_refetch_idle (GtkAccelLabel *accel_label); static GtkAccelLabelClass *accel_label_class = NULL; static GtkLabelClass *parent_class = NULL; @@ -249,7 +249,7 @@ gtk_accel_label_size_request (GtkWidget *widget, g_object_unref (G_OBJECT (layout)); } -static gint +static gboolean gtk_accel_label_expose_event (GtkWidget *widget, GdkEventExpose *event) { diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c index c5cc64f96..266e890a4 100644 --- a/gtk/gtkadjustment.c +++ b/gtk/gtkadjustment.c @@ -166,7 +166,7 @@ gtk_adjustment_clamp_page (GtkAdjustment *adjustment, gfloat lower, gfloat upper) { - gint need_emission; + gboolean need_emission; g_return_if_fail (adjustment != NULL); g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); diff --git a/gtk/gtkarg.c b/gtk/gtkarg.c index 20ba7cd02..705dc0ebf 100644 --- a/gtk/gtkarg.c +++ b/gtk/gtkarg.c @@ -450,7 +450,7 @@ gtk_arg_reset (GtkArg *arg) arg->type = GTK_TYPE_INVALID; } -gint +gboolean gtk_arg_info_equal (gconstpointer arg_info_1, gconstpointer arg_info_2) { diff --git a/gtk/gtkarg.h b/gtk/gtkarg.h index b3aacc2c9..862d26987 100644 --- a/gtk/gtkarg.h +++ b/gtk/gtkarg.h @@ -92,7 +92,7 @@ GtkArg* gtk_args_query (GtkType class_type, guint32 **arg_flags, guint *n_args_p); gchar* gtk_arg_name_strip_type (const gchar *arg_name); -gint gtk_arg_info_equal (gconstpointer arg_info_1, +gboolean gtk_arg_info_equal (gconstpointer arg_info_1, gconstpointer arg_info_2); guint gtk_arg_info_hash (gconstpointer arg_info); void gtk_arg_to_valueloc (GtkArg *arg, diff --git a/gtk/gtkarrow.c b/gtk/gtkarrow.c index 69859b344..d4c792995 100644 --- a/gtk/gtkarrow.c +++ b/gtk/gtkarrow.c @@ -221,7 +221,7 @@ gtk_arrow_set (GtkArrow *arrow, } -static gint +static gboolean gtk_arrow_expose (GtkWidget *widget, GdkEventExpose *event) { diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 6b8d1f6a1..6640bc2a4 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -709,7 +709,7 @@ gtk_button_paint (GtkWidget *widget, } } -static gint +static gboolean gtk_button_expose (GtkWidget *widget, GdkEventExpose *event) { @@ -731,7 +731,7 @@ gtk_button_expose (GtkWidget *widget, return FALSE; } -static gint +static gboolean gtk_button_button_press (GtkWidget *widget, GdkEventButton *event) { @@ -755,7 +755,7 @@ gtk_button_button_press (GtkWidget *widget, return TRUE; } -static gint +static gboolean gtk_button_button_release (GtkWidget *widget, GdkEventButton *event) { @@ -791,7 +791,7 @@ gtk_button_key_release (GtkWidget *widget, return FALSE; } -static gint +static gboolean gtk_button_enter_notify (GtkWidget *widget, GdkEventCrossing *event) { @@ -815,7 +815,7 @@ gtk_button_enter_notify (GtkWidget *widget, return FALSE; } -static gint +static gboolean gtk_button_leave_notify (GtkWidget *widget, GdkEventCrossing *event) { diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index a9fa8ad1a..05eb0f463 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -1449,7 +1449,7 @@ gtk_calendar_draw_focus (GtkWidget *widget) } } -static gint +static gboolean gtk_calendar_expose (GtkWidget *widget, GdkEventExpose *event) { @@ -2161,7 +2161,7 @@ gtk_calendar_display_options (GtkCalendar *calendar, } -gint +gboolean gtk_calendar_select_month (GtkCalendar *calendar, guint month, guint year) @@ -2238,7 +2238,7 @@ gtk_calendar_clear_marks (GtkCalendar *calendar) } } -gint +gboolean gtk_calendar_mark_day (GtkCalendar *calendar, guint day) { @@ -2258,7 +2258,7 @@ gtk_calendar_mark_day (GtkCalendar *calendar, return TRUE; } -gint +gboolean gtk_calendar_unmark_day (GtkCalendar *calendar, guint day) { @@ -2298,7 +2298,7 @@ gtk_calendar_get_date (GtkCalendar *calendar, *day = calendar->selected_day; } -static gint +static gboolean gtk_calendar_button_press (GtkWidget *widget, GdkEventButton *event) { @@ -2337,7 +2337,7 @@ gtk_calendar_button_press (GtkWidget *widget, return FALSE; } -static gint +static gboolean gtk_calendar_motion_notify (GtkWidget *widget, GdkEventMotion *event) { @@ -2379,7 +2379,7 @@ gtk_calendar_motion_notify (GtkWidget *widget, return TRUE; } -static gint +static gboolean gtk_calendar_enter_notify (GtkWidget *widget, GdkEventCrossing *event) { @@ -2419,7 +2419,7 @@ gtk_calendar_enter_notify (GtkWidget *widget, return TRUE; } -static gint +static gboolean gtk_calendar_leave_notify (GtkWidget *widget, GdkEventCrossing *event) { @@ -2625,7 +2625,7 @@ gtk_calendar_destroy (GtkObject *object) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } -static gint +static gboolean gtk_calendar_key_press (GtkWidget *widget, GdkEventKey *event) { diff --git a/gtk/gtkcalendar.h b/gtk/gtkcalendar.h index 851903b1e..792387ee1 100644 --- a/gtk/gtkcalendar.h +++ b/gtk/gtkcalendar.h @@ -110,15 +110,15 @@ struct _GtkCalendarClass GtkType gtk_calendar_get_type (void) G_GNUC_CONST; GtkWidget* gtk_calendar_new (void); -gint gtk_calendar_select_month (GtkCalendar *calendar, +gboolean gtk_calendar_select_month (GtkCalendar *calendar, guint month, guint year); void gtk_calendar_select_day (GtkCalendar *calendar, guint day); -gint gtk_calendar_mark_day (GtkCalendar *calendar, +gboolean gtk_calendar_mark_day (GtkCalendar *calendar, guint day); -gint gtk_calendar_unmark_day (GtkCalendar *calendar, +gboolean gtk_calendar_unmark_day (GtkCalendar *calendar, guint day); void gtk_calendar_clear_marks (GtkCalendar *calendar); diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c index 020ab7f28..706692e76 100644 --- a/gtk/gtkcombo.c +++ b/gtk/gtkcombo.c @@ -724,11 +724,11 @@ gtk_combo_init (GtkCombo * combo) GtkWidget *event_box; GdkCursor *cursor; - combo->case_sensitive = 0; - combo->value_in_list = 0; - combo->ok_if_empty = 1; - combo->use_arrows = 1; - combo->use_arrows_always = 0; + combo->case_sensitive = FALSE; + combo->value_in_list = FALSE; + combo->ok_if_empty = TRUE; + combo->use_arrows = TRUE; + combo->use_arrows_always = FALSE; combo->entry = gtk_entry_new (); combo->button = gtk_button_new (); combo->current_button = 0; @@ -849,7 +849,7 @@ gtk_combo_new (void) } void -gtk_combo_set_value_in_list (GtkCombo * combo, gint val, gint ok_if_empty) +gtk_combo_set_value_in_list (GtkCombo * combo, gboolean val, gboolean ok_if_empty) { g_return_if_fail (combo != NULL); g_return_if_fail (GTK_IS_COMBO (combo)); @@ -859,7 +859,7 @@ gtk_combo_set_value_in_list (GtkCombo * combo, gint val, gint ok_if_empty) } void -gtk_combo_set_case_sensitive (GtkCombo * combo, gint val) +gtk_combo_set_case_sensitive (GtkCombo * combo, gboolean val) { g_return_if_fail (combo != NULL); g_return_if_fail (GTK_IS_COMBO (combo)); @@ -869,7 +869,7 @@ gtk_combo_set_case_sensitive (GtkCombo * combo, gint val) } void -gtk_combo_set_use_arrows (GtkCombo * combo, gint val) +gtk_combo_set_use_arrows (GtkCombo * combo, gboolean val) { g_return_if_fail (combo != NULL); g_return_if_fail (GTK_IS_COMBO (combo)); @@ -879,13 +879,13 @@ gtk_combo_set_use_arrows (GtkCombo * combo, gint val) } void -gtk_combo_set_use_arrows_always (GtkCombo * combo, gint val) +gtk_combo_set_use_arrows_always (GtkCombo * combo, gboolean val) { g_return_if_fail (combo != NULL); g_return_if_fail (GTK_IS_COMBO (combo)); combo->use_arrows_always = val; - combo->use_arrows = 1; + combo->use_arrows = TRUE; g_object_notify (G_OBJECT (combo), "enable_arrows"); g_object_notify (G_OBJECT (combo), "enable_arrows_always"); } diff --git a/gtk/gtkcombo.h b/gtk/gtkcombo.h index 6345464f7..06ac0a26b 100644 --- a/gtk/gtkcombo.h +++ b/gtk/gtkcombo.h @@ -76,17 +76,17 @@ GtkType gtk_combo_get_type (void) G_GNUC_CONST; GtkWidget* gtk_combo_new (void); /* the text in the entry must be or not be in the list */ void gtk_combo_set_value_in_list (GtkCombo* combo, - gint val, - gint ok_if_empty); -/* set/unset arrows working for changing the value (can be annoying */ + gboolean val, + gboolean ok_if_empty); +/* set/unset arrows working for changing the value (can be annoying) */ void gtk_combo_set_use_arrows (GtkCombo* combo, - gint val); + gboolean val); /* up/down arrows change value if current value not in list */ void gtk_combo_set_use_arrows_always (GtkCombo* combo, - gint val); + gboolean val); /* perform case-sensitive compares */ void gtk_combo_set_case_sensitive (GtkCombo* combo, - gint val); + gboolean val); /* call this function on an item if it isn't a label or you want it to have a different value to be displayed in the entry */ void gtk_combo_set_item_string (GtkCombo* combo, diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c index 111398274..ff4fe0d89 100644 --- a/gtk/gtkctree.c +++ b/gtk/gtkctree.c @@ -4884,54 +4884,54 @@ gtk_ctree_node_get_cell_type (GtkCTree *ctree, return GTK_CTREE_ROW (node)->row.cell[column].type; } -gint +gboolean gtk_ctree_node_get_text (GtkCTree *ctree, GtkCTreeNode *node, gint column, gchar **text) { - g_return_val_if_fail (ctree != NULL, 0); - g_return_val_if_fail (GTK_IS_CTREE (ctree), 0); - g_return_val_if_fail (node != NULL, 0); + g_return_val_if_fail (ctree != NULL, FALSE); + g_return_val_if_fail (GTK_IS_CTREE (ctree), FALSE); + g_return_val_if_fail (node != NULL, FALSE); if (column < 0 || column >= GTK_CLIST (ctree)->columns) - return 0; + return FALSE; if (GTK_CTREE_ROW (node)->row.cell[column].type != GTK_CELL_TEXT) - return 0; + return FALSE; if (text) *text = GTK_CELL_TEXT (GTK_CTREE_ROW (node)->row.cell[column])->text; - return 1; + return TRUE; } -gint +gboolean gtk_ctree_node_get_pixmap (GtkCTree *ctree, GtkCTreeNode *node, gint column, GdkPixmap **pixmap, GdkBitmap **mask) { - g_return_val_if_fail (ctree != NULL, 0); - g_return_val_if_fail (GTK_IS_CTREE (ctree), 0); - g_return_val_if_fail (node != NULL, 0); + g_return_val_if_fail (ctree != NULL, FALSE); + g_return_val_if_fail (GTK_IS_CTREE (ctree), FALSE); + g_return_val_if_fail (node != NULL, FALSE); if (column < 0 || column >= GTK_CLIST (ctree)->columns) - return 0; + return FALSE; if (GTK_CTREE_ROW (node)->row.cell[column].type != GTK_CELL_PIXMAP) - return 0; + return FALSE; if (pixmap) *pixmap = GTK_CELL_PIXMAP (GTK_CTREE_ROW(node)->row.cell[column])->pixmap; if (mask) *mask = GTK_CELL_PIXMAP (GTK_CTREE_ROW (node)->row.cell[column])->mask; - return 1; + return TRUE; } -gint +gboolean gtk_ctree_node_get_pixtext (GtkCTree *ctree, GtkCTreeNode *node, gint column, @@ -4940,15 +4940,15 @@ gtk_ctree_node_get_pixtext (GtkCTree *ctree, GdkPixmap **pixmap, GdkBitmap **mask) { - g_return_val_if_fail (ctree != NULL, 0); - g_return_val_if_fail (GTK_IS_CTREE (ctree), 0); - g_return_val_if_fail (node != NULL, 0); + g_return_val_if_fail (ctree != NULL, FALSE); + g_return_val_if_fail (GTK_IS_CTREE (ctree), FALSE); + g_return_val_if_fail (node != NULL, FALSE); if (column < 0 || column >= GTK_CLIST (ctree)->columns) - return 0; + return FALSE; if (GTK_CTREE_ROW (node)->row.cell[column].type != GTK_CELL_PIXTEXT) - return 0; + return FALSE; if (text) *text = GTK_CELL_PIXTEXT (GTK_CTREE_ROW (node)->row.cell[column])->text; @@ -4961,10 +4961,10 @@ gtk_ctree_node_get_pixtext (GtkCTree *ctree, if (mask) *mask = GTK_CELL_PIXTEXT (GTK_CTREE_ROW (node)->row.cell[column])->mask; - return 1; + return TRUE; } -gint +gboolean gtk_ctree_get_node_info (GtkCTree *ctree, GtkCTreeNode *node, gchar **text, @@ -4976,9 +4976,9 @@ gtk_ctree_get_node_info (GtkCTree *ctree, gboolean *is_leaf, gboolean *expanded) { - g_return_val_if_fail (ctree != NULL, 0); - g_return_val_if_fail (GTK_IS_CTREE (ctree), 0); - g_return_val_if_fail (node != NULL, 0); + g_return_val_if_fail (ctree != NULL, FALSE); + g_return_val_if_fail (GTK_IS_CTREE (ctree), FALSE); + g_return_val_if_fail (node != NULL, FALSE); if (text) *text = GTK_CELL_PIXTEXT @@ -4999,7 +4999,7 @@ gtk_ctree_get_node_info (GtkCTree *ctree, if (expanded) *expanded = GTK_CTREE_ROW (node)->expanded; - return 1; + return TRUE; } void diff --git a/gtk/gtkctree.h b/gtk/gtkctree.h index 69cc0b982..5276bf2d8 100644 --- a/gtk/gtkctree.h +++ b/gtk/gtkctree.h @@ -342,23 +342,23 @@ gboolean gtk_ctree_node_get_selectable (GtkCTree *ctree, GtkCellType gtk_ctree_node_get_cell_type (GtkCTree *ctree, GtkCTreeNode *node, gint column); -gint gtk_ctree_node_get_text (GtkCTree *ctree, +gboolean gtk_ctree_node_get_text (GtkCTree *ctree, GtkCTreeNode *node, gint column, gchar **text); -gint gtk_ctree_node_get_pixmap (GtkCTree *ctree, +gboolean gtk_ctree_node_get_pixmap (GtkCTree *ctree, GtkCTreeNode *node, gint column, GdkPixmap **pixmap, GdkBitmap **mask); -gint gtk_ctree_node_get_pixtext (GtkCTree *ctree, +gboolean gtk_ctree_node_get_pixtext (GtkCTree *ctree, GtkCTreeNode *node, gint column, gchar **text, guint8 *spacing, GdkPixmap **pixmap, GdkBitmap **mask); -gint gtk_ctree_get_node_info (GtkCTree *ctree, +gboolean gtk_ctree_get_node_info (GtkCTree *ctree, GtkCTreeNode *node, gchar **text, guint8 *spacing, diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 6ca74c210..a1ea91bb8 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -717,7 +717,7 @@ gtk_events_pending (void) return result; } -gint +gboolean gtk_main_iteration (void) { GDK_THREADS_LEAVE (); @@ -730,7 +730,7 @@ gtk_main_iteration (void) return TRUE; } -gint +gboolean gtk_main_iteration_do (gboolean blocking) { GDK_THREADS_LEAVE (); @@ -950,13 +950,13 @@ gtk_main_do_event (GdkEvent *event) g_list_free_1 (tmp_list); } -gint +gboolean gtk_true (void) { return TRUE; } -gint +gboolean gtk_false (void) { return FALSE; diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h index 5701588ea..8f1c6ee9a 100644 --- a/gtk/gtkmain.h +++ b/gtk/gtkmain.h @@ -116,17 +116,17 @@ gint gtk_events_pending (void); * we expose it mainly to allow filtering of events between * GDK and GTK+. */ -void gtk_main_do_event (GdkEvent *event); +void gtk_main_do_event (GdkEvent *event); -void gtk_main (void); -guint gtk_main_level (void); -void gtk_main_quit (void); -gint gtk_main_iteration (void); +void gtk_main (void); +guint gtk_main_level (void); +void gtk_main_quit (void); +gboolean gtk_main_iteration (void); /* gtk_main_iteration() calls gtk_main_iteration_do(TRUE) */ -gint gtk_main_iteration_do (gboolean blocking); +gboolean gtk_main_iteration_do (gboolean blocking); -gint gtk_true (void) G_GNUC_CONST; -gint gtk_false (void) G_GNUC_CONST; +gboolean gtk_true (void) G_GNUC_CONST; +gboolean gtk_false (void) G_GNUC_CONST; void gtk_grab_add (GtkWidget *widget); GtkWidget* gtk_grab_get_current (void); diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 4ad4c9802..ada859ffb 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -300,14 +300,14 @@ gtk_menu_item_set_placement (GtkMenuItem *menu_item, void gtk_menu_item_configure (GtkMenuItem *menu_item, - gint show_toggle_indicator, - gint show_submenu_indicator) + gboolean show_toggle_indicator, + gboolean show_submenu_indicator) { g_return_if_fail (menu_item != NULL); g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); - menu_item->show_toggle_indicator = (show_toggle_indicator == TRUE); - menu_item->show_submenu_indicator = (show_submenu_indicator == TRUE); + menu_item->show_toggle_indicator = show_toggle_indicator; + menu_item->show_submenu_indicator = show_submenu_indicator; } void diff --git a/gtk/gtkmenuitem.h b/gtk/gtkmenuitem.h index 28b081c66..a879bce74 100644 --- a/gtk/gtkmenuitem.h +++ b/gtk/gtkmenuitem.h @@ -96,8 +96,8 @@ void gtk_menu_item_remove_submenu (GtkMenuItem *menu_item); void gtk_menu_item_set_placement (GtkMenuItem *menu_item, GtkSubmenuPlacement placement); void gtk_menu_item_configure (GtkMenuItem *menu_item, - gint show_toggle_indicator, - gint show_submenu_indicator); + gboolean show_toggle_indicator, + gboolean show_submenu_indicator); void gtk_menu_item_select (GtkMenuItem *menu_item); void gtk_menu_item_deselect (GtkMenuItem *menu_item); void gtk_menu_item_activate (GtkMenuItem *menu_item); diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c index 37b7c4d77..7cdfa8444 100644 --- a/gtk/gtkpixmap.c +++ b/gtk/gtkpixmap.c @@ -245,7 +245,7 @@ gtk_pixmap_expose (GtkWidget *widget, } void -gtk_pixmap_set_build_insensitive (GtkPixmap *pixmap, guint build) +gtk_pixmap_set_build_insensitive (GtkPixmap *pixmap, gboolean build) { g_return_if_fail (pixmap != NULL); g_return_if_fail (GTK_IS_PIXMAP (pixmap)); diff --git a/gtk/gtkpixmap.h b/gtk/gtkpixmap.h index 652457a41..f9e058de4 100644 --- a/gtk/gtkpixmap.h +++ b/gtk/gtkpixmap.h @@ -78,7 +78,7 @@ void gtk_pixmap_get (GtkPixmap *pixmap, GdkBitmap **mask); void gtk_pixmap_set_build_insensitive (GtkPixmap *pixmap, - guint build); + gboolean build); #ifdef __cplusplus diff --git a/gtk/gtkplug.h b/gtk/gtkplug.h index dd779f07d..ce41c5a6a 100644 --- a/gtk/gtkplug.h +++ b/gtk/gtkplug.h @@ -53,7 +53,7 @@ struct _GtkPlug GtkWindow window; GdkWindow *socket_window; - gint same_app; + gboolean same_app; }; struct _GtkPlugClass diff --git a/gtk/gtkprogress.c b/gtk/gtkprogress.c index e2d2c6928..4d13f6adb 100644 --- a/gtk/gtkprogress.c +++ b/gtk/gtkprogress.c @@ -171,10 +171,10 @@ gtk_progress_get_arg (GtkObject *object, switch (arg_id) { case ARG_ACTIVITY_MODE: - GTK_VALUE_BOOL (*arg) = (progress->activity_mode != 0); + GTK_VALUE_BOOL (*arg) = (progress->activity_mode != FALSE); break; case ARG_SHOW_TEXT: - GTK_VALUE_BOOL (*arg) = (progress->show_text != 0); + GTK_VALUE_BOOL (*arg) = (progress->show_text != FALSE); break; case ARG_TEXT_XALIGN: GTK_VALUE_FLOAT (*arg) = progress->x_align; @@ -591,7 +591,7 @@ gtk_progress_get_value (GtkProgress *progress) void gtk_progress_set_show_text (GtkProgress *progress, - gint show_text) + gboolean show_text) { g_return_if_fail (progress != NULL); g_return_if_fail (GTK_IS_PROGRESS (progress)); @@ -677,14 +677,14 @@ gtk_progress_get_text_from_value (GtkProgress *progress, void gtk_progress_set_activity_mode (GtkProgress *progress, - guint activity_mode) + gboolean activity_mode) { g_return_if_fail (progress != NULL); g_return_if_fail (GTK_IS_PROGRESS (progress)); - if (progress->activity_mode != (activity_mode != 0)) + if (progress->activity_mode != (activity_mode != FALSE)) { - progress->activity_mode = (activity_mode != 0); + progress->activity_mode = (activity_mode != FALSE); if (progress->activity_mode) GTK_PROGRESS_GET_CLASS (progress)->act_mode_enter (progress); diff --git a/gtk/gtkprogress.h b/gtk/gtkprogress.h index 00c398c62..5e6662ea4 100644 --- a/gtk/gtkprogress.h +++ b/gtk/gtkprogress.h @@ -84,7 +84,7 @@ struct _GtkProgressClass GtkType gtk_progress_get_type (void) G_GNUC_CONST; void gtk_progress_set_show_text (GtkProgress *progress, - gint show_text); + gboolean show_text); void gtk_progress_set_text_alignment (GtkProgress *progress, gfloat x_align, gfloat y_align); @@ -102,7 +102,7 @@ void gtk_progress_set_value (GtkProgress *progress, gfloat value); gfloat gtk_progress_get_value (GtkProgress *progress); void gtk_progress_set_activity_mode (GtkProgress *progress, - guint activity_mode); + gboolean activity_mode); gchar* gtk_progress_get_current_text (GtkProgress *progress); gchar* gtk_progress_get_text_from_value (GtkProgress *progress, gfloat value); diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index e520581ef..47c58c9e9 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -628,7 +628,7 @@ gtk_selection_remove_all (GtkWidget *widget) * this widget). *************************************************************/ -gint +gboolean gtk_selection_convert (GtkWidget *widget, GdkAtom selection, GdkAtom target, @@ -902,7 +902,7 @@ gtk_selection_init (void) * results: *************************************************************/ -gint +gboolean gtk_selection_clear (GtkWidget *widget, GdkEventSelection *event) { @@ -945,7 +945,7 @@ gtk_selection_clear (GtkWidget *widget, * results: *************************************************************/ -gint +gboolean gtk_selection_request (GtkWidget *widget, GdkEventSelection *event) { @@ -1160,7 +1160,7 @@ gtk_selection_request (GtkWidget *widget, * results: *************************************************************/ -gint +gboolean gtk_selection_incr_event (GdkWindow *window, GdkEventProperty *event) { @@ -1334,7 +1334,7 @@ gtk_selection_incr_timeout (GtkIncrInfo *info) * was event handled? *************************************************************/ -gint +gboolean gtk_selection_notify (GtkWidget *widget, GdkEventSelection *event) { @@ -1421,7 +1421,7 @@ gtk_selection_notify (GtkWidget *widget, * was event handled? *************************************************************/ -gint +gboolean gtk_selection_property_notify (GtkWidget *widget, GdkEventProperty *event) { diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h index 4c109d553..04a4ff3c5 100644 --- a/gtk/gtkselection.h +++ b/gtk/gtkselection.h @@ -116,7 +116,7 @@ void gtk_selection_add_targets (GtkWidget *widget, guint ntargets); void gtk_selection_clear_targets (GtkWidget *widget, GdkAtom selection); -gint gtk_selection_convert (GtkWidget *widget, +gboolean gtk_selection_convert (GtkWidget *widget, GdkAtom selection, GdkAtom target, guint32 time); @@ -135,16 +135,16 @@ void gtk_selection_remove_all (GtkWidget *widget); /* Event handlers */ -gint gtk_selection_clear (GtkWidget *widget, - GdkEventSelection *event); -gint gtk_selection_request (GtkWidget *widget, - GdkEventSelection *event); -gint gtk_selection_incr_event (GdkWindow *window, - GdkEventProperty *event); -gint gtk_selection_notify (GtkWidget *widget, - GdkEventSelection *event); -gint gtk_selection_property_notify (GtkWidget *widget, - GdkEventProperty *event); +gboolean gtk_selection_clear (GtkWidget *widget, + GdkEventSelection *event); +gboolean gtk_selection_request (GtkWidget *widget, + GdkEventSelection *event); +gboolean gtk_selection_incr_event (GdkWindow *window, + GdkEventProperty *event); +gboolean gtk_selection_notify (GtkWidget *widget, + GdkEventSelection *event); +gboolean gtk_selection_property_notify (GtkWidget *widget, + GdkEventProperty *event); GtkSelectionData *gtk_selection_data_copy (GtkSelectionData *data); void gtk_selection_data_free (GtkSelectionData *data); diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 5a8d86f1a..f44e9b801 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -745,7 +745,7 @@ gtk_text_new (GtkAdjustment *hadj, void gtk_text_set_word_wrap (GtkText *text, - gint word_wrap) + gboolean word_wrap) { g_return_if_fail (text != NULL); g_return_if_fail (GTK_IS_TEXT (text)); @@ -761,7 +761,7 @@ gtk_text_set_word_wrap (GtkText *text, void gtk_text_set_line_wrap (GtkText *text, - gint line_wrap) + gboolean line_wrap) { g_return_if_fail (text != NULL); g_return_if_fail (GTK_IS_TEXT (text)); @@ -1047,12 +1047,12 @@ gtk_text_insert (GtkText *text, gtk_text_thaw (text); } -gint +gboolean gtk_text_backward_delete (GtkText *text, guint nchars) { - g_return_val_if_fail (text != NULL, 0); - g_return_val_if_fail (GTK_IS_TEXT (text), 0); + g_return_val_if_fail (text != NULL, FALSE); + g_return_val_if_fail (GTK_IS_TEXT (text), FALSE); if (nchars > text->point.index || nchars <= 0) return FALSE; @@ -1062,7 +1062,7 @@ gtk_text_backward_delete (GtkText *text, return gtk_text_forward_delete (text, nchars); } -gint +gboolean gtk_text_forward_delete (GtkText *text, guint nchars) { @@ -1070,8 +1070,8 @@ gtk_text_forward_delete (GtkText *text, GtkOldEditable *old_editable = GTK_OLD_EDITABLE (text); gboolean frozen = FALSE; - g_return_val_if_fail (text != NULL, 0); - g_return_val_if_fail (GTK_IS_TEXT (text), 0); + g_return_val_if_fail (text != NULL, FALSE); + g_return_val_if_fail (GTK_IS_TEXT (text), FALSE); if (text->point.index + nchars > TEXT_LENGTH (text) || nchars <= 0) return FALSE; diff --git a/gtk/gtktext.h b/gtk/gtktext.h index bd46976e5..24c063475 100644 --- a/gtk/gtktext.h +++ b/gtk/gtktext.h @@ -185,9 +185,9 @@ GtkWidget* gtk_text_new (GtkAdjustment *hadj, void gtk_text_set_editable (GtkText *text, gboolean editable); void gtk_text_set_word_wrap (GtkText *text, - gint word_wrap); + gboolean word_wrap); void gtk_text_set_line_wrap (GtkText *text, - gint line_wrap); + gboolean line_wrap); void gtk_text_set_adjustments (GtkText *text, GtkAdjustment *hadj, GtkAdjustment *vadj); @@ -203,9 +203,9 @@ void gtk_text_insert (GtkText *text, GdkColor *back, const char *chars, gint length); -gint gtk_text_backward_delete (GtkText *text, +gboolean gtk_text_backward_delete (GtkText *text, guint nchars); -gint gtk_text_forward_delete (GtkText *text, +gboolean gtk_text_forward_delete (GtkText *text, guint nchars); #define GTK_TEXT_INDEX(t, index) (((t)->use_wchar) \ diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index a98402aeb..80a0c44d8 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -1144,7 +1144,7 @@ gtk_toolbar_set_space_style (GtkToolbar *toolbar, void gtk_toolbar_set_tooltips (GtkToolbar *toolbar, - gint enable) + gboolean enable) { g_return_if_fail (toolbar != NULL); g_return_if_fail (GTK_IS_TOOLBAR (toolbar)); diff --git a/gtk/gtktoolbar.h b/gtk/gtktoolbar.h index a64aa8eaa..bec63423b 100644 --- a/gtk/gtktoolbar.h +++ b/gtk/gtktoolbar.h @@ -211,7 +211,7 @@ void gtk_toolbar_set_space_size (GtkToolbar *toolbar, void gtk_toolbar_set_space_style (GtkToolbar *toolbar, GtkToolbarSpaceStyle space_style); void gtk_toolbar_set_tooltips (GtkToolbar *toolbar, - gint enable); + gboolean enable); void gtk_toolbar_set_button_relief (GtkToolbar *toolbar, GtkReliefStyle relief); GtkReliefStyle gtk_toolbar_get_button_relief (GtkToolbar *toolbar); diff --git a/gtk/gtktree.c b/gtk/gtktree.c index 114e6ea32..368eb0e7d 100644 --- a/gtk/gtktree.c +++ b/gtk/gtktree.c @@ -178,7 +178,7 @@ gtk_tree_init (GtkTree *tree) tree->current_indent = 0; tree->level = 0; tree->view_mode = GTK_TREE_VIEW_LINE; - tree->view_line = 1; + tree->view_line = TRUE; } GtkWidget* @@ -1194,7 +1194,7 @@ gtk_tree_set_view_mode (GtkTree *tree, void gtk_tree_set_view_lines (GtkTree *tree, - guint flag) + gboolean flag) { g_return_if_fail (tree != NULL); g_return_if_fail (GTK_IS_TREE (tree)); diff --git a/gtk/gtktree.h b/gtk/gtktree.h index d5f938e93..7aadb3182 100644 --- a/gtk/gtktree.h +++ b/gtk/gtktree.h @@ -120,7 +120,7 @@ void gtk_tree_set_selection_mode (GtkTree *tree, void gtk_tree_set_view_mode (GtkTree *tree, GtkTreeViewMode mode); void gtk_tree_set_view_lines (GtkTree *tree, - guint flag); + gboolean flag); /* deprecated function, use gtk_container_remove instead. */ diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 88491c4d5..2500432ec 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -1428,7 +1428,7 @@ gtk_widget_real_hide (GtkWidget *widget) * * Return value: %TRUE **/ -gint +gboolean gtk_widget_hide_on_delete (GtkWidget *widget) { g_return_val_if_fail (widget != NULL, FALSE); @@ -2242,7 +2242,7 @@ gtk_widget_real_focus_out_event (GtkWidget *widget, * * Return value: return from the event signal emission (%TRUE if the event was handled) **/ -gint +gboolean gtk_widget_event (GtkWidget *widget, GdkEvent *event) { diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index 7a8b1b35e..950c3bb5c 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -464,7 +464,7 @@ guint gtk_widget_accelerator_signal (GtkWidget *widget, void gtk_widget_lock_accelerators (GtkWidget *widget); void gtk_widget_unlock_accelerators (GtkWidget *widget); gboolean gtk_widget_accelerators_locked (GtkWidget *widget); -gint gtk_widget_event (GtkWidget *widget, +gboolean gtk_widget_event (GtkWidget *widget, GdkEvent *event); gint gtk_widget_send_expose (GtkWidget *widget, GdkEvent *event); @@ -544,7 +544,7 @@ gboolean gtk_widget_is_ancestor (GtkWidget *widget, /* Hide widget and return TRUE. */ -gint gtk_widget_hide_on_delete (GtkWidget *widget); +gboolean gtk_widget_hide_on_delete (GtkWidget *widget); /* Widget styles. */ diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 26164b8d8..c4921975e 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -737,9 +737,9 @@ gtk_window_set_default (GtkWindow *window, void gtk_window_set_policy (GtkWindow *window, - gint allow_shrink, - gint allow_grow, - gint auto_shrink) + gboolean allow_shrink, + gboolean allow_grow, + gboolean auto_shrink) { g_return_if_fail (window != NULL); g_return_if_fail (GTK_IS_WINDOW (window)); @@ -812,7 +812,7 @@ gtk_window_set_position (GtkWindow *window, g_object_notify (G_OBJECT (window), "window_position"); } -gint +gboolean gtk_window_activate_focus (GtkWindow *window) { g_return_val_if_fail (window != NULL, FALSE); @@ -828,7 +828,7 @@ gtk_window_activate_focus (GtkWindow *window) return FALSE; } -gint +gboolean gtk_window_activate_default (GtkWindow *window) { g_return_val_if_fail (window != NULL, FALSE); diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h index abd1edec1..e49ec209e 100644 --- a/gtk/gtkwindow.h +++ b/gtk/gtkwindow.h @@ -122,17 +122,17 @@ void gtk_window_set_wmclass (GtkWindow *window, void gtk_window_set_role (GtkWindow *window, const gchar *role); void gtk_window_set_policy (GtkWindow *window, - gint allow_shrink, - gint allow_grow, - gint auto_shrink); + gboolean allow_shrink, + gboolean allow_grow, + gboolean auto_shrink); void gtk_window_add_accel_group (GtkWindow *window, GtkAccelGroup *accel_group); void gtk_window_remove_accel_group (GtkWindow *window, GtkAccelGroup *accel_group); void gtk_window_set_position (GtkWindow *window, GtkWindowPosition position); -gint gtk_window_activate_focus (GtkWindow *window); -gint gtk_window_activate_default (GtkWindow *window); +gboolean gtk_window_activate_focus (GtkWindow *window); +gboolean gtk_window_activate_default (GtkWindow *window); void gtk_window_set_transient_for (GtkWindow *window, GtkWindow *parent); |