mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Fix some glib deprecation warnings
Most of these have been deprecated since forever (2.2), but they didn't raise warnings. Now they do, and the warnings are not the most verbose warnings you could ask for, but, they point in the right direction. This doesn't handle the GTimeVal deprecation warnings. Those seem trickier since they cover API, will look into those right after this.
This commit is contained in:
parent
50f8791f1e
commit
664c38afba
11 changed files with 33 additions and 33 deletions
|
|
@ -611,13 +611,13 @@ void gui_entry_insert_text(GUI_ENTRY_REC *entry, const char *str)
|
|||
entry_text_grow(entry, len);
|
||||
|
||||
/* make space for the string */
|
||||
g_memmove(entry->text + entry->pos + len, entry->text + entry->pos,
|
||||
(entry->text_len-entry->pos + 1) * sizeof(unichar));
|
||||
memmove(entry->text + entry->pos + len, entry->text + entry->pos,
|
||||
(entry->text_len-entry->pos + 1) * sizeof(unichar));
|
||||
|
||||
/* make space for the color */
|
||||
if (entry->uses_extents) {
|
||||
g_memmove(entry->extents + entry->pos + len + 1, entry->extents + entry->pos + 1,
|
||||
(entry->text_len-entry->pos) * sizeof(char *));
|
||||
memmove(entry->extents + entry->pos + len + 1, entry->extents + entry->pos + 1,
|
||||
(entry->text_len-entry->pos) * sizeof(char *));
|
||||
for (i = 0; i < len; i++) {
|
||||
entry->extents[entry->pos + i + 1] = NULL;
|
||||
}
|
||||
|
|
@ -662,12 +662,12 @@ void gui_entry_insert_char(GUI_ENTRY_REC *entry, unichar chr)
|
|||
entry_text_grow(entry, 1);
|
||||
|
||||
/* make space for the string */
|
||||
g_memmove(entry->text + entry->pos + 1, entry->text + entry->pos,
|
||||
(entry->text_len-entry->pos + 1) * sizeof(unichar));
|
||||
memmove(entry->text + entry->pos + 1, entry->text + entry->pos,
|
||||
(entry->text_len-entry->pos + 1) * sizeof(unichar));
|
||||
|
||||
if (entry->uses_extents) {
|
||||
g_memmove(entry->extents + entry->pos + 1 + 1, entry->extents + entry->pos + 1,
|
||||
(entry->text_len-entry->pos) * sizeof(char *));
|
||||
memmove(entry->extents + entry->pos + 1 + 1, entry->extents + entry->pos + 1,
|
||||
(entry->text_len-entry->pos) * sizeof(char *));
|
||||
entry->extents[entry->pos + 1] = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -838,8 +838,8 @@ void gui_entry_erase(GUI_ENTRY_REC *entry, int size, CUTBUFFER_UPDATE_OP update_
|
|||
while (entry->pos-size-w > 0 &&
|
||||
i_wcwidth(entry->text[entry->pos-size-w]) == 0) w++;
|
||||
|
||||
g_memmove(entry->text + entry->pos - size, entry->text + entry->pos,
|
||||
(entry->text_len-entry->pos+1) * sizeof(unichar));
|
||||
memmove(entry->text + entry->pos - size, entry->text + entry->pos,
|
||||
(entry->text_len-entry->pos+1) * sizeof(unichar));
|
||||
|
||||
if (entry->uses_extents) {
|
||||
for (i = entry->pos - size; i < entry->pos; i++) {
|
||||
|
|
@ -847,8 +847,8 @@ void gui_entry_erase(GUI_ENTRY_REC *entry, int size, CUTBUFFER_UPDATE_OP update_
|
|||
g_free(entry->extents[i+1]);
|
||||
}
|
||||
}
|
||||
g_memmove(entry->extents + entry->pos - size + 1, entry->extents + entry->pos + 1,
|
||||
(entry->text_len - entry->pos) * sizeof(void *)); /* no null terminator here */
|
||||
memmove(entry->extents + entry->pos - size + 1, entry->extents + entry->pos + 1,
|
||||
(entry->text_len - entry->pos) * sizeof(void *)); /* no null terminator here */
|
||||
for (i = 0; i < size; i++) {
|
||||
entry->extents[entry->text_len - i] = NULL;
|
||||
}
|
||||
|
|
@ -876,16 +876,16 @@ void gui_entry_erase_cell(GUI_ENTRY_REC *entry)
|
|||
while (entry->pos+size < entry->text_len &&
|
||||
i_wcwidth(entry->text[entry->pos+size]) == 0) size++;
|
||||
|
||||
g_memmove(entry->text + entry->pos, entry->text + entry->pos + size,
|
||||
(entry->text_len-entry->pos-size+1) * sizeof(unichar));
|
||||
memmove(entry->text + entry->pos, entry->text + entry->pos + size,
|
||||
(entry->text_len-entry->pos-size+1) * sizeof(unichar));
|
||||
|
||||
if (entry->uses_extents) {
|
||||
int i;
|
||||
for (i = 0; i < size; i++) {
|
||||
g_free(entry->extents[entry->pos + i + 1]);
|
||||
}
|
||||
g_memmove(entry->extents + entry->pos + 1, entry->extents + entry->pos + size + 1,
|
||||
(entry->text_len-entry->pos-size) * sizeof(char *));
|
||||
memmove(entry->extents + entry->pos + 1, entry->extents + entry->pos + size + 1,
|
||||
(entry->text_len-entry->pos-size) * sizeof(char *));
|
||||
for (i = 0; i < size; i++) {
|
||||
entry->extents[entry->text_len - i] = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ int main(int argc, char **argv)
|
|||
|
||||
g_log_set_always_fatal(loglev);
|
||||
textui_finish_init();
|
||||
main_loop = g_main_new(TRUE);
|
||||
main_loop = g_main_loop_new(NULL, TRUE);
|
||||
|
||||
/* Does the same as g_main_run(main_loop), except we
|
||||
can call our dirty-checker after each iteration */
|
||||
|
|
@ -348,11 +348,11 @@ int main(int argc, char **argv)
|
|||
dirty_check();
|
||||
|
||||
term_refresh_freeze();
|
||||
g_main_iteration(TRUE);
|
||||
g_main_context_iteration(NULL, TRUE);
|
||||
term_refresh_thaw();
|
||||
}
|
||||
|
||||
g_main_destroy(main_loop);
|
||||
g_main_loop_unref(main_loop);
|
||||
textui_deinit();
|
||||
|
||||
session_upgrade(); /* if we /UPGRADEd, start the new process */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue