| 39 #include "package_revision.h" |
39 #include "package_revision.h" |
| 40 #include "pidgincore.h" |
40 #include "pidgincore.h" |
| 41 #include "pidginresources.h" |
41 #include "pidginresources.h" |
| 42 |
42 |
| 43 struct _PidginAboutDialog { |
43 struct _PidginAboutDialog { |
| 44 GtkDialog parent; |
44 AdwWindow parent; |
| 45 |
45 |
| 46 GtkWidget *application_name; |
46 GtkWidget *application_name; |
| 47 |
47 |
| 48 AdwPreferencesPage *developers_page; |
48 AdwPreferencesPage *developers_page; |
| 49 |
49 |
| 554 |
554 |
| 555 /****************************************************************************** |
555 /****************************************************************************** |
| 556 * Callbacks |
556 * Callbacks |
| 557 *****************************************************************************/ |
557 *****************************************************************************/ |
| 558 static void |
558 static void |
| 559 pidgin_about_dialog_response_cb(GtkDialog *dialog, gint response_id, |
|
| 560 G_GNUC_UNUSED gpointer data) |
|
| 561 { |
|
| 562 switch(response_id) { |
|
| 563 case GTK_RESPONSE_CLOSE: |
|
| 564 case GTK_RESPONSE_DELETE_EVENT: |
|
| 565 gtk_window_destroy(GTK_WINDOW(dialog)); |
|
| 566 break; |
|
| 567 } |
|
| 568 } |
|
| 569 |
|
| 570 static void |
|
| 571 pidgin_about_dialog_copy_button_cb(GtkButton *button, |
559 pidgin_about_dialog_copy_button_cb(GtkButton *button, |
| 572 gpointer data) |
560 gpointer data) |
| 573 { |
561 { |
| 574 PidginAboutDialog *about = NULL; |
562 PidginAboutDialog *about = NULL; |
| 575 GdkClipboard *clipboard = NULL; |
563 GdkClipboard *clipboard = NULL; |
| 635 } |
623 } |
| 636 |
624 |
| 637 /****************************************************************************** |
625 /****************************************************************************** |
| 638 * GObject Implementation |
626 * GObject Implementation |
| 639 *****************************************************************************/ |
627 *****************************************************************************/ |
| 640 G_DEFINE_FINAL_TYPE(PidginAboutDialog, pidgin_about_dialog, GTK_TYPE_DIALOG) |
628 G_DEFINE_FINAL_TYPE(PidginAboutDialog, pidgin_about_dialog, ADW_TYPE_WINDOW) |
| 641 |
629 |
| 642 static void |
630 static void |
| 643 pidgin_about_dialog_class_init(PidginAboutDialogClass *klass) { |
631 pidgin_about_dialog_class_init(PidginAboutDialogClass *klass) { |
| 644 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); |
632 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); |
| 645 |
633 |
| 668 gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
656 gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
| 669 conf_path_info_group); |
657 conf_path_info_group); |
| 670 gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
658 gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
| 671 build_args_group); |
659 build_args_group); |
| 672 |
660 |
| 673 gtk_widget_class_bind_template_callback(widget_class, |
|
| 674 pidgin_about_dialog_response_cb); |
|
| 675 gtk_widget_class_bind_template_callback(widget_class, |
661 gtk_widget_class_bind_template_callback(widget_class, |
| 676 pidgin_about_dialog_copy_button_cb); |
662 pidgin_about_dialog_copy_button_cb); |
| 677 } |
663 } |
| 678 |
664 |
| 679 static void |
665 static void |