[dia] style: replace a bunch of gint with plain int
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] style: replace a bunch of gint with plain int
- Date: Fri, 30 Jul 2021 23:50:07 +0000 (UTC)
commit 31e1f19af28518fcd05f2121b6f3cdc808f1d852
Author: Zander Brown <zbrown gnome org>
Date: Sat Jul 31 00:47:15 2021 +0100
style: replace a bunch of gint with plain int
app/app_procs.c | 10 +++---
app/commands.c | 6 ++--
app/cut_n_paste.c | 2 +-
app/cut_n_paste.h | 2 +-
app/defaults.c | 11 +++---
app/dia-colour-area.c | 9 ++---
app/dia-guide-dialog.c | 2 +-
app/dia-guide-tool.c | 9 ++---
app/dia-line-width-area.c | 3 +-
app/dia-props.c | 2 +-
app/diagram.c | 8 ++---
app/diagram_tree_model.c | 57 ++++++++++++++++++------------
app/diagram_tree_view.c | 6 ++--
app/disp_callbacks.c | 54 ++++++++++++++++------------
app/disp_callbacks.h | 17 +++++----
app/display.c | 4 +--
app/filedlg.c | 2 +-
app/find-and-replace.c | 5 +--
app/grid.c | 2 +-
app/interface.c | 35 ++++++++++--------
app/layer-editor/dia-layer-editor.c | 2 +-
app/layer-editor/dia-layer-list.c | 6 ++--
app/layer-editor/dia-layer-widget.c | 6 ++--
app/modify_tool.c | 7 ++--
app/plugin-manager.c | 7 ++--
app/properties-dialog.c | 14 ++++----
app/recent_files.c | 2 +-
app/ruler.c | 8 ++---
app/sheet-editor/sheets_dialog_callbacks.c | 9 ++---
app/toolbox.c | 4 +--
app/undo.c | 2 +-
lib/dia-arrow-cell-renderer.c | 18 +++++-----
32 files changed, 185 insertions(+), 146 deletions(-)
---
diff --git a/app/app_procs.c b/app/app_procs.c
index 0d08a18d5..c9bbf7134 100644
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -124,7 +124,7 @@ build_output_file_name(const char *infname, const char *format, const char *outd
static void
show_layers_parse_numbers (DiagramData *diagdata,
gboolean *visible_layers,
- gint n_layers,
+ int n_layers,
const char *str)
{
char *p;
@@ -186,7 +186,7 @@ show_layers_parse_numbers (DiagramData *diagdata,
static void
show_layers_parse_word (DiagramData *diagdata,
gboolean *visible_layers,
- gint n_layers,
+ int n_layers,
const char *str)
{
gboolean found = FALSE;
@@ -222,7 +222,7 @@ show_layers_parse_word (DiagramData *diagdata,
static void
show_layers_parse_string (DiagramData *diagdata,
gboolean *visible_layers,
- gint n_layers,
+ int n_layers,
const char *str)
{
gchar **pp;
@@ -1146,8 +1146,8 @@ static void
print_credits (void)
{
int i;
- const gint nauthors = (sizeof (authors) / sizeof (authors[0])) - 1;
- const gint ndocumentors = (sizeof (documentors) / sizeof (documentors[0])) - 1;
+ const int nauthors = (sizeof (authors) / sizeof (authors[0])) - 1;
+ const int ndocumentors = (sizeof (documentors) / sizeof (documentors[0])) - 1;
g_print (_("The original author of Dia was:\n\n"));
for (i = 0; i < NUMBER_OF_ORIG_AUTHORS; i++) {
diff --git a/app/commands.c b/app/commands.c
index a13fb4e57..2dbc72210 100644
--- a/app/commands.c
+++ b/app/commands.c
@@ -202,7 +202,7 @@ insert_text (DDisplay *ddisp, Focus *focus, const gchar *text)
gchar *next_line = g_utf8_strchr (text, -1, '\n');
if (next_line != text) {
- gint len = g_utf8_strlen (text, (next_line-text));
+ int len = g_utf8_strlen (text, (next_line-text));
modified = (*focus->key_event) (focus, 0, GDK_A, text, len, &change);
}
@@ -348,7 +348,7 @@ received_clipboard_content_handler (GtkClipboard *clipboard,
DDisplay *ddisp = (DDisplay *) user_data;
GdkAtom type_atom;
gchar *type_name;
- gint len;
+ int len;
if ((len = gtk_selection_data_get_length (selection_data)) > 0) {
const guchar *data = gtk_selection_data_get_data (selection_data);
@@ -401,7 +401,7 @@ edit_paste_image_callback (GtkAction *action)
GtkClipboard *clipboard = gtk_clipboard_get (GDK_NONE);
DDisplay *ddisp;
GdkAtom *targets;
- gint n_targets;
+ int n_targets;
gboolean done = FALSE;
ddisp = ddisplay_active ();
diff --git a/app/cut_n_paste.c b/app/cut_n_paste.c
index f2e634f87..81333b6e3 100644
--- a/app/cut_n_paste.c
+++ b/app/cut_n_paste.c
@@ -52,7 +52,7 @@ cnp_get_stored_objects(int* generation)
return copied_list;
}
-gint
+gboolean
cnp_exist_stored_objects(void)
{
return (stored_list != NULL);
diff --git a/app/cut_n_paste.h b/app/cut_n_paste.h
index d21f9816f..f218b0a30 100644
--- a/app/cut_n_paste.h
+++ b/app/cut_n_paste.h
@@ -26,6 +26,6 @@ void cnp_store_objects(GList *object_list, int generation);
/* Gets a copy of the stored objects: */
GList *cnp_get_stored_objects(int* generation);
-gint cnp_exist_stored_objects(void);
+gboolean cnp_exist_stored_objects(void);
#endif /* CUT_N_PASTE_H */
diff --git a/app/defaults.c b/app/defaults.c
index d8cd87992..3dcfafb37 100644
--- a/app/defaults.c
+++ b/app/defaults.c
@@ -36,7 +36,7 @@ static DiaObject *current_object = NULL;
static GtkWidget *no_defaults_dialog = NULL;
-static gint defaults_respond (GtkWidget *widget, gint response_id, gpointer data);
+static int defaults_respond (GtkWidget *widget, int response_id, gpointer data);
static void
@@ -67,8 +67,8 @@ create_dialog (void)
}
-static gint
-defaults_dialog_destroyed(GtkWidget *widget, gpointer data)
+static int
+defaults_dialog_destroyed (GtkWidget *widget, gpointer data)
{
if (widget == object_part) {
object_part = NULL;
@@ -79,8 +79,9 @@ defaults_dialog_destroyed(GtkWidget *widget, gpointer data)
return 0;
}
-static gint
-defaults_respond(GtkWidget *widget, gint response_id, gpointer data)
+
+static int
+defaults_respond (GtkWidget *widget, int response_id, gpointer data)
{
if (response_id == GTK_RESPONSE_OK ||
response_id == GTK_RESPONSE_APPLY) {
diff --git a/app/dia-colour-area.c b/app/dia-colour-area.c
index e7d2b4393..8008d1b1c 100644
--- a/app/dia-colour-area.c
+++ b/app/dia-colour-area.c
@@ -42,7 +42,7 @@ dia_colour_area_target (DiaColourArea *self,
int x,
int y)
{
- gint rect_w, rect_h;
+ int rect_w, rect_h;
GtkAllocation alloc;
gtk_widget_get_allocation (GTK_WIDGET (self), &alloc);
@@ -72,8 +72,8 @@ dia_colour_area_draw (GtkWidget *self, /*cairo_t *ctx*/
GdkEventExpose *event)
{
GdkColor fg, bg;
- gint rect_w, rect_h;
- gint img_width, img_height;
+ int rect_w, rect_h;
+ int img_width, img_height;
DiaColourArea *priv = DIA_COLOUR_AREA (self);
cairo_t *ctx = gdk_cairo_create (gtk_widget_get_window (self));
GtkAllocation alloc;
@@ -115,9 +115,10 @@ dia_colour_area_draw (GtkWidget *self, /*cairo_t *ctx*/
return FALSE;
}
+
static void
dia_colour_area_response (GtkDialog *chooser,
- gint response,
+ int response,
DiaColourArea *self)
{
if (response == GTK_RESPONSE_OK) {
diff --git a/app/dia-guide-dialog.c b/app/dia-guide-dialog.c
index ddb82f9a9..3d237efff 100644
--- a/app/dia-guide-dialog.c
+++ b/app/dia-guide-dialog.c
@@ -96,7 +96,7 @@ dia_guide_dialog_finalize (GObject *object)
static void
dia_guide_dialog_response (GtkDialog *dialog,
- gint response_id)
+ int response_id)
{
DiaGuideDialog *self = DIA_GUIDE_DIALOG (dialog);
DiaGuideDialogPrivate *priv = dia_guide_dialog_get_instance_private (self);
diff --git a/app/dia-guide-tool.c b/app/dia-guide-tool.c
index 19be75918..eea1767d0 100644
--- a/app/dia-guide-tool.c
+++ b/app/dia-guide-tool.c
@@ -128,13 +128,14 @@ guide_button_release(GuideTool *tool, GdkEventButton *event,
tool_reset();
}
+
static void
-guide_motion(GuideTool *tool, GdkEventMotion *event, DDisplay *ddisp)
+guide_motion (GuideTool *tool, GdkEventMotion *event, DDisplay *ddisp)
{
- gint tx, ty;
+ int tx, ty;
Point to;
- gint disp_width;
- gint disp_height;
+ int disp_width;
+ int disp_height;
disp_width = dia_interactive_renderer_get_width_pixels (DIA_INTERACTIVE_RENDERER (ddisp->renderer));
disp_height = dia_interactive_renderer_get_height_pixels (DIA_INTERACTIVE_RENDERER (ddisp->renderer));
diff --git a/app/dia-line-width-area.c b/app/dia-line-width-area.c
index 1f8b154e6..d1ad0df69 100644
--- a/app/dia-line-width-area.c
+++ b/app/dia-line-width-area.c
@@ -64,9 +64,10 @@ linewidth_number_from_width (real width)
}
}
+
static void
dia_line_width_area_dialog_respond (GtkWidget *widget,
- gint response_id,
+ int response_id,
DiaLineWidthArea *self)
{
if (response_id == GTK_RESPONSE_OK) {
diff --git a/app/dia-props.c b/app/dia-props.c
index 17ac29205..6b785cb72 100644
--- a/app/dia-props.c
+++ b/app/dia-props.c
@@ -146,7 +146,7 @@ dia_diagram_properties_dialog_delete_event (GtkWidget *widget, GdkEventAny *even
static void
dia_diagram_properties_dialog_response (GtkDialog *dialog,
- gint response_id)
+ int response_id)
{
DiaDiagramPropertiesDialog *self = DIA_DIAGRAM_PROPERTIES_DIALOG (dialog);
DiaDiagramPropertiesDialogPrivate *priv = dia_diagram_properties_dialog_get_instance_private (self);
diff --git a/app/diagram.c b/app/diagram.c
index c9f80bf53..cc38f3ba0 100644
--- a/app/diagram.c
+++ b/app/diagram.c
@@ -72,7 +72,7 @@ struct _ObjectExtent
typedef struct _ObjectExtent ObjectExtent;
-static gint diagram_parent_sort_cb(gconstpointer a, gconstpointer b);
+static int diagram_parent_sort_cb(gconstpointer a, gconstpointer b);
enum {
@@ -613,7 +613,7 @@ object_within_parent(DiaObject *obj, DiaObject *p)
void
diagram_update_menu_sensitivity (Diagram *dia)
{
- gint selected_count = dia ? g_list_length (dia->data->selected) : 0;
+ int selected_count = dia ? g_list_length (dia->data->selected) : 0;
DDisplay *ddisp = ddisplay_active();
gboolean focus_active = dia ? (get_active_focus(dia->data) != NULL) : FALSE;
gboolean textedit_active = ddisp ? textedit_mode(ddisp) : FALSE;
@@ -1173,8 +1173,8 @@ strip_connections(DiaObject *obj, GList *not_strip_list, Diagram *dia)
/* GCompareFunc */
-static gint
-diagram_parent_sort_cb(gconstpointer _a, gconstpointer _b)
+static int
+diagram_parent_sort_cb (gconstpointer _a, gconstpointer _b)
{
ObjectExtent **a = (ObjectExtent **)_a;
ObjectExtent **b = (ObjectExtent **)_b;
diff --git a/app/diagram_tree_model.c b/app/diagram_tree_model.c
index cb5a52b42..4caef63ec 100644
--- a/app/diagram_tree_model.c
+++ b/app/diagram_tree_model.c
@@ -77,14 +77,18 @@ _dtm_get_flags (GtkTreeModel *tree_model)
{
return GTK_TREE_MODEL_ITERS_PERSIST; /* NOT: ; */
}
-static gint
+
+
+static int
_dtm_get_n_columns (GtkTreeModel *tree_model)
{
return NUM_COLUMNS;
}
+
+
static GType
_dtm_get_column_type (GtkTreeModel *tree_model,
- gint index)
+ int index)
{
g_return_val_if_fail (index >= DIAGRAM_COLUMN || index < NUM_COLUMNS, G_TYPE_NONE);
@@ -102,15 +106,17 @@ _dtm_get_column_type (GtkTreeModel *tree_model,
return G_TYPE_NONE;
}
}
+
+
static gboolean
_dtm_get_iter (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreePath *path)
+ GtkTreeIter *iter,
+ GtkTreePath *path)
{
/* copy&paste from Gtk */
GtkTreeIter parent;
- gint *indices;
- gint depth, i;
+ int *indices;
+ int depth, i;
indices = gtk_tree_path_get_indices (path);
depth = gtk_tree_path_get_depth (path);
@@ -167,9 +173,10 @@ _dtm_get_path (GtkTreeModel *tree_model,
return result;
}
-static gint
+
+static int
_dtm_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
if (!iter)
return g_list_length (dia_open_diagrams());
@@ -188,11 +195,13 @@ _dtm_iter_n_children (GtkTreeModel *tree_model,
}
return 0;
}
+
+
static void
_dtm_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
+ GtkTreeIter *iter,
+ int column,
+ GValue *value)
{
switch (column) {
@@ -302,11 +311,13 @@ _dtm_iter_has_child (GtkTreeModel *tree_model,
{
return _dtm_iter_n_children (tree_model, iter) > 0;
}
+
+
static gboolean
_dtm_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent,
+ int n)
{
if (parent) {
*iter = *parent;
@@ -607,13 +618,13 @@ cmp_diagram (GtkTreeIter *a,
}
-static gint
+static int
cmp_layer (GtkTreeIter *a,
- GtkTreeIter *b)
+ GtkTreeIter *b)
{
DiaLayer *pa = NODE_LAYER(a), *pb = NODE_LAYER(b);
const char *na, *nb;
- gint ret;
+ int ret;
if (pa == pb)
return 0;
na = dia_layer_get_name (pa);
@@ -668,14 +679,14 @@ name_sort_func (GtkTreeModel *model,
}
-static gint
+static int
type_sort_func (GtkTreeModel *model,
- GtkTreeIter *a,
- GtkTreeIter *b,
- gpointer user_data)
+ GtkTreeIter *a,
+ GtkTreeIter *b,
+ gpointer user_data)
{
DiaObject *pa = NODE_OBJECT(a), *pb = NODE_OBJECT(b);
- gint ret = cmp_diagram (a, b);
+ int ret = cmp_diagram (a, b);
if (ret)
return ret;
ret = cmp_layer (a, b);
@@ -687,6 +698,8 @@ type_sort_func (GtkTreeModel *model,
return (pa > pb) ? -1 : 1;
return strcmp (pa->type->name, pb->type->name);
}
+
+
static GtkTreeModel *
wrap_as_sortable_model (GtkTreeModel *model)
{
diff --git a/app/diagram_tree_view.c b/app/diagram_tree_view.c
index f96cda515..6087cbe56 100644
--- a/app/diagram_tree_view.c
+++ b/app/diagram_tree_view.c
@@ -129,8 +129,8 @@ _dtv_button_press (GtkWidget *widget,
static gboolean
_dtv_query_tooltip (GtkWidget *widget,
- gint x,
- gint y,
+ int x,
+ int y,
gboolean keyboard_mode,
GtkTooltip *tooltip)
{
@@ -507,7 +507,7 @@ _dtv_init (DiagramTreeView *dtv)
{
GtkTreeViewColumn *column;
GtkCellRenderer *cell;
- gint font_size;
+ int font_size;
GtkStyle *style;
/* connect the model with the view */
diff --git a/app/disp_callbacks.c b/app/disp_callbacks.c
index dd8013d1c..242e8524b 100644
--- a/app/disp_callbacks.c
+++ b/app/disp_callbacks.c
@@ -467,8 +467,9 @@ popup_object_menu(DDisplay *ddisp, GdkEvent *event)
g_warning ("Unhandled GdkEvent type=%d", event->type);
}
-gint
-ddisplay_focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+
+int
+ddisplay_focus_in_event (GtkWidget *widget, GdkEventFocus *event, gpointer data)
{
DDisplay *ddisp;
@@ -485,8 +486,9 @@ ddisplay_focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
return FALSE;
}
-gint
-ddisplay_focus_out_event(GtkWidget *widget, GdkEventFocus *event,gpointer data)
+
+int
+ddisplay_focus_out_event (GtkWidget *widget, GdkEventFocus *event, gpointer data)
{
DDisplay *ddisp;
int return_val;
@@ -608,11 +610,12 @@ ddisplay_im_context_commit(GtkIMContext *context, const gchar *str,
handle_key_event(ddisp, focus, 0, 0, str, g_utf8_strlen(str,-1));
}
+
void
-ddisplay_im_context_preedit_changed(GtkIMContext *context,
- DDisplay *ddisp)
+ddisplay_im_context_preedit_changed (GtkIMContext *context,
+ DDisplay *ddisp)
{
- gint cursor_pos;
+ int cursor_pos;
Focus *focus = get_active_focus((DiagramData *) ddisp->diagram);
ddisplay_im_context_preedit_reset(ddisp, focus);
@@ -732,7 +735,7 @@ ddisplay_canvas_events (GtkWidget *canvas,
GdkEventButton *bevent;
GdkEventKey *kevent;
GdkEventScroll *sevent;
- gint tx, ty;
+ int tx, ty;
GdkModifierType tmask;
guint state = 0;
Focus *focus;
@@ -1139,34 +1142,37 @@ ddisplay_canvas_events (GtkWidget *canvas,
return return_val;
}
-gint
+
+int
ddisplay_hsb_update (GtkAdjustment *adjustment,
- DDisplay *ddisp)
+ DDisplay *ddisp)
{
- ddisplay_set_origo(ddisp, gtk_adjustment_get_value (adjustment), ddisp->origo.y);
- ddisplay_add_update_all(ddisp);
- ddisplay_flush(ddisp);
+ ddisplay_set_origo (ddisp, gtk_adjustment_get_value (adjustment), ddisp->origo.y);
+ ddisplay_add_update_all (ddisp);
+ ddisplay_flush (ddisp);
return FALSE;
}
-gint
+
+int
ddisplay_vsb_update (GtkAdjustment *adjustment,
- DDisplay *ddisp)
+ DDisplay *ddisp)
{
- ddisplay_set_origo(ddisp, ddisp->origo.x, gtk_adjustment_get_value (adjustment));
- ddisplay_add_update_all(ddisp);
- ddisplay_flush(ddisp);
+ ddisplay_set_origo (ddisp, ddisp->origo.x, gtk_adjustment_get_value (adjustment));
+ ddisplay_add_update_all (ddisp);
+ ddisplay_flush (ddisp);
return FALSE;
}
-gint
+
+int
ddisplay_delete (GtkWidget *widget, GdkEvent *event, gpointer data)
{
DDisplay *ddisp;
ddisp = (DDisplay *)data;
- ddisplay_close(ddisp);
+ ddisplay_close (ddisp);
return TRUE;
}
@@ -1180,10 +1186,14 @@ ddisplay_destroy (GtkWidget *widget, gpointer data)
ddisplay_really_destroy(ddisp);
}
+
/* returns NULL if object cannot be created */
DiaObject *
-ddisplay_drop_object(DDisplay *ddisp, gint x, gint y, DiaObjectType *otype,
- gpointer user_data)
+ddisplay_drop_object (DDisplay *ddisp,
+ int x,
+ int y,
+ DiaObjectType *otype,
+ gpointer user_data)
{
Point droppoint;
Point droppoint_orig;
diff --git a/app/disp_callbacks.h b/app/disp_callbacks.h
index ab2eb8a75..0a4f9e3c9 100644
--- a/app/disp_callbacks.h
+++ b/app/disp_callbacks.h
@@ -20,10 +20,12 @@
#include "display.h"
-gint ddisplay_focus_in_event (GtkWidget *widget, GdkEventFocus *event,
- gpointer data);
-gint ddisplay_focus_out_event (GtkWidget *widget, GdkEventFocus *event,
- gpointer data);
+int ddisplay_focus_in_event (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer data);
+int ddisplay_focus_out_event (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer data);
void ddisplay_realize (GtkWidget *widget, gpointer data);
void ddisplay_unrealize (GtkWidget *widget, gpointer data);
@@ -37,8 +39,11 @@ int ddisplay_vsb_update (GtkAdjustment *adjustment, DDisplay *ddisp);
int ddisplay_delete (GtkWidget *widget, GdkEvent *event, gpointer data);
void ddisplay_destroy (GtkWidget *widget, gpointer data);
-DiaObject *ddisplay_drop_object(DDisplay *ddisp, gint x, gint y, DiaObjectType *otype,
- gpointer user_data);
+DiaObject *ddisplay_drop_object (DDisplay *ddisp,
+ int x,
+ int y,
+ DiaObjectType *otype,
+ gpointer user_data);
void ddisplay_im_context_commit(GtkIMContext *context, const gchar *str,
DDisplay *ddisp);
void ddisplay_im_context_preedit_changed(GtkIMContext *context,
diff --git a/app/display.c b/app/display.c
index e86ff18c1..36a118f9e 100644
--- a/app/display.c
+++ b/app/display.c
@@ -1557,8 +1557,8 @@ display_set_active(DDisplay *ddisp)
GtkNotebook *notebook = g_object_get_data (G_OBJECT (ddisp->shell),
DIA_MAIN_NOTEBOOK);
/* Find the page with ddisp then set the label on the tab */
- gint num_pages = gtk_notebook_get_n_pages (notebook);
- gint num;
+ int num_pages = gtk_notebook_get_n_pages (notebook);
+ int num;
GtkWidget *page;
for (num = 0 ; num < num_pages ; num++)
{
diff --git a/app/filedlg.c b/app/filedlg.c
index 98675cd54..4391ee502 100644
--- a/app/filedlg.c
+++ b/app/filedlg.c
@@ -473,7 +473,7 @@ gboolean
file_save_as(Diagram *dia, DDisplay *ddisp)
{
GtkWidget *dlg;
- gint response;
+ int response;
dlg = file_save_as_dialog_prepare(dia, ddisp);
diff --git a/app/find-and-replace.c b/app/find-and-replace.c
index 3f7bab52a..08e74dad6 100644
--- a/app/find-and-replace.c
+++ b/app/find-and-replace.c
@@ -381,8 +381,9 @@ _replace (DiaObject *obj, const SearchData *sd, const char *replacement)
return TRUE;
}
-static gint
-fnr_respond (GtkWidget *widget, gint response_id, gpointer data)
+
+static int
+fnr_respond (GtkWidget *widget, int response_id, gpointer data)
{
const gchar *search = gtk_entry_get_text (g_object_get_data (G_OBJECT (widget), "search-entry"));
const gchar *replace;
diff --git a/app/grid.c b/app/grid.c
index bc8d4bbe0..4ca2a60d3 100644
--- a/app/grid.c
+++ b/app/grid.c
@@ -477,7 +477,7 @@ snap_to_grid (DDisplay *ddisp, double *x, double *y)
if (ddisp->guides_snap && ddisp->guides_visible) {
DiaGuide *guide_h;
DiaGuide *guide_v;
- const gint snap_distance = prefs.snap_distance;
+ const int snap_distance = prefs.snap_distance;
guide_h = dia_diagram_pick_guide_h (ddisp->diagram, *x, *y,
FUNSCALEX (ddisp, snap_distance),
diff --git a/app/interface.c b/app/interface.c
index e20ffbd5d..2dcdd2554 100644
--- a/app/interface.c
+++ b/app/interface.c
@@ -83,8 +83,8 @@ static gboolean _ddisplay_vruler_motion_notify (GtkWidget *widget,
static void
dia_dnd_file_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
- gint x,
- gint y,
+ int x,
+ int y,
GtkSelectionData *data,
guint info,
guint time,
@@ -202,8 +202,8 @@ interface_toggle_snap_to_guides (GtkWidget *widget, gpointer data)
}
-static gint
-origin_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data)
+static int
+origin_button_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
{
DDisplay *ddisp = (DDisplay *)data;
@@ -334,9 +334,13 @@ create_zoom_widget(DDisplay *ddisp) {
return combo;
}
+
static gboolean
-display_drop_callback(GtkWidget *widget, GdkDragContext *context,
- gint x, gint y, guint time)
+display_drop_callback (GtkWidget *widget,
+ GdkDragContext *context,
+ int x,
+ int y,
+ guint time)
{
if (gtk_drag_get_source_widget(context) != NULL) {
/* we only accept drops from the same instance of the application,
@@ -347,15 +351,16 @@ display_drop_callback(GtkWidget *widget, GdkDragContext *context,
return FALSE;
}
+
static void
-display_data_received_callback (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- GtkSelectionData *data,
- guint info,
- guint time,
- DDisplay *ddisp)
+display_data_received_callback (GtkWidget *widget,
+ GdkDragContext *context,
+ int x,
+ int y,
+ GtkSelectionData *data,
+ guint info,
+ guint time,
+ DDisplay *ddisp)
{
if (gtk_selection_data_get_format(data) == 8 &&
gtk_selection_data_get_length(data) == sizeof(ToolButtonData *) &&
@@ -669,7 +674,7 @@ use_integrated_ui_for_display_shell (DDisplay *ddisp, char *title)
GtkWidget *image;
GtkWidget *close_button; /* Close button for the notebook page */
GtkRcStyle *rcstyle;
- gint notebook_page_index;
+ int notebook_page_index;
ddisp->is_standalone_window = FALSE;
diff --git a/app/layer-editor/dia-layer-editor.c b/app/layer-editor/dia-layer-editor.c
index c16700f84..75104db8c 100644
--- a/app/layer-editor/dia-layer-editor.c
+++ b/app/layer-editor/dia-layer-editor.c
@@ -133,7 +133,7 @@ dia_layer_editor_class_init (DiaLayerEditorClass *klass)
static void rename_layer (GtkWidget *widget, DiaLayerEditor *self);
-static gint
+static int
list_button_press (GtkWidget *widget,
GdkEvent *event,
DiaLayerEditor *self)
diff --git a/app/layer-editor/dia-layer-list.c b/app/layer-editor/dia-layer-list.c
index 5d77d2321..49975b431 100644
--- a/app/layer-editor/dia-layer-list.c
+++ b/app/layer-editor/dia-layer-list.c
@@ -236,7 +236,7 @@ dia_layer_list_realize (GtkWidget *widget)
{
GtkAllocation alloc;
GdkWindowAttr attributes;
- gint attributes_mask;
+ int attributes_mask;
GdkWindow *window;
GtkStyle *style;
@@ -445,7 +445,7 @@ static gboolean
dia_layer_list_focus (GtkWidget *widget,
GtkDirectionType direction)
{
- gint return_val = FALSE;
+ int return_val = FALSE;
GtkContainer *container;
GtkWidget *focus_child;
DiaLayerListPrivate *priv;
@@ -720,7 +720,7 @@ scroll_vertical (DiaLayerWidget *list_item,
GtkAdjustment *adj;
GtkWidget *focus_child;
GtkAllocation alloc;
- gint new_value;
+ int new_value;
g_return_if_fail (DIA_IS_LAYER_LIST (list));
diff --git a/app/layer-editor/dia-layer-widget.c b/app/layer-editor/dia-layer-widget.c
index 53f13f1c9..8742b36bd 100644
--- a/app/layer-editor/dia-layer-widget.c
+++ b/app/layer-editor/dia-layer-widget.c
@@ -143,7 +143,7 @@ static void
dia_layer_widget_realize (GtkWidget *widget)
{
GdkWindowAttr attributes;
- gint attributes_mask;
+ int attributes_mask;
GtkAllocation alloc;
GdkWindow *window;
GtkStyle *style;
@@ -191,8 +191,8 @@ dia_layer_widget_size_request (GtkWidget *widget,
GtkWidget *child;
GtkRequisition child_requisition;
GtkStyle *style;
- gint focus_width;
- gint focus_pad;
+ int focus_width;
+ int focus_pad;
int border_width;
g_return_if_fail (DIA_IS_LAYER_WIDGET (widget));
diff --git a/app/modify_tool.c b/app/modify_tool.c
index d0ba15b7a..70910aa7f 100644
--- a/app/modify_tool.c
+++ b/app/modify_tool.c
@@ -269,14 +269,15 @@ static int do_if_clicked_handle(DDisplay *ddisp, ModifyTool *tool,
static void
-modify_button_press(ModifyTool *tool, GdkEventButton *event,
- DDisplay *ddisp)
+modify_button_press (ModifyTool *tool,
+ GdkEventButton *event,
+ DDisplay *ddisp)
{
Point clickedpoint;
DiaObject *clicked_obj;
gboolean some_selected;
DiaGuide *guide;
- const gint pick_guide_snap_distance = 20; /* Margin of error for selecting a guide. */
+ const int pick_guide_snap_distance = 20; /* Margin of error for selecting a guide. */
ddisplay_untransform_coords(ddisp,
(int)event->x, (int)event->y,
diff --git a/app/plugin-manager.c b/app/plugin-manager.c
index 4242c2337..cc0b7d7b1 100644
--- a/app/plugin-manager.c
+++ b/app/plugin-manager.c
@@ -32,11 +32,12 @@
#include "plug-ins.h"
#include "message.h"
-static gint
-pm_respond(GtkWidget *widget, gint response_id, gpointer data)
+
+static int
+pm_respond (GtkWidget *widget, int response_id, gpointer data)
{
if (response_id != GTK_RESPONSE_APPLY)
- gtk_widget_hide(widget);
+ gtk_widget_hide (widget);
return 0;
}
diff --git a/app/properties-dialog.c b/app/properties-dialog.c
index 3b9bd8e92..d153b924a 100644
--- a/app/properties-dialog.c
+++ b/app/properties-dialog.c
@@ -40,12 +40,12 @@ static Diagram *current_dia = NULL;
static GtkWidget *no_properties_dialog = NULL;
-static gint properties_respond(GtkWidget *widget,
- gint response_id,
- gpointer data);
-static gboolean properties_key_event(GtkWidget *widget,
- GdkEventKey *event,
- gpointer data);
+static int properties_respond (GtkWidget *widget,
+ int response_id,
+ gpointer data);
+static gboolean properties_key_event (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer data);
static void properties_dialog_hide(void);
static void
@@ -85,7 +85,7 @@ create_dialog(GtkWidget *parent)
}
/* when the dialog gets destroyed we need to drop our references */
-static gint
+static int
properties_part_destroyed(GtkWidget *widget, gpointer data)
{
if (widget == object_part) {
diff --git a/app/recent_files.c b/app/recent_files.c
index a5bb1294f..72e496842 100644
--- a/app/recent_files.c
+++ b/app/recent_files.c
@@ -64,7 +64,7 @@ recent_file_history_make_menu (void)
GList *items;
GtkActionGroup *group;
GtkAction *action;
- gint i = 0;
+ int i = 0;
items = persistent_list_get_glist ("recent-files");
if (!items)
diff --git a/app/ruler.c b/app/ruler.c
index c5c127d47..764f52af5 100644
--- a/app/ruler.c
+++ b/app/ruler.c
@@ -165,11 +165,11 @@ dia_ruler_motion_notify (GtkWidget *widget,
GdkEventMotion *event)
{
DiaRuler *ruler = DIA_RULER (widget);
- gint x;
- gint y;
+ int x;
+ int y;
real tmp;
- gint width, height;
- gint x0, y0;
+ int width, height;
+ int x0, y0;
GtkAllocation alloc;
gdk_event_request_motions (event);
diff --git a/app/sheet-editor/sheets_dialog_callbacks.c b/app/sheet-editor/sheets_dialog_callbacks.c
index 95d7a640a..85aec714a 100644
--- a/app/sheet-editor/sheets_dialog_callbacks.c
+++ b/app/sheet-editor/sheets_dialog_callbacks.c
@@ -531,7 +531,7 @@ sheets_dialog_move_up_or_down (SheetsDialogMoveDir dir)
GtkWidget *wrapbox;
GList *button_list;
GtkWidget *active_button;
- gint button_pos;
+ int button_pos;
SheetObjectMod *som;
SheetObjectMod *som_next;
GList *next_button_list;
@@ -576,7 +576,7 @@ sheets_dialog_move_up_or_down (SheetsDialogMoveDir dir)
{
SheetMod *sm;
GSList *object_list;
- gint object_pos;
+ int object_pos;
som->mod = SHEET_OBJECT_MOD_CHANGED;
@@ -1007,8 +1007,9 @@ on_sheets_remove_dialog_button_cancel_clicked (GtkButton *button,
static void
sheets_dialog_togglebutton_set_sensitive (GtkToggleButton *togglebutton,
- GtkWidget *dialog,
- gchar *widget_names[], gint type)
+ GtkWidget *dialog,
+ char *widget_names[],
+ int type)
{
gboolean is_sensitive;
guint i;
diff --git a/app/toolbox.c b/app/toolbox.c
index c94e64a9f..c3a4d49d2 100644
--- a/app/toolbox.c
+++ b/app/toolbox.c
@@ -220,7 +220,7 @@ get_sheet_by_name(const gchar *name)
return NULL;
}
-static gint
+static int
tool_button_press (GtkWidget *w,
GdkEventButton *event,
gpointer data)
@@ -889,7 +889,7 @@ tool_select_update (GtkWidget *w,
}
if (tooldata->type != -1) {
- gint x, y;
+ int x, y;
GdkModifierType mask;
/* get the modifiers */
gdk_window_get_pointer (gtk_widget_get_parent_window(w), &x, &y, &mask);
diff --git a/app/undo.c b/app/undo.c
index 3d652af7a..46df6fa45 100644
--- a/app/undo.c
+++ b/app/undo.c
@@ -1417,7 +1417,7 @@ DIA_DEFINE_CHANGE (DiaMoveObjectToLayerChange, dia_move_object_to_layer_change)
* better make it listen to object-add signal?
*/
static void
-move_object_layer_relative (DiagramData *dia, GList *objects, gint dist)
+move_object_layer_relative (DiagramData *dia, GList *objects, int dist)
{
/* from the active layer to above or below */
DiaLayer *active, *target;
diff --git a/lib/dia-arrow-cell-renderer.c b/lib/dia-arrow-cell-renderer.c
index 50af86a0c..8585c18bf 100644
--- a/lib/dia-arrow-cell-renderer.c
+++ b/lib/dia-arrow-cell-renderer.c
@@ -128,20 +128,18 @@ static void
dia_arrow_cell_renderer_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
+ int *x_offset,
+ int *y_offset,
+ int *width,
+ int *height)
{
- gint calc_width;
- gint calc_height;
- int xpad;
- int ypad;
+ int calc_width, calc_height;
+ int xpad, ypad;
gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
- calc_width = (gint) xpad * 2 + 40;
- calc_height = (gint) ypad * 2 + 20;
+ calc_width = (int) xpad * 2 + 40;
+ calc_height = (int) ypad * 2 + 20;
if (x_offset) *x_offset = 0;
if (y_offset) *y_offset = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]