key values on key pressed

2013-11-22 Thread Sergei Kolomeeyets
Hi,
to write a trivial key-press handler like the following:

static gboolean key_pressed (GtkWidget *area, GdkEventKey *event, GPtrArray
*ptLinePoints)
{
  GError *error;
  guint tt;

 if (event-keyval == GDK_Delete) {
...
  }

 if (event-keyval == GDK_Return) {
...
   }

  return FALSE;
}

one can use predefined constants from gdk/gdkkeysyms.h. Is there anybody
who could tell me what all those constants written in the file mean (except
the most explicit ones like GDK_Delete or similar)?  The question about the
possible meaning of GDK_KP_Enter, for instance, drivers me up the wall
really. I'm actually able to guess the meaning of Enter and GDK,,, But
what does that KP mean? Of course, the question is not about only one
constant, but about the whole set of names which is in the file. Who knows
it or where can I get the description for them?

In particulary, I badly need to use Alt+... and Ctrl+... combinations.
It would be very appreciated if someone throw a hint to me at least
relating to hexes for such combinations.
Tricks like
tt = event-keyval;
g_print (%h, tt);
give nothing.

Thanks!
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: key values on key pressed

2013-11-22 Thread Chris Angelico
On Sat, Nov 23, 2013 at 2:39 AM, Sergei Kolomeeyets
kolomeey...@gmail.com wrote:
 The question about the
 possible meaning of GDK_KP_Enter, for instance, drivers me up the wall
 really. I'm actually able to guess the meaning of Enter and GDK,,, But
 what does that KP mean?

Keypad. That would be the enter key on the numeric keypad as opposed
to the one near the alphabetic keys (which is often called Return).

ChrisA
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: key values on key pressed

2013-11-22 Thread Olivier Brunel
On 11/22/13 16:39, Sergei Kolomeeyets wrote:
 Hi,
 to write a trivial key-press handler like the following:
 
 static gboolean key_pressed (GtkWidget *area, GdkEventKey *event, GPtrArray
 *ptLinePoints)
 {
   GError *error;
   guint tt;
 
  if (event-keyval == GDK_Delete) {
 ...
   }
 
  if (event-keyval == GDK_Return) {
 ...
}
 
   return FALSE;
 }
 
 one can use predefined constants from gdk/gdkkeysyms.h. Is there anybody
 who could tell me what all those constants written in the file mean (except
 the most explicit ones like GDK_Delete or similar)?  The question about the
 possible meaning of GDK_KP_Enter, for instance, drivers me up the wall
 really. I'm actually able to guess the meaning of Enter and GDK,,, But
 what does that KP mean? Of course, the question is not about only one

I believe it stands for KeyPad, for the other Enter key by the, well,
keypad.

 constant, but about the whole set of names which is in the file. Who knows
 it or where can I get the description for them?
 
 In particulary, I badly need to use Alt+... and Ctrl+... combinations.
 It would be very appreciated if someone throw a hint to me at least
 relating to hexes for such combinations.
 Tricks like
 tt = event-keyval;
 g_print (%h, tt);
 give nothing.

Maybe try: g_print (%s, gdk_keyval_name (event-keyval));
Also for Ctrl/Alt/etc those are modifiers, you should check event-state

-j

 
 Thanks!
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GTK+ 3.6.4 not working for vc 2010 because of inline

2013-11-22 Thread jack zhu
Issue:
The application works fine for GTK2 and have issue for GTK3。Most caused by
improper inline macro defination.

Solution:
1 /Dinline= not working as in link stage, some wield string function
redefination reports
2 after some dig, replace inline region defined in glibconfig.h from gtk2
is working for the compilation process. Below is the regions:

//hack,use gtk2 header
#if 0 //hack
#ifdef__cplusplus
#defineG_HAVE_INLINE1
#else/* !__cplusplus */
#define G_HAVE_INLINE 1
#define G_HAVE___INLINE 1
#define G_HAVE___INLINE__ 1
#endif/* !__cplusplus */

#ifdef__cplusplus
#define G_CAN_INLINE1
#else/* !__cplusplus */
#define G_CAN_INLINE1
#endif

#else //hack
#ifdef__cplusplus
#defineG_HAVE_INLINE1
#else/* !__cplusplus */
#ifndef _MSC_VER
#define G_HAVE_INLINE 1
#endif /* _MSC_VER */
#define G_HAVE___INLINE 1
#if !defined(_MSC_VER)  !defined(__DMC__)
#define G_HAVE___INLINE__ 1
#endif /* !_MSC_VER and !__DMC__ */
#endif/* !__cplusplus */

