Bug 46948

Summary: Glib patches
Product: poppler Reporter: Adrian Johnson <ajohnson>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: add poppler_fonts_iter_get_encoding
show encoding in demo
ctrl-q to quit demo

Description Adrian Johnson 2012-03-04 00:26:10 UTC
Created attachment 57995 [details] [review]
add poppler_fonts_iter_get_encoding

Add API to get font encoding.
Comment 1 Adrian Johnson 2012-03-04 00:32:10 UTC
Created attachment 57996 [details] [review]
show encoding in demo

Show the font encoding in the demo.
Comment 2 Adrian Johnson 2012-03-04 00:33:25 UTC
Created attachment 57997 [details] [review]
ctrl-q to quit demo

Make ctrl-q quit the demo
Comment 3 Carlos Garcia Campos 2012-03-05 11:08:25 UTC
Comment on attachment 57995 [details] [review]
add poppler_fonts_iter_get_encoding

Review of attachment 57995 [details] [review]:
-----------------------------------------------------------------

Looks good!
Comment 4 Carlos Garcia Campos 2012-03-05 11:10:27 UTC
Comment on attachment 57996 [details] [review]
show encoding in demo

Review of attachment 57996 [details] [review]:
-----------------------------------------------------------------

Looks good too, thanks!

::: glib/demo/fonts.c
@@ +165,5 @@
>  				name = "No name";
>  
> +			encoding = poppler_fonts_iter_get_encoding (fonts_iter);
> +			if (!encoding)
> +				encoding = "No encoding";

Maybe this could be just None, since this will look like:

Encoding: No encoding

maybe it's a bit redundant.
Comment 5 Carlos Garcia Campos 2012-03-05 11:11:50 UTC
Comment on attachment 57997 [details] [review]
ctrl-q to quit demo

Review of attachment 57997 [details] [review]:
-----------------------------------------------------------------

Ok.
Comment 6 Carlos Garcia Campos 2012-03-05 11:16:16 UTC
Comment on attachment 57997 [details] [review]
ctrl-q to quit demo

Review of attachment 57997 [details] [review]:
-----------------------------------------------------------------

Ok.

::: glib/demo/main.c
@@ +370,5 @@
> +	closure = g_cclosure_new (G_CALLBACK (gtk_main_quit), NULL, NULL);
> +	gtk_accel_group_connect (gtk_accel, gdk_keyval_from_name ("q"),
> +				 GDK_CONTROL_MASK, 0, closure);
> +	g_closure_unref (closure);
> +	gtk_window_add_accel_group (GTK_WINDOW(win), gtk_accel);

hmm, I think gtk_window_add_accel_group takes a reference of the accel_group, so you should probably unref it here
Comment 7 Carlos Garcia Campos 2012-03-05 11:17:31 UTC
Feel free to push the patches, just make sure you check whether you need to unref the accel group or not. Thanks
Comment 8 Adrian Johnson 2012-03-07 03:06:49 UTC
pushed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.