| 57 gtk_widget_set_visible(label, !purple_strempty(ret)); |
57 gtk_widget_set_visible(label, !purple_strempty(ret)); |
| 58 |
58 |
| 59 return ret; |
59 return ret; |
| 60 } |
60 } |
| 61 |
61 |
| |
62 static void |
| |
63 pidgin_info_pane_subtitle_enter_cb(GtkEventControllerMotion *self, |
| |
64 G_GNUC_UNUSED gdouble x, |
| |
65 G_GNUC_UNUSED gdouble y, |
| |
66 G_GNUC_UNUSED gpointer data) |
| |
67 { |
| |
68 GtkWidget *label = NULL; |
| |
69 |
| |
70 label = gtk_event_controller_get_widget(GTK_EVENT_CONTROLLER(self)); |
| |
71 gtk_label_set_lines(GTK_LABEL(label), 10); |
| |
72 } |
| |
73 |
| |
74 static void |
| |
75 pidgin_info_pane_subtitle_leave_cb(GtkEventControllerMotion *self, |
| |
76 G_GNUC_UNUSED gdouble x, |
| |
77 G_GNUC_UNUSED gdouble y, |
| |
78 G_GNUC_UNUSED gpointer data) |
| |
79 { |
| |
80 GtkWidget *label = NULL; |
| |
81 |
| |
82 label = gtk_event_controller_get_widget(GTK_EVENT_CONTROLLER(self)); |
| |
83 gtk_label_set_lines(GTK_LABEL(label), 2); |
| |
84 } |
| |
85 |
| 62 /****************************************************************************** |
86 /****************************************************************************** |
| 63 * GObject Implementation |
87 * GObject Implementation |
| 64 *****************************************************************************/ |
88 *****************************************************************************/ |
| 65 static void |
89 static void |
| 66 pidgin_info_pane_get_property(GObject *obj, guint param_id, GValue *value, |
90 pidgin_info_pane_get_property(GObject *obj, guint param_id, GValue *value, |
| 174 gtk_widget_class_set_template_from_resource(widget_class, |
198 gtk_widget_class_set_template_from_resource(widget_class, |
| 175 "/im/pidgin/Pidgin3/infopane.ui"); |
199 "/im/pidgin/Pidgin3/infopane.ui"); |
| 176 |
200 |
| 177 gtk_widget_class_bind_template_callback(widget_class, |
201 gtk_widget_class_bind_template_callback(widget_class, |
| 178 pidgin_info_pane_linkify_text_cb); |
202 pidgin_info_pane_linkify_text_cb); |
| |
203 gtk_widget_class_bind_template_callback(widget_class, |
| |
204 pidgin_info_pane_subtitle_enter_cb); |
| |
205 gtk_widget_class_bind_template_callback(widget_class, |
| |
206 pidgin_info_pane_subtitle_leave_cb); |
| 179 } |
207 } |
| 180 |
208 |
| 181 /****************************************************************************** |
209 /****************************************************************************** |
| 182 * API |
210 * API |
| 183 *****************************************************************************/ |
211 *****************************************************************************/ |