#define G_CAN_INLINE1
#endif //end of hack

Question:
The gtk3 part doesnot seems to work for visual c++. So does anything go
wrong for the above part from GTK2 to GTK3.

Regards,
Jack Zhu
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

[PATCH 0/4] [RFC v1] gdbus: Preliminary kdbus-support patches

2013-11-22 Thread Karol Lewandowski
[ Cced systemd-devel@ and dev@tizen mailing lists in case someone
  there would be interested too. ]

Folks,

We have recently started experimenting with possibilities of
adding kdbus-support to glib's gio.  Following patchset is
result of our work.

Please note this is cleanup of modifications available from
Tizen repositories (please see notes for details), rebased on
top of glib's master branch - 6f7d8f6294 (gbacktrace: Print
out gdb exec errors correctly).


What we would like to accomplish by this RFC is to gather 
feedback if our approach for glib modifications is sound
for you (we do not know glib code that well).


In short:

 - This patchset adds ability for glib programs to connect
   to kdbus busses via

 DBUS_SESSION_BUS_ADDRESS=(kernel|kdbus):/dev/kdbus/0-kdbus/bus 

 - Library modifications are not all, it's required to have
   service handling org.freedesktop.DBus requests in userspace.

   Currently we use modified[3] dbus-daemon to for that
   purpose.

 - Basic functionality works - sending/receiving messages,
   signals, name registration, etc.

 - Last patch contains basic tests accompanied with README,
   please take a look there too.


We will be happy to hear any and all of your comments.

Thanks!


Notes:
==

This code originates from Tizen[1], and was imported[2] by
Ryan Lortie into glib's tizen/kdbus-dev branch.

  [1] 
https://review.tizen.org/gerrit/gitweb?p=platform%2Fupstream%2Fglib.git;a=summary
  
  git://review.tizen.org/platform/upstream/glib kdbus-dev

  [2] https://git.gnome.org/browse/glib/log/?h=tizen/kdbus-dev

We are the same people that did that work, precisely Lukasz Skalski
and Michal Eljasiewicz wrote all the code, I just gave it finishing
touches.

We think this patchset could replace glibs tizen/kdbus-dev iff you
think that it's worth to keep kdbus support code in main repo at
all. ;)   (At this point in time, that is!)

Moreover, we would be more than happy to work directly on that
branch, if you find it feasible.


kdbus-enabled dbus-daemon is available here:

  [3]  git://review.tizen.org/platform/upstream/dbus kdbus-dev

We are aware that in future it will be probably systemd role
to provide it (I've seen that Daniel Mack is already working
on it).


Karol Lewandowski (4):
  gdbus: Import kdbus interface header
  gdbus: Add preliminary implementation of kdbus support
  gdbus: Integrate kdbus into GDBus core
  gdbus: Add basic kdbus tests

 configure.ac  |   11 +
 gio/Makefile.am   |4 +
 gio/gdbusaddress.c|   80 +-
 gio/gdbusconnection.c |   20 +-
 gio/gdbusprivate.c|  211 +++-
 gio/gdbusprivate.h|8 +-
 gio/giotypes.h|   33 +
 gio/gkdbus.c  | 1112 +
 gio/gkdbus.h  |  113 +++
 gio/gkdbusconnection.c|  196 
 gio/gkdbusconnection.h|   91 ++
 gio/kdbus.h   |  436 
 gio/tests/Makefile.am |   13 +
 gio/tests/kdbus-test/README   |  108 ++
 gio/tests/kdbus-test/gdbus-example-kdbus-client.c |   51 +
 gio/tests/kdbus-test/gdbus-example-kdbus-server.c |  117 +++
 16 files changed, 2572 insertions(+), 32 deletions(-)
 create mode 100644 gio/gkdbus.c
 create mode 100644 gio/gkdbus.h
 create mode 100644 gio/gkdbusconnection.c
 create mode 100644 gio/gkdbusconnection.h
 create mode 100644 gio/kdbus.h
 create mode 100644 gio/tests/kdbus-test/README
 create mode 100644 gio/tests/kdbus-test/gdbus-example-kdbus-client.c
 create mode 100644 gio/tests/kdbus-test/gdbus-example-kdbus-server.c

-- 
1.8.4.rc3

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


[PATCH 1/4] gdbus: Import kdbus interface header

