CristianHenzel / ClipIt

ClipIt clipboard manager for GTK+
https://github.com/CristianHenzel/ClipIt
GNU General Public License v3.0
648 stars 84 forks source link

1.4.4: FTBFS when built using "--with-gtk3" #92

Closed onlyjob closed 5 years ago

onlyjob commented 6 years ago
main.c:544:24: error: 'GDK_Down' undeclared (first use in this function); did you mean 'XK_Down'? 
   if (event->keyval == GDK_Down || event->keyval == GDK_Up) { 
                        ^~~~~~~~ 
                        XK_Down 
main.c:544:24: note: each undeclared identifier is reported only once for each function it appears in 
main.c:544:53: error: 'GDK_Up' undeclared (first use in this function); did you mean 'GDK_OK'? 
   if (event->keyval == GDK_Down || event->keyval == GDK_Up) { 
                                                     ^~~~~~ 
                                                     GDK_OK 
main.c:552:24: error: 'GtkMenuShell {aka struct _GtkMenuShell}' has no member named 'children' 
   GList* element = menu->children; 
                        ^~ 

main.c:581:9: error: 'GtkMenuShell {aka struct _GtkMenuShell}' has no member named 'active_menu_item' 
     menu->active_menu_item = (GtkWidget *) first_match; 
         ^~ 
main.c: In function 'selected_by_digit': 
onlyjob commented 6 years ago

Fixed by #90. Please merge it.

jrrtck commented 5 years ago

Does clipit work for you after building with this patch?

On fresh Ubuntu 18.04.1, I've build clipit --with-gtk3 option. When I start it, it doesn't appear in system tray (this is Gnome 3). Installing Tray Icons extension didn't help. When I try accessing history via keyboard shortcut, nothing happens except following message in console:

(clipit:21184): GLib-GObject-CRITICAL **: 11:41:39.757: g_object_set_data: assertion 'G_IS_OBJECT (object)' failed

(clipit:21184): Gdk-CRITICAL **: 11:41:39.757: gdk_window_get_window_type: assertion 'GDK_IS_WINDOW (window)' failed

When I try opening Manage history (search) dialog via shortcut, grey rectangle appears instead and same message is repeated in console.

When I try same steps in XFCE4, clipit icon appears in system tray. Shortcuts still don't work, except:

I've noticed, that it all works, if run in parallel to clipit from distro (gtk2 built).

Sooo, anybody else having these issues?

And one last remark. Given latest HEAD replaced deprecated gtk2 functions with gtk3 variants, it is no longer possible to build with gtk2. Maybe --with-gtk3 could become default from now on?