~siretart/gxine/bug.542506

« back to all changes in this revision

Viewing changes to src/post.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-03-21 11:24:59 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080321112459-igb0jy01nytpdrzt
Tags: 0.5.901-1ubuntu1
* merge debian changes for hardy PPA. Remaining changes:
  - debian/control: added Xb-Npp-xxx tags accordingly to "firefox distro
    add-on suport" spec,
    (https://blueprints.launchpad.net/ubuntu/+spec/firefox-distro-addon-support)
* Feature Freeze exception granted in LP: #204563
* New upstream release fixes playing DVDs. LP: #128864
* mime.default: add "x-content/video-dvd;x-content/video-vcd;x-content/video-svcd;"
  to get it listed as a player for dvd and video cds in nautilus. Thanks to
  Sebastien Bacher for the hint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004-2006 the xine-project
 
2
 * Copyright (C) 2004-2007 the xine-project
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or
5
5
 * modify it under the terms of the GNU General Public License as
16
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
17
17
 * USA
18
18
 *
19
 
 * $Id: post.c,v 1.45 2006/04/09 14:27:29 dsalt Exp $
20
 
 *
21
19
 * post-plugin handling
22
20
 */
23
21
 
507
505
                                 GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
508
506
                                 GTK_STOCK_OK, GTK_RESPONSE_OK,
509
507
                                 NULL);
 
508
  GtkDialog *dbox = GTK_DIALOG (info->dbox);
510
509
  g_signal_connect (G_OBJECT(info->dbox), "response",
511
510
                    G_CALLBACK(post_config_post_response), info);
512
 
  gtk_dialog_set_default_response (GTK_DIALOG (info->dbox), GTK_RESPONSE_OK);
 
511
  gtk_dialog_set_default_response (dbox, GTK_RESPONSE_OK);
513
512
  ui_add_undo_response (info->dbox, NULL);
514
513
  free (title);
515
514
  table = gtk_table_new (1, 2, FALSE);
516
 
  gtk_box_pack_start (GTK_BOX(GTK_DIALOG(info->dbox)->vbox), table,
517
 
                      FALSE, TRUE, 0);
 
515
  gtk_box_pack_start (GTK_BOX(dbox->vbox), table, FALSE, TRUE, 0);
518
516
 
519
517
  info->params = post_parse_parameters (info->plugin, info->parameters);
520
518
  param = param_desc->parameter - 1;
543
541
      {
544
542
        GtkObject *adj =
545
543
          gtk_adjustment_new (*(int *)param_p, INT_MIN, INT_MAX, 1, 10, 0);
546
 
        widget = gtk_spin_button_new (GTK_ADJUSTMENT(adj), 1, 0);
547
 
        gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON(widget),
548
 
                                           GTK_UPDATE_ALWAYS);
549
 
        gtk_spin_button_set_numeric (GTK_SPIN_BUTTON(widget), TRUE);
 
544
        widget = ui_spin_button_new (adj);
550
545
        g_signal_connect (G_OBJECT(widget), "value-changed",
551
546
                          G_CALLBACK(spin_cb), param_p);
552
547
      }
564
559
        adj = gtk_adjustment_new (*(double *)param_p,
565
560
                                  param->range_min, param->range_max,
566
561
                                  step, page, 0);
567
 
        widget = gtk_hscale_new (GTK_ADJUSTMENT(adj));
 
562
        widget = ui_hscale_new (adj, GTK_POS_TOP, floating ? 2 : 0);
568
563
        gtk_widget_set_size_request (widget, 100, -1);
569
 
        gtk_scale_set_draw_value (GTK_SCALE(widget), TRUE);
570
 
        gtk_scale_set_value_pos (GTK_SCALE(widget), GTK_POS_TOP);
571
 
        gtk_scale_set_digits (GTK_SCALE(widget), floating ? 2 : 0); /* hmm... */
572
564
        g_signal_connect (G_OBJECT (adj), "value-changed",
573
565
                          G_CALLBACK (range_cb), param_p);
574
566
      }
607
599
    if (param->description)
608
600
      gtk_tooltips_set_tip (tips, widget, param->description, NULL);
609
601
 
