r3607 - in trunk/src/target/OM-2007.2/applications/openmoko-today2: . src
chris at sita.openmoko.org
chris at sita.openmoko.org
Thu Dec 6 15:40:33 CET 2007
Author: chris
Date: 2007-12-06 15:40:32 +0100 (Thu, 06 Dec 2007)
New Revision: 3607
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-task-manager.c
Log:
* src/today-task-manager.c: (window_get_icon),
(today_task_manager_populate_tasks), (set_focus_cb),
(today_task_manager_page_create):
Set the icon size correctly
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog 2007-12-06 14:40:05 UTC (rev 3606)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog 2007-12-06 14:40:32 UTC (rev 3607)
@@ -1,5 +1,12 @@
2007-12-06 Chris Lord <chris at openedhand.com>
+ * src/today-task-manager.c: (window_get_icon),
+ (today_task_manager_populate_tasks), (set_focus_cb),
+ (today_task_manager_page_create):
+ Set the icon size correctly
+
+2007-12-06 Chris Lord <chris at openedhand.com>
+
* src/today-main.c: (main):
Add dbus signal before trying to connect to it
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-task-manager.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-task-manager.c 2007-12-06 14:40:05 UTC (rev 3606)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-task-manager.c 2007-12-06 14:40:32 UTC (rev 3607)
@@ -29,6 +29,7 @@
static gboolean hidden = TRUE;
static Atom atoms[N_ATOMS];
+static GtkIconSize icon_size;
static GdkFilterReturn
filter_func (GdkXEvent *xevent, GdkEvent *event, TodayData *data);
@@ -201,7 +202,7 @@
/* Got it. Now what size icon are we looking for? */
settings = gtk_widget_get_settings (GTK_WIDGET (tdata->tasks_table));
gtk_icon_size_lookup_for_settings (settings,
- GTK_ICON_SIZE_MENU,
+ icon_size,
&ideal_width,
&ideal_height);
@@ -378,7 +379,7 @@
/* Load into menu */
current = gdk_screen_get_active_window (screen);
for (i = 0; i < nitems; i++) {
- char *name;
+ char *name, *bname;
GtkWidget *task_tile;
GdkPixbuf *icon;
GdkWindow *window;
@@ -403,8 +404,8 @@
name = window_get_name (data, windows[i]);
task_tile = taku_icon_tile_new ();
taku_icon_tile_set_primary (TAKU_ICON_TILE (task_tile), name);
+ g_free (name);
taku_icon_tile_set_secondary (TAKU_ICON_TILE (task_tile), "");
- g_free (name);
icon = window_get_icon (data, windows[i]);
if (icon) {
@@ -460,8 +461,10 @@
static void
set_focus_cb (GtkWindow *window, GtkWidget *widget, TodayData *data)
{
- gtk_widget_set_sensitive (data->kill_button, TAKU_IS_TILE (widget));
- gtk_widget_set_sensitive (data->switch_button, TAKU_IS_TILE (widget));
+ gtk_widget_set_sensitive (GTK_WIDGET (data->kill_button),
+ TAKU_IS_TILE (widget));
+ gtk_widget_set_sensitive (GTK_WIDGET (data->switch_button),
+ TAKU_IS_TILE (widget));
}
static void
@@ -747,6 +750,11 @@
{
GtkWidget *vbox, *toolbar, *viewport, *scroll;
+ icon_size = gtk_icon_size_from_name ("taku-icon");
+ if (icon_size == GTK_ICON_SIZE_INVALID) {
+ icon_size = GTK_ICON_SIZE_BUTTON;
+ }
+
vbox = gtk_vbox_new (FALSE, 0);
/* Create toolbar */
More information about the commitlog
mailing list