~kripkenstein/valence/devel

« back to all changes in this revision

Viewing changes to valence.vala

  • Committer: alon
  • Date: 2008-01-23 21:42:29 UTC
  • Revision ID: alon@dignity-20080123214229-c483c9c6408izj9y
new widget for clutter, rewrite much of gui

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
        private Gtk.Label          max_page_label;
104
104
        private ZoomComboBox       zoom_combobox;
105
105
        private LayoutComboBox     layout_combobox;
106
 
        private Gtk.ScrolledWindow main_scrolledwindow;
107
106
 
108
107
        private ValenceView      main_view;
109
108
 
340
339
 
341
340
 
342
341
                // Main Image & Scrolledwindow for it & Viewport
343
 
                main_scrolledwindow = main_view.view_scrolledwindow;
 
342
//              main_scrolledwindow = main_view.view_scrolledwindow;
344
343
 
345
344
                // Main VBox
346
345
                main_vbox = new Gtk.VBox(false, 0);
351
350
                main_vbox.add(main_toolbar);
352
351
                main_vbox.set_child_packing(main_toolbar, false, false, 0, Gtk.PackType.START);
353
352
 
354
 
                main_vbox.add(main_scrolledwindow);
 
353
                main_vbox.add(main_view.main_table);
355
354
 
356
355
                // Main Window
357
356
                try {
461
460
                unfullscreen();
462
461
                at_fullscreen = false;
463
462
                // TODO: Set to whatever is right
464
 
                main_view.view_scrolledwindow.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS);
 
463
//              main_view.view_scrolledwindow.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS);
465
464
                main_menubar.show();
466
465
                main_toolbar.show();
467
466
                at_fullscreen = false;
469
468
 
470
469
        private void enter_presentation() {
471
470
                main_view.set_center_docspace_position(0, 0);
472
 
                main_view.view_scrolledwindow.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER);
 
471
//              main_view.view_scrolledwindow.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER);
473
472
                main_menubar.hide();
474
473
                main_toolbar.hide();
475
474
                main_view.set_zoom_state(ZoomState.PAGE);
540
539
                Debug.mutter("Callbacked!");
541
540
//              Gdk.threads_enter();
542
541
                page_entry_field.set_text((page+1).to_string());
 
542
                Debug.mutter("ok.");
543
543
//              Gdk.threads_leave();
544
544
        }
545
545
 
661
661
 
662
662
                        // Wait for all to happen, then grab focus
663
663
                        while (Gtk.events_pending()) { Gtk.main_iteration_do(false); }
664
 
                        main_scrolledwindow.grab_focus();
 
664
                        main_view.main_table.grab_focus();
665
665
                }
666
666
        }
667
667
 
810
810
 
811
811
                Clutter.init (ref args); // TODO: Args?
812
812
 
813
 
                var stage = (Stage) Stage.get_default ();
814
 
                Clutter.Color stage_color;
815
 
                Clutter.Color.parse ("#ccccccff", out stage_color);
816
 
                stage.set_color (ref stage_color);
 
813
//              var stage = (Stage) Stage.get_default ();
 
814
//              Clutter.Color stage_color;
 
815
//              Clutter.Color.parse ("#ccccccff", out stage_color);
 
816
//              stage.set_color (ref stage_color);
817
817
 
818
818
//              stage.set_perspective(60, 1, (float)0.2, (float)100);
819
819
//              float fovy, aspect, near, far;
820
820
//              stage.get_perspective(out fovy, out aspect, out near, out far);
821
821
//              Debug.mutter("%f, %f, %f, %f\r\n", fovy, aspect, near, far);
822
822
 
823
 
                stage.show();
 
823
//              stage.show();
824
824
 
825
825
                MemoryManager.set_dynamic_max();
826
826