Changeset 1383
- Timestamp:
- 03/16/07 07:39:08 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007/applications/openmoko-taskmanager/src/list_view.c
r1382 r1383 161 161 /* Destruction */ 162 162 void 163 moko_task_list_clear(MokoTaskList *l) { 163 moko_task_list_clear(MokoTaskList *l) 164 { 164 165 if (!l) g_free (l); 165 166 } … … 174 175 name = moko_get_window_name(dpy, w); 175 176 if (!strcmp (name, "Openmoko-taskmanager")) 176 {177 { 177 178 g_free (name); 178 179 return; 179 }180 } 180 181 181 182 icon = moko_get_window_icon (dpy, w); … … 183 184 gtk_list_store_set (list_store, &iter, TEXT_COL, name, OBJECT_COL, w, -1); 184 185 185 if (icon) { 186 if (icon) 187 { 186 188 GdkPixbuf *icons = gdk_pixbuf_scale_simple (icon, 160, 160, GDK_INTERP_BILINEAR); 187 189 gtk_list_store_set (list_store, &iter, PIXBUF_COL, icons, -1); 188 gdk_pixbuf_unref (icons);189 }190 gdk_pixbuf_unref (icons); 191 } 190 192 else if (default_icon) 191 193 gtk_list_store_set (list_store, &iter, PIXBUF_COL, default_icon, -1); … … 193 195 g_error ("Failed to load %s's icon", name); 194 196 195 gdk_pixbuf_unref (icon); 197 if (icon) 198 gdk_pixbuf_unref (icon); 196 199 g_free (name); 197 }200 } 198 201 199 202 void … … 215 218 Window w; 216 219 gtk_tree_model_get (GTK_TREE_MODEL (list_store), &iter, OBJECT_COL, &w, -1); 217 for (i=0; i<nr; i++) { 218 if (list[i] == w) { 220 for (i=0; i<nr; i++) 221 { 222 if (list[i] == w) 223 { 219 224 p[i] = 1; 220 225 found = TRUE; 221 226 break; 222 }223 227 } 228 } 224 229 if (found) 225 230 more = gtk_tree_model_iter_next (GTK_TREE_MODEL (list_store), &iter); … … 230 235 } 231 236 232 for (i=0; i<nr; i++) { 237 for (i=0; i<nr; i++) 238 { 233 239 if (p[i] == 0 && list[i] != my_win) 234 240 moko_add_window (dpy, list[i], list_store); 235 }241 } 236 242 237 243 g_free (p);
Note: See TracChangeset
for help on using the changeset viewer.
