Skip to contentSkip to conversation

Any glfer users?

DISCUSSION Al Scanandoah 3 participants 5 messages Apr 16, 2006 – Apr 17, 2006

lore
Share & tools
lore
#0 lore raw

Hello

I'm trying to get glfer up and running on my SuSE 10.0 system, but am having little luck. As best I can tell, I've got all the dependencies in place and configure runs without errors. However, when I run make, it screeches to a halt with the following:

al@linux:~/glfer-0.3.4> make
make all-am
make[1]: Entering directory `/home/al/glfer-0.3.4'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -ggdb -O2 -Wall -MT g_main.o -MD -MP -MF ".deps/g_main.Tpo" -c -o g_main.o g_main.c; \
then mv -f ".deps/g_main.Tpo" ".deps/g_main.Po"; else rm -f ".deps/g_main.Tpo"; exit 1; fi
In file included from g_main.c:34:
g_save_image.h:25: error: conflicting types for ‘gdk_pixbuf_get_from_drawable’
/opt/gnome/include/gtk-2.0/gdk/gdkpixbuf.h:97: error: previous declaration of ‘gdk_pixbuf_get_from_drawable’ was here
g_main.c: In function ‘get_main_menu’:
g_main.c:151: warning: implicit declaration of function ‘gtk_accel_group_attach’
g_main.c: In function ‘spect_save_ok’:
g_main.c:182: warning: assignment discards qualifiers from pointer target type
g_main.c:191: warning: pointer targets in passing argument 3 of ‘write_jpeg_file’ differ in signedness
g_main.c:195: warning: pointer targets in passing argument 3 of ‘write_jpeg_file’ differ in signedness
g_main.c: In function ‘open_file_ok’:
g_main.c:206: warning: assignment discards qualifiers from pointer target type
g_main.c: In function ‘save_full_pixmap’:
g_main.c:1037: warning: pointer targets in passing argument 3 of ‘write_jpeg_file’ differ in signedness
make[1]: *** [g_main.o] Error 1
make[1]: Leaving directory `/home/al/glfer-0.3.4'
make: *** [all] Error 2
al@linux:~/glfer-0.3.4>

Has anyone encountered this before?

Al, K2ZN
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 11 lines · Al Scanandoah

g_main.c: In function ‘save_full_pixmap’:
g_main.c:1037: warning: pointer targets in passing argument 3 of ‘write_jpeg_file’ differ in signedness
make[1]: *** [g_main.o] Error 1
make[1]: Leaving directory `/home/al/glfer-0.3.4'
make: *** [all] Error 2
al@linux:~/glfer-0.3.4>

Has anyone encountered this before?

This compiles just fine on my mandrake system... but I have seen this error before
change the define of write_jpeg_file in g_save_image.h and g_save_image.c
from (char *filename, int quality, char *image_buffer, int image_width, int image_height)
to (char *filename, int quality, guchar *image_buffer, int
image_width, int image_height)

and it should work

--
Alex / AB2RC
[email protected]

-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

It looks like it may be getting closer, but still no cigar. The error messages have changed.

I didn't have any problems with glfer back when I ran Mandrake, but I could never get all my HW to play well together.

al@linux:~/glfer-0.3.4> make
make all-am
make[1]: Entering directory `/home/al/glfer-0.3.4'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -ggdb -O2 -Wall -MT g_main.o -MD -MP -MF ".deps/g_main.Tpo" -c -o g_main.o g_main.c; \
then mv -f ".deps/g_main.Tpo" ".deps/g_main.Po"; else rm -f ".deps/g_main.Tpo"; exit 1; fi
In file included from g_main.c:34:
g_save_image.h:25: error: conflicting types for ‘gdk_pixbuf_get_from_drawable’
/opt/gnome/include/gtk-2.0/gdk/gdkpixbuf.h:97: error: previous declaration of ‘gdk_pixbuf_get_from_drawable’ was here
g_main.c: In function ‘get_main_menu’:
g_main.c:151: warning: implicit declaration of function ‘gtk_accel_group_attach’
g_main.c: In function ‘spect_save_ok’:
g_main.c:182: warning: assignment discards qualifiers from pointer target type
g_main.c: In function ‘open_file_ok’:
g_main.c:206: warning: assignment discards qualifiers from pointer target type
make[1]: *** [g_main.o] Error 1
make[1]: Leaving directory `/home/al/glfer-0.3.4'
make: *** [all] Error 2
al@linux:~/glfer-0.3.4>

Quoted 12 lines · Alex Flinsch
Quoted 9 lines · Al Scanandoah

g_main.c: In function ‘save_full_pixmap’:
g_main.c:1037: warning: pointer targets in passing argument 3 of ‘write_jpeg_file’ differ in signedness make[1]: *** [g_main.o] Error 1
make[1]: Leaving directory `/home/al/glfer-0.3.4'
make: *** [all] Error 2
al@linux:~/glfer-0.3.4>

