r7128 - in dumbhippo/trunk/client/linux: . src
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7128 - in dumbhippo/trunk/client/linux: . src
- Date: Thu, 3 Jan 2008 16:28:06 -0600 (CST)
Author: walters
Date: 2008-01-03 16:28:05 -0600 (Thu, 03 Jan 2008)
New Revision: 7128
Modified:
dumbhippo/trunk/client/linux/Makefile-icons.am
dumbhippo/trunk/client/linux/Makefile-libddm.am
dumbhippo/trunk/client/linux/Makefile-mugshot.am
dumbhippo/trunk/client/linux/configure.ac
dumbhippo/trunk/client/linux/src/hippo-cookies-linux.c
dumbhippo/trunk/client/linux/src/hippo-dbus-system.c
dumbhippo/trunk/client/linux/src/hippo-distribution.c
dumbhippo/trunk/client/linux/src/hippo-idle.c
dumbhippo/trunk/client/linux/src/hippo-platform-impl.c
dumbhippo/trunk/client/linux/src/hippo-ui.c
dumbhippo/trunk/client/linux/src/hippo-window-gtk.c
Log:
Changes for maemo integration, from Luis Rocha:
Look in microb browser cookies path.
Allow running without XScreensaver.
Listen for Nokia ICD connection messages as well as
NetworkManager.
Reduced functionality in hippo-distribution if gnome-desktop API
is not available.
Use different window type hint for NOTIFICATION HippoWindow role
on Maemo.
New --with-maemo configure option.
Update required Loudmouth version.
Also allow compilation of Firefox plugin on microb-engine-nspr, if
available.
New 40x40 icon, only installed on Maemo.
Install desktop file in Maemo directory.
Modified: dumbhippo/trunk/client/linux/Makefile-icons.am
===================================================================
--- dumbhippo/trunk/client/linux/Makefile-icons.am 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/Makefile-icons.am 2008-01-03 22:28:05 UTC (rev 7128)
@@ -13,11 +13,13 @@
normalicon_DATA= \
$(NORMALICONSUBDIR)/mugshot.png
+if WITH_MAEMO
SUBNORMALICONSUBDIR=icons/hicolor/40x40/apps
subnormalicondir=$(datadir)/$(SUBNORMALICONSUBDIR)
subnormalicon_DATA= \
$(SUBNORMALICONSUBDIR)/mugshot_notification.png \
$(SUBNORMALICONSUBDIR)/mugshot_notification_disabled.png
+endif
MEDIUMICONSUBDIR=icons/hicolor/32x32/apps
mediumicondir=$(datadir)/$(MEDIUMICONSUBDIR)
Modified: dumbhippo/trunk/client/linux/Makefile-libddm.am
===================================================================
--- dumbhippo/trunk/client/linux/Makefile-libddm.am 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/Makefile-libddm.am 2008-01-03 22:28:05 UTC (rev 7128)
@@ -122,61 +122,61 @@
TESTS_ENVIRONMENT=DDM_SRCDIR=$(COMMONSRCDIR)/ddm
-ALL_DDM_TEST_SOURCES =
+ALL_DDM_TESTS =
test_condition_parser_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS) -DDDM_COMPILATION=1
test_condition_parser_LDADD=libddm-1.la
nodist_test_condition_parser_SOURCES=$(COMMONSRCDIR)/ddm/test-condition-parser.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_condition_parser_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_condition_parser_SOURCES)
test_condition_reduce_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS) -DDDM_COMPILATION=1
test_condition_reduce_LDADD=libddm-1.la libddm-test.la
nodist_test_condition_reduce_SOURCES=$(COMMONSRCDIR)/ddm/test-condition-reduce.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_condition_reduce_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_condition_reduce_SOURCES)
test_feed_object_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS) -DDDM_COMPILATION=1
test_feed_object_LDADD=libddm-1.la libddm-test.la
nodist_test_feed_object_SOURCES=$(COMMONSRCDIR)/ddm/test-feed-object.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_feed_object_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_feed_object_SOURCES)
test_ddm_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS)
test_ddm_LDADD=libddm-1.la
nodist_test_ddm_SOURCES=$(COMMONSRCDIR)/ddm/test-ddm.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_ddm_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_ddm_SOURCES)
test_multipart_fetch_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS) -DDDM_COMPILATION=1
test_multipart_fetch_LDADD=libddm-1.la libddm-test.la
nodist_test_multipart_fetch_SOURCES=$(COMMONSRCDIR)/ddm/test-multipart-fetch.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_multipart_fetch_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_multipart_fetch_SOURCES)
test_notification_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS) -DDDM_COMPILATION=1
test_notification_LDADD=libddm-1.la libddm-test.la
nodist_test_notification_SOURCES=$(COMMONSRCDIR)/ddm/test-notification.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_notification_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_notification_SOURCES)
test_rules_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS) -DDDM_COMPILATION=1
test_rules_LDADD=libddm-1.la libddm-test.la
nodist_test_rules_SOURCES=$(COMMONSRCDIR)/ddm/test-rules.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_rules_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_rules_SOURCES)
test_static_file_parser_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS) -DDDM_COMPILATION=1
test_static_file_parser_LDADD=libddm-1.la libddm-test.la
nodist_test_static_file_parser_SOURCES=$(COMMONSRCDIR)/ddm/test-static-file-parser.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_static_file_parser_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_static_file_parser_SOURCES)
test_static_file_backend_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDDM_CFLAGS) -DDDM_COMPILATION=1
test_static_file_backend_LDADD=libddm-1.la libddm-test.la
nodist_test_static_file_backend_SOURCES=$(COMMONSRCDIR)/ddm/test-static-file-backend.c
-ALL_DDM_TEST_SOURCES += $(nodist_test_static_file_backend_SOURCES)
+ALL_DDM_TESTS += $(nodist_test_static_file_backend_SOURCES)
######################################################################
@@ -186,7 +186,7 @@
libddm-dist-hook:
-mkdir $(distdir)/common-dist
-mkdir $(distdir)/common-dist/ddm
- cp $(LIBDDM_SOURCEFILES) $(nodist_libddminclude_HEADERS) $(nodist_libddm_test_la_SOURCES) $(ALL_DDM_TEST_SOURCES) $(distdir)/common-dist/ddm
+ cp $(LIBDDM_SOURCEFILES) $(nodist_libddminclude_HEADERS) $(nodist_libddm_test_la_SOURCES) $(ALL_DDM_TESTS) $(distdir)/common-dist/ddm
mkdir $(distdir)/common-dist/ddm/generated
cp $(COMMONSRCDIR)/ddm/ddm-marshal.list $(COMMONSRCDIR)/ddm/test-data.xml $(COMMONSRCDIR)/ddm/test-local-data.xml $(distdir)/common-dist/ddm
Modified: dumbhippo/trunk/client/linux/Makefile-mugshot.am
===================================================================
--- dumbhippo/trunk/client/linux/Makefile-mugshot.am 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/Makefile-mugshot.am 2008-01-03 22:28:05 UTC (rev 7128)
@@ -159,7 +159,11 @@
autostart_files=$(autostart_in_files:.desktop.in=.desktop)
autostart_DATA = $(autostart_files)
+if WITH_MAEMO
+desktopfilesdir=$(datadir)/applications/hildon
+else
desktopfilesdir=$(datadir)/applications
+endif
desktopfiles_in_files=mugshot.desktop.in
desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop)
desktopfiles_DATA = $(desktopfiles_files)
Modified: dumbhippo/trunk/client/linux/configure.ac
===================================================================
--- dumbhippo/trunk/client/linux/configure.ac 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/configure.ac 2008-01-03 22:28:05 UTC (rev 7128)
@@ -287,10 +287,15 @@
fi
fi
+AC_ARG_WITH(maemo,
+ AC_HELP_STRING([--with-maemo=[yes/no]],
+ [Whether to use Maemo version of Mugshot client]),
+ ,
+ with_maemo=no)
GLIB2_REQUIRED=2.6.0
GTK2_REQUIRED=2.6.0
-LOUDMOUTH_REQUIRED=1.0
+LOUDMOUTH_REQUIRED=1.2.2
# unfortunately this breaks us on FC4
DBUS_REQUIRED=0.60
DBUS_GLIB_REQUIRED=0.60
@@ -365,11 +370,16 @@
CFLAGS="$hippo_save_CFLAGS"
LIBS="$hippo_save_LIBS"
- if ! $have_xscreensaver ; then
- AC_MSG_ERROR([XScreenSaver extension is required - X11/extensions/scnsaver.h, libXss.so])
+ if test "x$with_maemo" != xno ; then
+ if ! $have_xscreensaver ; then
+ AC_MSG_ERROR([XScreenSaver extension is required - X11/extensions/scnsaver.h, libXss.so])
+ fi
+ XSCREENSAVER_LIBS="-lXss -lXext -lX11 $X_EXTRA_LIBS"
+ XSCREENSAVER_CFLAGS="$X_CFLAGS"
+ else
+ XSCREENSAVER_LIBS=""
+ XSCREENSAVER_CFLAGS=""
fi
- XSCREENSAVER_LIBS="-lXss -lXext -lX11 $X_EXTRA_LIBS"
- XSCREENSAVER_CFLAGS="$X_CFLAGS"
fi
# PCRE checks
@@ -448,14 +458,27 @@
AC_DEFINE(HIPPO_LOUDMOUTH_IS_10, 1, [Define if Loudmouth is version 1.0 or below])
PKG_CHECK_MODULES(LIBHIPPOIPC, gobject-2.0 dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED)
PKG_CHECK_MODULES(LIBGTKCOPY, gtk+-2.0 >= $GTK2_REQUIRED gtk+-x11-2.0)
-PKG_CHECK_MODULES(MUGSHOT_BASE, gtk+-2.0 >= $GTK2_REQUIRED gthread-2.0 loudmouth-1.0 >= $LOUDMOUTH_REQUIRED dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED gnome-vfs-2.0 $XSCREENSAVER_PACKAGES $CANVAS_MODULES)
-MUGSHOT_LIBS="$MUGSHOT_BASE_LIBS $CURL_LIBS $XSCREENSAVER_LIBS $JPEG_LIBS $RESOLV_LIBS"
-MUGSHOT_CFLAGS="$MUGSHOT_BASE_CFLAGS $CURL_CFLAGS $XSCREENSAVER_CFLAGS"
+PKG_CHECK_MODULES(MUGSHOT_BASE, gtk+-2.0 >= $GTK2_REQUIRED gthread-2.0 loudmouth-1.0 >= $LOUDMOUTH_REQUIRED dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED gnome-vfs-2.0 $XSCREENSAVER_PACKAGES $CANVAS_MODULES)
+
+# If we're building the Maemo client, we don't need gnome-desktop
+if test "x$with_maemo" != xno ; then
+ PKG_CHECK_MODULES(MUGSHOT_MAEMO, libosso >= 0.9.19)
+else
+ PKG_CHECK_MODULES(MUGSHOT_GNOME, gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED)
+fi
+
+MUGSHOT_LIBS="$MUGSHOT_BASE_LIBS $MUGSHOT_GNOME_LIBS $MUGSHOT_MAEMO_LIBS $CURL_LIBS $XSCREENSAVER_LIBS $JPEG_LIBS $RESOLV_LIBS"
+MUGSHOT_CFLAGS="$MUGSHOT_BASE_CFLAGS $MUGSHOT_GNOME_CFLAGS $MUGSHOT_MAEMO_CFLAGS $CURL_CFLAGS $XSCREENSAVER_CFLAGS"
AC_SUBST(MUGSHOT_LIBS)
AC_SUBST(MUGSHOT_CFLAGS)
PKG_CHECK_MODULES(MUGSHOT_URI_HANDLER, gtk+-2.0 >= $GTK2_REQUIRED gthread-2.0 dbus-1 >= $DBUS_REQUIRED)
PKG_CHECK_MODULES(TEST_HIPPO_IPC, gobject-2.0 dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED)
+if test "x$with_maemo" != xno ; then
+ AC_DEFINE(WITH_MAEMO, , [whether Maemo is active])
+fi
+AM_CONDITIONAL(WITH_MAEMO, test "x$with_maemo" != xno)
+
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
@@ -620,7 +643,7 @@
if $sdk_includes_nspr ; then
NSPR_LIBS="-L $with_gecko_sdk/lib -lnspr4"
else
- for pkg in firefox-nspr xulrunnner-nspr nspr ; do
+ for pkg in firefox-nspr xulrunnner-nspr nspr microb-engine-nspr; do
if test "x$NSPR_PACKAGES" = x ; then
HIPPO_PKG_CHECK_EXISTS($pkg, NSPR_PACKAGES=$pkg)
fi
@@ -631,7 +654,7 @@
fi
if $need_separate_js ; then
- for pkg in firefox-js xulrunner-js ; do
+ for pkg in firefox-js xulrunner-js microb-engine-js; do
if test "x$JS_PACKAGES" = x ; then
HIPPO_PKG_CHECK_EXISTS($pkg, JS_PACKAGES=$pkg)
fi
Modified: dumbhippo/trunk/client/linux/src/hippo-cookies-linux.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-cookies-linux.c 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/src/hippo-cookies-linux.c 2008-01-03 22:28:05 UTC (rev 7128)
@@ -1,4 +1,5 @@
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+#include <config.h>
#include "hippo-cookies-linux.h"
#include <string.h>
@@ -29,6 +30,12 @@
hippo_cookie_locator_add_file(locator, path, HIPPO_BROWSER_GALEON);
g_free(path);
+ path = g_build_filename(homedir,
+ ".mozilla/microb/cookies.txt",
+ NULL);
+ hippo_cookie_locator_add_file(locator, path, HIPPO_BROWSER_MAEMO);
+ g_free(path);
+
path = g_build_filename(homedir, ".mozilla/firefox", NULL);
hippo_cookie_locator_add_directory(locator, path, HIPPO_BROWSER_FIREFOX);
g_free(path);
Modified: dumbhippo/trunk/client/linux/src/hippo-dbus-system.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-system.c 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-system.c 2008-01-03 22:28:05 UTC (rev 7128)
@@ -147,16 +147,32 @@
if (dbus_message_is_signal(message, "org.freedesktop.NetworkManager", "StateChange")) {
dbus_uint32_t v_UINT32;
-
if (dbus_message_get_args(message, NULL, DBUS_TYPE_UINT32, &v_UINT32, DBUS_TYPE_INVALID)) {
- HippoNetworkStatus status = HIPPO_NETWORK_STATUS_UNKNOWN;
+ HippoNetworkStatus status = HIPPO_NETWORK_STATUS_UNKNOWN;
if (v_UINT32 == 3)
status = HIPPO_NETWORK_STATUS_UP;
else if (v_UINT32 == 1)
status = HIPPO_NETWORK_STATUS_DOWN;
g_debug("new network status from network manager %u", v_UINT32);
-
+ g_signal_emit(G_OBJECT(dbus), signals[NETWORK_STATUS_CHANGED], 0, status);
+ }
+ } else if (dbus_message_is_signal(message, "com.nokia.icd", "status_changed")) {
+ char *iap_id, *bearer, *state;
+
+ if (dbus_message_get_args(message, NULL,
+ DBUS_TYPE_STRING, &iap_id,
+ DBUS_TYPE_STRING, &bearer,
+ DBUS_TYPE_STRING, &state,
+ DBUS_TYPE_INVALID)) {
+ HippoNetworkStatus status = HIPPO_NETWORK_STATUS_UNKNOWN;
+
+ if (strcmp(state, "IDLE") == 0)
+ status = HIPPO_NETWORK_STATUS_DOWN;
+ else if (strcmp(state, "CONNECTED") == 0)
+ status = HIPPO_NETWORK_STATUS_UP;
+
+ g_debug("new network status from com.nokia.icd is %s", state);
g_signal_emit(G_OBJECT(dbus), signals[NETWORK_STATUS_CHANGED], 0, status);
}
} else if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
@@ -217,6 +233,15 @@
"StateChange"
"'",
&derror);
+ dbus_bus_add_match(connection,
+ "type='signal',sender='"
+ "com.nokia.icd"
+ "',interface='"
+ "com.nokia.icd"
+ "',member='"
+ "status_changed"
+ "'",
+ &derror);
if (dbus_error_is_set(&derror)) {
propagate_dbus_error(error, &derror);
Modified: dumbhippo/trunk/client/linux/src/hippo-distribution.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-distribution.c 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/src/hippo-distribution.c 2008-01-03 22:28:05 UTC (rev 7128)
@@ -1,10 +1,13 @@
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+#include <config.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
+#ifndef WITH_MAEMO
#include <libgnome/gnome-desktop-item.h>
+#endif
#include <libgnomevfs/gnome-vfs.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
@@ -1069,6 +1072,7 @@
HippoAsyncCallback callback,
void *callback_data)
{
+#ifndef WITH_MAEMO
GnomeDesktopItem *item = NULL;
char *desktop_file = NULL;
GError *error = NULL;
@@ -1110,6 +1114,7 @@
gnome_desktop_item_unref(item);
g_free(desktop_file);
+#endif
}
Modified: dumbhippo/trunk/client/linux/src/hippo-idle.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-idle.c 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/src/hippo-idle.c 2008-01-03 22:28:05 UTC (rev 7128)
@@ -4,7 +4,9 @@
#include <X11/Xlib.h>
#include <X11/Xatom.h>
+#ifndef WITH_MAEMO
#include <X11/extensions/scrnsaver.h>
+#endif
#include <gdk/gdkx.h>
#include "hippo-idle.h"
@@ -16,7 +18,9 @@
};
struct HippoIdleMonitor {
+#ifndef WITH_MAEMO
XScreenSaverInfo *info;
+#endif
GdkDisplay *display;
HippoDataCache *cache;
GTime activity_time;
@@ -226,20 +230,24 @@
idle_time = G_MAXINT;
n_screens = gdk_display_get_n_screens(monitor->display);
for (i = 0; i < n_screens; ++i) {
- int result;
+ int result = 0;
GdkScreen *screen;
- screen = gdk_display_get_screen(monitor->display, i);
+ screen = gdk_display_get_screen(monitor->display, i);
+#ifndef WITH_MAEMO
result = XScreenSaverQueryInfo(GDK_DISPLAY_XDISPLAY(monitor->display),
GDK_SCREEN_XSCREEN(screen)->root,
monitor->info);
+#endif
if (result == 0) {
g_warning("Failed to get idle time from screensaver extension");
break;
}
/* monitor->info->idle is time in milliseconds since last user interaction event */
+#ifndef WITH_MAEMO
idle_time = MIN(monitor->info->idle, idle_time);
+#endif
}
was_idle = monitor->currently_idle;
@@ -290,16 +298,20 @@
HippoIdleMonitor *monitor;
xdisplay = GDK_DISPLAY_XDISPLAY(display);
-
+#ifndef WITH_MAEMO
if (!XScreenSaverQueryExtension(xdisplay, &event_base, &error_base)) {
g_warning("Screensaver extension not found on X display, can't detect user idleness");
return NULL;
}
+#endif
+ return NULL;
monitor = g_new0(HippoIdleMonitor, 1);
monitor->display = g_object_ref(display);
monitor->cache = g_object_ref(cache);
+#ifndef WITH_MAEMO
monitor->info = XScreenSaverAllocInfo();
+#endif
monitor->activity_time = get_time();
monitor->last_idle = 0;
monitor->currently_idle = FALSE;
@@ -319,9 +331,9 @@
{
if (monitor == NULL)
return; /* means no screensaver extension */
-
+#ifndef WITH_MAEMO
XFree(monitor->info);
-
+#endif
g_source_remove(monitor->poll_id);
g_object_unref(monitor->display);
g_object_unref(monitor->cache);
Modified: dumbhippo/trunk/client/linux/src/hippo-platform-impl.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-platform-impl.c 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/src/hippo-platform-impl.c 2008-01-03 22:28:05 UTC (rev 7128)
@@ -448,10 +448,13 @@
case HIPPO_BROWSER_GALEON:
command = g_strdup_printf("galeon %s", quoted);
break;
+ case HIPPO_BROWSER_MAEMO:
+ command = g_strdup_printf("browser --url=%s", quoted);
+ break;
case HIPPO_BROWSER_FIREFOX:
case HIPPO_BROWSER_UNKNOWN: /* FIXME get user's default from gnome */
default:
- command = g_strdup_printf("firefox %s", quoted);
+ command = g_strdup_printf("firefox %s", quoted);
break;
}
Modified: dumbhippo/trunk/client/linux/src/hippo-ui.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-ui.c 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/src/hippo-ui.c 2008-01-03 22:28:05 UTC (rev 7128)
@@ -493,16 +493,19 @@
*/
GdkDisplay *display = gdk_screen_get_display(screen);
GdkWindow *root = gdk_screen_get_root_window(screen);
+#ifndef WITH_MAEMO
Atom current_desktop_atom = gdk_x11_get_xatom_by_name_for_display(display, "_NET_CURRENT_DESKTOP");
+#endif
Atom workarea_atom = gdk_x11_get_xatom_by_name_for_display(display, "_NET_WORKAREA");
int format;
Atom type;
unsigned long n_items;
unsigned long bytes_after;
unsigned char *data;
- guint current_desktop;
+ guint current_desktop = 0;
guint n_desktops;
+#ifndef WITH_MAEMO
if (XGetWindowProperty(GDK_WINDOW_XDISPLAY(root), GDK_WINDOW_XWINDOW(root),
current_desktop_atom,
0, G_MAXLONG, False, XA_CARDINAL,
@@ -519,7 +522,7 @@
current_desktop = ((unsigned long *)data)[0];
XFree(data);
-
+#endif
if (XGetWindowProperty(GDK_WINDOW_XDISPLAY(root), GDK_WINDOW_XWINDOW(root),
workarea_atom,
@@ -542,9 +545,14 @@
}
work_area->x = ((unsigned long *)data)[current_desktop * 4];
+ work_area->width = ((unsigned long *)data)[current_desktop * 4 + 2];
+#ifndef WITH_MAEMO
work_area->y = ((unsigned long *)data)[current_desktop * 4 + 1];
- work_area->width = ((unsigned long *)data)[current_desktop * 4 + 2];
work_area->height = ((unsigned long *)data)[current_desktop * 4 + 3];
+#else
+ work_area->y = ((unsigned long *)data)[current_desktop * 4 + 1] + 50;
+ work_area->height = ((unsigned long *)data)[current_desktop * 4 + 3] - 50;
+#endif
XFree(data);
return;
Modified: dumbhippo/trunk/client/linux/src/hippo-window-gtk.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-window-gtk.c 2008-01-03 21:41:17 UTC (rev 7127)
+++ dumbhippo/trunk/client/linux/src/hippo-window-gtk.c 2008-01-03 22:28:05 UTC (rev 7128)
@@ -69,8 +69,12 @@
static const RoleProperties role_properties[] = {
/* type_hint, skip_taskbar_pager, accept_focus, no_background */
- /* APPLICATION */ { GDK_WINDOW_TYPE_HINT_NORMAL, FALSE, TRUE, FALSE },
+ /* APPLICATION */ { GDK_WINDOW_TYPE_HINT_NORMAL, FALSE, TRUE, FALSE },
+#ifdef WITH_MAEMO
+ /* NOTIFICATION */ { GDK_WINDOW_TYPE_HINT_DIALOG, TRUE, FALSE, TRUE },
+#else
/* NOTIFICATION */ { GDK_WINDOW_TYPE_HINT_DOCK, TRUE, FALSE, TRUE },
+#endif
/* INPUT_POPUP */ { GDK_WINDOW_TYPE_HINT_TOOLBAR, FALSE, TRUE, TRUE },
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]