diff options
author | Benjamin Otte <otte@redhat.com> | 2020-07-24 15:54:49 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-07-25 00:47:36 +0200 |
commit | d7266b25ba5f2f21a5bd19d0fb88aca530e4d265 (patch) | |
tree | 8dc515efd6e0c0b0da1d7e02049f284edd6050ff /tests | |
parent | 46423e614d4fcf142d9578d4788dde664ea280f9 (diff) | |
download | gtk+-d7266b25ba5f2f21a5bd19d0fb88aca530e4d265.tar.gz |
Replace "gint" with "int"
Diffstat (limited to 'tests')
53 files changed, 259 insertions, 259 deletions
diff --git a/tests/listmodel.c b/tests/listmodel.c index 09adaa601f..8c3320842b 100644 --- a/tests/listmodel.c +++ b/tests/listmodel.c @@ -14,7 +14,7 @@ typedef struct GObject parent; gchar *label; - gint id; + int id; } MyObject; typedef struct @@ -115,10 +115,10 @@ create_widget (gpointer item, return label; } -static gint +static int compare_items (gconstpointer a, gconstpointer b, gpointer data) { - gint id_a, id_b; + int id_a, id_b; g_object_get ((gpointer)a, "id", &id_a, NULL); g_object_get ((gpointer)b, "id", &id_b, NULL); @@ -129,7 +129,7 @@ compare_items (gconstpointer a, gconstpointer b, gpointer data) static void add_some (GtkButton *button, GListStore *store) { - gint n, i; + int n, i; guint n_items; GObject *obj; gchar *label; @@ -152,7 +152,7 @@ add_some (GtkButton *button, GListStore *store) static void remove_some (GtkButton *button, GListStore *store) { - gint n, i; + int n, i; guint n_items; for (n = 0; n < 50; n++) @@ -170,7 +170,7 @@ main (int argc, char *argv[]) { GtkWidget *window, *grid, *sw, *box, *button; GListStore *store; - gint i; + int i; gtk_init (); diff --git a/tests/overlayscroll.c b/tests/overlayscroll.c index 9a447b5c63..c3b595bb74 100644 --- a/tests/overlayscroll.c +++ b/tests/overlayscroll.c @@ -22,7 +22,7 @@ static gchar * get_content (void) { GString *s; - gint i; + int i; s = g_string_new (""); for (i = 1; i <= 150; i++) @@ -34,7 +34,7 @@ get_content (void) static void mode_changed (GtkComboBox *combo, GtkScrolledWindow *sw) { - gint active = gtk_combo_box_get_active (combo); + int active = gtk_combo_box_get_active (combo); gtk_scrolled_window_set_overlay_scrolling (sw, active == 1); } diff --git a/tests/syncscroll.c b/tests/syncscroll.c index 05338c7607..d42fc9b8f5 100644 --- a/tests/syncscroll.c +++ b/tests/syncscroll.c @@ -3,7 +3,7 @@ static void fill_text_view (GtkWidget *tv, const gchar *text) { - gint i; + int i; GString *s; s = g_string_new (""); diff --git a/tests/testaccel.c b/tests/testaccel.c index 9ff403507d..a74a081e40 100644 --- a/tests/testaccel.c +++ b/tests/testaccel.c @@ -35,7 +35,7 @@ accel_edited_callback (GtkCellRendererText *cell, g_print ("%u %d %u\n", keyval, mask, hardware_keycode); gtk_list_store_set (GTK_LIST_STORE (model), &iter, - 0, (gint)mask, + 0, (int)mask, 1, keyval, 2, hardware_keycode, -1); @@ -63,7 +63,7 @@ key_test (void) GtkListStore *store; GtkTreeViewColumn *column; GtkCellRenderer *rend; - gint i; + int i; GtkWidget *box, *entry; /* create window */ @@ -116,8 +116,8 @@ key_test (void) return window; } -gint -main (gint argc, gchar **argv) +int +main (int argc, gchar **argv) { GtkWidget *dialog; diff --git a/tests/testappchooser.c b/tests/testappchooser.c index 63ec9bfdee..f398694d0e 100644 --- a/tests/testappchooser.c +++ b/tests/testappchooser.c @@ -30,7 +30,7 @@ static GtkWidget *def, *recommended, *fallback, *other, *all; static void dialog_response (GtkDialog *d, - gint response_id, + int response_id, gpointer user_data) { GAppInfo *app_info; diff --git a/tests/testassistant.c b/tests/testassistant.c index 22ee8209c2..00b1674d52 100644 --- a/tests/testassistant.c +++ b/tests/testassistant.c @@ -108,7 +108,7 @@ static gboolean progress_timeout (GtkWidget *assistant) { GtkWidget *progress; - gint current_page; + int current_page; gdouble value; current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (assistant)); @@ -323,8 +323,8 @@ select_branch (GtkWidget *widget, gchar branch) selected_branch = branch; } -static gint -nonlinear_assistant_forward_page (gint current_page, gpointer data) +static int +nonlinear_assistant_forward_page (int current_page, gpointer data) { switch (current_page) { @@ -408,8 +408,8 @@ create_nonlinear_assistant (GtkWidget *widget) } } -static gint -looping_assistant_forward_page (gint current_page, gpointer data) +static int +looping_assistant_forward_page (int current_page, gpointer data) { switch (current_page) { @@ -680,7 +680,7 @@ int main (int argc, gchar *argv[]) { GtkWidget *window, *box, *button; - gint i; + int i; gboolean done = FALSE; gtk_init (); diff --git a/tests/testbaseline.c b/tests/testbaseline.c index f229a9b660..d5fe781876 100644 --- a/tests/testbaseline.c +++ b/tests/testbaseline.c @@ -28,7 +28,7 @@ static void baseline_row_value_changed (GtkSpinButton *spin_button, GtkGrid *grid) { - gint row = gtk_spin_button_get_value_as_int (spin_button); + int row = gtk_spin_button_get_value_as_int (spin_button); gtk_grid_set_baseline_row (grid, row); } @@ -53,13 +53,13 @@ static void image_size_value_changed (GtkSpinButton *spin_button, GtkImage *image) { - gint size = gtk_spin_button_get_value_as_int (spin_button); + int size = gtk_spin_button_get_value_as_int (spin_button); gtk_image_set_pixel_size (GTK_IMAGE (image), size); } static void -set_font_size (GtkWidget *widget, gint size) +set_font_size (GtkWidget *widget, int size) { const gchar *class[3] = { "small-font", "medium-font", "large-font" }; diff --git a/tests/testcalendar.c b/tests/testcalendar.c index de43eac502..2610a86688 100644 --- a/tests/testcalendar.c +++ b/tests/testcalendar.c @@ -182,7 +182,7 @@ create_calendar(void) GtkWidget *calendar = gtk_calendar_new (); GtkWidget *button; GtkWidget *frame, *label, *bbox; - gint i; + int i; struct { const char *prop_name; const char *label; diff --git a/tests/testcellarea.c b/tests/testcellarea.c index 158553c28b..6c66daa98a 100644 --- a/tests/testcellarea.c +++ b/tests/testcellarea.c @@ -466,9 +466,9 @@ cell_spacing_changed (GtkSpinButton *spin_button, GtkIconView *iconview) { GtkCellArea *area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (iconview)); - gint value; + int value; - value = (gint)gtk_spin_button_get_value (spin_button); + value = (int)gtk_spin_button_get_value (spin_button); gtk_cell_area_box_set_spacing (GTK_CELL_AREA_BOX (area), value); } @@ -477,9 +477,9 @@ static void row_spacing_changed (GtkSpinButton *spin_button, GtkIconView *iconview) { - gint value; + int value; - value = (gint)gtk_spin_button_get_value (spin_button); + value = (int)gtk_spin_button_get_value (spin_button); gtk_icon_view_set_row_spacing (iconview, value); } @@ -488,9 +488,9 @@ static void item_padding_changed (GtkSpinButton *spin_button, GtkIconView *iconview) { - gint value; + int value; - value = (gint)gtk_spin_button_get_value (spin_button); + value = (int)gtk_spin_button_get_value (spin_button); gtk_icon_view_set_item_padding (iconview, value); } diff --git a/tests/testcombo.c b/tests/testcombo.c index fc1a53bedc..fd1099c3df 100644 --- a/tests/testcombo.c +++ b/tests/testcombo.c @@ -736,7 +736,7 @@ capital_sensitive (GtkCellLayout *cell_layout, static gboolean capital_animation (gpointer data) { - static gint insert_count = 0; + static int insert_count = 0; GtkTreeModel *model = GTK_TREE_MODEL (data); GtkTreePath *path; GtkTreeIter iter, parent; @@ -879,7 +879,7 @@ set_sensitive (GtkCellLayout *cell_layout, gpointer data) { GtkTreePath *path; - gint *indices; + int *indices; gboolean sensitive; path = gtk_tree_model_get_path (tree_model, iter); @@ -910,7 +910,7 @@ static void displayed_row_changed (GtkComboBox *combo, GtkCellView *cell) { - gint row; + int row; GtkTreePath *path; row = gtk_combo_box_get_active (combo); @@ -942,7 +942,7 @@ main (int argc, char **argv) GtkTreeIter iter; GtkCellArea *area; gchar *text; - gint i; + int i; gboolean done = FALSE; gtk_init (); diff --git a/tests/testcombochange.c b/tests/testcombochange.c index a72a44ad46..ba06bf88da 100644 --- a/tests/testcombochange.c +++ b/tests/testcombochange.c @@ -115,8 +115,8 @@ static void on_reorder (void) { GArray *new_contents; - gint *shuffle_array; - gint i; + int *shuffle_array; + int i; shuffle_array = g_new (int, contents->len); @@ -125,8 +125,8 @@ on_reorder (void) for (i = 0; i + 1 < contents->len; i++) { - gint pos = g_random_int_range (i, contents->len); - gint tmp; + int pos = g_random_int_range (i, contents->len); + int tmp; tmp = shuffle_array[i]; shuffle_array[i] = shuffle_array[pos]; @@ -150,7 +150,7 @@ on_reorder (void) static int n_animations = 0; static int timer = 0; -static gint +static int animation_timer (gpointer data) { switch (g_random_int_range (0, 3)) diff --git a/tests/testellipsise.c b/tests/testellipsise.c index 07090289db..81ebd98f8e 100644 --- a/tests/testellipsise.c +++ b/tests/testellipsise.c @@ -29,7 +29,7 @@ combo_changed_cb (GtkWidget *combo, gpointer data) { GtkWidget *label = GTK_WIDGET (data); - gint active; + int active; active = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); gtk_label_set_ellipsize (GTK_LABEL (label), (PangoEllipsizeMode)active); diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c index 68985d7383..37473a6b79 100644 --- a/tests/testentrycompletion.c +++ b/tests/testentrycompletion.c @@ -182,7 +182,7 @@ match_func (GtkEntryCompletion *completion, return ret; } -static gint timer_count = 0; +static int timer_count = 0; static const char *dynamic_completions[] = { "GNOME", @@ -210,12 +210,12 @@ static const char *dynamic_completions[] = { "zombie" }; -static gint +static int animation_timer (GtkEntryCompletion *completion) { GtkTreeIter iter; - gint n_completions = G_N_ELEMENTS (dynamic_completions); - gint n; + int n_completions = G_N_ELEMENTS (dynamic_completions); + int n; static GtkListStore *old_store = NULL; GtkListStore *store = GTK_LIST_STORE (gtk_entry_completion_get_model (completion)); diff --git a/tests/testentryicons.c b/tests/testentryicons.c index 9d8bf7fd1f..cc875a5ee9 100644 --- a/tests/testentryicons.c +++ b/tests/testentryicons.c @@ -2,7 +2,7 @@ #include <stdio.h> static void -clear_pressed (GtkEntry *entry, gint icon, gpointer data) +clear_pressed (GtkEntry *entry, int icon, gpointer data) { if (icon == GTK_ENTRY_ICON_SECONDARY) gtk_editable_set_text (GTK_EDITABLE (entry), ""); diff --git a/tests/testerrors.c b/tests/testerrors.c index 6b4180cea2..6e92026160 100644 --- a/tests/testerrors.c +++ b/tests/testerrors.c @@ -128,8 +128,8 @@ test_error_trapping (GdkDisplay *gdk_display) XSync (d, TRUE); } -gint -main (gint argc, gchar *argv[]) +int +main (int argc, gchar *argv[]) { GdkDisplay *gdk_display; GdkDisplay *extra_display; diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index 6e8359a92a..4d3fb13bd7 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -63,7 +63,7 @@ print_selected (GtkFileChooser *chooser) static void response_cb (GtkDialog *dialog, - gint response_id, + int response_id, gpointer data) { gboolean *done = data; diff --git a/tests/testflowbox.c b/tests/testflowbox.c index 6fef5fa2f4..727e16708b 100644 --- a/tests/testflowbox.c +++ b/tests/testflowbox.c @@ -34,13 +34,13 @@ enum { #define N_ITEMS 1000 static GtkFlowBox *the_flowbox = NULL; -static gint items_type = SIMPLE_ITEMS; +static int items_type = SIMPLE_ITEMS; static void populate_flowbox_simple (GtkFlowBox *flowbox) { GtkWidget *widget, *frame; - gint i; + int i; for (i = 0; i < N_ITEMS; i++) { @@ -62,7 +62,7 @@ static void populate_flowbox_focus (GtkFlowBox *flowbox) { GtkWidget *widget, *frame, *box; - gint i; + int i; gboolean sensitive; for (i = 0; i < 200; i++) @@ -110,7 +110,7 @@ static void populate_flowbox_buttons (GtkFlowBox *flowbox) { GtkWidget *widget; - gint i; + int i; for (i = 0; i < 50; i++) { @@ -125,7 +125,7 @@ static void populate_flowbox_wrappy (GtkFlowBox *flowbox) { GtkWidget *widget, *frame; - gint i; + int i; const gchar *strings[] = { "These are", "some wrappy label", "texts", "of various", "lengths.", @@ -156,7 +156,7 @@ static void populate_flowbox_images (GtkFlowBox *flowbox) { GtkWidget *widget, *image, *label; - gint i; + int i; for (i = 0; i < N_ITEMS; i++) { @@ -242,7 +242,7 @@ static void line_length_changed (GtkSpinButton *spin, GtkFlowBox *flowbox) { - gint length = gtk_spin_button_get_value_as_int (spin); + int length = gtk_spin_button_get_value_as_int (spin); gtk_flow_box_set_min_children_per_line (flowbox, length); } @@ -251,7 +251,7 @@ static void max_line_length_changed (GtkSpinButton *spin, GtkFlowBox *flowbox) { - gint length = gtk_spin_button_get_value_as_int (spin); + int length = gtk_spin_button_get_value_as_int (spin); gtk_flow_box_set_max_children_per_line (flowbox, length); } @@ -261,7 +261,7 @@ spacing_changed (GtkSpinButton *button, gpointer data) { GtkOrientation orientation = GPOINTER_TO_INT (data); - gint state = gtk_spin_button_get_value_as_int (button); + int state = gtk_spin_button_get_value_as_int (button); if (orientation == GTK_ORIENTATION_HORIZONTAL) gtk_flow_box_set_column_spacing (the_flowbox, state); @@ -319,7 +319,7 @@ on_selected_children_changed (GtkFlowBox *self) static gboolean filter_func (GtkFlowBoxChild *child, gpointer user_data) { - gint index; + int index; index = gtk_flow_box_child_get_index (child); @@ -338,7 +338,7 @@ filter_toggled (GtkToggleButton *button, gtk_flow_box_set_filter_func (flowbox, NULL, NULL, NULL); } -static gint +static int sort_func (GtkFlowBoxChild *a, GtkFlowBoxChild *b, gpointer data) diff --git a/tests/testfontchooserdialog.c b/tests/testfontchooserdialog.c index 318baeb5b9..7d3a88af0e 100644 --- a/tests/testfontchooserdialog.c +++ b/tests/testfontchooserdialog.c @@ -90,7 +90,7 @@ main (int argc, char *argv[]) { FcConfig *config; PangoFontMap *fontmap; - gint i; + int i; /* Create a custom font configuration by adding font files specified * on the commandline to the default config. diff --git a/tests/testgmenu.c b/tests/testgmenu.c index 579518751d..c4f9639139 100644 --- a/tests/testgmenu.c +++ b/tests/testgmenu.c @@ -350,7 +350,7 @@ create_action_treeview (GActionGroup *group) GtkTreeViewColumn *column; GtkCellRenderer *cell; gchar **group_actions; - gint i; + int i; store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); group_actions = g_action_group_list_actions (group); diff --git a/tests/testgrid.c b/tests/testgrid.c index 97c52cb609..690b7eb94c 100644 --- a/tests/testgrid.c +++ b/tests/testgrid.c @@ -258,7 +258,7 @@ scrolling (void) GtkWidget *viewport; GtkWidget *grid; GtkWidget *child; - gint i; + int i; window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Scrolling"); diff --git a/tests/testgtk.c b/tests/testgtk.c index acb14b7615..674274908e 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -61,8 +61,8 @@ file_exists (const char *filename) static GtkWidget * build_option_menu (const char *items[], - gint num_items, - gint history, + int num_items, + int history, void (*func) (GtkWidget *widget, gpointer data), gpointer data); @@ -92,13 +92,13 @@ typedef struct sTreeButtons { static GtkWidget * build_option_menu (const char *items[], - gint num_items, - gint history, + int num_items, + int history, void (*func)(GtkWidget *widget, gpointer data), gpointer data) { GtkWidget *omenu; - gint i; + int i; omenu = gtk_combo_box_text_new (); g_signal_connect (omenu, "changed", @@ -395,7 +395,7 @@ create_widget_grid (GType widget_type) { GtkWidget *grid; GtkWidget *group_widget = NULL; - gint i, j; + int i, j; grid = gtk_grid_new (); @@ -865,7 +865,7 @@ create_selectable_control (GtkWidget *widget) } static void -dialog_response (GtkWidget *dialog, gint response_id, GtkLabel *label) +dialog_response (GtkWidget *dialog, int response_id, GtkLabel *label) { const gchar *text; @@ -1421,8 +1421,8 @@ create_image (GtkWidget *widget) static int list_sort_cb (GtkListBoxRow *a, GtkListBoxRow *b, gpointer data) { - gint aa = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (a), "value")); - gint bb = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (b), "value")); + int aa = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (a), "value")); + int bb = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (b), "value")); return aa - bb; } @@ -1435,7 +1435,7 @@ list_filter_all_cb (GtkListBoxRow *row, gpointer data) static gboolean list_filter_odd_cb (GtkListBoxRow *row, gpointer data) { - gint value = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "value")); + int value = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "value")); return value % 2 == 0; } @@ -1536,7 +1536,7 @@ create_listbox (GtkWidget *widget) for (i = 0; i < 1000; i++) { - gint value = g_random_int_range (0, 10000); + int value = g_random_int_range (0, 10000); label = gtk_label_new (g_strdup_printf ("Value %u", value)); gtk_list_box_insert (GTK_LIST_BOX (list), label, -1); g_object_set_data (G_OBJECT (gtk_widget_get_parent (label)), "value", GINT_TO_POINTER (value)); @@ -1877,7 +1877,7 @@ scrolled_windows_destroy_cb (GtkWidget *widget, GtkWidget *scrollwin) } static void -scrolled_windows_remove (GtkWidget *dialog, gint response, GtkWidget *scrollwin) +scrolled_windows_remove (GtkWidget *dialog, int response, GtkWidget *scrollwin) { if (response != GTK_RESPONSE_APPLY) { @@ -2458,7 +2458,7 @@ get_spin_value (GtkWidget *widget, gpointer data) g_free (buffer); } -static gint +static int spin_button_time_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; @@ -2475,11 +2475,11 @@ spin_button_time_output_func (GtkSpinButton *spin_button) return TRUE; } -static gint +static int spin_button_month_input_func (GtkSpinButton *spin_button, gdouble *new_val) { - gint i; + int i; static const char *month[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; @@ -2506,12 +2506,12 @@ spin_button_month_input_func (GtkSpinButton *spin_button, return TRUE; } -static gint +static int spin_button_month_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; gdouble value; - gint i; + int i; static const char *month[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; @@ -2527,7 +2527,7 @@ spin_button_month_output_func (GtkSpinButton *spin_button) return TRUE; } -static gint +static int spin_button_hex_input_func (GtkSpinButton *spin_button, gdouble *new_val) { @@ -2544,7 +2544,7 @@ spin_button_hex_input_func (GtkSpinButton *spin_button, return TRUE; } -static gint +static int spin_button_hex_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; @@ -2556,7 +2556,7 @@ spin_button_hex_output_func (GtkSpinButton *spin_button) if (fabs (val) < 1e-5) sprintf (buf, "0x00"); else - sprintf (buf, "0x%.2X", (gint) val); + sprintf (buf, "0x%.2X", (int) val); if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (spin_button)))) gtk_editable_set_text (GTK_EDITABLE (spin_button), buf); @@ -2854,7 +2854,7 @@ static GtkTreeModel * cursor_model (void) { GtkListStore *store; - gint i; + int i; store = gtk_list_store_new (1, G_TYPE_STRING); for (i = 0; i < G_N_ELEMENTS (cursor_names); i++) @@ -2872,8 +2872,8 @@ cursor_pressed_cb (GtkGesture *gesture, { GtkWidget *widget; const gchar *name; - gint i; - const gint n = G_N_ELEMENTS (cursor_names); + int i; + const int n = G_N_ELEMENTS (cursor_names); int button; widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)); @@ -2922,7 +2922,7 @@ change_cursor_theme (GtkWidget *widget, { #if defined(GDK_WINDOWING_X11) || defined (GDK_WINDOWING_WAYLAND) const gchar *theme; - gint size; + int size; GdkDisplay *display; GtkWidget *entry; GtkWidget *spin; @@ -2931,7 +2931,7 @@ change_cursor_theme (GtkWidget *widget, spin = gtk_widget_get_next_sibling (entry); theme = gtk_editable_get_text (GTK_EDITABLE (entry)); - size = (gint) gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); + size = (int) gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); display = gtk_widget_get_display (widget); #ifdef GDK_WINDOWING_X11 @@ -3310,7 +3310,7 @@ create_font_selection (GtkWidget *widget) static GtkWidget *dialog_window = NULL; static void -dialog_response_cb (GtkWidget *widget, gint response, gpointer unused) +dialog_response_cb (GtkWidget *widget, int response, gpointer unused) { GtkWidget *content_area; GtkWidget *child; @@ -3421,7 +3421,7 @@ screen_display_check (GtkWidget *widget, ScreenDisplaySelection *data) else { GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (data->combo)); - gint i = 0; + int i = 0; GtkTreeIter iter; gboolean found = FALSE; while (gtk_tree_model_iter_nth_child (model, &iter, NULL, i++)) @@ -3676,7 +3676,7 @@ GdkPixbuf *book_closed; GtkWidget *sample_notebook; static void -set_page_image (GtkNotebook *notebook, gint page_num, GdkPixbuf *pixbuf) +set_page_image (GtkNotebook *notebook, int page_num, GdkPixbuf *pixbuf) { GtkWidget *page_widget; GtkWidget *pixwid; @@ -3691,10 +3691,10 @@ set_page_image (GtkNotebook *notebook, gint page_num, GdkPixbuf *pixbuf) } static void -page_switch (GtkWidget *widget, gpointer *page, gint page_num) +page_switch (GtkWidget *widget, gpointer *page, int page_num) { GtkNotebook *notebook = GTK_NOTEBOOK (widget); - gint old_page_num = gtk_notebook_get_current_page (notebook); + int old_page_num = gtk_notebook_get_current_page (notebook); if (page_num == old_page_num) return; @@ -3720,7 +3720,7 @@ tab_expand (GtkToggleButton *button, GtkWidget *child) } static void -create_pages (GtkNotebook *notebook, gint start, gint end) +create_pages (GtkNotebook *notebook, int start, int end) { GtkWidget *child = NULL; GtkWidget *button; @@ -3730,7 +3730,7 @@ create_pages (GtkNotebook *notebook, gint start, gint end) GtkWidget *label_box; GtkWidget *menu_box; GtkWidget *pixwid; - gint i; + int i; char buffer[32]; char accel_buffer[32]; @@ -3816,7 +3816,7 @@ notebook_type_changed (GtkWidget *optionmenu, gpointer data) { GtkNotebook *notebook; - gint i, c; + int i, c; enum { STANDARD, @@ -4863,8 +4863,8 @@ create_surface_states (GtkWidget *widget) static void get_ints (GtkWidget *window, - gint *a, - gint *b) + int *a, + int *b) { GtkWidget *spin1; GtkWidget *spin2; @@ -4880,7 +4880,7 @@ static void set_size_callback (GtkWidget *widget, gpointer data) { - gint w, h; + int w, h; get_ints (data, &w, &h); @@ -4899,7 +4899,7 @@ static void set_default_size_callback (GtkWidget *widget, gpointer data) { - gint w, h; + int w, h; get_ints (data, &w, &h); @@ -4919,7 +4919,7 @@ static void set_size_request_callback (GtkWidget *widget, gpointer data) { - gint w, h; + int w, h; get_ints (data, &w, &h); @@ -5158,7 +5158,7 @@ static void progressbar_toggle_orientation (GtkWidget *widget, gpointer data) { ProgressData *pdata; - gint i; + int i; pdata = (ProgressData *) data; @@ -5194,7 +5194,7 @@ progressbar_toggle_ellipsize (GtkWidget *widget, ProgressData *pdata = data; if (gtk_widget_is_drawable (widget)) { - gint i = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); + int i = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (pdata->pbar), i); } } @@ -5502,7 +5502,7 @@ hide_native (GtkWidget *button, static void native_response (GtkNativeDialog *self, - gint response_id, + int response_id, GtkWidget *label) { static int count = 0; diff --git a/tests/testheightforwidth.c b/tests/testheightforwidth.c index 2d825b4158..063a916f5b 100644 --- a/tests/testheightforwidth.c +++ b/tests/testheightforwidth.c @@ -655,7 +655,7 @@ static GtkWidget * create_window (void) { GtkWidget *window, *vbox, *button; - gint i; + int i; window = gtk_window_new (); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); diff --git a/tests/testiconview-keynav.c b/tests/testiconview-keynav.c index 000304dc5d..f7a97223c7 100644 --- a/tests/testiconview-keynav.c +++ b/tests/testiconview-keynav.c @@ -117,7 +117,7 @@ keynav_failed (GtkWidget *view, GtkTreePath *path; GtkTreeModel *model; GtkTreeIter iter; - gint col; + int col; GtkTreePath *sel; if (view == views->view1 && direction == GTK_DIR_DOWN) diff --git a/tests/testiconview.c b/tests/testiconview.c index 4fb6723ead..a09aba44f9 100644 --- a/tests/testiconview.c +++ b/tests/testiconview.c @@ -124,15 +124,15 @@ swap_rows (GtkWidget *button, GtkIconView *icon_list) } static void -add_n_items (GtkIconView *icon_list, gint n) +add_n_items (GtkIconView *icon_list, int n) { - static gint count = NUMBER_OF_ITEMS; + static int count = NUMBER_OF_ITEMS; GtkTreeIter iter; GtkListStore *store; GdkPixbuf *pixbuf; gchar *str, *str2; - gint i; + int i; store = GTK_LIST_STORE (gtk_icon_view_get_model (icon_list)); pixbuf = gdk_pixbuf_new_from_file ("gnome-textfile.png", NULL); @@ -390,8 +390,8 @@ popup_menu_handler (GtkWidget *widget) return TRUE; } -gint -main (gint argc, gchar **argv) +int +main (int argc, gchar **argv) { GtkWidget *paned, *tv; GtkWidget *window, *icon_list, *scrolled_window; diff --git a/tests/testkineticscrolling.c b/tests/testkineticscrolling.c index ba72529584..be9d49f640 100644 --- a/tests/testkineticscrolling.c +++ b/tests/testkineticscrolling.c @@ -30,7 +30,7 @@ kinetic_scrolling (void) GtkListStore *store; GtkWidget *textview; GdkContentFormats *targets; - gint i; + int i; window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 400, 400); diff --git a/tests/testlist.c b/tests/testlist.c index b781c28980..25579739be 100644 --- a/tests/testlist.c +++ b/tests/testlist.c @@ -9,7 +9,7 @@ struct _Row { GtkListBoxRow parent_instance; GtkWidget *label; - gint sort_id; + int sort_id; }; struct _RowClass @@ -44,7 +44,7 @@ row_class_init (RowClass *class) } static GtkWidget * -row_new (const gchar* text, gint sort_id) { +row_new (const gchar* text, int sort_id) { Row *row; row = g_object_new (row_get_type (), NULL); diff --git a/tests/testlist2.c b/tests/testlist2.c index 11229c557a..e9465f63bd 100644 --- a/tests/testlist2.c +++ b/tests/testlist2.c @@ -50,7 +50,7 @@ static void add_row_below (GtkButton *button, GtkWidget *child) { GtkWidget *revealer, *row, *list; - gint index; + int index; row = gtk_widget_get_parent (child); index = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (row)); @@ -109,7 +109,7 @@ quit_cb (GtkWidget *widget, int main (int argc, char *argv[]) { GtkWidget *window, *list, *sw, *row; - gint i; + int i; gchar *text; gboolean done = FALSE; diff --git a/tests/testlist3.c b/tests/testlist3.c index f3f6b3b0dd..a800f3b9f3 100644 --- a/tests/testlist3.c +++ b/tests/testlist3.c @@ -126,7 +126,7 @@ main (int argc, char *argv[]) { GtkWidget *window, *list, *sw, *row; GtkWidget *hbox, *vbox, *combo, *button; - gint i; + int i; gchar *text; GtkCssProvider *provider; diff --git a/tests/testlist4.c b/tests/testlist4.c index ce0500d24e..e7bbf3ed5b 100644 --- a/tests/testlist4.c +++ b/tests/testlist4.c @@ -93,7 +93,7 @@ new_window (GApplication *app) GtkWidget *row_content; GtkListBoxRow *row; - gint i; + int i; gchar *text, *text2; window = gtk_application_window_new (GTK_APPLICATION (app)); diff --git a/tests/testmountoperation.c b/tests/testmountoperation.c index c4cecc3032..d6222c622d 100644 --- a/tests/testmountoperation.c +++ b/tests/testmountoperation.c @@ -38,7 +38,7 @@ got_reply (GMountOperation *op, if (ask_question) { - gint choice = g_mount_operation_get_choice (op); + int choice = g_mount_operation_get_choice (op); g_print ("User chose: %d\n", choice); } else diff --git a/tests/testnotebookdnd.c b/tests/testnotebookdnd.c index dc6c6b2b15..3858aa6383 100644 --- a/tests/testnotebookdnd.c +++ b/tests/testnotebookdnd.c @@ -58,8 +58,8 @@ const char *tabs4 [] = { static GtkNotebook* window_creation_function (GtkNotebook *source_notebook, GtkWidget *child, - gint x, - gint y, + int x, + int y, gpointer data) { GtkWidget *window, *notebook; @@ -230,7 +230,7 @@ create_notebook_with_notebooks (const char **labels, GtkPositionType pos) { GtkWidget *notebook, *title, *page; - gint count = 0; + int count = 0; notebook = gtk_notebook_new (); g_signal_connect (notebook, "create-window", @@ -286,8 +286,8 @@ quit_cb (GtkWidget *widget, g_main_context_wakeup (NULL); } -gint -main (gint argc, gchar *argv[]) +int +main (int argc, gchar *argv[]) { GtkWidget *window, *grid; gboolean done = FALSE; diff --git a/tests/testrc.c b/tests/testrc.c index 6ef1e0ee49..91d979bfc1 100644 --- a/tests/testrc.c +++ b/tests/testrc.c @@ -50,7 +50,7 @@ load_types (void) int main (int argc, char *argv[]) { - gint i; + int i; gtk_init (); load_types (); diff --git a/tests/testrevealer.c b/tests/testrevealer.c index a36080f21e..9ec28b3caa 100644 --- a/tests/testrevealer.c +++ b/tests/testrevealer.c @@ -1,7 +1,7 @@ #include <gtk/gtk.h> -gint -main (gint argc, +int +main (int argc, gchar ** argv) { GtkWidget *window, *revealer, *box, *widget, *entry; diff --git a/tests/testscrolledge.c b/tests/testscrolledge.c index 70820d66f5..94f808f7e8 100644 --- a/tests/testscrolledge.c +++ b/tests/testscrolledge.c @@ -23,10 +23,10 @@ static guint add_rows_id = 0; static void populate_list (GtkListBox *list) { - gint i; + int i; gchar *text; GtkWidget *row, *label; - gint n; + int n; GtkWidget *child; for (child = gtk_widget_get_first_child (GTK_WIDGET (list)), n = 0; diff --git a/tests/testscrolledwindow.c b/tests/testscrolledwindow.c index ca772c12dd..6642ef3b44 100644 --- a/tests/testscrolledwindow.c +++ b/tests/testscrolledwindow.c @@ -27,7 +27,7 @@ content_width_changed (GtkSpinButton *spin_button, gdouble value; value = gtk_spin_button_get_value (spin_button); - gtk_scrolled_window_set_min_content_width (swindow, (gint)value); + gtk_scrolled_window_set_min_content_width (swindow, (int)value); } static void @@ -38,7 +38,7 @@ content_height_changed (GtkSpinButton *spin_button, gdouble value; value = gtk_spin_button_get_value (spin_button); - gtk_scrolled_window_set_min_content_height (swindow, (gint)value); + gtk_scrolled_window_set_min_content_height (swindow, (int)value); } static void diff --git a/tests/testselectionmode.c b/tests/testselectionmode.c index 7157c8ec02..325e80b2f0 100644 --- a/tests/testselectionmode.c +++ b/tests/testselectionmode.c @@ -78,7 +78,7 @@ selectable_row_new (void) } static void -add_row (GtkWidget *list, gint i) +add_row (GtkWidget *list, int i) { GtkWidget *row; GtkWidget *label; @@ -190,7 +190,7 @@ main (int argc, char *argv[]) GtkWidget *window; GtkWidget *list; GtkWidget *button; - gint i; + int i; GSimpleActionGroup *group; GSimpleAction *action; diff --git a/tests/testspinbutton.c b/tests/testspinbutton.c index ef8f2db648..0d21cf3a0b 100644 --- a/tests/testspinbutton.c +++ b/tests/testspinbutton.c @@ -18,7 +18,7 @@ #include "config.h" #include <gtk/gtk.h> -static gint num_windows = 0; +static int num_windows = 0; static gboolean done = FALSE; diff --git a/tests/teststack.c b/tests/teststack.c index 39e77ff190..571d58fc07 100644 --- a/tests/teststack.c +++ b/tests/teststack.c @@ -53,7 +53,7 @@ on_back_button_clicked (GtkButton *button, gpointer user_data) { const gchar *seq[] = { "1", "2", "3" }; const gchar *vis; - gint i; + int i; vis = gtk_stack_get_visible_child_name (GTK_STACK (stack)); @@ -72,7 +72,7 @@ on_forward_button_clicked (GtkButton *button, gpointer user_data) { const gchar *seq[] = { "1", "2", "3" }; const gchar *vis; - gint i; + int i; vis = gtk_stack_get_visible_child_name (GTK_STACK (stack)); @@ -104,8 +104,8 @@ update_forward_button_sensitivity (GtkStack *_stack, GParamSpec *pspec, GtkWidge gtk_widget_set_sensitive (button, g_strcmp0 (vis, "3") != 0); } -gint -main (gint argc, +int +main (int argc, gchar ** argv) { GtkWidget *window, *box, *button, *hbox, *combo, *layout; diff --git a/tests/testtexthistory.c b/tests/testtexthistory.c index 8332b4d8a1..fddc86daf5 100644 --- a/tests/testtexthistory.c +++ b/tests/testtexthistory.c @@ -126,8 +126,8 @@ do_delete (gpointer funcs_data, static void do_select (gpointer funcs_data, - gint selection_insert, - gint selection_bound) + int selection_insert, + int selection_bound) { Text *text = funcs_data; diff --git a/tests/testtooltips.c b/tests/testtooltips.c index e7a91889ff..a955d56dd5 100644 --- a/tests/testtooltips.c +++ b/tests/testtooltips.c @@ -59,8 +59,8 @@ my_tooltip_class_init (MyTooltipClass *tt_class) static gboolean query_tooltip_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) @@ -73,8 +73,8 @@ query_tooltip_cb (GtkWidget *widget, static gboolean query_tooltip_text_view_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) @@ -86,14 +86,14 @@ query_tooltip_text_view_cb (GtkWidget *widget, if (keyboard_tip) { - gint offset; + int offset; g_object_get (buffer, "cursor-position", &offset, NULL); gtk_text_buffer_get_iter_at_offset (buffer, &iter, offset); } else { - gint bx, by, trailing; + int bx, by, trailing; gtk_text_view_window_to_buffer_coords (text_view, GTK_TEXT_WINDOW_TEXT, x, y, &bx, &by); @@ -110,8 +110,8 @@ query_tooltip_text_view_cb (GtkWidget *widget, static gboolean query_tooltip_tree_view_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) @@ -179,8 +179,8 @@ selection_changed_cb (GtkTreeSelection *selection, static struct Rectangle { - gint x; - gint y; + int x; + int y; gfloat r; gfloat g; gfloat b; @@ -195,13 +195,13 @@ rectangles[] = static gboolean query_tooltip_drawing_area_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) { - gint i; + int i; if (keyboard_tip) return FALSE; @@ -228,7 +228,7 @@ drawing_area_draw (GtkDrawingArea *drawing_area, int height, gpointer data) { - gint i; + int i; cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_paint (cr); @@ -249,8 +249,8 @@ drawing_area_draw (GtkDrawingArea *drawing_area, static gboolean query_tooltip_label_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c index 47030f8f9b..768418d315 100644 --- a/tests/testtreecolumns.c +++ b/tests/testtreecolumns.c @@ -68,7 +68,7 @@ struct _ViewColumnModel GtkListStore parent; GtkTreeView *view; GList *columns; - gint stamp; + int stamp; }; struct _ViewColumnModelClass @@ -94,7 +94,7 @@ static void view_column_model_init (ViewColumnModel *model) model->stamp = g_random_int (); } -static gint +static int view_column_model_get_n_columns (GtkTreeModel *tree_model) { return 2; @@ -102,7 +102,7 @@ view_column_model_get_n_columns (GtkTreeModel *tree_model) static GType view_column_model_get_column_type (GtkTreeModel *tree_model, - gint index) + int index) { switch (index) { @@ -123,7 +123,7 @@ view_column_model_get_iter (GtkTreeModel *tree_model, { ViewColumnModel *view_model = (ViewColumnModel *)tree_model; GList *list; - gint i; + int i; g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE); @@ -146,7 +146,7 @@ view_column_model_get_path (GtkTreeModel *tree_model, ViewColumnModel *view_model = (ViewColumnModel *)tree_model; GtkTreePath *retval; GList *list; - gint i = 0; + int i = 0; g_return_val_if_fail (iter->stamp == view_model->stamp, NULL); @@ -167,7 +167,7 @@ view_column_model_get_path (GtkTreeModel *tree_model, static void view_column_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { #ifndef G_DISABLE_CHECKS @@ -237,18 +237,18 @@ view_column_model_iter_has_child (GtkTreeModel *tree_model, return FALSE; } -static gint +static int view_column_model_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { return g_list_length (((ViewColumnModel *)tree_model)->columns); } -static gint +static int view_column_model_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { ViewColumnModel *view_model = (ViewColumnModel *)tree_model; @@ -385,7 +385,7 @@ static void update_columns (GtkTreeView *view, ViewColumnModel *view_model) { GList *old_columns = view_model->columns; - gint old_length, length; + int old_length, length; GList *a, *b; view_model->columns = gtk_tree_view_get_columns (view_model->view); @@ -396,7 +396,7 @@ update_columns (GtkTreeView *view, ViewColumnModel *view_model) if (length != old_length) { GtkTreePath *path; - gint i = 0; + int i = 0; /* where are they different */ for (a = old_columns, b = view_model->columns; a && b; a = a->next, b = b->next) @@ -423,9 +423,9 @@ update_columns (GtkTreeView *view, ViewColumnModel *view_model) } else { - gint i; - gint m = 0, n = 1; - gint *new_order; + int i; + int m = 0, n = 1; + int *new_order; GtkTreePath *path; new_order = g_new (int, length); @@ -505,7 +505,7 @@ view_column_model_new (GtkTreeView *view) static void add_clicked (GtkWidget *button, gpointer data) { - static gint i = 0; + static int i = 0; GtkTreeIter iter; GtkTreeViewColumn *column; @@ -608,7 +608,7 @@ move_to_right (GtkTreeIter *src_iter, { gchar *label; GtkTreeViewColumn *column; - gint before = -1; + int before = -1; gtk_tree_model_get (GTK_TREE_MODEL (left_tree_model), src_iter, 0, &label, 1, &column, -1); @@ -637,7 +637,7 @@ move_up_or_down (GtkTreeModel *src, { GtkTreeViewColumn *column; gchar *label; - gint before = -1; + int before = -1; gtk_tree_model_get (src, src_iter, 0, &label, 1, &column, -1); @@ -732,7 +732,7 @@ main (int argc, char *argv[]) GtkWidget *swindow; GtkTreeModel *sample_model; GdkContentFormats *targets; - gint i; + int i; gboolean done = FALSE; gtk_init (); diff --git a/tests/testtreeedit.c b/tests/testtreeedit.c index e528d50191..e3b17668ef 100644 --- a/tests/testtreeedit.c +++ b/tests/testtreeedit.c @@ -23,7 +23,7 @@ typedef struct { const gchar *string; gboolean is_editable; gboolean is_sensitive; - gint progress; + int progress; } ListEntry; enum { @@ -52,7 +52,7 @@ create_model (void) { GtkTreeStore *model; GtkTreeIter iter; - gint i; + int i; model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING, @@ -184,7 +184,7 @@ enum { }; static void -create_control (GtkWidget *box, gint number, gint cntl, CallbackData *data) +create_control (GtkWidget *box, int number, int cntl, CallbackData *data) { GtkWidget *checkbutton; GCallback callback = NULL; @@ -227,8 +227,8 @@ quit_cb (GtkWidget *widget, g_main_context_wakeup (NULL); } -gint -main (gint argc, gchar **argv) +int +main (int argc, gchar **argv) { GtkWidget *window; GtkWidget *scrolled_window; diff --git a/tests/testtreeflow.c b/tests/testtreeflow.c index de9e235878..6b882bff36 100644 --- a/tests/testtreeflow.c +++ b/tests/testtreeflow.c @@ -46,7 +46,7 @@ static const char *words[] = static void initialize_model (void) { - gint i; + int i; GtkTreeIter iter; model = (GtkTreeModel *) gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING); @@ -63,7 +63,7 @@ initialize_model (void) static void futz_row (void) { - gint i; + int i; GtkTreePath *path; GtkTreeIter iter; GtkTreeIter iter2; @@ -110,7 +110,7 @@ futz_row (void) static gboolean futz (void) { - gint i; + int i; for (i = 0; i < 15; i++) futz_row (); diff --git a/tests/testtreefocus.c b/tests/testtreefocus.c index 1f6f2d1dd8..da5802c3bf 100644 --- a/tests/testtreefocus.c +++ b/tests/testtreefocus.c @@ -324,7 +324,7 @@ set_indicator_size (GtkTreeViewColumn *column, GtkTreeIter *iter, gpointer data) { - gint size; + int size; GtkTreePath *path; path = gtk_tree_model_get_path (model, iter); @@ -354,7 +354,7 @@ main (int argc, char *argv[]) GtkWidget *tree_view; GtkTreeModel *model; GtkCellRenderer *renderer; - gint col_offset; + int col_offset; GtkTreeViewColumn *column; gboolean done = FALSE; diff --git a/tests/testtreemodel.c b/tests/testtreemodel.c index 2becbd0d1b..dffa4647d6 100644 --- a/tests/testtreemodel.c +++ b/tests/testtreemodel.c @@ -25,8 +25,8 @@ #include <gtk/gtk.h> -static gint repeats = 2; -static gint max_size = 8; +static int repeats = 2; +static int max_size = 8; static GOptionEntry entries[] = { { "repeats", 'r', 0, G_OPTION_ARG_INT, &repeats, "Average over N repetitions", "N" }, @@ -37,13 +37,13 @@ static GOptionEntry entries[] = { typedef void (ClearFunc)(GtkTreeModel *model); typedef void (InsertFunc)(GtkTreeModel *model, - gint items, - gint i); + int items, + int i); static void list_store_append (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; @@ -57,8 +57,8 @@ list_store_append (GtkTreeModel *model, static void list_store_prepend (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; @@ -72,13 +72,13 @@ list_store_prepend (GtkTreeModel *model, static void list_store_insert (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; gchar *text; - gint n; + int n; text = g_strdup_printf ("row %d", i); n = g_random_int_range (0, i + 1); @@ -87,14 +87,14 @@ list_store_insert (GtkTreeModel *model, g_free (text); } -static gint +static int compare (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data) { gchar *str_a, *str_b; - gint result; + int result; gtk_tree_model_get (model, a, 1, &str_a, -1); gtk_tree_model_get (model, b, 1, &str_b, -1); @@ -109,8 +109,8 @@ compare (GtkTreeModel *model, static void tree_store_append (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; @@ -124,8 +124,8 @@ tree_store_append (GtkTreeModel *model, static void tree_store_prepend (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; @@ -139,13 +139,13 @@ tree_store_prepend (GtkTreeModel *model, static void tree_store_insert_flat (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; gchar *text; - gint n; + int n; text = g_strdup_printf ("row %d", i); n = g_random_int_range (0, i + 1); @@ -155,8 +155,8 @@ tree_store_insert_flat (GtkTreeModel *model, } typedef struct { - gint i; - gint n; + int i; + int n; gboolean found; GtkTreeIter iter; } FindData; @@ -183,8 +183,8 @@ find_nth (GtkTreeModel *model, static void tree_store_insert_deep (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; @@ -209,7 +209,7 @@ test_run (const char *title, ClearFunc *clear, InsertFunc *insert) { - gint i, k, d, items; + int i, k, d, items; GTimer *timer; gdouble elapsed; int memused; diff --git a/tests/testtreepos.c b/tests/testtreepos.c index e2c26e90f6..80be31a0be 100644 --- a/tests/testtreepos.c +++ b/tests/testtreepos.c @@ -2,18 +2,18 @@ static gboolean clicked_icon (GtkTreeView *tv, - gint x, - gint y, + int x, + int y, GtkTreePath **path) { GtkTreeViewColumn *col; - gint cell_x, cell_y; - gint cell_pos, cell_width; + int cell_x, cell_y; + int cell_pos, cell_width; GList *cells, *l; - gint depth; - gint level_indentation; - gint expander_size; - gint indent; + int depth; + int level_indentation; + int expander_size; + int indent; if (gtk_tree_view_get_path_at_pos (tv, x, y, path, &col, &cell_x, &cell_y)) { @@ -60,7 +60,7 @@ release_event (GtkGestureClick *gesture, GtkTreeView *tv) { GtkTreePath *path; - gint tx, ty; + int tx, ty; gtk_tree_view_convert_widget_to_tree_coords (tv, x, y, &tx, &ty); diff --git a/tests/testtreesort.c b/tests/testtreesort.c index a85240d06e..8b923c11dc 100644 --- a/tests/testtreesort.c +++ b/tests/testtreesort.c @@ -27,7 +27,7 @@ struct _ListSort const gchar *word_2; const gchar *word_3; const gchar *word_4; - gint number_1; + int number_1; }; static ListSort data[] = @@ -105,7 +105,7 @@ main (int argc, char *argv[]) GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeIter iter; - gint i; + int i; GtkWidget *entry, *button; GtkWidget *window2, *vbox2, *scrolled_window2, *tree_view2; @@ -155,7 +155,7 @@ main (int argc, char *argv[]) /* 12 iters now, 12 later... */ for (i = 0; data[i].word_1 != NULL; i++) { - gint k; + int k; GtkTreeIter child_iter; @@ -374,7 +374,7 @@ main (int argc, char *argv[]) for (i = 0; data[i].word_1 != NULL; i++) { - gint k; + int k; gtk_tree_store_prepend (GTK_TREE_STORE (model), &iter, NULL); gtk_tree_store_set (GTK_TREE_STORE (model), &iter, diff --git a/tests/testtreeview.c b/tests/testtreeview.c index f6854a74d7..2efb476b22 100644 --- a/tests/testtreeview.c +++ b/tests/testtreeview.c @@ -66,7 +66,7 @@ struct _GtkTreeModelTypes { GObject parent; - gint stamp; + int stamp; }; struct _GtkTreeModelTypesClass @@ -74,9 +74,9 @@ struct _GtkTreeModelTypesClass GObjectClass parent_class; guint (* get_flags) (GtkTreeModel *tree_model); - gint (* get_n_columns) (GtkTreeModel *tree_model); + int (* get_n_columns) (GtkTreeModel *tree_model); GType (* get_column_type) (GtkTreeModel *tree_model, - gint index); + int index); gboolean (* get_iter) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path); @@ -84,7 +84,7 @@ struct _GtkTreeModelTypesClass GtkTreeIter *iter); void (* get_value) (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); gboolean (* iter_next) (GtkTreeModel *tree_model, GtkTreeIter *iter); @@ -93,12 +93,12 @@ struct _GtkTreeModelTypesClass GtkTreeIter *parent); gboolean (* iter_has_child) (GtkTreeModel *tree_model, GtkTreeIter *iter); - gint (* iter_n_children) (GtkTreeModel *tree_model, + int (* iter_n_children) (GtkTreeModel *tree_model, GtkTreeIter *iter); gboolean (* iter_nth_child) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); gboolean (* iter_parent) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child); @@ -502,7 +502,7 @@ create_list_model (void) { GtkListStore *store; GtkTreeIter iter; - gint i; + int i; GType *t; t = get_model_types (); @@ -543,7 +543,7 @@ typesystem_recurse (GType type, { GType* children; guint n_children = 0; - gint i; + int i; GtkTreeIter iter; gchar *str; @@ -575,7 +575,7 @@ static GtkTreeModel* create_tree_model (void) { GtkTreeStore *store; - gint i; + int i; GType *t; /* Make the tree more interesting */ @@ -608,7 +608,7 @@ static void model_selected (GtkComboBox *combo_box, gpointer data) { GtkTreeView *tree_view = GTK_TREE_VIEW (data); - gint hist; + int hist; hist = gtk_combo_box_get_active (combo_box); @@ -622,7 +622,7 @@ static void columns_selected (GtkComboBox *combo_box, gpointer data) { GtkTreeView *tree_view = GTK_TREE_VIEW (data); - gint hist; + int hist; hist = gtk_combo_box_get_active (combo_box); @@ -663,7 +663,7 @@ main (int argc, GtkWidget *combo_box; GtkTreeModel *model; GdkContentFormats *targets; - gint i; + int i; gboolean done = FALSE; gtk_init (); @@ -769,14 +769,14 @@ main (int argc, static void gtk_tree_model_types_init (GtkTreeModelTypes *model_types); static void gtk_tree_model_types_tree_model_init (GtkTreeModelIface *iface); -static gint gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model); +static int gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model); static GType gtk_real_model_types_get_column_type (GtkTreeModel *tree_model, - gint index); + int index); static GtkTreePath *gtk_real_model_types_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter); static void gtk_real_model_types_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); static gboolean gtk_real_model_types_iter_next (GtkTreeModel *tree_model, GtkTreeIter *iter); @@ -785,12 +785,12 @@ static gboolean gtk_real_model_types_iter_children (GtkTreeModel *t GtkTreeIter *parent); static gboolean gtk_real_model_types_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter); -static gint gtk_real_model_types_iter_n_children (GtkTreeModel *tree_model, +static int gtk_real_model_types_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter); static gboolean gtk_real_model_types_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); static gboolean gtk_real_model_types_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child); @@ -870,7 +870,7 @@ static GType column_types[] = { G_TYPE_STRING /* type name */ }; -static gint +static int gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model) { return G_N_ELEMENTS (column_types); @@ -878,7 +878,7 @@ gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model) static GType gtk_real_model_types_get_column_type (GtkTreeModel *tree_model, - gint index) + int index) { g_return_val_if_fail (index < G_N_ELEMENTS (column_types), G_TYPE_INVALID); @@ -919,7 +919,7 @@ gtk_real_model_types_get_path (GtkTreeModel *tree_model, while (parent != G_TYPE_INVALID) { GType* children = g_type_children (parent, NULL); - gint i = 0; + int i = 0; if (!children || children[0] == G_TYPE_INVALID) { @@ -947,7 +947,7 @@ gtk_real_model_types_get_path (GtkTreeModel *tree_model, static void gtk_real_model_types_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GType type; @@ -1008,7 +1008,7 @@ gtk_real_model_types_iter_next (GtkTreeModel *tree_model, else { GType* children = g_type_children (parent, NULL); - gint i = 0; + int i = 0; g_assert (children != NULL); @@ -1079,7 +1079,7 @@ gtk_real_model_types_iter_has_child (GtkTreeModel *tree_model, } } -static gint +static int gtk_real_model_types_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { @@ -1107,7 +1107,7 @@ static gboolean gtk_real_model_types_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { if (parent == NULL) { @@ -1183,10 +1183,10 @@ gtk_real_model_types_iter_parent (GtkTreeModel *tree_model, static void treestore_torture_recurse (GtkTreeStore *store, GtkTreeIter *root, - gint depth) + int depth) { GtkTreeModel *model; - gint i; + int i; GtkTreeIter iter; model = GTK_TREE_MODEL (store); @@ -1284,7 +1284,7 @@ run_automated_tests (void) /* Make sure list store mutations don't crash anything */ GtkListStore *store; GtkTreeModel *model; - gint i; + int i; GtkTreeIter iter; store = gtk_list_store_new (1, G_TYPE_INT); diff --git a/tests/testverticalcells.c b/tests/testverticalcells.c index ed89ece29a..2ef1929977 100644 --- a/tests/testverticalcells.c +++ b/tests/testverticalcells.c @@ -30,7 +30,7 @@ struct _TreeEntry { const gchar *description; const gchar *fine_print; const gchar *fine_print_color; - gint progress; + int progress; TreeEntry *entries; }; @@ -249,7 +249,7 @@ populate_model (GtkTreeStore *model, TreeEntry *entries) { GtkTreeIter iter; - gint i; + int i; for (i = 0; entries[i].info != NULL; i++) { @@ -272,7 +272,7 @@ static GtkTreeModel * create_model (void) { GtkTreeStore *model; - gint i; + int i; model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING, @@ -299,8 +299,8 @@ quit_cb (GtkWidget *widget, g_main_context_wakeup (NULL); } -gint -main (gint argc, gchar **argv) +int +main (int argc, gchar **argv) { GtkWidget *window; GtkWidget *scrolled_window; diff --git a/tests/testvolumebutton.c b/tests/testvolumebutton.c index b86577a696..7fb886dcf4 100644 --- a/tests/testvolumebutton.c +++ b/tests/testvolumebutton.c @@ -27,7 +27,7 @@ value_changed (GtkWidget *button, static void response_cb (GtkDialog *dialog, - gint arg1, + int arg1, gpointer user_data) { gtk_window_destroy (GTK_WINDOW (dialog)); diff --git a/tests/testwindowsize.c b/tests/testwindowsize.c index ae6b2fcaa5..3b7e795a47 100644 --- a/tests/testwindowsize.c +++ b/tests/testwindowsize.c @@ -23,7 +23,7 @@ show_dialog (void) { GtkWidget *dialog; GtkWidget *label; - gint width_chars, max_width_chars, default_width, default_height; + int width_chars, max_width_chars, default_width, default_height; gboolean resizable; width_chars = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (width_chars_spin)); diff --git a/tests/treestoretest.c b/tests/treestoretest.c index afe871414e..34a833538b 100644 --- a/tests/treestoretest.c +++ b/tests/treestoretest.c @@ -21,7 +21,7 @@ #include <string.h> GtkTreeStore *base_model; -static gint node_count = 0; +static int node_count = 0; static void selection_changed (GtkTreeSelection *selection, @@ -36,7 +36,7 @@ selection_changed (GtkTreeSelection *selection, static void node_set (GtkTreeIter *iter) { - gint n; + int n; gchar *str; str = g_strdup_printf ("Row (<span color=\"red\">%d</span>)", node_count++); @@ -290,7 +290,7 @@ quit_cb (GtkWidget *widget, } static void -make_window (gint view_type) +make_window (int view_type) { GtkWidget *window; GtkWidget *vbox; diff --git a/tests/video-timer.c b/tests/video-timer.c index 512ab7a66f..cc59a9525a 100644 --- a/tests/video-timer.c +++ b/tests/video-timer.c @@ -152,7 +152,7 @@ static void adjust_clock_for_phase (gint64 frame_clock_time, gint64 presentation_time) { - static gint count = 0; + static int count = 0; static gint64 previous_frame_clock_time; static gint64 previous_presentation_time; gint64 phase = presentation_time - frame_clock_time; |