2013-11-22 Thread Karol Lewandowski
kdbus.h taken from git://github.com/gregkh/kdbus, commit cc5b49c0d.
---
 gio/kdbus.h | 436 
 1 file changed, 436 insertions(+)
 create mode 100644 gio/kdbus.h

diff --git a/gio/kdbus.h b/gio/kdbus.h
new file mode 100644
index 000..06c2c24
--- /dev/null
+++ b/gio/kdbus.h
@@ -0,0 +1,436 @@
+/*
+ * Copyright (C) 2013 Kay Sievers
+ * Copyright (C) 2013 Greg Kroah-Hartman gre...@linuxfoundation.org
+ * Copyright (C) 2013 Linux Foundation
+ * Copyright (C) 2013 Lennart Poettering
+ * Copyright (C) 2013 Daniel Mack dan...@zonque.org
+ *
+ * kdbus is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ */
+
+#ifndef _KDBUS_H_
+#define _KDBUS_H_
+
+#ifndef __KERNEL__
+#include sys/ioctl.h
+#include sys/types.h
+#include linux/types.h
+#endif
+
+#define KDBUS_IOC_MAGIC0x95
+#define KDBUS_SRC_ID_KERNEL(0)
+#define KDBUS_DST_ID_WELL_KNOWN_NAME   (0)
+#define KDBUS_MATCH_SRC_ID_ANY (~0ULL)
+#define KDBUS_DST_ID_BROADCAST (~0ULL)
+
+/* Common first elements in a structure which are used to iterate over
+ * a list of elements. */
+#define KDBUS_PART_HEADER \
+   struct {\
+   __u64 size; \
+   __u64 type; \
+   }
+
+/* Message sent from kernel to userspace, when the owner or starter of
+ * a well-known name changes */
+struct kdbus_manager_msg_name_change {
+   __u64 old_id;
+   __u64 new_id;
+   __u64 flags;/* 0 or (possibly?) KDBUS_NAME_IN_QUEUE 
*/
+   char name[0];
+};
+
+struct kdbus_manager_msg_id_change {
+   __u64 id;
+   __u64 flags;/* The kernel flags field from 
KDBUS_HELLO */
+};
+
+struct kdbus_creds {
+   __u64 uid;
+   __u64 gid;
+   __u64 pid;
+   __u64 tid;
+
+   /* The starttime of the process PID. This is useful to detect
+   PID overruns from the client side. i.e. if you use the PID to
+   look something up in /proc/$PID/ you can afterwards check the
+   starttime field of it to ensure you didn't run into a PID
+   ovretun. */
+   __u64 starttime;
+};
+
+struct kdbus_audit {
+   __u64 sessionid;
+   __u64 loginuid;
+};
+
+struct kdbus_timestamp {
+   __u64 monotonic_ns;
+   __u64 realtime_ns;
+};
+
+struct kdbus_vec {
+   __u64 size;
+   union {
+   __u64 address;
+   __u64 offset;
+   };
+};
+
+struct kdbus_memfd {
+   __u64 size;
+   int fd;
+   __u32 __pad;
+};
+
+/* Message Item Types */
+enum {
+   _KDBUS_MSG_NULL,
+
+   /* Filled in by userspace */
+   KDBUS_MSG_PAYLOAD_VEC,  /* .data_vec, reference to memory area 
*/
+   KDBUS_MSG_PAYLOAD_OFF,  /* .data_vec, reference to memory area 
*/
+   KDBUS_MSG_PAYLOAD_MEMFD,/* file descriptor of a special data 
file */
+   KDBUS_MSG_FDS,  /* .data_fds of file descriptors */
+   KDBUS_MSG_BLOOM,/* for broadcasts, carries bloom filter 
blob in .data */
+   KDBUS_MSG_DST_NAME, /* destination's well-known name, in 
.str */
+   KDBUS_MSG_PRIORITY, /* queue priority for message */
+
+   /* Filled in by kernelspace */
+   KDBUS_MSG_SRC_NAMES = 0x400,/* NUL separated string list with 
well-known names of source */
+   KDBUS_MSG_TIMESTAMP,/* .timestamp */
+   KDBUS_MSG_SRC_CREDS,/* .creds */
+   KDBUS_MSG_SRC_PID_COMM, /* optional, in .str */
+   KDBUS_MSG_SRC_TID_COMM, /* optional, in .str */
+   KDBUS_MSG_SRC_EXE,  /* optional, in .str */
+   KDBUS_MSG_SRC_CMDLINE,  /* optional, in .str (a chain of NUL 
str) */
+   KDBUS_MSG_SRC_CGROUP,   /* optional, in .str */
+   KDBUS_MSG_SRC_CAPS, /* caps data blob, in .data */
+   KDBUS_MSG_SRC_SECLABEL, /* NUL terminated string, in .str */
+   KDBUS_MSG_SRC_AUDIT,/* .audit */
+
+   /* Special messages from kernel, consisting of one and only one of 
these data blocks */
+   KDBUS_MSG_NAME_ADD  = 0x800,/* .name_change */
+   KDBUS_MSG_NAME_REMOVE,  /* .name_change */
+   KDBUS_MSG_NAME_CHANGE,  /* .name_change */
+   KDBUS_MSG_ID_ADD,   /* .id_change */
+   KDBUS_MSG_ID_REMOVE,/* .id_change */
+   KDBUS_MSG_REPLY_TIMEOUT,/* empty, but .reply_cookie in 
.kdbus_msg is filled in */
+   KDBUS_MSG_REPLY_DEAD,   /* dito */
+};
+
+/**
+ * struct  kdbus_item - chain of data blocks
+ *
+ * size: overall data record size
+ * type: 

[PATCH 3/4] gdbus: Integrate kdbus into GDBus core

2013-11-22 Thread Karol Lewandowski
This commit hooks kdbus into GDBus and provides
--enable-kdbus-transport configure switch.
---
 configure.ac  |  10 +++
 gio/Makefile.am   |   4 +
 gio/gdbusaddress.c|  80 +++
 gio/gdbusconnection.c |  20 -
 gio/gdbusprivate.c| 211 ++
 gio/gdbusprivate.h|   8 +-
 gio/giotypes.h|  33 
 7 files changed, 334 insertions(+), 32 deletions(-)

diff --git a/configure.ac b/configure.ac
index deacdc1..413c9f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,6 +242,10 @@ AC_ARG_ENABLE(gc_friendly,
   [AS_HELP_STRING([--enable-gc-friendly],
   [turn on garbage collector friendliness 
[default=no]])],,
   [enable_gc_friendly=no])
+AC_ARG_ENABLE(kdbus_transport,
+  [AS_HELP_STRING([--enable-kdbus-transport],
+ [enable kdbus transport [default=no]])],,
+  [enable_kdbus_transport=no])
 AC_ARG_ENABLE(mem_pools,
   [AS_HELP_STRING([--disable-mem-pools],
  [disable all glib memory pools])],,
@@ -259,6 +263,12 @@ AS_IF([test x$enable_gc_friendly = xyes], [
   AC_MSG_RESULT([yes])
 ], [ AC_MSG_RESULT([no]) ])
 
+AC_MSG_CHECKING([kdbus transport])
+AS_IF([test x$enable_kdbus_transport = xyes], [
+  AC_DEFINE(KDBUS_TRANSPORT, 1, [Define if kdbus transport is enabled])
+  AC_MSG_RESULT([yes])
+], [ AC_MSG_RESULT([no]) ])
+
 AC_MSG_CHECKING([whether to disable memory pools])
 AS_IF([test x$disable_mem_pools = xno], [
   AC_MSG_RESULT([no])
diff --git a/gio/Makefile.am b/gio/Makefile.am
index 5b6cda1..c060ef2 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -394,6 +394,8 @@ libgio_2_0_la_SOURCES = \
giostream.c \
gioprivate.h\
giowin32-priv.h \
+   gkdbus.c\
+   gkdbusconnection.c  \
gloadableicon.c \
gmount.c\
gmemoryinputstream.c\
@@ -569,6 +571,8 @@ gio_headers =   \
giomodule.h \
gioscheduler.h  \
giostream.h \
+   gkdbus.h\
+   gkdbusconnection.h  \
gloadableicon.h \
gmount.h\
gmemoryinputstream.h\
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index b5143cf..bed0bbe 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -1,6 +1,7 @@
 /* GDBus - GLib D-Bus Library
  *
  * Copyright (C) 2008-2010 Red Hat, Inc.
+ * Copyright (C) 2013 Samsung Electronics
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -17,7 +18,9 @@
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  *
- * Author: David Zeuthen dav...@redhat.com
+ * Author: David Zeuthendav...@redhat.com
+ * Author: Lukasz Skalski   l.skal...@partner.samsung.com
+ * Author: Michal Eljasiewicz   m.eljasie...@samsung.com
  */
 
 #include config.h
@@ -44,6 +47,7 @@
 
 #ifdef G_OS_UNIX
 #include gio/gunixsocketaddress.h
+#include gio/gkdbusconnection.h
 #endif
 
 #ifdef G_OS_WIN32
@@ -360,6 +364,18 @@ is_valid_tcp (const gchar  *address_entry,
   return ret;
 }
 
+static int
+g_dbus_is_supported_address_kdbus (const gchar  *transport_name)
+{
+  int supported = 0;
+
+#if defined (G_OS_UNIX)  (KDBUS_TRANSPORT)
+  supported = (g_strcmp0 (transport_name, kdbus) == 0) || (g_strcmp0 
(transport_name, kernel) == 0);
+#endif
+
+  return supported;
+}
+
 /**
  * g_dbus_is_supported_address:
  * @string: A string.
@@ -401,7 +417,8 @@ g_dbus_is_supported_address (const gchar  *string,
 goto out;
 
   supported = FALSE;
-  if (g_strcmp0 (transport_name, unix) == 0)
+  if ((g_strcmp0 (transport_name, unix) == 0)
+  || g_dbus_is_supported_address_kdbus (transport_name))
 supported = is_valid_unix (a[n], key_value_pairs, error);
   else if (g_strcmp0 (transport_name, tcp) == 0)
 supported = is_valid_tcp (a[n], key_value_pairs, error);
@@ -553,7 +570,8 @@ g_dbus_address_connect (const gchar   *address_entry,
 {
 }
 #ifdef G_OS_UNIX
-  else if (g_strcmp0 (transport_name, unix) == 0)
+  if ((g_strcmp0 (transport_name, unix) == 0)
+  || g_dbus_is_supported_address_kdbus (transport_name))
 {
   const gchar *path;
   const gchar *abstract;
@@ -664,21 +682,49 @@ g_dbus_address_connect (const gchar   *address_entry,
 
   if (connectable != NULL)
 {
-  GSocketClient *client;
-  GSocketConnection *connection;
-
-  g_assert (ret == NULL);
-  client = g_socket_client_new ();
-  connection = g_socket_client_connect (client,
-connectable,
-cancellable,
-error);
-  

[PATCH 4/4] gdbus: Add basic kdbus tests

2013-11-22 Thread Karol Lewandowski
---
 configure.ac  |   1 +
 gio/tests/Makefile.am |  13 +++
 gio/tests/kdbus-test/README   | 108 
 gio/tests/kdbus-test/gdbus-example-kdbus-client.c |  51 ++
 gio/tests/kdbus-test/gdbus-example-kdbus-server.c | 117 ++
 5 files changed, 290 insertions(+)
 create mode 100644 gio/tests/kdbus-test/README
 create mode 100644 gio/tests/kdbus-test/gdbus-example-kdbus-client.c
 create mode 100644 gio/tests/kdbus-test/gdbus-example-kdbus-server.c

diff --git a/configure.ac b/configure.ac
index 413c9f2..c3349c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,6 +264,7 @@ AS_IF([test x$enable_gc_friendly = xyes], [
 ], [ AC_MSG_RESULT([no]) ])
 
 AC_MSG_CHECKING([kdbus transport])
+AM_CONDITIONAL(KDBUS_TRANSPORT, [test x$enable_kdbus_transport = xyes])
 AS_IF([test x$enable_kdbus_transport = xyes], [
   AC_DEFINE(KDBUS_TRANSPORT, 1, [Define if kdbus transport is enabled])
   AC_MSG_RESULT([yes])
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index bec70d7..8d692bb 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -470,6 +470,19 @@ gdbus_serialization_SOURCES = \
gdbus-tests.c
 endif
 
+if KDBUS_TRANSPORT
+test_programs += gdbus-example-kdbus-server
+test_programs += gdbus-example-kdbus-client
+
+gdbus_example_kdbus_server_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
+gdbus_example_kdbus_server_LDADD = $(LDADD) $(DBUS1_LIBS)
+gdbus_example_kdbus_server_SOURCES = kdbus-test/gdbus-example-kdbus-server.c
+
+gdbus_example_kdbus_client_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
+gdbus_example_kdbus_client_LDADD = $(LDADD) $(DBUS1_LIBS)
+gdbus_example_kdbus_client_SOURCES = kdbus-test/gdbus-example-kdbus-client.c
+endif
+
 # -
 #  The resources test is a bit more complicated...
 
diff --git a/gio/tests/kdbus-test/README b/gio/tests/kdbus-test/README
new file mode 100644
index 000..6f44f0b
--- /dev/null
+++ b/gio/tests/kdbus-test/README
@@ -0,0 +1,108 @@
+Description
+===
+
+In order to perform tests of modified libgio library (with kdbus
+transport) we have created two programs: gdbus-example-kdbus-server
+and gdbus-example-kdbus-client.  The first of them acts as a server,
+registers itself on the bus under well-known name and waits for calls
+to its objects and methods. The second one (client) makes calls and
+records periods of time between moment of preparing of a call to the
+moment of receiving and parsing an answer. The measurement is made by
+performing one thousand of calls and computing a sum of duration of
+every call (for different sizes of message payload: 4B, 8B, 4kB, 8kB,
+16kB, 64kB and 512kB).  The client program returns total time of
+performed calls after successful execution.
+
+
+Requirements
+
+
+* kdbus kernel module,
+* modified version of glib (with kdbus transport),
+* modified version of dbus-daemon (with kdbus transport),
+
+
+KDBUS
+=
+
+Simple install procedure:
+
+  % git clone https://github.com/gregkh/kdbus.git# download kdbus source
+  % cd kdbus # change to kdbus 
directory
+  % make # build kdbus module
+  % insmod kdbus.ko  # load kdbus kernel module
+
+
+GLIB (modified version)
+===
+
+Simple install procedure:
+
+
+  % cd glib # change to glib directory
+  % ./configure --enable-kdbus-transport# run the `configure' 
script with kdbus support
+  % make# build GLIB
+
+
+DBUS-DAEMON (modified version)
+==
+
+Modified version of dbus-daemon (from tizen.org) is required to run
+kdbus transport in libgio.
+
+Solution, which we propose, includes modifications both in client
+libraries (libgio, libdbus) and dbus daemon. Daemon is registered on
+kdbus bus as a client under org.freedesktop.DBus name.  Only
+messages addressed to this interface are handled by daemon. Messages
+such as RequestName or AddMatch are translated by daemon to respective
+ioctl() calls, which send them through kdbus on behalf of original
+client process. The rest of messages would are going straight from
+origin to destination through kdbus.
+
+Simple install procedure:
+
+* download modified version of dbus from tizen.org repository
+  (kdbus-dev branch):
+
+  git clone git://review.tizen.org/platform/upstream/dbus.git -b kdbus-dev
+
+* change to dbus directory and build dbus-daemon with kdbus support:
+
+  ./configure --enable-kdbus-transport
+  make  make install
+
+* start of custom dbus-daemon supporting kdbus transport:
+
+  ./dbus-daemon --nofork --address=kdbus: 
--config-file=/etc/dbus-1/session.conf
+
+
+TESTS
+=
+
+* Build test binaries:
+
+  cd gio/tests
+  make
+
+* Set variable to use 

pygtk version

2013-11-22 Thread Rudra Banerjee
Hi,
do pygtk still use gtk2.x? The tutorial in pygtk shows, that is the case
(http://www.pygtk.org/tutorial.html ).
Though I have found another site (non gnome,
http://python-gtk-3-tutorial.readthedocs.org/en/latest/ ) I am still to
find the official gnome document, ala pygtk.
Any idea please?
 

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: [systemd-devel] [PATCH 0/4] [RFC v1] gdbus: Preliminary kdbus-support patches

2013-11-22 Thread Karol Lewandowski
On 11/21/2013 02:15 PM, Lennart Poettering wrote:
 On Thu, 21.11.13 12:33, Karol Lewandowski (k.lewando...@samsung.com) wrote:
 
 Haven't looked at the actual patch, just two comments for now.
 
  - This patchset adds ability for glib programs to connect
to kdbus busses via

  DBUS_SESSION_BUS_ADDRESS=(kernel|kdbus):/dev/kdbus/0-kdbus/bus 
 
 Note that libsystemd-bus only acceptes kernel: here for this, and I am 
 pretty
 sure we shouldn't allow the ambiguity here. Stick to one.

Sure, will drop kdbus.


  - Library modifications are not all, it's required to have
service handling org.freedesktop.DBus requests in userspace.

Currently we use modified[3] dbus-daemon to for that
purpose.
 
 Daniel has been working on adding this service to systemd.

I've seen it, good stuff.


 Before we consider this for merging into gio, we need to figure out what
 to speak on the wire. i.e. Ryan wants us to marshal exclusively to
 GVariant on kdbus, and I am on the same page with him on that, but I'd
 first need to beef up the marshaller in libsystemd-bus to speak both
 traditional dbus1 and gvariant marshalling.
 
 If you want libdbus-1 to also talk kdbus then libdbus-1 would also need code
 for gvariant natively. That said, systemd will provide a compat bridge
 that speaks the old protocol and remarshalls in both directions.

Our changes are incomplete without org.freedesktop.DBus replacement,
so this is where we plan to invest our time. libdbus-1 port will follow
whatever libsystemd-bus does.

Cheers,
Karol

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: [systemd-devel] [PATCH 0/4] [RFC v1] gdbus: Preliminary kdbus-support patches

2013-11-22 Thread Lennart Poettering
On Thu, 21.11.13 12:33, Karol Lewandowski (k.lewando...@samsung.com) wrote:

Haven't looked at the actual patch, just two comments for now.

  - This patchset adds ability for glib programs to connect
to kdbus busses via
 
  DBUS_SESSION_BUS_ADDRESS=(kernel|kdbus):/dev/kdbus/0-kdbus/bus 

Note that libsystemd-bus only acceptes kernel: here for this, and I am pretty
sure we shouldn't allow the ambiguity here. Stick to one.

 
  - Library modifications are not all, it's required to have
service handling org.freedesktop.DBus requests in userspace.
 
Currently we use modified[3] dbus-daemon to for that
purpose.

Daniel has been working on adding this service to systemd.

Before we consider this for merging into gio, we need to figure out what
to speak on the wire. i.e. Ryan wants us to marshal exclusively to
GVariant on kdbus, and I am on the same page with him on that, but I'd
first need to beef up the marshaller in libsystemd-bus to speak both
traditional dbus1 and gvariant marshalling.

If you want libdbus-1 to also talk kdbus then libdbus-1 would also need code
for gvariant natively. That said, systemd will provide a compat bridge
that speaks the old protocol and remarshalls in both directions.

Lennart

-- 
Lennart Poettering, Red Hat
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: symbolic icon fallback failure

2013-11-22 Thread Patrick Welche
On Thu, Nov 21, 2013 at 10:40:42AM -0500, Jasper St. Pierre wrote:
 On Thu, Nov 21, 2013 at 10:35 AM, Patrick Welche pr...@cam.ac.uk wrote:
 
  On Thu, Nov 21, 2013 at 10:07:55AM -0500, Jasper St. Pierre wrote:
   On Thu, Nov 21, 2013 at 9:38 AM, Patrick Welche pr...@cam.ac.uk wrote:

(gtk-update-icon-cache --validate returns 0 for those two directories
 so validates OK.
 Is there an easy way of dumping the contents of the cache?)

Is there a way of validating

   gnome/icon-theme.cachegnome/index.theme

further?

 I'd put a print statement inside the for loop near that if statement that
 prints the theme name, e.g.
 
 g_print (searching theme %s\n, theme-name);
 
 It sounds to me like the gnome icon theme isn't being properly added. Maybe
 also put lots of print statements in insert_theme. Is that being called
 with gnome as a theme name? Is it bailing out at some point before it's
 supposed to?

At least g_key_file_load_from_file() is not giving an error with
icons/gnome/index.theme

Probably why icons/gnome cache was found in earlier post? If there
were a problem, found cache for ...icons/gnome wouldn't have been
printed?

gtk_icon_theme_lookup_icon dialog-password
theme_lookup_icon: searching theme hicolor for dialog-password
...
theme_lookup_icon found dialog-password in dir (null)

I don't see searching theme gnome for dialog-password yet it is found.

gtk_icon_theme_lookup_icon go-up-symbolic
theme_lookup_icon: searching theme hicolor for go-up-symbolic
...
theme_lookup_icon: searching theme gnome for go-up-symbolic
...
theme_lookup_icon look for go-up-symbolic in dir .../hicolor/48x48/actions
theme_lookup_icon look for go-up-symbolic in dir .../gnome/48x48/actions
...

BUT not in icons/gnome/scalable/actions


Cheers,

Patrick
--- gtk/gtkicontheme.c.orig 2013-11-11 13:53:39.0 +
+++ gtk/gtkicontheme.c
@@ -1098,6 +1098,8 @@ insert_theme (GtkIconTheme *icon_theme, 
   
   priv = icon_theme-priv;
 
+  GTK_NOTE (ICONTHEME, g_print (insert_theme %s\n, theme_name));
+
   for (l = priv-themes; l != NULL; l = l-next)
 {
   theme = l-data;
@@ -1136,11 +1138,15 @@ insert_theme (GtkIconTheme *icon_theme, 
  g_key_file_load_from_file (theme_file, path, 0, error);
  if (error)
{
+  GTK_NOTE (ICONTHEME, 
+g_print (Error loading %s: %s\n, path, error-message));
  g_key_file_free (theme_file);
  theme_file = NULL;
  g_error_free (error);
  error = NULL;
}
+  else
+GTK_NOTE (ICONTHEME, g_print (Loaded %s successfully\n, path));
}
   g_free (path);
 }
@@ -1634,6 +1640,10 @@ choose_icon (GtkIconTheme   *icon_th
   icon_info = g_object_ref (icon_info);
   remove_from_lru_cache (icon_theme, icon_info);
 
+  GTK_NOTE (ICONTHEME, 
+   g_print (choose_icon: found %s in cache\n, 
+ g_strjoinv (,, icon_info-key.icon_names)));
+
   return icon_info;
 }
 
@@ -2813,6 +2823,10 @@ theme_lookup_icon (IconTheme  *t
   min_difference = G_MAXINT;
   min_dir = NULL;
 
+  GTK_NOTE (ICONTHEME, 
+g_print (theme_lookup_icon: searching theme %s for %s\n,
+ theme-name, icon_name));
+
   /* Builtin icons are logically part of the default theme and
* are searched before other subdirectories of the default theme.
*/
@@ -2822,8 +2836,13 @@ theme_lookup_icon (IconTheme  *t
   size, scale,
   min_difference);
 
+
   if (min_difference == 0)
-   return icon_info_new_builtin (closest_builtin);
+{
+  GTK_NOTE (ICONTHEME,
+g_print (theme_lookup_icon found %s in builtins\n, 
icon_name));
+  return icon_info_new_builtin (closest_builtin);
+}
 
   dirs = builtin_dirs;
 }
@@ -2836,7 +2855,7 @@ theme_lookup_icon (IconTheme  *t
   dir = l-data;
 
   GTK_NOTE (ICONTHEME,
-   g_print (theme_lookup_icon dir %s\n, dir-dir));
+   g_print (theme_lookup_icon look for %s in dir %s\n, 
icon_name, dir-dir));
   suffix = theme_dir_get_icon_suffix (dir, icon_name, NULL);
   if (best_suffix (suffix, allow_svg) != ICON_SUFFIX_NONE)
{
@@ -2926,11 +2945,18 @@ theme_lookup_icon (IconTheme  *t
  
min_dir-subdir_index);
}
 
+  GTK_NOTE (ICONTHEME,
+   g_print (theme_lookup_icon found %s in dir %s\n, icon_name, 
min_dir-dir));
+
   return icon_info;
 }
 
   if (closest_builtin)
-return icon_info_new_builtin (closest_builtin);
+{
+  GTK_NOTE (ICONTHEME,
+g_print (theme_lookup_icon found (close to) %s in 
builtins\n, icon_name));
+  return icon_info_new_builtin (closest_builtin);
+}
   
   return NULL;
 }

Re: pygtk version

2013-11-22 Thread John Ralls

On Nov 16, 2013, at 12:09 PM, Rudra Banerjee bnrj.ru...@gmail.com wrote:

 Hi,
 do pygtk still use gtk2.x? The tutorial in pygtk shows, that is the case
 (http://www.pygtk.org/tutorial.html ).
 Though I have found another site (non gnome,
 http://python-gtk-3-tutorial.readthedocs.org/en/latest/ ) I am still to
 find the official gnome document, ala pygtk.
 Any idea please?

https://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html

Regards,
John Ralls

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: pygtk version

2013-11-22 Thread Emmanuele Bassi
hi;

On 16 November 2013 20:09, Rudra Banerjee bnrj.ru...@gmail.com wrote:
 Hi,
 do pygtk still use gtk2.x? The tutorial in pygtk shows, that is the case
 (http://www.pygtk.org/tutorial.html ).

yes: pygtk is GTK+ 2.x, Python 2.x only and it's not maintained any more.

GTK+ 3.x is wrapped through introspection by pygobject.

 Though I have found another site (non gnome,
 http://python-gtk-3-tutorial.readthedocs.org/en/latest/ ) I am still to
 find the official gnome document, ala pygtk.

there is no official API reference: you're supposed to use the C API
reference until we can generate documentation for non-C languages from
the same introspection data.

the tutorial you link, alongside the beginner tutorials available on
developer.gnome.org[0] are as official as you can get.

ciao,
 Emmanuele.

[0] https://developer.gnome.org/gnome-devel-demos/unstable/tutorial.py.html.en

-- 
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list