Re: Universal Remote for CE/HA? (maemo)

2009-09-30 Thread Arto Karppinen
Jed wrote:
> Hi, anyone got some thoughts/experiences relating to this please?
> 
> Jed wrote:
>> Hi All,
>>
>> I was wondering if there's any good Universal Remote software for CE &or
>> HA being developed in this ecosystem?
>>
>> Does anyone know of anything under way or a related Linux project that
>> could be re-adapted to it?
>>
>> I have something "roughly" like this visualised... (see attached txt 
>> file)
>>
>> I have an old Axim X50v which android is being ported to atm...
>> But progress is slow so I may have to find a better supported device 
>> soon.
>>
>> Any thoughts/ideas/advice greatly appreciated!
>>
>> Cheers,
>> Jed

Have you taken a look at Irreco?

http://irreco.garage.maemo.org/


I have no idea what you mean by CE or HA, but Irreco does have a modular
backend system which you can use to write libraries to support different
control systems.




-- 
Arto Karppinen
--
arto.karppi...@iki.fi
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


g_enum_get_value_by_name

2008-12-17 Thread Arto Karppinen
Hi.

I need to save and read an enum from a GKeyFile. I was going save the 
value as a string into the keyfile and use g_enum_get_value_by_name() to 
parse the value, but i cant figure out how to get the GEnumClass parameter.

GEnumValue* g_enum_get_value_by_name(GEnumClass *enum_class, 

  const gchar *name);

Or should i be doing something else?

-- 
Arto Karppinen
--
arto.karppi...@iki.fi
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: GtkPixbuf from Char buffer

2008-10-19 Thread Arto Karppinen
This looks like what we need. Thanks.

Kemal Hadimli wrote:
>>From Maemopad+ 
>>(https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/unified/src/ui/callbacks.c?revision=94&root=maemopadplus&view=markup
> )
> 
> GdkPixbufLoader *pl = gdk_pixbuf_loader_new_with_type("png", NULL);
> GError *err = NULL;
> gdk_pixbuf_loader_write(pl, (guchar *) blob, blobsize, &err);
> f (err != NULL)
> {
> //error
> g_error_free(err);
> return;
> }
> gdk_pixbuf_loader_close(pl, NULL);
> GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf(pl);
> 
> if (GDK_IS_PIXBUF(pixbuf))
> {
> //do stuff
> }
> g_object_unref(pl);
> 
> 

-- 
Arto Karppinen
--
[EMAIL PROTECTED]
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: GtkPixbuf from Char buffer

2008-10-16 Thread Arto Karppinen
gary liquid wrote:
> arto,
> 
> have you considered caching the downloaded file to disk and reading from 
> there using the standard function?
> 
> This would give you the obvious benefit of allowing offline usage and 
> faster requerying.
> There isn't an infinite amount of memory available and having to 
> download images everytime could cause user angst.

This is about a small preview image for the complete Irreco Theme, so i 
don't feel there is any real need to cache it.

The theme will be saved to disk if the user likes the preview, and 
chooses do download the whole thing.


-- 
Arto Karppinen
--
[EMAIL PROTECTED]
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


GtkPixbuf from Char buffer

2008-10-16 Thread Arto Karppinen

Hi, were developing an application which is supposed to show user images 
downloaded from web server using xmlrpc. The problem is that we cant 
quite figure out how to create a pixbuf from a buffer which contains the 
RAW contents of a file.

Functions like:

gdk_pixbuf_new_from_data
gdk_pixbuf_new_from_inline
gdk_pixbuf_from_pixdata

all seem to expect the image to be in some particular format already, 
while what we need is more like gdk_pixbuf_new_from_file() which is able 
to autodetect everything and just read the file.

All information that our application has about the image are:
  - Name of file.
  - Size of file.
  - Contents of file.

-- 
Arto Karppinen
--
[EMAIL PROTECTED]
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Porting packages from debian

