| 1 /* |
|
| 2 * pidgin |
|
| 3 * |
|
| 4 * Pidgin is the legal property of its developers, whose names are too numerous |
|
| 5 * to list here. Please refer to the COPYRIGHT file distributed with this |
|
| 6 * source distribution. |
|
| 7 * |
|
| 8 * This program is free software; you can redistribute it and/or modify |
|
| 9 * it under the terms of the GNU General Public License as published by |
|
| 10 * the Free Software Foundation; either version 2 of the License, or |
|
| 11 * (at your option) any later version. |
|
| 12 * |
|
| 13 * This program is distributed in the hope that it will be useful, |
|
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 16 * GNU General Public License for more details. |
|
| 17 * |
|
| 18 * You should have received a copy of the GNU General Public License |
|
| 19 * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
| 20 */ |
|
| 21 |
|
| 22 #include "pidginclosebutton.h" |
|
| 23 |
|
| 24 struct _PidginCloseButton { |
|
| 25 GtkButton parent; |
|
| 26 }; |
|
| 27 |
|
| 28 /****************************************************************************** |
|
| 29 * GObject Implementation |
|
| 30 *****************************************************************************/ |
|
| 31 G_DEFINE_TYPE(PidginCloseButton, pidgin_close_button, GTK_TYPE_BUTTON) |
|
| 32 |
|
| 33 static void |
|
| 34 pidgin_close_button_init(PidginCloseButton *button) { |
|
| 35 gtk_widget_init_template(GTK_WIDGET(button)); |
|
| 36 } |
|
| 37 |
|
| 38 static void |
|
| 39 pidgin_close_button_class_init(PidginCloseButtonClass *klass) { |
|
| 40 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); |
|
| 41 |
|
| 42 gtk_widget_class_set_template_from_resource( |
|
| 43 widget_class, |
|
| 44 "/im/pidgin/Pidgin3/closebutton.ui" |
|
| 45 ); |
|
| 46 } |
|
| 47 |
|
| 48 /****************************************************************************** |
|
| 49 * Public API |
|
| 50 *****************************************************************************/ |
|
| 51 GtkWidget * |
|
| 52 pidgin_close_button_new(void) { |
|
| 53 return GTK_WIDGET(g_object_new(PIDGIN_TYPE_CLOSE_BUTTON, NULL)); |
|
| 54 } |
|