pidgin/pidginabout.c

changeset 41307
685bab46fad2
parent 41219
17dd0210fae7
child 41372
e3d28548e01d
equal deleted inserted replaced
41306:8befd71928c2 41307:685bab46fad2
65 GtkWidget *build_info_treeview; 65 GtkWidget *build_info_treeview;
66 GtkTreeStore *build_info_store; 66 GtkTreeStore *build_info_store;
67 }; 67 };
68 68
69 /****************************************************************************** 69 /******************************************************************************
70 * Globals
71 *****************************************************************************/
72 static GtkWidget *about_dialog = NULL;
73
74 /******************************************************************************
75 * Helpers 70 * Helpers
76 *****************************************************************************/ 71 *****************************************************************************/
77 static void 72 static void
78 pidgin_about_dialog_load_application_name(PidginAboutDialog *about) { 73 pidgin_about_dialog_load_application_name(PidginAboutDialog *about) {
79 gchar *label = g_strdup_printf("%s %s", PIDGIN_NAME, VERSION); 74 gchar *label = g_strdup_printf("%s %s", PIDGIN_NAME, VERSION);
578 /****************************************************************************** 573 /******************************************************************************
579 * Public API 574 * Public API
580 *****************************************************************************/ 575 *****************************************************************************/
581 GtkWidget * 576 GtkWidget *
582 pidgin_about_dialog_new(void) { 577 pidgin_about_dialog_new(void) {
583 if(GTK_IS_WIDGET(about_dialog)) { 578 return g_object_new(
584 return about_dialog;
585 }
586
587 about_dialog = g_object_new(
588 PIDGIN_TYPE_ABOUT_DIALOG, 579 PIDGIN_TYPE_ABOUT_DIALOG,
589 "title", "About Pidgin", 580 "title", "About Pidgin",
590 NULL 581 NULL
591 ); 582 );
592 583 }
593 g_object_add_weak_pointer(G_OBJECT(about_dialog),
594 (gpointer)&about_dialog);
595
596 return about_dialog;
597 }
598

mercurial