! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Port xfce4-clipman-plugin to libxfce4ui and GtkBuilder
Status:
CLOSED: FIXED
Product:
Xfce4-clipman-plugin
Component:
General

Comments

Description Matias De lellis 2010-11-18 00:24:15 CET
Attach patch to port xfce4-clipman-plugin to libxfce4ui and GtkBuilder.

Please review.

Tested in fedora 14 over xfce 4.8pre1.
Comment 1 Matias De lellis 2010-11-18 00:25:27 CET
Created attachment 3194 
Port to gtkbuilder and libxfce4ui
Comment 2 Matias De lellis 2010-11-19 16:48:38 CET
Created attachment 3196 
Port xfce4-clipman-plugin to libxfce4ui, gtkbuilder, and exo-1 to xfce 4.8

A better patch.
Fixed various warning and horror in the previous patch.

Now everything should work correctly in xfce 4.8pre1
Comment 3 Mike Massonnet editbugs 2010-11-21 14:05:48 CET
Some first notes:
- Keep your changes committed
  -> always run git commit to save your changes, don't just join the diff of your current changes.
  -> basically, commit with a message log, than I only have to run "git am" to include your changes with your email and message log.
  -> once changes are committed, create a patch for you commit with the command "git format-patch", for example "git format-patch -1" will create a patch for the last commit, -2 for the two last commits etc.
- You can work on your commits
  -> To work on the last commit run "git reset --soft"
  -> To /squash/ two commits into one use "git rebase -i 2"

I'm not sure if you already know about some of these features, so here they are in all cases :)

Second, the patch looks very clean to me, except the syntax for the function calls, the space is not always respected. Sometimes they are like in the code e.g. "function (foo (bar));" but other times "function(foo(bar));", it's important to keep this consistent.

Other remarks:
- make sure to not commit an empty pot file (po/xfce4-clipman-plugin.pot).
- in the file main-panel-plugin.c(panel_plugin_set_size), it is possible to replace the GtkImage with XfcePanelImage from the new API of xfce4-panel.
  -> http://foo-projects.org/~nick/docs/libxfce4panel/libxfce4panel-xfce-panel-image.html#libxfce4panel-xfce-panel-image.description

That's roughly about it :)


Now while running the plugin I received the following warnings:

(xfce4-clipman-plugin:32313): Gtk-CRITICAL **: IA__gtk_image_get_pixbuf: assertion `image->storage_type == GTK_IMAGE_PIXBUF || image->storage_type == GTK_IMAGE_EMPTY' failed

(xfce4-clipman-plugin:32313): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `GDK_IS_PIXBUF (src)' failed

(xfce4-clipman-plugin:32313): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

After a quick look, replace "GTK_STOCK_PASTE" (the string) against GTK_STOCK_PASTE (this pre-processing constant is defined inside the GTK+ headers). Better, the whole size-changed callback can be dropped and replaced with XfcePanelImage.
Comment 4 Mike Massonnet editbugs 2010-11-21 14:07:30 CET
Created attachment 3199 
Drop-sige-changed-signal-and-use-XfcePanelImage-for-.patch

Patch over yours (attachment 3196 ) to use XfcePanelImage.
Comment 5 Matias De lellis 2010-11-21 16:58:30 CET
Created attachment 3200 
Port to gtkbuilder and libxfce4ui

Add your patch.
Respect spaces.
Remove some useless GTK_WIDGET and G_OBJECT casting.
Remove useless button variable.
Now requires libxfce4panel >= 4.7.0
No commit an empty pot file.

Thanks for your advice.
Comment 6 Matias De lellis 2010-11-21 17:12:01 CET
Created attachment 3201 
Port xfce4-clipman-plugin to libxfce4ui, gtkbuilder, and exo-1 to xfce 4.8

Sorry.

On previous changes now also:
More respect for the spaces.
Depend on gtk >= 2.12 necessary to gtk_builder_* ()
Comment 7 Mike Massonnet editbugs 2011-05-07 15:15:56 CEST
commited in git, 4b08db

Bug #6853

Reported by:
Matias De lellis
Reported on: 2010-11-18
Last modified on: 2012-04-09

People

Assignee:
Mike Massonnet
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information