pidgin/gtkxfer.c

changeset 35672
81f41f7bca98
parent 35511
201a7fd12507
child 35892
02bf3200b9cb
child 37129
edbea75bd68f
equal deleted inserted replaced
35671:d1cc97d667a2 35672:81f41f7bca98
35 /* the maximum size of files we will try to make a thumbnail for */ 35 /* the maximum size of files we will try to make a thumbnail for */
36 #define PIDGIN_XFER_MAX_SIZE_IMAGE_THUMBNAIL 10 * 1024 * 1024 36 #define PIDGIN_XFER_MAX_SIZE_IMAGE_THUMBNAIL 10 * 1024 * 1024
37 37
38 struct _PidginXferDialog 38 struct _PidginXferDialog
39 { 39 {
40 gint box_count;
41
40 gboolean keep_open; 42 gboolean keep_open;
41 gboolean auto_clear; 43 gboolean auto_clear;
42 44
43 gint num_transfers; 45 gint num_transfers;
44 46
1075 /* If we got to this point then we know everything is finished */ 1077 /* If we got to this point then we know everything is finished */
1076 pidgin_xfer_dialog_hide(dialog); 1078 pidgin_xfer_dialog_hide(dialog);
1077 } 1079 }
1078 1080
1079 /************************************************************************** 1081 /**************************************************************************
1082 * PidginXferDialog GBoxed code
1083 **************************************************************************/
1084 static PidginXferDialog *
1085 pidgin_xfer_dialog_ref(PidginXferDialog *dialog)
1086 {
1087 g_return_val_if_fail(dialog != NULL, NULL);
1088
1089 dialog->box_count++;
1090
1091 return dialog;
1092 }
1093
1094 static void
1095 pidgin_xfer_dialog_unref(PidginXferDialog *dialog)
1096 {
1097 g_return_if_fail(dialog != NULL);
1098 g_return_if_fail(dialog->box_count >= 0);
1099
1100 if (!dialog->box_count--)
1101 pidgin_xfer_dialog_destroy(dialog);
1102 }
1103
1104 GType
1105 pidgin_xfer_dialog_get_type(void)
1106 {
1107 static GType type = 0;
1108
1109 if (type == 0) {
1110 type = g_boxed_type_register_static("PidginXferDialog",
1111 (GBoxedCopyFunc)pidgin_xfer_dialog_ref,
1112 (GBoxedFreeFunc)pidgin_xfer_dialog_unref);
1113 }
1114
1115 return type;
1116 }
1117
1118 /**************************************************************************
1080 * File Transfer UI Ops 1119 * File Transfer UI Ops
1081 **************************************************************************/ 1120 **************************************************************************/
1082 static void 1121 static void
1083 pidgin_xfer_new_xfer(PurpleXfer *xfer) 1122 pidgin_xfer_new_xfer(PurpleXfer *xfer)
1084 { 1123 {

mercurial