Bug 46948 - Glib patches
Summary: Glib patches
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-04 00:26 UTC by Adrian Johnson
Modified: 2012-03-07 03:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
add poppler_fonts_iter_get_encoding (2.48 KB, patch)
2012-03-04 00:26 UTC, Adrian Johnson
Details | Splinter Review
show encoding in demo (1.67 KB, patch)
2012-03-04 00:32 UTC, Adrian Johnson
Details | Splinter Review
ctrl-q to quit demo (1.21 KB, patch)
2012-03-04 00:33 UTC, Adrian Johnson
Details | Splinter Review

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.