comparison src/gtknotify.c @ 5524:101384b068c1

[gaim-migrate @ 5924] Fixification. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 26 May 2003 02:58:45 +0000
parents 42a20beb80a7
children 8bf28c2d100e
comparison
equal deleted inserted replaced
5523:fe76565d93c4 5524:101384b068c1
124 gaim_gtk_notify_email(const char *subject, const char *from, 124 gaim_gtk_notify_email(const char *subject, const char *from,
125 const char *to, const char *url, 125 const char *to, const char *url,
126 GCallback cb, void *user_data) 126 GCallback cb, void *user_data)
127 { 127 {
128 return gaim_gtk_notify_emails(1, TRUE, 128 return gaim_gtk_notify_emails(1, TRUE,
129 &subject, &from, &to, &url, cb, user_data); 129 (subject == NULL ? NULL : &subject),
130 (from == NULL ? NULL : &from),
131 (to == NULL ? NULL : &to),
132 (url == NULL ? NULL : &url),
133 cb, user_data);
130 } 134 }
131 135
132 static void * 136 static void *
133 gaim_gtk_notify_emails(size_t count, gboolean detailed, 137 gaim_gtk_notify_emails(size_t count, gboolean detailed,
134 const char **subjects, const char **froms, 138 const char **subjects, const char **froms,
147 data = g_new0(GaimNotifyMailData, 1); 151 data = g_new0(GaimNotifyMailData, 1);
148 152
149 data->url = g_strdup(urls[0]); 153 data->url = g_strdup(urls[0]);
150 154
151 /* Create the dialog. */ 155 /* Create the dialog. */
152 dialog = gtk_dialog_new_with_buttons("", NULL, 0, 156 data->dialog = dialog = gtk_dialog_new();
153 GTK_STOCK_CLOSE, 1, 157
154 GAIM_STOCK_OPEN_MAIL, 0, 158 gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, 1);
155 NULL); 159
156 data->dialog = dialog; 160 if (urls != NULL)
161 gtk_dialog_add_button(GTK_DIALOG(dialog), GAIM_STOCK_OPEN_MAIL, 1);
157 162
158 g_signal_connect(G_OBJECT(dialog), "response", 163 g_signal_connect(G_OBJECT(dialog), "response",
159 G_CALLBACK(__email_response_cb), data); 164 G_CALLBACK(__email_response_cb), data);
160 165
161 /* Setup the dialog */ 166 /* Setup the dialog */