Group :: Graphical desktop/MATE
RPM: mate-control-center
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: mate-control-center_fv-next-sync-from-Sushi.patch
Download
Download
diff -upr mate-control-center/font-viewer/sushi-font-loader.c mate-control-center-test/font-viewer/sushi-font-loader.c
--- mate-control-center/font-viewer/sushi-font-loader.c 2015-08-30 14:20:23.501739471 +0200
+++ mate-control-center-test/font-viewer/sushi-font-loader.c 2015-08-30 14:10:57.707855000 +0200
@@ -87,10 +87,13 @@ create_face_from_contents (FontLoadJob *
&retval);
if (ft_error != 0) {
- g_set_error_literal (error, G_IO_ERROR, 0,
- "Unable to read the font face file");
+ gchar *uri;
+ uri = g_file_get_uri (job->file);
+ g_set_error (error, G_IO_ERROR, 0,
+ "Unable to read the font face file '%s'", uri);
retval = NULL;
g_free (job->face_contents);
+ g_free (uri);
} else {
*contents = job->face_contents;
}
diff -upr mate-control-center/font-viewer/sushi-font-widget.c mate-control-center-test/font-viewer/sushi-font-widget.c
--- mate-control-center/font-viewer/sushi-font-widget.c 2015-08-30 14:20:16.141662952 +0200
+++ mate-control-center-test/font-viewer/sushi-font-widget.c 2015-08-30 14:14:40.146169000 +0200
@@ -37,6 +37,7 @@ enum {
enum {
LOADED,
+ ERROR,
NUM_SIGNALS
};
@@ -549,7 +550,7 @@ font_face_async_ready_cb (GObject *objec
&error);
if (error != NULL) {
- /* FIXME: need to signal the error */
+ g_signal_emit (self, signals[ERROR], 0, error->message);
g_print ("Can't load the font face: %s\n", error->message);
g_error_free (error);
@@ -682,6 +683,13 @@ sushi_font_widget_class_init (SushiFontW
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ signals[ERROR] =
+ g_signal_new ("error",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_FIRST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
g_object_class_install_properties (oclass, NUM_PROPERTIES, properties);
g_type_class_add_private (klass, sizeof (SushiFontWidgetPrivate));
@@ -705,3 +713,9 @@ sushi_font_widget_get_ft_face (SushiFont
return self->priv->face;
}
+const gchar *
+sushi_font_widget_get_uri (SushiFontWidget *self)
+{
+ return self->priv->uri;
+}
+
diff -upr mate-control-center/font-viewer/sushi-font-widget.h mate-control-center-test/font-viewer/sushi-font-widget.h
--- mate-control-center/font-viewer/sushi-font-widget.h 2015-08-30 14:20:07.806576294 +0200
+++ mate-control-center-test/font-viewer/sushi-font-widget.h 2015-08-30 14:15:23.586620000 +0200
@@ -63,6 +63,8 @@ SushiFontWidget *sushi_font_widget_new (
FT_Face sushi_font_widget_get_ft_face (SushiFontWidget *self);
+const gchar *sushi_font_widget_get_uri (SushiFontWidget *self);
+
G_END_DECLS
#endif /* __SUSHI_FONT_WIDGET_H__ */