Quoted 16 lines
Quoted 1 line

Has anyone encountered this before?

This compiles just fine on my mandrake system... but I have seen this error before change the define of write_jpeg_file in g_save_image.h and g_save_image.c from (char *filename, int quality, char *image_buffer, int image_width, int image_height)
to (char *filename, int quality, guchar *image_buffer, int image_width, int image_height)

and it should work

Signature · 2 lines
Alex / AB2RC
[email protected]

-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Op zo, 16-04-2006 te 18:32 -0400, schreef Al Scanandoah:

Quoted 2 lines

It looks like it may be getting closer, but still no cigar. The error messages have changed.

You can't compile glfer against version 2.0 of the GTK+ libraries. It is an application written for version 1.2 of these libraries. In order to get it working with GTK+-2.0 you need the attached patch.

I have sent this to the glfer author a while back, but he never replied to my mail...

Regards,
Joop PG4I

g_about.c +12 -8
diff -u -r glfer-0.3.4/g_about.c glfer-0.3.4gtk2/g_about.c
@@ -464,7 +464,9 @@
 void show_license(GtkWidget * widget, gpointer data)
 {
   static GdkFont *font = NULL;
-  GtkWidget *bu, *hb, *te, *sb;
+  GtkWidget *bu, *hb, *te, *sw;
+  GtkTextBuffer *b;
+  GtkTextIter end;
 
   if (license_dialog && license_dialog->window) {
     gdk_window_show(license_dialog->window);
@@ -492,15 +494,15 @@
   gtk_box_pack_start(GTK_BOX(GTK_DIALOG(license_dialog)->vbox), hb, TRUE, TRUE, 0);
   gtk_widget_show(hb);
 
-  te = gtk_text_new(NULL, NULL);
+  sw = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show(sw);
+  te = gtk_text_view_new();
+  gtk_container_add (GTK_CONTAINER (sw), te);
   gtk_widget_set_usize(te, 81 * gdk_char_width(font, ' '), 400);
-  gtk_text_set_word_wrap(GTK_TEXT(te), FALSE);
+  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (te), GTK_WRAP_WORD);
   gtk_box_pack_start(GTK_BOX(hb), te, TRUE, TRUE, 0);
   gtk_widget_show(te);
-
-  sb = gtk_vscrollbar_new(GTK_TEXT(te)->vadj);
-  gtk_box_pack_start(GTK_BOX(hb), sb, FALSE, FALSE, 0);
-  gtk_widget_show(sb);
+  gtk_box_pack_start(GTK_BOX(hb), sw, FALSE, FALSE, 0);
 
   bu = gtk_button_new_with_label("Ok");
   gtk_tooltips_set_tip(glfer.tt, bu, "Close window", NULL);
@@ -511,5 +513,7 @@
   gtk_widget_show(bu);
 
   gtk_widget_show(license_dialog);
-  gtk_text_insert(GTK_TEXT(te), font, NULL, NULL, gpl_text, strlen(gpl_text));
+  b = gtk_text_view_get_buffer (GTK_TEXT_VIEW (te));
+  gtk_text_buffer_get_end_iter (b, &end);
+  gtk_text_buffer_insert (b, &end, gpl_text, -1);
 }