610
 
    widget = gtk_label_new (param->name);
611
 
    gtk_misc_set_alignment (GTK_MISC (widget), 1, 0.5);
 
602
    widget = ui_label_new_with_xalign (param->name, 1);
612
603
    gtk_table_attach (GTK_TABLE(table), widget,
613
604
                      0, 1, param_count, param_count + 1,
614
605
                      GTK_FILL, GTK_FILL, 2, 2);
679
670
                                      GTK_POLICY_AUTOMATIC);
680
671
 
681
672
      gtk_widget_set_size_request (window, 1, -1);
682
 
      gtk_box_pack_end (GTK_BOX(GTK_DIALOG(info->dbox)->vbox), window,
683
 
                        TRUE, TRUE, 2);
 
673
      gtk_box_pack_end (GTK_BOX(dbox->vbox), window, TRUE, TRUE, 2);
684
674
    }
685
675
    free (helptext);
686
676
 
687
 
    gtk_box_pack_end (GTK_BOX(GTK_DIALOG(info->dbox)->vbox),
 
677
    gtk_box_pack_end (GTK_BOX(dbox->vbox),
688
678
                      gtk_hseparator_new (), FALSE, TRUE, 2);
689
679
  }
690
680
 
695
685
    GdkGeometry geom;
696
686
    geom.width_inc = 0;
697
687
    geom.height_inc = 1;
698
 
    gtk_window_set_geometry_hints (GTK_WINDOW(info->dbox), info->dbox, &geom,
 
688
    gtk_window_set_geometry_hints (GTK_WINDOW(dbox), info->dbox, &geom,
699
689
                                   GDK_HINT_RESIZE_INC);
700
690
  }
701
691
 
890
880
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w), enabled);
891
881
  gtk_box_pack_start (GTK_BOX(info->box), w, FALSE, TRUE, 0);
892
882
 
 
883
  GtkBox *box = GTK_BOX (info->box);
 
884
 
893
885
  /* FIXME but not until combo box menu items can have tooltips */
894
886
  w = gtk_option_menu_new ();
895
887
  gtk_option_menu_set_menu (GTK_OPTION_MENU(w), m);
896
888
  gtk_option_menu_set_history (GTK_OPTION_MENU(w), history);
897
 
  gtk_box_pack_start_defaults (GTK_BOX(info->box), w);
 
889
  gtk_box_pack_start_defaults (box, w);
898
890
  g_signal_connect (G_OBJECT(w), "changed",
899
891
                    G_CALLBACK(post_config_post_chain_set_plugin), info);
900
892
  if (hist_desc)
902
894
 
903
895
  info->up = w = ui_button_new_stock (GTK_STOCK_GO_UP);
904
896
  gtk_widget_set_sensitive (w, !!chain->plugins); /* disable for first plugin */
905
 
  gtk_box_pack_end (GTK_BOX(info->box), w, FALSE, TRUE, 0);
 
897
  gtk_box_pack_end (box, w, FALSE, TRUE, 0);
906
898
  g_signal_connect (G_OBJECT(w), "clicked",
907
899
                    G_CALLBACK(post_config_post_chain_move_plugin), info);
908
900
 
909
901
  w = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
910
 
  gtk_box_pack_end (GTK_BOX(info->box), w, FALSE, TRUE, 0);
 
902
  gtk_box_pack_end (box, w, FALSE, TRUE, 0);
911
903
  g_signal_connect (G_OBJECT(w), "clicked",
912
904
                    G_CALLBACK(post_config_post_chain_delete_plugin), info);
913
905
 
914
906
  info->pref = w = gtk_toggle_button_new_with_label (GTK_STOCK_PROPERTIES);
915
907
  g_object_set (G_OBJECT(w), "use-stock", TRUE, NULL);
916
 
  gtk_box_pack_end (GTK_BOX(info->box), w, FALSE, TRUE, 0);
 
908
  gtk_box_pack_end (box, w, FALSE, TRUE, 0);
917
909
  if (!xine_post_input (post, "parameters"))
918
910
    gtk_widget_set_sensitive (w, FALSE);
919
911
  info->pref_toggled = g_signal_connect (G_OBJECT(w), "toggled",