2008-04-22 Thread Arto Karppinen
If i get a debian package sources from debian website and compile it in 
Maemo, what should i do to debian/* files?

- Should i change myself as maintainer when i have no idea about the 
internals of the lib?
- Should i add something to the package version, like lib_1.2.3-mypkg1, 
or something?

What is the proper procedure here, if there is such?

-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Which SOAP library?

2008-04-03 Thread Arto Karppinen
Graham Cobb wrote:
> On Friday 28 Mar 2008, Arto Karppinen wrote:
>> The following packages have unmet dependencies:
>>   libsoup2.2-dev: Depends: libgnutls-dev (>= 1.4.0) but it is not going
>> to be installed
>> E: Broken packages
>>
>> Where do i find libgnutls-dev for maemo?
>
> It is in extras but I suspect one of its dependencies is not.  I have not 
> tested installing the -dev packages just from extras (I have tested that the 
> lib packages themselves install just from extras).  Try adding extras-devel 
> to your sources.list and try again -- I recommend that anyone doing 
> development has extras-devel in their list as it helps us all find any 
> package conflict problems early on.
>
> If that still doesn't work, use apt-get to try to install the dependency that 
> is causing the trouble (in this case libgnutls-dev) and see what error is 
> reported.  It will probably be one or more dependencies of *that* package so 
> recurse until you find the package that apt actually can't find.
>
> Let me know how you get on because it would be a good idea to fix whatever 
> the 
> dependency is that is causing the trouble.
>

These are the depencies which are not in extras, but can be found in 
extras-devel.

  libgnutls13: Depends: libopencdk10 (>= 0.6.5) but it is not installable
   Depends: libtasn1-3 (>= 0.3.4) but it is not installable


>> Also there are no x86 packages for libsoup in extras, but i guess those
>> aren't really necessary.
>
> Yes, I don't currently build x86 packages.  I hope to start doing that soon, 
> but it may be a few more weeks.

Also a source package would be nice, because libsoup has a lot of tags 
and branches in their svn. I tried to get xmlrpc-test.c working with 
your package from one of the branches, but it failed because 
soup-md5-tools.h or somesuch was missing.

What branch / tag is your package based on?

-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Which SOAP library?

2008-03-28 Thread Arto Karppinen
Graham Cobb wrote:
> On Wednesday 26 Mar 2008, Arto Karppinen wrote:
>   
>> What SOAP library would you recommend to be used in Gtk / HILDON
>> application?
>> 
>
> I cannot comment on the advantages/disadvantages of any of these except to 
> say 
> that libsoup is being used by both GPE and Opensync.  As such, I have built 
> it and uploaded it to Maemo Extras and I would expect to continue doing that 
> as long as I am supplying GPE and Opensync packages which depend on it.
>
> Graham
>
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>   

Yes, im coming to the conclusion that libsoup and its xmlrpc functions 
would probably the most Gtk'ish way of doing my stuff.

About you packages, it says:

sbox-CHINOOK_ARMEL ~ $ apt-get install libsoup2.2-dev
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  libsoup2.2-dev: Depends: libgnutls-dev (>= 1.4.0) but it is not going
to be installed
E: Broken packages

Where do i find libgnutls-dev for maemo?

Also there are no x86 packages for libsoup in extras, but i guess those aren't 
really necessary.




-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Which SOAP library?

2008-03-26 Thread Arto Karppinen
What SOAP library would you recommend to be used in Gtk / HILDON 
application?

Alternatives i have found:
- gsoap, http://www.cs.fsu.edu/~engelen/soap.html
- libsoup, http://live.gnome.org/LibSoup
- csoap, http://csoap.sourceforge.net/
- libxml?
- curl?

I'm sort of lost what would be the best way to go forward.

-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Dialogs and gtk_window_set_transient_for()

2008-02-26 Thread Arto Karppinen
Tapani Pälli wrote:
> Hello;
>
> ext Arto Karppinen wrote:
>   
>> Hi
>>
>> Im developing an app which shows modal dialogs to the user. Also the app 
>> may popup a custom error message dialog if something goes wrong. 
>> Currently i'm setting both dialog to be transient_for to my main window. 
>> This has the effect of the error dialog appearing beneath the first 
>> modal dialog..
>>
>>   
>> 
> Does the error happen due to a wrong action in the first dialog? 

The error may happen inside a subsystem which the dialog calls.

> Why
> don't you set error dialog to be transient to the modal dialog?
>
>   

Because i have two main windows, and several dialogs for both. The 
subsystem which pops up the error dialog does not have any trivial way 
of figuring out which window happens to be on top at the moment.

>> That is, the dialog which is first set to be trancient for the main 
>> window, is shown on top of any dialog which is created later.
>>
>> Which is not what i want, i want the error message dialog to be shown on 
>> top.
>>
>> Is there some way to get which dialogs are trancient for a window, or do 
>> i have to build some kind of system which keeps track of what dialogs 
>> are currently shown
>> 
>
> If you show a modal dialog, it means that you should not be able to
> access the application elsewhere before closing this dialog. It is
> probably best for you to set error dialog transient to the modal dialog.
> You might want to pass the window as parameter to the function that pops
> up the dialog so it can be changed easily.
>   

All of my dialogs take the parent dialog as a pointer. The problem is of 
scale, i have too many windows to manually write switch case or some 
other structure to select the correct parent from somewhere.

The core of the problem is that Gtk provides 
gtk_window_get_transient_for() function which you can use to iterate 
"upwards" from child windows until you get to the toplevel window.

However, Gtk does not have (as far i know), 
gtk_window_get_transient_children() or some such, which you could use to 
iterate "downwards" from toplevel window until you would reach the child 
which happens to be on top at the moment.

Currently im using g_object_set_data() to set pointer to the child 
window from the parent window so i can iterate "downwards" the window 
tree. This way i only need to know my main window, and i can iterate 
"downwards" from there until i find the dialog on top.

This is what I'm doing for now:

#define IRRECO_DLG_CHILD_DATA_KEY "IrrecoChildDialog"

void irreco_dlg_set_parent(IrrecoDlg *self, GtkWindow *parent)
{
gint depth = 0;
gpointer data;
IRRECO_ENTER
   
if (gtk_window_get_transient_for(GTK_WINDOW(self))) {
IRRECO_PRINTF("Dialog is already tracient for something.\n");
IRRECO_RETURN
}
   
/* Iterate trough child windows, until we find the one that is
   topmost on screen. */
do {
data = g_object_get_data(G_OBJECT(parent), 
IRRECO_DLG_CHILD_DATA_KEY);
if (data != NULL && GTK_IS_WINDOW(data)) {
parent = GTK_WINDOW(data);
} else {
break;
}
depth++;
} while (TRUE);
   
IRRECO_PRINTF("Number of parent dialogs on screen: %i\n", depth);
   
/* Set self as a child window. */
gtk_window_set_transient_for(GTK_WINDOW(self), parent);
g_object_set_data(G_OBJECT(parent), IRRECO_DLG_CHILD_DATA_KEY, self);
   
/* Set up cleanup event. */
g_signal_connect(G_OBJECT(self), "destroy",
G_CALLBACK(irreco_dlg_data_key_cleanup), parent);
IRRECO_RETURN
}

static void irreco_dlg_data_key_cleanup(IrrecoDlg *self, GtkWindow *parent)
{
gpointer data;
IRRECO_ENTER
   
if (G_IS_OBJECT(parent) == FALSE) IRRECO_RETURN;
   
/* Does parent have a pointer which points to this instace? */
    data = g_object_get_data(G_OBJECT(parent), IRRECO_DLG_CHILD_DATA_KEY);
if (data == NULL || data != self) IRRECO_RETURN;
   
/* Remote the pointer. */
g_object_steal_data(G_OBJECT(parent), IRRECO_DLG_CHILD_DATA_KEY);
IRRECO_RETURN
}


-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Dialogs and gtk_window_set_transient_for()

2008-02-20 Thread Arto Karppinen
Hi

Im developing an app which shows modal dialogs to the user. Also the app 
may popup a custom error message dialog if something goes wrong. 
Currently i'm setting both dialog to be transient_for to my main window. 
This has the effect of the error dialog appearing beneath the first 
modal dialog..

That is, the dialog which is first set to be trancient for the main 
window, is shown on top of any dialog which is created later.

