libDesktop API update
This commit is contained in:
parent
ae268b2ff6
commit
99762e8b25
|
@ -1,5 +1,5 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/* Copyright (c) 2012 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) 2012-2013 Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS Desktop Panel */
|
/* This file is part of DeforaOS Desktop Panel */
|
||||||
/* This program is free software: you can redistribute it and/or modify
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -208,7 +208,9 @@ static int _embed_on_idle(gpointer data)
|
||||||
g_object_ref(embed->vbox);
|
g_object_ref(embed->vbox);
|
||||||
gtk_container_add(GTK_CONTAINER(embed->window), embed->vbox);
|
gtk_container_add(GTK_CONTAINER(embed->window), embed->vbox);
|
||||||
gtk_widget_show(embed->vbox);
|
gtk_widget_show(embed->vbox);
|
||||||
desktop_message_register(PANEL_CLIENT_MESSAGE,
|
/* listen to desktop messages */
|
||||||
|
gtk_widget_realize(embed->window);
|
||||||
|
desktop_message_register(embed->window, PANEL_CLIENT_MESSAGE,
|
||||||
_embed_on_desktop_message, embed);
|
_embed_on_desktop_message, embed);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/* Copyright (c) 2011-2012 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) 2011-2013 Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS Desktop Panel */
|
/* This file is part of DeforaOS Desktop Panel */
|
||||||
/* This program is free software: you can redistribute it and/or modify
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -134,9 +134,6 @@ static Keyboard * _keyboard_init(PanelAppletHelper * helper,
|
||||||
_keyboard_on_toggled), keyboard);
|
_keyboard_on_toggled), keyboard);
|
||||||
image = gtk_image_new_from_icon_name(applet.icon, helper->icon_size);
|
image = gtk_image_new_from_icon_name(applet.icon, helper->icon_size);
|
||||||
gtk_container_add(GTK_CONTAINER(keyboard->button), image);
|
gtk_container_add(GTK_CONTAINER(keyboard->button), image);
|
||||||
/* FIXME de-register on destroy */
|
|
||||||
desktop_message_register(KEYBOARD_CLIENT_MESSAGE, _keyboard_on_message,
|
|
||||||
keyboard);
|
|
||||||
gtk_widget_show_all(keyboard->button);
|
gtk_widget_show_all(keyboard->button);
|
||||||
keyboard->source = g_idle_add(_init_idle, keyboard);
|
keyboard->source = g_idle_add(_init_idle, keyboard);
|
||||||
*widget = keyboard->button;
|
*widget = keyboard->button;
|
||||||
|
@ -195,6 +192,10 @@ static gboolean _init_idle(gpointer data)
|
||||||
_keyboard_on_removed), NULL);
|
_keyboard_on_removed), NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(keyboard->window), keyboard->socket);
|
gtk_container_add(GTK_CONTAINER(keyboard->window), keyboard->socket);
|
||||||
gtk_widget_show(keyboard->socket);
|
gtk_widget_show(keyboard->socket);
|
||||||
|
/* listen to desktop messages */
|
||||||
|
gtk_widget_realize(keyboard->window);
|
||||||
|
desktop_message_register(keyboard->window, KEYBOARD_CLIENT_MESSAGE,
|
||||||
|
_keyboard_on_message, keyboard);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/* Copyright (c) 2011-2012 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) 2011-2013 Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS Desktop Panel */
|
/* This file is part of DeforaOS Desktop Panel */
|
||||||
/* This program is free software: you can redistribute it and/or modify
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -139,5 +139,6 @@ static void _on_screen_changed(GtkWidget * widget, GdkScreen * previous)
|
||||||
{
|
{
|
||||||
if(previous != NULL)
|
if(previous != NULL)
|
||||||
return;
|
return;
|
||||||
desktop_message_register(PHONE_EMBED_MESSAGE, _on_message, widget);
|
desktop_message_register(widget, PHONE_EMBED_MESSAGE, _on_message,
|
||||||
|
widget);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user