|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
failing of object initializingHey there,
Since the change from thunar-vfs to GIO i'm getting back in touch with Thunar. I'm trying to create a plugin for thunar. I've tried making a new object with a window in it but this seems to be failing all the time. The creation of the object i tried as followed: #ifndef __THUNAR_TA_WINDOW_H__ #define __THUNAR_TA_WINDOW_H__ #include <thunarx/thunarx.h> G_BEGIN_DECLS; typedef struct _ThunarTaWindowClass ThunarTaWindowClass; typedef struct _ThunarTaWindow ThunarTaWindow; #define THUNAR_TA_TYPE_WINDOW (thunar_ta_window_get_type ()) #define THUNAR_TA_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_TA_TYPE_WINDOW, ThunarTaWindow)) #define THUNAR_TA_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_TA_TYPE_WINDOW, ThunarTaWindowClass)) #define THUNAR_TA_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_TA_TYPE_WINDOW)) #define THUNAR_TA_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_TA_TYPE_WINDOW)) #define THUNAR_TA_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_TA_TYPE_WINDOW, ThunarTaWindowClass)) GType thunar_ta_window_get_type (void) G_GNUC_CONST; void thunar_ta_window_register_type (ThunarxProviderPlugin *plugin); G_END_DECLS; #endif /* !__THUNAR_TA_WINDOW_H__ */ #ifdef HAVE_CONFIG_H #include <config.h> #endif //// #include "ta-window.h" static void thunar_ta_window_response(GtkDialog *, gint); static gboolean thunar_ta_window_key_press_event (GtkWidget *, GdkEventKey *); struct _ThunarTaWindowClass { GtkDialogClass __parent__; }; struct _ThunarTaWindow { GtkDialog __parent__; }; THUNARX_DEFINE_TYPE (ThunarTaWindow, thunar_ta_window, GTK_TYPE_DIALOG); static void thunar_ta_window_class_init (ThunarTaWindowClass *klass) { } static void thunar_ta_window_init (ThunarTaWindow *ta_window) { //window things } ///// so when doing: dialog = g_object_new (THUNAR_TA_TYPE_WINDOW, NULL); it gives a (lt-Thunar:9832): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed What is wron with the creation of object? -- Kees _______________________________________________ Xfce4-dev mailing list Xfce4-dev@... http://foo-projects.org/mailman/listinfo/xfce4-dev |
|
|
Re: failing of object initializingOn Wed, Oct 21, 2009 at 9:40 AM, Kees Scherpenhuijzen <noik00@...> wrote:
> Hey there, > > Since the change from thunar-vfs to GIO i'm getting back in touch with > Thunar. I'm trying to create a plugin for thunar. > I've tried making a new object with a window in it but this seems to > be failing all the time. Hi, please be more specific. How does it fail? It does not compile? If it does, do you get runtime output on the console? > The creation of the object i tried as followed: It would be more useful if you would upload these files somewhere and include the URL, or possibly attach the files, instead of adding them to the email text. And just out of curiosity, what task is your plugin going to perform? ~David _______________________________________________ Xfce4-dev mailing list Xfce4-dev@... http://foo-projects.org/mailman/listinfo/xfce4-dev |
|
|
Re: failing of object initializing2009/10/21 David Mohr <squisher@...>:
> On Wed, Oct 21, 2009 at 9:40 AM, Kees Scherpenhuijzen <noik00@...> wrote: >> Hey there, >> >> Since the change from thunar-vfs to GIO i'm getting back in touch with >> Thunar. I'm trying to create a plugin for thunar. >> I've tried making a new object with a window in it but this seems to >> be failing all the time. > > Hi, > please be more specific. How does it fail? It does not compile? If it > does, do you get runtime output on the console? > >> The creation of the object i tried as followed: > > It would be more useful if you would upload these files somewhere and > include the URL, or possibly attach the files, instead of adding them > to the email text. > > And just out of curiosity, what task is your plugin going to perform? > > ~David > _______________________________________________ > Xfce4-dev mailing list > Xfce4-dev@... > http://foo-projects.org/mailman/listinfo/xfce4-dev > I'm sorry for not including a link to the app. I'm waiting for mij SVN update to get clearance on the GIT again. then i will upload it again. But the app is compiling fully without any problems. On runtime when i *click* on a button where this window is made, it gives this error: (lt-Thunar:9832): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed -- Kees _______________________________________________ Xfce4-dev mailing list Xfce4-dev@... http://foo-projects.org/mailman/listinfo/xfce4-dev |
|
|
Re: failing of object initializingDid you added the thunar_ta_window_register_type function to
thunar_extension_initialize? Nick _______________________________________________ Xfce4-dev mailing list Xfce4-dev@... http://foo-projects.org/mailman/listinfo/xfce4-dev |
|
|
Re: failing of object initializing2009/10/22 Nick Schermer <nickschermer@...>:
> Did you added the thunar_ta_window_register_type function to > thunar_extension_initialize? > > Nick > _______________________________________________ > Xfce4-dev mailing list > Xfce4-dev@... > http://foo-projects.org/mailman/listinfo/xfce4-dev > If i read correclty the function THUNARX_DEFINE_TYPE()[1] will implement those. So i think the functions are added. [1] http://www.xfce.org/documentation/4.6/api/thunarx/ThunarxProviderPlugin.html#THUNARX-DEFINE-TYPE:CAPS -- Kees _______________________________________________ Xfce4-dev mailing list Xfce4-dev@... http://foo-projects.org/mailman/listinfo/xfce4-dev |
|
|
Re: failing of object initializing2009/10/22 Kees Scherpenhuijzen <noik00@...>:
> 2009/10/22 Nick Schermer <nickschermer@...>: >> Did you added the thunar_ta_window_register_type function to >> thunar_extension_initialize? >> >> Nick >> _______________________________________________ >> Xfce4-dev mailing list >> Xfce4-dev@... >> http://foo-projects.org/mailman/listinfo/xfce4-dev >> > > If i read correclty the function THUNARX_DEFINE_TYPE()[1] will > implement those. So i think the functions are added. > > [1] http://www.xfce.org/documentation/4.6/api/thunarx/ThunarxProviderPlugin.html#THUNARX-DEFINE-TYPE:CAPS THUNARX_DEFINE_TYPE will create the function for you, you have to call it in thunar_extension_initialize. Look at an existing plugin and you'll see. Nick _______________________________________________ Xfce4-dev mailing list Xfce4-dev@... http://foo-projects.org/mailman/listinfo/xfce4-dev |
| Free embeddable forum powered by Nabble | Forum Help |