Which is not what i want, i want the error message dialog to be shown on 
top.

Is there some way to get which dialogs are trancient for a window, or do 
i have to build some kind of system which keeps track of what dialogs 
are currently shown?



-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Packaging images into deb

2008-02-05 Thread Arto Karppinen
Guillem Jover wrote:
> Hi,
>
> On Mon, 2008-02-04 at 10:17:12 -0500, ext Levi Bard wrote:
>   
>> # Example Makefile
>> # The DESTDIR is important for dpkg
>> 
>
> This is not only for dpkg or Debian, this is how proper upstream build
> systems should behave, to ease packaging the software. It allows to
> install in a different directory than the one it was built for, so
> that you can relocate when creating the packages.
>   

I implemeted this. Works now. Thanks.

-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: is this the future for gnome apps?

2007-09-06 Thread Arto Karppinen
pancake wrote:
> http://live.gnome.org/Vala
>
> Looks like there's support for Hildon too x)
>
>   http://live.gnome.org/Vala/HildonSample
>
> --pancake
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>   
I sure as hell hope so. Writing gtk / gobject stuff in plain c contains 
so much boiler plate code. 

Since vala will be generate c code, to me it looks like it takes the 
fast speed and low overhead of C and combines it with high level 
programming language. Hopefully that means that i can write apps without 
boiler plate code and get good performance. I really, really hope that 
something good will come out of it.


-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Eclipse & the IDEs

2007-06-29 Thread Arto Karppinen
Kate Alhola wrote:
> I can't argue about any other users love at all. Eclipse has really
> many good things in it and one important is that it is cross platform
> tool. It makes migrating from one environment to other easier than
> learning completely new tools.
>   
Well, i cant disagree with that. So i guess Eclipse isnt all bad. Just 
wanted to speak my mind. :)

-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Eclipse & the IDEs

2007-06-29 Thread Arto Karppinen
Kate Alhola wrote:
> There just happens to be many that prefer eclipse and
> when there is large commercial developers using it, it
> needs to be supported. It just happens to be a tool chosen
> by Nokia for Symbian development.
>   
So which one is it? The tool preferred by developers or the tool chosen 
by Nokia. This is actually the whole point of this thread in the end. Do 
developers use Eclipse because they want to, or because they have to?

If developers use Eclipse because they want to, then your point about 
Eclipse & Maemo is valid.

But if developers use Eclipse because they have to, then your whole 
point about "Many mobile developers want to use Eclipse everywhere" is 
rubbish.

And i must say that i strongly feel that you mix market penetration with 
user satisfaction. I had to use Carbide / Eclipse because Nokia pushed 
it. Id did NOT use it because i wanted it, because lets face it, there 
isnt that many other IDEs around for Nokia phones. Code Warrior comes to 
mind, but thats more expensive than Carbide.

So i think this is more about Nokia policy, than about doing what 
developers like.

It not that im specially against Eclipse & Maemo. Its just that i dont 
believe that Eclipse is such a loved IDE as you seem to assume it is.

-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Eclipse & the IDEs

2007-06-28 Thread Arto Karppinen
Andreas Orfanos wrote:
> Eclipse is very slow. I tried to move to Eclipse 3.2 my development
> process. But it didn't work for me. Creating projects with
> a few thousand files I managed to crash Eclipse a few times. It was
> unworkable IDE.
I agree, i had to use Carbide.C++ for 6 months for a student work i did 
for a company. And i must say i DONT want use it again.

Question: What do you get when you combine Java programming environment 
made with Java, and a half functional C++ plugin to it?

Answer: Slow and poorly functioning IDE.

My recommendation: Go with Anjuta. To me as a programmer it is not 
important whether i know the IDE before hand, most IDE's are pretty 
similar in the end. What is REALLY REALLY REALLY important is that it 
WORKS!. And Carbide / Eclipse doesnt. Not for C++. The really important 
thing is that Anjuta is designed for GTK + C, and that the GTK people 
seem to be heading that way. What Maemo should do is to go with the 
flow, not to whander or somewhere else.

-- 
Arto Karppinen
--
[EMAIL PROTECTED]

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers