mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-07-04 19:19:25 +00:00
Compare commits
5 Commits
72427006dd
...
6f6d378600
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f6d378600 | ||
|
|
216b463b8f | ||
| 4ad84cb5e5 | |||
| 19e0946717 | |||
| 0de1ad06cd |
@@ -1168,8 +1168,11 @@ set_showval (session *sess, const struct prefs *var, char *tbuf)
|
|||||||
switch (var->type)
|
switch (var->type)
|
||||||
{
|
{
|
||||||
case TYPE_STR:
|
case TYPE_STR:
|
||||||
sprintf (tbuf + len, "\0033:\017 %s\n", (char *) &prefs + var->offset);
|
{
|
||||||
break;
|
const char *value = (char *) &prefs + var->offset;
|
||||||
|
sprintf (tbuf + len, "\0033:\017 %s\n", value ? value : "");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case TYPE_INT:
|
case TYPE_INT:
|
||||||
sprintf (tbuf + len, "\0033:\017 %d\n", *((int *) &prefs + var->offset));
|
sprintf (tbuf + len, "\0033:\017 %d\n", *((int *) &prefs + var->offset));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -522,6 +522,10 @@ gtkutil_file_req (GtkWindow *parent, const char *title, void *callback, void *us
|
|||||||
|
|
||||||
g_signal_connect (native, "response",
|
g_signal_connect (native, "response",
|
||||||
G_CALLBACK (gtkutil_native_file_req_response), freq);
|
G_CALLBACK (gtkutil_native_file_req_response), freq);
|
||||||
|
|
||||||
|
if (flags & FRF_MODAL)
|
||||||
|
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (native), TRUE);
|
||||||
|
|
||||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
|
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5241,9 +5241,14 @@ static void
|
|||||||
mg_handle_drop (GtkWidget *widget, int y, int *pos, int *other_pos)
|
mg_handle_drop (GtkWidget *widget, int y, int *pos, int *other_pos)
|
||||||
{
|
{
|
||||||
int height;
|
int height;
|
||||||
|
GdkWindow *window;
|
||||||
session_gui *gui = current_sess->gui;
|
session_gui *gui = current_sess->gui;
|
||||||
|
|
||||||
height = gdk_window_get_height (gtk_widget_get_window (widget));
|
window = gtk_widget_get_window (widget);
|
||||||
|
if (!window)
|
||||||
|
return;
|
||||||
|
|
||||||
|
height = gdk_window_get_height (window);
|
||||||
|
|
||||||
if (y < height / 2)
|
if (y < height / 2)
|
||||||
{
|
{
|
||||||
@@ -5321,6 +5326,9 @@ mg_drag_begin_cb (GtkWidget *widget, GdkDragContext *context, gpointer userdata)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
window = gtk_widget_get_window (widget);
|
window = gtk_widget_get_window (widget);
|
||||||
|
if (!window)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
width = gdk_window_get_width (window);
|
width = gdk_window_get_width (window);
|
||||||
height = gdk_window_get_height (window);
|
height = gdk_window_get_height (window);
|
||||||
|
|
||||||
@@ -5398,11 +5406,16 @@ mg_drag_motion_cb (GtkWidget *widget, GdkDragContext *context, int x, int y, gui
|
|||||||
width = allocation.width;
|
width = allocation.width;
|
||||||
height = allocation.height;
|
height = allocation.height;
|
||||||
window = gtk_widget_get_window (widget);
|
window = gtk_widget_get_window (widget);
|
||||||
|
if (!window)
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ox = oy = 0;
|
ox = oy = 0;
|
||||||
window = gtk_widget_get_window (widget);
|
window = gtk_widget_get_window (widget);
|
||||||
|
if (!window)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
width = gdk_window_get_width (window);
|
width = gdk_window_get_width (window);
|
||||||
height = gdk_window_get_height (window);
|
height = gdk_window_get_height (window);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user