Commit 73d7fbed authored by Michael Natterer's avatar Michael Natterer 😴

plug-ins: port file-pdf-load to GimpUnitComboBox and build it again

parent 16f5727e
......@@ -130,6 +130,8 @@
/file-pat.exe
/file-pcx
/file-pcx.exe
/file-pdf-load
/file-pdf-load.exe
/file-pdf-save
/file-pdf-save.exe
/file-pix
......
......@@ -107,6 +107,7 @@ libexec_PROGRAMS = \
$(FILE_MNG) \
file-pat \
file-pcx \
$(FILE_PDF_LOAD) \
$(FILE_PDF_SAVE) \
file-pix \
$(FILE_PNG) \
......@@ -192,6 +193,7 @@ EXTRA_PROGRAMS = \
file-aa \
file-jp2-load \
file-mng \
file-pdf-load \
file-pdf-save \
file-png \
file-psp \
......@@ -1270,6 +1272,26 @@ file_pcx_LDADD = \
$(INTLLIBS) \
$(file_pcx_RC)
file_pdf_load_CFLAGS = $(POPPLER_CFLAGS)
file_pdf_load_SOURCES = \
file-pdf-load.c
file_pdf_load_LDADD = \
$(libgimpui) \
$(libgimpwidgets) \
$(libgimpmodule) \
$(libgimp) \
$(libgimpmath) \
$(libgimpconfig) \
$(libgimpcolor) \
$(libgimpbase) \
$(GTK_LIBS) \
$(POPPLER_LIBS) \
$(RT_LIBS) \
$(INTLLIBS) \
$(file_pdf_load_RC)
file_pdf_save_CFLAGS = $(CAIRO_PDF_CFLAGS)
file_pdf_save_SOURCES = \
......
......@@ -1147,6 +1147,7 @@ gimp_resolution_entry_new (const gchar *width_label,
GimpUnit initial_unit)
{
GimpResolutionEntry *gre;
GtkTreeModel *model;
gre = g_object_new (GIMP_TYPE_RESOLUTION_ENTRY, NULL);
......@@ -1170,13 +1171,17 @@ gimp_resolution_entry_new (const gchar *width_label,
gtk_widget_show (gre->x.spinbutton);
gre->unitmenu = gimp_unit_menu_new (_("pixels/%s"), initial_unit,
FALSE, FALSE,
TRUE);
gre->unitmenu = gimp_unit_combo_box_new ();
model = gtk_combo_box_get_model (GTK_COMBO_BOX (gre->unitmenu));
gimp_unit_store_set_has_pixels (GIMP_UNIT_STORE (model), FALSE);
gimp_unit_store_set_has_percent (GIMP_UNIT_STORE (model), FALSE);
gimp_unit_combo_box_set_active (GIMP_UNIT_COMBO_BOX (gre->unitmenu),
initial_unit);
gtk_table_attach (GTK_TABLE (gre), gre->unitmenu,
3, 4, 3, 4,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
g_signal_connect (gre->unitmenu, "unit-changed",
g_signal_connect (gre->unitmenu, "changed",
G_CALLBACK (gimp_resolution_entry_unit_callback),
gre);
gtk_widget_show (gre->unitmenu);
......@@ -1416,7 +1421,7 @@ gimp_resolution_entry_unit_callback (GtkWidget *widget,
{
GimpUnit new_unit;
new_unit = gimp_unit_menu_get_unit (GIMP_UNIT_MENU (widget));
new_unit = gimp_unit_combo_box_get_active (GIMP_UNIT_COMBO_BOX (widget));
if (gre->unit != new_unit)
gimp_resolution_entry_update_unit (gre, new_unit);
......
......@@ -62,6 +62,7 @@ file_jp2_load_RC = file-jp2-load.rc.o
file_mng_RC = file-mng.rc.o
file_pat_RC = file-pat.rc.o
file_pcx_RC = file-pcx.rc.o
file_pdf_load_RC = file-pdf-load.rc.o
file_pdf_save_RC = file-pdf-save.rc.o
file_pix_RC = file-pix.rc.o
file_png_RC = file-png.rc.o
......
......@@ -66,7 +66,7 @@
'file-pix' => { ui => 1 },
'file-png' => { ui => 1, optional => 1, libs => 'PNG_LIBS', cflags => 'PNG_CFLAGS' },
'file-pnm' => { ui => 1 },
# 'file-pdf-load' => { ui => 1, optional => 1, libs => 'POPPLER_LIBS', cflags => 'POPPLER_CFLAGS' },
'file-pdf-load' => { ui => 1, optional => 1, libs => 'POPPLER_LIBS', cflags => 'POPPLER_CFLAGS' },
'file-pdf-save' => { ui => 1, optional => 1, libs => 'CAIRO_PDF_LIBS', cflags => 'CAIRO_PDF_CFLAGS' },
'file-ps' => { ui => 1 },
'file-psp' => { ui => 1, optional => 1, libs => 'Z_LIBS' },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment