Do not rely on enums being of the same width as int
This commit is contained in:
parent
0a8bf1ce8a
commit
6bc5eb9e41
@ -1050,7 +1050,7 @@ moo_edit_apply_lang_config (MooEdit *edit)
|
|||||||
static void
|
static void
|
||||||
moo_edit_apply_config (MooEdit *edit)
|
moo_edit_apply_config (MooEdit *edit)
|
||||||
{
|
{
|
||||||
GtkWrapMode wrap_mode;
|
int wrap_mode;
|
||||||
gboolean line_numbers;
|
gboolean line_numbers;
|
||||||
guint tab_width;
|
guint tab_width;
|
||||||
char *word_chars;
|
char *word_chars;
|
||||||
|
@ -1776,7 +1776,7 @@ wrap_text_toggled (MooEditWindow *window,
|
|||||||
gboolean active)
|
gboolean active)
|
||||||
{
|
{
|
||||||
MooEdit *doc;
|
MooEdit *doc;
|
||||||
GtkWrapMode mode;
|
int mode;
|
||||||
|
|
||||||
doc = ACTIVE_DOC (window);
|
doc = ACTIVE_DOC (window);
|
||||||
g_return_if_fail (doc != NULL);
|
g_return_if_fail (doc != NULL);
|
||||||
@ -2073,7 +2073,7 @@ edit_wrap_mode_changed (MooEditWindow *window,
|
|||||||
MooEdit *doc)
|
MooEdit *doc)
|
||||||
{
|
{
|
||||||
gpointer action;
|
gpointer action;
|
||||||
GtkWrapMode mode;
|
int mode;
|
||||||
|
|
||||||
if (doc != ACTIVE_DOC (window))
|
if (doc != ACTIVE_DOC (window))
|
||||||
return;
|
return;
|
||||||
|
@ -1093,7 +1093,7 @@ get_iter_attrs (MooPrintOperation *op,
|
|||||||
|
|
||||||
if (style_set)
|
if (style_set)
|
||||||
{
|
{
|
||||||
PangoStyle style_value;
|
int style_value;
|
||||||
if (style) pango_attribute_destroy (style);
|
if (style) pango_attribute_destroy (style);
|
||||||
g_object_get (tag, "style", &style_value, NULL);
|
g_object_get (tag, "style", &style_value, NULL);
|
||||||
style = pango_attr_style_new (style_value);
|
style = pango_attr_style_new (style_value);
|
||||||
@ -1101,7 +1101,7 @@ get_iter_attrs (MooPrintOperation *op,
|
|||||||
|
|
||||||
if (ul_set)
|
if (ul_set)
|
||||||
{
|
{
|
||||||
PangoUnderline underline;
|
int underline;
|
||||||
if (ul) pango_attribute_destroy (ul);
|
if (ul) pango_attribute_destroy (ul);
|
||||||
g_object_get (tag, "underline", &underline, NULL);
|
g_object_get (tag, "underline", &underline, NULL);
|
||||||
ul = pango_attr_underline_new (underline);
|
ul = pango_attr_underline_new (underline);
|
||||||
@ -1109,7 +1109,7 @@ get_iter_attrs (MooPrintOperation *op,
|
|||||||
|
|
||||||
if (weight_set)
|
if (weight_set)
|
||||||
{
|
{
|
||||||
PangoWeight weight_value;
|
int weight_value;
|
||||||
if (weight) pango_attribute_destroy (weight);
|
if (weight) pango_attribute_destroy (weight);
|
||||||
g_object_get (tag, "weight", &weight_value, NULL);
|
g_object_get (tag, "weight", &weight_value, NULL);
|
||||||
weight = pango_attr_weight_new (weight_value);
|
weight = pango_attr_weight_new (weight_value);
|
||||||
|
@ -367,7 +367,7 @@ child_set_pane_size (GtkWidget *child,
|
|||||||
int size,
|
int size,
|
||||||
MooBigPaned *paned)
|
MooBigPaned *paned)
|
||||||
{
|
{
|
||||||
MooPanePosition pos;
|
int pos;
|
||||||
|
|
||||||
g_object_get (child, "pane-position", &pos, NULL);
|
g_object_get (child, "pane-position", &pos, NULL);
|
||||||
g_return_if_fail (paned->paned[pos] == child);
|
g_return_if_fail (paned->paned[pos] == child);
|
||||||
@ -381,7 +381,7 @@ sticky_pane_notify (GtkWidget *child,
|
|||||||
G_GNUC_UNUSED GParamSpec *pspec,
|
G_GNUC_UNUSED GParamSpec *pspec,
|
||||||
MooBigPaned *paned)
|
MooBigPaned *paned)
|
||||||
{
|
{
|
||||||
MooPanePosition pos;
|
int pos;
|
||||||
gboolean sticky;
|
gboolean sticky;
|
||||||
|
|
||||||
g_object_get (child, "pane-position", &pos,
|
g_object_get (child, "pane-position", &pos,
|
||||||
@ -400,7 +400,7 @@ active_pane_notify (GtkWidget *child,
|
|||||||
G_GNUC_UNUSED GParamSpec *pspec,
|
G_GNUC_UNUSED GParamSpec *pspec,
|
||||||
MooBigPaned *paned)
|
MooBigPaned *paned)
|
||||||
{
|
{
|
||||||
MooPanePosition pos;
|
int pos;
|
||||||
MooPane *pane = NULL;
|
MooPane *pane = NULL;
|
||||||
const char *id = NULL;
|
const char *id = NULL;
|
||||||
MooPanedConfig *pc;
|
MooPanedConfig *pc;
|
||||||
@ -680,7 +680,7 @@ moo_big_paned_reorder_pane (MooBigPaned *paned,
|
|||||||
{
|
{
|
||||||
MooPane *pane;
|
MooPane *pane;
|
||||||
MooPaned *child;
|
MooPaned *child;
|
||||||
MooPanePosition old_position;
|
int old_position;
|
||||||
int old_index;
|
int old_index;
|
||||||
const char *id;
|
const char *id;
|
||||||
|
|
||||||
@ -919,7 +919,7 @@ moo_big_paned_get_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
MooBigPaned *paned = MOO_BIG_PANED (object);
|
MooBigPaned *paned = MOO_BIG_PANED (object);
|
||||||
GdkCursorType cursor_type;
|
int cursor_type;
|
||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
@ -1329,7 +1329,7 @@ get_drop_area (MooBigPaned *paned,
|
|||||||
GdkRectangle *button_rect)
|
GdkRectangle *button_rect)
|
||||||
{
|
{
|
||||||
int width, height, size = 0;
|
int width, height, size = 0;
|
||||||
MooPanePosition active_position;
|
int active_position;
|
||||||
|
|
||||||
width = paned->priv->outer->allocation.width;
|
width = paned->priv->outer->allocation.width;
|
||||||
height = paned->priv->outer->allocation.height;
|
height = paned->priv->outer->allocation.height;
|
||||||
|
@ -941,7 +941,7 @@ static GtkToolbarStyle
|
|||||||
get_toolbar_style_gtk (MooWindow *window)
|
get_toolbar_style_gtk (MooWindow *window)
|
||||||
{
|
{
|
||||||
GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (window));
|
GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (window));
|
||||||
GtkToolbarStyle style = GTK_TOOLBAR_ICONS;
|
int style = GTK_TOOLBAR_ICONS;
|
||||||
gpointer toolbar_class;
|
gpointer toolbar_class;
|
||||||
|
|
||||||
g_return_val_if_fail (settings != NULL, style);
|
g_return_val_if_fail (settings != NULL, style);
|
||||||
@ -950,7 +950,7 @@ get_toolbar_style_gtk (MooWindow *window)
|
|||||||
g_object_get (settings, "gtk-toolbar-style", &style, NULL);
|
g_object_get (settings, "gtk-toolbar-style", &style, NULL);
|
||||||
g_type_class_unref (toolbar_class);
|
g_type_class_unref (toolbar_class);
|
||||||
|
|
||||||
g_return_val_if_fail (style < N_STYLES, 0);
|
g_return_val_if_fail (0 <= style && style < N_STYLES, 0);
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user