~ubuntu-branches/ubuntu/precise/gcompris/precise

« back to all changes in this revision

Viewing changes to src/imageid-activity/imageid.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-01-10 01:37:41 UTC
  • mto: This revision was merged to the branch mainline in revision 48.
  • Revision ID: package-import@ubuntu.com-20120110013741-q90ulmfrj910igm3
Tags: upstream-12.01
ImportĀ upstreamĀ versionĀ 12.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
  gchar *filename = NULL;
146
146
  GHashTable *config = gc_db_get_board_conf();
147
147
 
148
 
  gc_locale_change(g_hash_table_lookup( config, "locale"));
 
148
  gc_locale_set(g_hash_table_lookup( config, "locale"));
149
149
 
150
150
  g_hash_table_destroy(config);
151
151
 
192
192
      destroy_board_list();
193
193
    }
194
194
 
195
 
  gc_locale_reset();
 
195
  gc_locale_set( NULL );
196
196
 
197
197
  gcomprisBoard = NULL;
198
198
}
214
214
{
215
215
  if (gcomprisBoard)
216
216
    {
217
 
      if(g_strcasecmp(gcomprisBoard->type, "imageid")==0)
 
217
      if(g_ascii_strcasecmp(gcomprisBoard->type, "imageid")==0)
218
218
        {
219
219
          /* Set the plugin entry */
220
220
          gcomprisBoard->plugin=&menu_bp;
315
315
                               y,
316
316
                               NULL);
317
317
 
 
318
#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
318
319
  gdk_pixbuf_unref(pixmap);
 
320
#else
 
321
  g_object_unref(pixmap);
 
322
#endif
319
323
 
320
324
  xp = HORIZONTAL_SEPARATION;
321
325
 
349
353
                      "button", button);
350
354
 
351
355
      g_signal_connect(button, "button_press_event",
352
 
                       (GtkSignalFunc) item_event,
 
356
                       (GCallback) item_event,
353
357
                       GINT_TO_POINTER(i));
354
358
 
355
359
      item = goo_canvas_text_new (group,
363
367
                                  NULL);
364
368
 
365
369
      g_signal_connect(item, "button_press_event",
366
 
                       (GtkSignalFunc) item_event,
 
370
                       (GCallback) item_event,
367
371
                       GINT_TO_POINTER(i));
368
372
 
369
373
      item = goo_canvas_text_new (group,
377
381
                                  NULL);
378
382
 
379
383
      g_signal_connect(item, "button_press_event",
380
 
                       (GtkSignalFunc) item_event,
 
384
                       (GCallback) item_event,
381
385
                       GINT_TO_POINTER(i));
382
386
 
383
387
      yp +=  button_pixmap_height + vertical_separation;
573
577
  xmlNodePtr node;
574
578
 
575
579
  for(node = doc->children->children; node != NULL; node = node->next) {
576
 
    if ( g_strcasecmp((gchar *)node->name, "Board") == 0 )
 
580
    if ( g_ascii_strcasecmp((gchar *)node->name, "Board") == 0 )
577
581
      add_xml_data(doc, node, NULL);
578
582
  }
579
583
 
601
605
     /* if it doesn't have a name */
602
606
     !doc->children->name ||
603
607
     /* if it isn't a ImageId node */
604
 
     g_strcasecmp((char *)doc->children->name,"ImageId")!=0) {
 
608
     g_ascii_strcasecmp((char *)doc->children->name,"ImageId")!=0) {
605
609
    xmlFreeDoc(doc);
606
610
    return FALSE;
607
611
  }
662
666
                            (gchar *) value);
663
667
}
664
668
 
665
 
static GcomprisConfCallback conf_ok(GHashTable *table)
 
669
static gboolean conf_ok(GHashTable *table)
666
670
{
667
671
  if (!table){
668
672
    if (gcomprisBoard)
669
673
      pause_board(FALSE);
670
 
    return NULL;
 
674
    return TRUE;
671
675
  }
672
676
 
673
677
  g_hash_table_foreach(table, (GHFunc) save_table, NULL);
696
700
  board_conf = NULL;
697
701
  profile_conf = NULL;
698
702
 
699
 
  return NULL;
 
703
  return TRUE;
700
704
}
701
705
 
702
706
static void
714
718
                                 aProfile ? aProfile->name : "");
715
719
  GcomprisBoardConf *bconf;
716
720
  bconf = gc_board_config_window_display( label,
717
 
                                 (GcomprisConfCallback )conf_ok);
 
721
                                 conf_ok);
718
722
 
719
723
  g_free(label);
720
724