Fixed bunch of compiler warnings
parent
2d64a195f4
commit
4c56fa6176
|
@ -186,7 +186,7 @@ show_system_info (void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_string_append_printf (text, "GTK version: %d.%d.%d\n",
|
g_string_append_printf (text, "GTK version: %u.%u.%u\n",
|
||||||
gtk_major_version,
|
gtk_major_version,
|
||||||
gtk_minor_version,
|
gtk_minor_version,
|
||||||
gtk_micro_version);
|
gtk_micro_version);
|
||||||
|
|
|
@ -281,7 +281,7 @@ moo_edit_add_bookmark (MooEdit *edit,
|
||||||
if (no)
|
if (no)
|
||||||
{
|
{
|
||||||
char buf[32];
|
char buf[32];
|
||||||
g_snprintf (buf, sizeof buf, "<b>%d</b>", no);
|
g_snprintf (buf, sizeof buf, "<b>%u</b>", no);
|
||||||
moo_line_mark_set_markup (MOO_LINE_MARK (bk), buf);
|
moo_line_mark_set_markup (MOO_LINE_MARK (bk), buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -497,7 +497,6 @@ cfunc_newline (MSValue **args,
|
||||||
MSContext *ctx)
|
MSContext *ctx)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
GtkTextBuffer *buffer;
|
|
||||||
GtkTextView *doc;
|
GtkTextView *doc;
|
||||||
char *freeme = NULL;
|
char *freeme = NULL;
|
||||||
const char *insert;
|
const char *insert;
|
||||||
|
@ -510,7 +509,6 @@ cfunc_newline (MSValue **args,
|
||||||
if (!n)
|
if (!n)
|
||||||
return ms_value_none ();
|
return ms_value_none ();
|
||||||
|
|
||||||
buffer = gtk_text_view_get_buffer (doc);
|
|
||||||
insert = "\n";
|
insert = "\n";
|
||||||
|
|
||||||
if (n > 1)
|
if (n > 1)
|
||||||
|
|
|
@ -412,7 +412,7 @@ _moo_edit_save_multiple_changes_dialog (GSList *docs,
|
||||||
#endif /* GTK_CHECK_VERSION(2,6,0) */
|
#endif /* GTK_CHECK_VERSION(2,6,0) */
|
||||||
|
|
||||||
label = moo_glade_xml_get_widget (xml, "label");
|
label = moo_glade_xml_get_widget (xml, "label");
|
||||||
msg = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">There are %d "
|
msg = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">There are %u "
|
||||||
"documents with unsaved changes. Save changes before "
|
"documents with unsaved changes. Save changes before "
|
||||||
"closing?</span>", g_slist_length (docs));
|
"closing?</span>", g_slist_length (docs));
|
||||||
gtk_label_set_markup (GTK_LABEL (label), msg);
|
gtk_label_set_markup (GTK_LABEL (label), msg);
|
||||||
|
|
|
@ -553,7 +553,7 @@ _moo_text_view_button_press_event (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("got button %d in button_press callback", event->button);
|
g_warning ("got button %u in button_press callback", event->button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event->type == GDK_2BUTTON_PRESS && event->button == 1)
|
else if (event->type == GDK_2BUTTON_PRESS && event->button == 1)
|
||||||
|
|
|
@ -398,7 +398,6 @@ create_lang_model (MooEditor *editor)
|
||||||
!strcmp (_moo_lang_get_section (lang), section))
|
!strcmp (_moo_lang_get_section (lang), section))
|
||||||
{
|
{
|
||||||
GtkTreeIter child;
|
GtkTreeIter child;
|
||||||
char *ext, *mime;
|
|
||||||
|
|
||||||
ext = list_to_string (_moo_lang_mgr_get_globs (mgr, _moo_lang_id (lang)), TRUE);
|
ext = list_to_string (_moo_lang_mgr_get_globs (mgr, _moo_lang_id (lang)), TRUE);
|
||||||
mime = list_to_string (_moo_lang_mgr_get_mime_types (mgr, _moo_lang_id (lang)), TRUE);
|
mime = list_to_string (_moo_lang_mgr_get_mime_types (mgr, _moo_lang_id (lang)), TRUE);
|
||||||
|
@ -570,14 +569,13 @@ helper_update_widgets (MooPrefsDialogPage *page,
|
||||||
GtkTreeIter *iter)
|
GtkTreeIter *iter)
|
||||||
{
|
{
|
||||||
GtkEntry *extensions, *mimetypes, *config;
|
GtkEntry *extensions, *mimetypes, *config;
|
||||||
GtkWidget *label_extensions, *label_mimetypes;
|
GtkWidget *label_mimetypes;
|
||||||
MooLang *lang = NULL;
|
MooLang *lang = NULL;
|
||||||
char *ext = NULL, *mime = NULL, *id = NULL, *conf = NULL;
|
char *ext = NULL, *mime = NULL, *id = NULL, *conf = NULL;
|
||||||
|
|
||||||
g_return_if_fail (iter != NULL);
|
g_return_if_fail (iter != NULL);
|
||||||
|
|
||||||
extensions = moo_glade_xml_get_widget (page->xml, "extensions");
|
extensions = moo_glade_xml_get_widget (page->xml, "extensions");
|
||||||
label_extensions = moo_glade_xml_get_widget (page->xml, "label_extensions");
|
|
||||||
mimetypes = moo_glade_xml_get_widget (page->xml, "mimetypes");
|
mimetypes = moo_glade_xml_get_widget (page->xml, "mimetypes");
|
||||||
label_mimetypes = moo_glade_xml_get_widget (page->xml, "label_mimetypes");
|
label_mimetypes = moo_glade_xml_get_widget (page->xml, "label_mimetypes");
|
||||||
config = moo_glade_xml_get_widget (page->xml, "config");
|
config = moo_glade_xml_get_widget (page->xml, "config");
|
||||||
|
|
|
@ -652,7 +652,7 @@ moo_edit_window_class_init (MooEditWindowClass *klass)
|
||||||
#ifdef ENABLE_BOOKMARKS
|
#ifdef ENABLE_BOOKMARKS
|
||||||
for (i = 1; i < 10; ++i)
|
for (i = 1; i < 10; ++i)
|
||||||
{
|
{
|
||||||
char *action_id = g_strdup_printf (MOO_EDIT_GOTO_BOOKMARK_ACTION "%d", i);
|
char *action_id = g_strdup_printf (MOO_EDIT_GOTO_BOOKMARK_ACTION "%u", i);
|
||||||
moo_window_class_new_action_custom (window_class, action_id, NULL,
|
moo_window_class_new_action_custom (window_class, action_id, NULL,
|
||||||
create_goto_bookmark_action,
|
create_goto_bookmark_action,
|
||||||
GUINT_TO_POINTER (i),
|
GUINT_TO_POINTER (i),
|
||||||
|
@ -1354,8 +1354,8 @@ create_goto_bookmark_action (MooWindow *window,
|
||||||
char *accel;
|
char *accel;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
name = g_strdup_printf (MOO_EDIT_GOTO_BOOKMARK_ACTION "%d", n);
|
name = g_strdup_printf (MOO_EDIT_GOTO_BOOKMARK_ACTION "%u", n);
|
||||||
accel = g_strdup_printf ("<ctrl>%d", n);
|
accel = g_strdup_printf ("<ctrl>%u", n);
|
||||||
|
|
||||||
action = g_object_new (MOO_TYPE_ACTION, "name", name, "accel", accel,
|
action = g_object_new (MOO_TYPE_ACTION, "name", name, "accel", accel,
|
||||||
"connect-accel", TRUE, "accel-editable", FALSE, NULL);
|
"connect-accel", TRUE, "accel-editable", FALSE, NULL);
|
||||||
|
@ -1393,7 +1393,7 @@ create_bookmark_item (MooEditWindow *window,
|
||||||
GtkAction *action;
|
GtkAction *action;
|
||||||
char *action_name;
|
char *action_name;
|
||||||
|
|
||||||
action_name = g_strdup_printf (MOO_EDIT_GOTO_BOOKMARK_ACTION "%d", bk->no);
|
action_name = g_strdup_printf (MOO_EDIT_GOTO_BOOKMARK_ACTION "%u", bk->no);
|
||||||
action = moo_window_get_action (MOO_WINDOW (window), action_name);
|
action = moo_window_get_action (MOO_WINDOW (window), action_name);
|
||||||
|
|
||||||
if (action)
|
if (action)
|
||||||
|
|
|
@ -287,7 +287,7 @@ parse_content (Parser *parser,
|
||||||
char *text = g_strndup (line, line_len);
|
char *text = g_strndup (line, line_len);
|
||||||
g_set_error (&parser->error, MOO_KEY_FILE_ERROR,
|
g_set_error (&parser->error, MOO_KEY_FILE_ERROR,
|
||||||
MOO_KEY_FILE_ERROR_PARSE,
|
MOO_KEY_FILE_ERROR_PARSE,
|
||||||
"wrong indentation in file %s at line %d: %s",
|
"wrong indentation in file %s at line %u: %s",
|
||||||
parser->file, parser->line_no, text);
|
parser->file, parser->line_no, text);
|
||||||
g_free (text);
|
g_free (text);
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -347,7 +347,7 @@ parse_item (Parser *parser,
|
||||||
char *text = g_strndup (line, line_len);
|
char *text = g_strndup (line, line_len);
|
||||||
g_set_error (&parser->error, MOO_KEY_FILE_ERROR,
|
g_set_error (&parser->error, MOO_KEY_FILE_ERROR,
|
||||||
MOO_KEY_FILE_ERROR_PARSE,
|
MOO_KEY_FILE_ERROR_PARSE,
|
||||||
"unexpected text in file %s at line %d: %s",
|
"unexpected text in file %s at line %u: %s",
|
||||||
parser->file, parser->line_no, text);
|
parser->file, parser->line_no, text);
|
||||||
g_free (text);
|
g_free (text);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -386,7 +386,7 @@ find_and_parse_item (Parser *parser)
|
||||||
{
|
{
|
||||||
g_set_error (&parser->error, MOO_KEY_FILE_ERROR,
|
g_set_error (&parser->error, MOO_KEY_FILE_ERROR,
|
||||||
MOO_KEY_FILE_ERROR_PARSE,
|
MOO_KEY_FILE_ERROR_PARSE,
|
||||||
"unexpected indented block in file %s at line %d",
|
"unexpected indented block in file %s at line %u",
|
||||||
parser->file, parser->line_no);
|
parser->file, parser->line_no);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ find_and_parse_item (Parser *parser)
|
||||||
char *text = g_strndup (line, line_len);
|
char *text = g_strndup (line, line_len);
|
||||||
g_set_error (&parser->error, MOO_KEY_FILE_ERROR,
|
g_set_error (&parser->error, MOO_KEY_FILE_ERROR,
|
||||||
MOO_KEY_FILE_ERROR_PARSE,
|
MOO_KEY_FILE_ERROR_PARSE,
|
||||||
"unexpected text in file %s at line %d: %s",
|
"unexpected text in file %s at line %u: %s",
|
||||||
parser->file, parser->line_no, text);
|
parser->file, parser->line_no, text);
|
||||||
g_free (text);
|
g_free (text);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -482,7 +482,6 @@ moo_text_replace_regex_all_real (GtkTextIter *start,
|
||||||
char *freeme_here = NULL;
|
char *freeme_here = NULL;
|
||||||
const char *real_replacement;
|
const char *real_replacement;
|
||||||
char *string;
|
char *string;
|
||||||
GError *error = NULL;
|
|
||||||
int match_len;
|
int match_len;
|
||||||
|
|
||||||
if (!_moo_text_search_regex_forward (start, end, regex, &match_start, &match_end,
|
if (!_moo_text_search_regex_forward (start, end, regex, &match_start, &match_end,
|
||||||
|
|
|
@ -655,7 +655,7 @@ generate_id (MooUserToolInfo *info,
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
char *tmp = g_strdup_printf ("%s_%d", base, i);
|
char *tmp = g_strdup_printf ("%s_%u", base, i);
|
||||||
|
|
||||||
if (!g_hash_table_lookup (ids, tmp))
|
if (!g_hash_table_lookup (ids, tmp))
|
||||||
{
|
{
|
||||||
|
|
|
@ -538,7 +538,6 @@ moo_file_selector_constructor (GType type,
|
||||||
guint n_props,
|
guint n_props,
|
||||||
GObjectConstructParam *props)
|
GObjectConstructParam *props)
|
||||||
{
|
{
|
||||||
MooEditor *editor;
|
|
||||||
MooPaneLabel *label;
|
MooPaneLabel *label;
|
||||||
MooUIXML *xml;
|
MooUIXML *xml;
|
||||||
MooFileSelector *filesel;
|
MooFileSelector *filesel;
|
||||||
|
@ -553,8 +552,6 @@ moo_file_selector_constructor (GType type,
|
||||||
|
|
||||||
g_return_val_if_fail (filesel->window != NULL, object);
|
g_return_val_if_fail (filesel->window != NULL, object);
|
||||||
|
|
||||||
editor = moo_edit_window_get_editor (filesel->window);
|
|
||||||
|
|
||||||
g_idle_add ((GSourceFunc) file_selector_go_home, g_object_ref (filesel));
|
g_idle_add ((GSourceFunc) file_selector_go_home, g_object_ref (filesel));
|
||||||
|
|
||||||
group = moo_action_collection_get_group (moo_file_view_get_actions (MOO_FILE_VIEW (fileview)), NULL);
|
group = moo_action_collection_get_group (moo_file_view_get_actions (MOO_FILE_VIEW (fileview)), NULL);
|
||||||
|
@ -845,7 +842,6 @@ save_as_dialog (GtkWidget *parent,
|
||||||
GtkWidget *dialog = NULL;
|
GtkWidget *dialog = NULL;
|
||||||
GtkEntry *entry = NULL;
|
GtkEntry *entry = NULL;
|
||||||
char *fullname = NULL;
|
char *fullname = NULL;
|
||||||
gboolean first_time = TRUE;
|
|
||||||
|
|
||||||
g_return_val_if_fail (dirname != NULL, NULL);
|
g_return_val_if_fail (dirname != NULL, NULL);
|
||||||
|
|
||||||
|
@ -873,8 +869,6 @@ save_as_dialog (GtkWidget *parent,
|
||||||
text = gtk_entry_get_text (entry);
|
text = gtk_entry_get_text (entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
first_time = FALSE;
|
|
||||||
|
|
||||||
if (!text[0])
|
if (!text[0])
|
||||||
{
|
{
|
||||||
g_critical ("%s: ooops", G_STRLOC);
|
g_critical ("%s: ooops", G_STRLOC);
|
||||||
|
|
|
@ -404,8 +404,8 @@ static void
|
||||||
init_dir_entry (MooHistoryCombo *hist_combo,
|
init_dir_entry (MooHistoryCombo *hist_combo,
|
||||||
MooEdit *doc)
|
MooEdit *doc)
|
||||||
{
|
{
|
||||||
GtkWidget *entry;
|
|
||||||
MooHistoryList *list;
|
MooHistoryList *list;
|
||||||
|
GtkWidget *entry;
|
||||||
|
|
||||||
list = moo_history_combo_get_list (hist_combo);
|
list = moo_history_combo_get_list (hist_combo);
|
||||||
entry = MOO_COMBO (hist_combo)->entry;
|
entry = MOO_COMBO (hist_combo)->entry;
|
||||||
|
@ -476,9 +476,8 @@ static void
|
||||||
init_find_dialog (MooEditWindow *window,
|
init_find_dialog (MooEditWindow *window,
|
||||||
WindowStuff *stuff)
|
WindowStuff *stuff)
|
||||||
{
|
{
|
||||||
GtkWidget *dir_entry, *pattern_entry;
|
GtkWidget *pattern_entry;
|
||||||
|
|
||||||
dir_entry = MOO_COMBO(moo_glade_xml_get_widget (stuff->find_xml, "dir_combo"))->entry;
|
|
||||||
pattern_entry = MOO_COMBO(moo_glade_xml_get_widget (stuff->find_xml, "pattern_combo"))->entry;
|
pattern_entry = MOO_COMBO(moo_glade_xml_get_widget (stuff->find_xml, "pattern_combo"))->entry;
|
||||||
|
|
||||||
init_dir_entry (moo_glade_xml_get_widget (stuff->grep_xml, "dir_combo"),
|
init_dir_entry (moo_glade_xml_get_widget (stuff->grep_xml, "dir_combo"),
|
||||||
|
|
|
@ -634,7 +634,6 @@ _moo_bookmark_mgr_add_user (MooBookmarkMgr *mgr,
|
||||||
MooUIXML *xml,
|
MooUIXML *xml,
|
||||||
const char *path)
|
const char *path)
|
||||||
{
|
{
|
||||||
guint merge_id;
|
|
||||||
UserInfo *info;
|
UserInfo *info;
|
||||||
|
|
||||||
g_return_if_fail (MOO_IS_BOOKMARK_MGR (mgr));
|
g_return_if_fail (MOO_IS_BOOKMARK_MGR (mgr));
|
||||||
|
@ -643,7 +642,6 @@ _moo_bookmark_mgr_add_user (MooBookmarkMgr *mgr,
|
||||||
g_return_if_fail (MOO_IS_UI_XML (xml));
|
g_return_if_fail (MOO_IS_UI_XML (xml));
|
||||||
g_return_if_fail (path != NULL);
|
g_return_if_fail (path != NULL);
|
||||||
|
|
||||||
merge_id = moo_ui_xml_new_merge_id (xml);
|
|
||||||
info = user_info_new (user, actions, xml, path,
|
info = user_info_new (user, actions, xml, path,
|
||||||
++mgr->priv->last_user_id);
|
++mgr->priv->last_user_id);
|
||||||
mgr->priv->users = g_slist_prepend (mgr->priv->users, info);
|
mgr->priv->users = g_slist_prepend (mgr->priv->users, info);
|
||||||
|
|
|
@ -883,7 +883,6 @@ moo_folder_model_iter_nth_child (GtkTreeModel *tree_model,
|
||||||
GtkTreeIter *parent,
|
GtkTreeIter *parent,
|
||||||
gint n)
|
gint n)
|
||||||
{
|
{
|
||||||
MooFolderModel *model;
|
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
gboolean result;
|
gboolean result;
|
||||||
|
|
||||||
|
@ -897,7 +896,6 @@ moo_folder_model_iter_nth_child (GtkTreeModel *tree_model,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
model = MOO_FOLDER_MODEL (tree_model);
|
|
||||||
path = gtk_tree_path_new_from_indices (n, -1);
|
path = gtk_tree_path_new_from_indices (n, -1);
|
||||||
result = gtk_tree_model_get_iter (tree_model, iter, path);
|
result = gtk_tree_model_get_iter (tree_model, iter, path);
|
||||||
gtk_tree_path_free (path);
|
gtk_tree_path_free (path);
|
||||||
|
|
|
@ -3006,7 +3006,6 @@ moo_icon_view_maybe_drag (MooIconView *view,
|
||||||
GtkTreePath *path = NULL;
|
GtkTreePath *path = NULL;
|
||||||
gboolean result = FALSE;
|
gboolean result = FALSE;
|
||||||
int button;
|
int button;
|
||||||
GdkDragContext *context;
|
|
||||||
|
|
||||||
info = view->priv->dnd_info;
|
info = view->priv->dnd_info;
|
||||||
|
|
||||||
|
@ -3040,11 +3039,11 @@ moo_icon_view_maybe_drag (MooIconView *view,
|
||||||
|
|
||||||
/* drag it! */
|
/* drag it! */
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
context = gtk_drag_begin (GTK_WIDGET (view),
|
gtk_drag_begin (GTK_WIDGET (view),
|
||||||
info->source_targets,
|
info->source_targets,
|
||||||
info->source_actions,
|
info->source_actions,
|
||||||
button,
|
button,
|
||||||
(GdkEvent*) event);
|
(GdkEvent*) event);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// GdkPixmap *pixmap;
|
// GdkPixmap *pixmap;
|
||||||
|
|
|
@ -442,7 +442,7 @@ _wrap_moo_plugin_call_method (PyGObject *self, PyObject *args)
|
||||||
if ((int) meth->n_params + 1 != PyTuple_GET_SIZE (args))
|
if ((int) meth->n_params + 1 != PyTuple_GET_SIZE (args))
|
||||||
{
|
{
|
||||||
PyErr_Format (PyExc_TypeError, "in Plugin.call_method: method '%s' takes "
|
PyErr_Format (PyExc_TypeError, "in Plugin.call_method: method '%s' takes "
|
||||||
"exactly %d arguments (%"G_GSSIZE_FORMAT" given)", name, meth->n_params,
|
"exactly %u arguments (%"G_GSSIZE_FORMAT" given)", name, meth->n_params,
|
||||||
PyTuple_GET_SIZE (args) - 1);
|
PyTuple_GET_SIZE (args) - 1);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,7 +337,7 @@ ms_context_assign_positional (MSContext *ctx,
|
||||||
|
|
||||||
g_return_val_if_fail (MS_IS_CONTEXT (ctx), FALSE);
|
g_return_val_if_fail (MS_IS_CONTEXT (ctx), FALSE);
|
||||||
|
|
||||||
name = g_strdup_printf ("_%d", n);
|
name = g_strdup_printf ("_%u", n);
|
||||||
result = ms_context_assign_variable (ctx, name, value);
|
result = ms_context_assign_variable (ctx, name, value);
|
||||||
|
|
||||||
g_free (name);
|
g_free (name);
|
||||||
|
|
|
@ -374,7 +374,7 @@ _ms_script_yyerror (MSParser *parser,
|
||||||
const char *string)
|
const char *string)
|
||||||
{
|
{
|
||||||
char *line = get_line ((const char*) parser->lex->input + parser->lex->line_ptr);
|
char *line = get_line ((const char*) parser->lex->input + parser->lex->line_ptr);
|
||||||
g_print ("On line %d: %s\n", parser->lex->line_no, string);
|
g_print ("On line %u: %s\n", parser->lex->line_no, string);
|
||||||
g_print ("%s\n", line);
|
g_print ("%s\n", line);
|
||||||
parser->failed = TRUE;
|
parser->failed = TRUE;
|
||||||
g_free (line);
|
g_free (line);
|
||||||
|
|
|
@ -787,11 +787,11 @@ ms_value_print (MSValue *val)
|
||||||
case G_TYPE_INT:
|
case G_TYPE_INT:
|
||||||
return g_strdup_printf ("%d", g_value_get_int (val->u.gval));
|
return g_strdup_printf ("%d", g_value_get_int (val->u.gval));
|
||||||
case G_TYPE_UINT:
|
case G_TYPE_UINT:
|
||||||
return g_strdup_printf ("%d", g_value_get_uint (val->u.gval));
|
return g_strdup_printf ("%u", g_value_get_uint (val->u.gval));
|
||||||
case G_TYPE_LONG:
|
case G_TYPE_LONG:
|
||||||
return g_strdup_printf ("%ld", g_value_get_long (val->u.gval));
|
return g_strdup_printf ("%ld", g_value_get_long (val->u.gval));
|
||||||
case G_TYPE_ULONG:
|
case G_TYPE_ULONG:
|
||||||
return g_strdup_printf ("%ld", g_value_get_ulong (val->u.gval));
|
return g_strdup_printf ("%lu", g_value_get_ulong (val->u.gval));
|
||||||
case G_TYPE_INT64:
|
case G_TYPE_INT64:
|
||||||
return g_strdup_printf ("%" G_GINT64_FORMAT, g_value_get_int64 (val->u.gval));
|
return g_strdup_printf ("%" G_GINT64_FORMAT, g_value_get_int64 (val->u.gval));
|
||||||
case G_TYPE_UINT64:
|
case G_TYPE_UINT64:
|
||||||
|
@ -799,7 +799,7 @@ ms_value_print (MSValue *val)
|
||||||
case G_TYPE_ENUM:
|
case G_TYPE_ENUM:
|
||||||
return g_strdup_printf ("%d", g_value_get_enum (val->u.gval));
|
return g_strdup_printf ("%d", g_value_get_enum (val->u.gval));
|
||||||
case G_TYPE_FLAGS:
|
case G_TYPE_FLAGS:
|
||||||
return g_strdup_printf ("%d", g_value_get_flags (val->u.gval));
|
return g_strdup_printf ("%u", g_value_get_flags (val->u.gval));
|
||||||
case G_TYPE_FLOAT:
|
case G_TYPE_FLOAT:
|
||||||
return g_strdup_printf ("%f", g_value_get_float (val->u.gval));
|
return g_strdup_printf ("%f", g_value_get_float (val->u.gval));
|
||||||
case G_TYPE_DOUBLE:
|
case G_TYPE_DOUBLE:
|
||||||
|
@ -867,11 +867,11 @@ ms_value_repr (MSValue *val)
|
||||||
case G_TYPE_INT:
|
case G_TYPE_INT:
|
||||||
return g_strdup_printf ("%d", g_value_get_int (val->u.gval));
|
return g_strdup_printf ("%d", g_value_get_int (val->u.gval));
|
||||||
case G_TYPE_UINT:
|
case G_TYPE_UINT:
|
||||||
return g_strdup_printf ("%d", g_value_get_uint (val->u.gval));
|
return g_strdup_printf ("%u", g_value_get_uint (val->u.gval));
|
||||||
case G_TYPE_LONG:
|
case G_TYPE_LONG:
|
||||||
return g_strdup_printf ("%ld", g_value_get_long (val->u.gval));
|
return g_strdup_printf ("%ld", g_value_get_long (val->u.gval));
|
||||||
case G_TYPE_ULONG:
|
case G_TYPE_ULONG:
|
||||||
return g_strdup_printf ("%ld", g_value_get_ulong (val->u.gval));
|
return g_strdup_printf ("%lu", g_value_get_ulong (val->u.gval));
|
||||||
case G_TYPE_INT64:
|
case G_TYPE_INT64:
|
||||||
return g_strdup_printf ("%" G_GINT64_FORMAT, g_value_get_int64 (val->u.gval));
|
return g_strdup_printf ("%" G_GINT64_FORMAT, g_value_get_int64 (val->u.gval));
|
||||||
case G_TYPE_UINT64:
|
case G_TYPE_UINT64:
|
||||||
|
@ -879,7 +879,7 @@ ms_value_repr (MSValue *val)
|
||||||
case G_TYPE_ENUM:
|
case G_TYPE_ENUM:
|
||||||
return g_strdup_printf ("<%d>", g_value_get_enum (val->u.gval));
|
return g_strdup_printf ("<%d>", g_value_get_enum (val->u.gval));
|
||||||
case G_TYPE_FLAGS:
|
case G_TYPE_FLAGS:
|
||||||
return g_strdup_printf ("<%d>", g_value_get_flags (val->u.gval));
|
return g_strdup_printf ("<%u>", g_value_get_flags (val->u.gval));
|
||||||
case G_TYPE_FLOAT:
|
case G_TYPE_FLOAT:
|
||||||
return g_strdup_printf ("%f", g_value_get_float (val->u.gval));
|
return g_strdup_printf ("%f", g_value_get_float (val->u.gval));
|
||||||
case G_TYPE_DOUBLE:
|
case G_TYPE_DOUBLE:
|
||||||
|
|
|
@ -415,17 +415,6 @@ rect_window_to_screen (MooTerm *term,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline static void
|
|
||||||
region_destroy (GdkRegion **region)
|
|
||||||
{
|
|
||||||
if (*region)
|
|
||||||
{
|
|
||||||
gdk_region_destroy (*region);
|
|
||||||
*region = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
moo_term_draw (MooTerm *term,
|
moo_term_draw (MooTerm *term,
|
||||||
GdkDrawable *drawable,
|
GdkDrawable *drawable,
|
||||||
|
|
|
@ -178,7 +178,7 @@ struct _MooTermPrivate {
|
||||||
guint meta_sends_escape : 1; /* = TRUE */
|
guint meta_sends_escape : 1; /* = TRUE */
|
||||||
guint scroll_on_input : 1; /* = TRUE */
|
guint scroll_on_input : 1; /* = TRUE */
|
||||||
guint bold_pango : 1;
|
guint bold_pango : 1;
|
||||||
gboolean bold_offset : 1;
|
guint bold_offset : 1;
|
||||||
} settings;
|
} settings;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -444,7 +444,7 @@ _moo_term_button_press (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("got button %d in button_press callback", event->button);
|
g_warning ("got button %u in button_press callback", event->button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event->type == GDK_2BUTTON_PRESS && event->button == 1)
|
else if (event->type == GDK_2BUTTON_PRESS && event->button == 1)
|
||||||
|
@ -559,8 +559,8 @@ _moo_term_motion_notify (GtkWidget *widget,
|
||||||
gdk_window_get_pointer (event->window, &event_x, &event_y, NULL);
|
gdk_window_get_pointer (event->window, &event_x, &event_y, NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
event_x = (int)event->x;
|
event_x = (int) event->x;
|
||||||
event_y = (int)event->y;
|
event_y = (int) event->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
moo_term_window_to_buffer_coords (term, event_x, event_y, &x, &y);
|
moo_term_window_to_buffer_coords (term, event_x, event_y, &x, &y);
|
||||||
|
@ -609,14 +609,11 @@ _moo_term_motion_notify (GtkWidget *widget,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* this piece is from gtktextview.c */
|
/* this piece is from gtktextview.c */
|
||||||
int x, y;
|
|
||||||
|
|
||||||
gdk_window_get_pointer (widget->window, &x, &y, NULL);
|
gdk_window_get_pointer (widget->window, &x, &y, NULL);
|
||||||
|
|
||||||
if (gtk_drag_check_threshold (widget, MOUSE_STUFF(term)->drag_start_x,
|
if (gtk_drag_check_threshold (widget, MOUSE_STUFF(term)->drag_start_x,
|
||||||
MOUSE_STUFF(term)->drag_start_y, x, y))
|
MOUSE_STUFF(term)->drag_start_y, x, y))
|
||||||
{
|
{
|
||||||
MooTermIter iter;
|
|
||||||
int buffer_x, buffer_y;
|
int buffer_x, buffer_y;
|
||||||
|
|
||||||
moo_term_window_to_buffer_coords (term,
|
moo_term_window_to_buffer_coords (term,
|
||||||
|
|
|
@ -1681,7 +1681,7 @@ void moo_term_buffer_set_mode (MooTermBuffer *buf,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
g_warning ("%s: unknown mode %d", G_STRLOC, mode);
|
g_warning ("%s: unknown mode %u", G_STRLOC, mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -521,7 +521,7 @@ moo_paned_constructor (GType type,
|
||||||
paned->button_box = gtk_hbox_new (FALSE, button_spacing);
|
paned->button_box = gtk_hbox_new (FALSE, button_spacing);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("%s: invalid 'pane-position' property value '%d',"
|
g_warning ("%s: invalid 'pane-position' property value '%u',"
|
||||||
"falling back to MOO_PANE_POS_LEFT", G_STRLOC,
|
"falling back to MOO_PANE_POS_LEFT", G_STRLOC,
|
||||||
paned->priv->pane_position);
|
paned->priv->pane_position);
|
||||||
paned->priv->pane_position = MOO_PANE_POS_LEFT;
|
paned->priv->pane_position = MOO_PANE_POS_LEFT;
|
||||||
|
|
|
@ -2267,7 +2267,7 @@ moo_ui_xml_create_widget (MooUIXML *xml,
|
||||||
|
|
||||||
if (type < 1 || type > 3)
|
if (type < 1 || type > 3)
|
||||||
{
|
{
|
||||||
g_warning ("%s: invalid widget type %d", G_STRLOC, type);
|
g_warning ("%s: invalid widget type %u", G_STRLOC, type);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ _moo_value_convert (const GValue *src,
|
||||||
if (src_type == G_TYPE_UINT)
|
if (src_type == G_TYPE_UINT)
|
||||||
{
|
{
|
||||||
char *string =
|
char *string =
|
||||||
g_strdup_printf ("%d", g_value_get_uint (src));
|
g_strdup_printf ("%u", g_value_get_uint (src));
|
||||||
g_value_take_string (dest, string);
|
g_value_take_string (dest, string);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue