Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Commits

r19383 - in projects/haf/trunk/hildon-control-panel: . debian src

 

 

Maemo commits RSS feed   Index | Next | Previous | View Threaded


subversion at stage

Sep 23, 2009, 3:39 PM

Post #1 of 1 (401 views)
Permalink
r19383 - in projects/haf/trunk/hildon-control-panel: . debian src

Author: paradi
Date: 2009-09-24 01:39:06 +0300 (Thu, 24 Sep 2009)
New Revision: 19383

Modified:
projects/haf/trunk/hildon-control-panel/ChangeLog
projects/haf/trunk/hildon-control-panel/configure.ac
projects/haf/trunk/hildon-control-panel/debian/changelog
projects/haf/trunk/hildon-control-panel/src/hcp-program.h
projects/haf/trunk/hildon-control-panel/src/hcp-window.c
Log:
* Fixes: NB#139895 - Control panel needs to take a screenshot



Modified: projects/haf/trunk/hildon-control-panel/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-control-panel/ChangeLog 2009-09-23 11:10:48 UTC (rev 19382)
+++ projects/haf/trunk/hildon-control-panel/ChangeLog 2009-09-23 22:39:06 UTC (rev 19383)
@@ -1,3 +1,15 @@
+2009-09-23 Peter Aradi <peter.aradi [at] maemo>
+
+ Release 2.2.17
+
+ * configure.ac: 2.2.17
+
+2009-09-23 Peter Aradi <peter.aradi [at] maemo>
+
+ * src/hcp-window.c:
+ * src/hcp-program.h:
+ Taking screenshot for faking faster startup.
+
2009-09-03 Peter Aradi <peter.aradi [at] maemo>

* src/hcp-app-view.c:

Modified: projects/haf/trunk/hildon-control-panel/configure.ac
===================================================================
--- projects/haf/trunk/hildon-control-panel/configure.ac 2009-09-23 11:10:48 UTC (rev 19382)
+++ projects/haf/trunk/hildon-control-panel/configure.ac 2009-09-23 22:39:06 UTC (rev 19383)
@@ -1,5 +1,5 @@
AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(hildon-control-panel, 2.2.15)
+AM_INIT_AUTOMAKE(hildon-control-panel, 2.2.17)
AM_CONFIG_HEADER(config.h)

AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[Debug (default=no)])],

Modified: projects/haf/trunk/hildon-control-panel/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-control-panel/debian/changelog 2009-09-23 11:10:48 UTC (rev 19382)
+++ projects/haf/trunk/hildon-control-panel/debian/changelog 2009-09-23 22:39:06 UTC (rev 19383)
@@ -1,3 +1,9 @@
+hildon-control-panel (1:2.2.17-1) unstable; urgency=low
+
+ * Fixes: NB#139895 - Control panel needs to take a screenshot
+
+ -- Peter Aradi <peter.aradi [at] maemo> Thu, 23 Sep 2009 18:42:17 +0100
+
hildon-control-panel (1:2.2.16-1) unstable; urgency=low

* Fixes: NB#131500 - Control panel layout incorrect

Modified: projects/haf/trunk/hildon-control-panel/src/hcp-program.h
===================================================================
--- projects/haf/trunk/hildon-control-panel/src/hcp-program.h 2009-09-23 11:10:48 UTC (rev 19382)
+++ projects/haf/trunk/hildon-control-panel/src/hcp-program.h 2009-09-23 22:39:06 UTC (rev 19383)
@@ -55,6 +55,9 @@
HCPAppList *al;
osso_context_t *osso;
gint execute;
+ /* signal handler id, currently used for screenshot when window is visible
+ * with it's contents */
+ gulong handler_id;
};

struct _HCPProgramClass

Modified: projects/haf/trunk/hildon-control-panel/src/hcp-window.c
===================================================================
--- projects/haf/trunk/hildon-control-panel/src/hcp-window.c 2009-09-23 11:10:48 UTC (rev 19382)
+++ projects/haf/trunk/hildon-control-panel/src/hcp-window.c 2009-09-23 22:39:06 UTC (rev 19383)
@@ -83,6 +83,7 @@

#define HCP_CUD_WARNING _("cud_ia_text")
#define HCP_CUD_SCRIPT "/usr/sbin/osso-app-killer-cud.sh"
+#define HCP_SCREENSHOT_PATH "/home/user/.cache/launch/com.nokia.controlpanel.pvr"

static void
hcp_window_enforce_state (HCPWindow *window)
@@ -455,7 +456,7 @@
hcp_app_view_populate (HCP_APP_VIEW (priv->view), al);

gtk_widget_show_all (priv->view);
-
+
if (priv->focused_item == NULL)
return;

@@ -498,6 +499,29 @@
gtk_main_quit ();
}

+static gboolean
+hcp_take_screenshot (gpointer data)
+{
+
+ if (!g_file_test(HCP_SCREENSHOT_PATH, G_FILE_TEST_EXISTS)){
+ g_debug("taking screenshot");
+ hildon_gtk_window_take_screenshot(GTK_WINDOW(data), TRUE);
+ }
+ return FALSE;
+}
+
+static gboolean
+_expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
+{
+ HCPProgram *program = hcp_program_get_instance ();
+
+ g_timeout_add (80, hcp_take_screenshot, program->window);
+
+ /* we only need to call this once */
+ g_signal_handler_disconnect(G_OBJECT(data), program->handler_id);
+ return FALSE;
+}
+
static void
hcp_window_construct_ui (HCPWindow *window)
{
@@ -601,7 +625,6 @@
hildon_pannable_area_add_with_viewport (
HILDON_PANNABLE_AREA (scrolled_window),
align);
-
}

static void
@@ -634,6 +657,9 @@
hcp_window_construct_ui (window);

hcp_app_view_populate (HCP_APP_VIEW (priv->view), priv->al);
+
+ program->handler_id = g_signal_connect_after (G_OBJECT (priv->view), "expose-event",
+ G_CALLBACK (_expose_cb), priv->view);
}

static void

_______________________________________________
maemo-commits mailing list
maemo-commits [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-commits

Maemo commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.