Fix some compilations warnings
This commit is contained in:
parent
19407c76ca
commit
c0c1ca9b7a
@ -206,8 +206,8 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data) {
|
|||||||
// however, 60 would increase the distance between the icon and the
|
// however, 60 would increase the distance between the icon and the
|
||||||
// text,
|
// text,
|
||||||
// decreasing to 10 fix it.
|
// decreasing to 10 fix it.
|
||||||
gtk_label_set_width_chars (text, 10);
|
gtk_label_set_width_chars (GTK_LABEL (text), 10);
|
||||||
gtk_label_set_max_width_chars (text, 10);
|
gtk_label_set_max_width_chars (GTK_LABEL (text), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->modal)
|
if (data->modal)
|
||||||
|
@ -153,7 +153,7 @@ zenity_util_fill_file_buffer (GtkTextBuffer *buffer, const gchar *filename) {
|
|||||||
gtk_text_buffer_insert (buffer, &iter, buf, leftover - buf);
|
gtk_text_buffer_insert (buffer, &iter, buf, leftover - buf);
|
||||||
|
|
||||||
remaining = (buf + remaining + count) - leftover;
|
remaining = (buf + remaining + count) - leftover;
|
||||||
g_memmove (buf, leftover, remaining);
|
memmove (buf, leftover, remaining);
|
||||||
|
|
||||||
if (remaining > 6 || count < to_read)
|
if (remaining > 6 || count < to_read)
|
||||||
break;
|
break;
|
||||||
@ -326,11 +326,12 @@ transient_get_xterm (void) {
|
|||||||
Window wid = strtoul (wid_str, &wid_str_end, 10);
|
Window wid = strtoul (wid_str, &wid_str_end, 10);
|
||||||
if (*wid_str != '\0' && *wid_str_end == '\0' && wid != 0) {
|
if (*wid_str != '\0' && *wid_str_end == '\0' && wid != 0) {
|
||||||
XWindowAttributes attrs;
|
XWindowAttributes attrs;
|
||||||
gdk_error_trap_push ();
|
GdkDisplay *display;
|
||||||
|
display = gdk_display_get_default ();
|
||||||
|
gdk_x11_display_error_trap_push (display);
|
||||||
ret = XGetWindowAttributes (
|
ret = XGetWindowAttributes (
|
||||||
GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), wid, &attrs);
|
GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), wid, &attrs);
|
||||||
gdk_flush ();
|
if (gdk_x11_display_error_trap_pop (display) != 0 || ret == 0) {
|
||||||
if (gdk_error_trap_pop () != 0 || ret == 0) {
|
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
return wid;
|
return wid;
|
||||||
|
Reference in New Issue
Block a user