g_main.c +3 -3
diff -u -r glfer-0.3.4/g_main.c glfer-0.3.4gtk2/g_main.c
@@ -148,7 +148,7 @@
     gtk_widget_set_sensitive(glfer.test_menu_item, FALSE);
   }
 
-  gtk_accel_group_attach(accel_group, GTK_OBJECT(window));
+  gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
 
   if (menu_bar)
     *menu_bar = gtk_item_factory_get_widget(item_factory, "<main>");
@@ -468,7 +468,7 @@
   D(printf("x_left = %f, y_top = %f, x_right = %f, y_bottom = %f\n", x_left, y_top, x_right, y_bottom));	/* for debug */
 
   if (event->button == 1) {
-    pixels = gdk_pixbuf_get_from_drawable(pixels, pixmap, gdk_rgb_get_cmap(), x_left, y_top, sel_width, sel_height);
+    pixels = mygdk_pixbuf_get_from_drawable(pixels, pixmap, gdk_rgb_get_cmap(), x_left, y_top, sel_width, sel_height);
     save_spect_dialog(widget, NULL);
   }
 }
@@ -1033,7 +1033,7 @@
   guchar *pixels = NULL;
   int quality = 75;
 
-  pixels = gdk_pixbuf_get_from_drawable(pixels, pixmap, gdk_rgb_get_cmap(), 0, 0, pixmap_width, pixmap_height);
+  pixels = mygdk_pixbuf_get_from_drawable(pixels, pixmap, gdk_rgb_get_cmap(), 0, 0, pixmap_width, pixmap_height);
   write_jpeg_file("glfer.jpg", quality, pixels, pixmap_width, pixmap_height);
 }
 
g_save_image.c +2 -1
diff -u -r glfer-0.3.4/g_save_image.c glfer-0.3.4gtk2/g_save_image.c
@@ -229,7 +229,8 @@
  * the latter case, NULL will be returned if not enough memory could be
  * allocated for the pixbuf to be created.
  **/
-guchar *gdk_pixbuf_get_from_drawable(guchar * dest, GdkDrawable * src, GdkColormap * cmap, int src_x, int src_y, int width, int height)
+
+guchar *mygdk_pixbuf_get_from_drawable(guchar * dest, GdkDrawable * src, GdkColormap * cmap, int src_x, int src_y, int width, int height)
 {
   GdkWindowType window_type;
   int src_width, src_height;
g_save_image.h +1 -1
diff -u -r glfer-0.3.4/g_save_image.h glfer-0.3.4gtk2/g_save_image.h
@@ -22,7 +22,7 @@
 
 #include <gtk/gtk.h>
 
-guchar *gdk_pixbuf_get_from_drawable(guchar * dest, GdkDrawable * src, GdkColormap * cmap, int src_x, int src_y, int width, int height);
+guchar *mygdk_pixbuf_get_from_drawable(guchar * dest, GdkDrawable * src, GdkColormap * cmap, int src_x, int src_y, int width, int height);
 
 int write_jpeg_file(char *filename, int quality, char *image_buffer, int image_height, int image_width);
 
#4 lore raw

That took care of it, thank you very much!

Al, K2ZN

Quoted 14 lines · Joop Stakenborg

Op zo, 16-04-2006 te 18:32 -0400, schreef Al Scanandoah:

Quoted 1 line

It looks like it may be getting closer, but still no cigar. The error messages have changed.

You can't compile glfer against version 2.0 of the GTK+ libraries. It is an application written for version 1.2 of these libraries. In order to get it working with GTK+-2.0 you need the attached patch.

I have sent this to the glfer author a while back, but he never replied to my mail...

Regards,
Joop PG4I