pidgin/gtknotify.c

changeset 34449
bbcb198650b7
parent 34274
9169710b5af5
child 34450
0145b9f2d77c
equal deleted inserted replaced
34448:e15d91a77cb3 34449:bbcb198650b7
507 g_list_free(row); 507 g_list_free(row);
508 } 508 }
509 509
510 static void * 510 static void *
511 pidgin_notify_message(PurpleNotifyMsgType type, const char *title, 511 pidgin_notify_message(PurpleNotifyMsgType type, const char *title,
512 const char *primary, const char *secondary) 512 const char *primary, const char *secondary,
513 PurpleRequestCommonParameters *cpar)
513 { 514 {
514 GtkWidget *dialog; 515 GtkWidget *dialog;
515 GtkWidget *hbox; 516 GtkWidget *hbox;
516 GtkWidget *label; 517 GtkWidget *label;
517 GtkWidget *img = NULL; 518 GtkWidget *img = NULL;
1223 1224
1224 if (!purple_program_is_valid(command)) 1225 if (!purple_program_is_valid(command))
1225 { 1226 {
1226 tmp = g_strdup_printf(_("The browser command \"%s\" is invalid."), 1227 tmp = g_strdup_printf(_("The browser command \"%s\" is invalid."),
1227 command ? command : "(none)"); 1228 command ? command : "(none)");
1228 purple_notify_error(NULL, NULL, _("Unable to open URL"), tmp); 1229 purple_notify_error(NULL, NULL, _("Unable to open URL"), tmp, NULL);
1229 g_free(tmp); 1230 g_free(tmp);
1230 1231
1231 } 1232 }
1232 else if (sync) 1233 else if (sync)
1233 { 1234 {
1235 1236
1236 if (!g_spawn_command_line_sync(command, NULL, NULL, &status, &error)) 1237 if (!g_spawn_command_line_sync(command, NULL, NULL, &status, &error))
1237 { 1238 {
1238 tmp = g_strdup_printf(_("Error launching \"%s\": %s"), 1239 tmp = g_strdup_printf(_("Error launching \"%s\": %s"),
1239 command, error->message); 1240 command, error->message);
1240 purple_notify_error(NULL, NULL, _("Unable to open URL"), tmp); 1241 purple_notify_error(NULL, NULL, _("Unable to open URL"), tmp, NULL);
1241 g_free(tmp); 1242 g_free(tmp);
1242 g_error_free(error); 1243 g_error_free(error);
1243 } 1244 }
1244 else 1245 else
1245 ret = status; 1246 ret = status;
1248 { 1249 {
1249 if (!g_spawn_command_line_async(command, &error)) 1250 if (!g_spawn_command_line_async(command, &error))
1250 { 1251 {
1251 tmp = g_strdup_printf(_("Error launching \"%s\": %s"), 1252 tmp = g_strdup_printf(_("Error launching \"%s\": %s"),
1252 command, error->message); 1253 command, error->message);
1253 purple_notify_error(NULL, NULL, _("Unable to open URL"), tmp); 1254 purple_notify_error(NULL, NULL, _("Unable to open URL"), tmp, NULL);
1254 g_free(tmp); 1255 g_free(tmp);
1255 g_error_free(error); 1256 g_error_free(error);
1256 } 1257 }
1257 } 1258 }
1258 1259
1407 web_command = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/browsers/manual_command"); 1408 web_command = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/browsers/manual_command");
1408 1409
1409 if (web_command == NULL || *web_command == '\0') 1410 if (web_command == NULL || *web_command == '\0')
1410 { 1411 {
1411 purple_notify_error(NULL, NULL, _("Unable to open URL"), 1412 purple_notify_error(NULL, NULL, _("Unable to open URL"),
1412 _("The 'Manual' browser command has been " 1413 _("The 'Manual' browser command has been "
1413 "chosen, but no command has been set.")); 1414 "chosen, but no command has been set."), NULL);
1414 return NULL; 1415 return NULL;
1415 } 1416 }
1416 1417
1417 if (strstr(web_command, "%s")) 1418 if (strstr(web_command, "%s"))
1418 command = purple_strreplace(web_command, "%s", escaped); 1419 command = purple_strreplace(web_command, "%s", escaped);

mercurial