comparison finch/gntnotify.c @ 22819:a9141d049266

Show the url, instead of silently ignoring a url-open request.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 05 May 2008 00:02:37 +0000
parents c38d72677c8a
children 41171963c986
comparison
equal deleted inserted replaced
22818:7b21c5b208fb 22819:a9141d049266
27 #include <gntbox.h> 27 #include <gntbox.h>
28 #include <gntbutton.h> 28 #include <gntbutton.h>
29 #include <gntlabel.h> 29 #include <gntlabel.h>
30 #include <gnttree.h> 30 #include <gnttree.h>
31 #include <gntutils.h> 31 #include <gntutils.h>
32 #include <gntwindow.h>
32 33
33 #include "finch.h" 34 #include "finch.h"
34 35
35 #include <util.h> 36 #include <util.h>
36 37
64 case PURPLE_NOTIFY_MSG_INFO: 65 case PURPLE_NOTIFY_MSG_INFO:
65 pf |= GNT_TEXT_FLAG_BOLD; 66 pf |= GNT_TEXT_FLAG_BOLD;
66 break; 67 break;
67 } 68 }
68 69
69 window = gnt_box_new(FALSE, TRUE); 70 window = gnt_window_box_new(FALSE, TRUE);
70 gnt_box_set_toplevel(GNT_BOX(window), TRUE);
71 gnt_box_set_title(GNT_BOX(window), title); 71 gnt_box_set_title(GNT_BOX(window), title);
72 gnt_box_set_fill(GNT_BOX(window), FALSE); 72 gnt_box_set_fill(GNT_BOX(window), FALSE);
73 gnt_box_set_alignment(GNT_BOX(window), GNT_ALIGN_MID); 73 gnt_box_set_alignment(GNT_BOX(window), GNT_ALIGN_MID);
74 gnt_box_set_pad(GNT_BOX(window), 0); 74 gnt_box_set_pad(GNT_BOX(window), 0);
75 75
418 g_object_set_data(G_OBJECT(window), "notify-results", results); 418 g_object_set_data(G_OBJECT(window), "notify-results", results);
419 419
420 return tree; 420 return tree;
421 } 421 }
422 422
423 static void *
424 finch_notify_uri(const char *url)
425 {
426 return finch_notify_message(PURPLE_NOTIFY_URI, _("URI"), url, NULL);
427 }
428
423 static PurpleNotifyUiOps ops = 429 static PurpleNotifyUiOps ops =
424 { 430 {
425 finch_notify_message, 431 finch_notify_message,
426 finch_notify_email, 432 finch_notify_email,
427 finch_notify_emails, 433 finch_notify_emails,
428 finch_notify_formatted, 434 finch_notify_formatted,
429 finch_notify_searchresults, 435 finch_notify_searchresults,
430 finch_notify_sr_new_rows, 436 finch_notify_sr_new_rows,
431 finch_notify_userinfo, 437 finch_notify_userinfo,
432 NULL, /* notify_uri is of low-priority to me. --sadrul */ 438 finch_notify_uri,
433 finch_close_notify, /* The rest of the notify-uiops return a GntWidget. 439 finch_close_notify, /* The rest of the notify-uiops return a GntWidget.
434 These widgets should be destroyed from here. */ 440 These widgets should be destroyed from here. */
435 NULL, 441 NULL,
436 NULL, 442 NULL,
437 NULL, 443 NULL,