Hi,

This is my first time, how can i commit it?
Tell me if i'm doing something wrong.
Regards,

João Carlos Ribeiro Luís
SomagueTI

Rua da Tapada da Quinta de Cima - Linhó
2714-555 Sintra - Portugal
Email: [EMAIL PROTECTED]
Work Email: [EMAIL PROTECTED]
Site: www.somagueti.pt

--- ../mono/monodoc/browser/browser.cs  2004-03-25 15:59:27.000000000 +0000
+++ browser.cs  2004-04-09 00:00:28.000000000 +0000
@@ -12,6 +12,7 @@
 //
 using Gtk;
 using Glade;
+using Gnome;
 using System;
 using System.IO;
 using System.Reflection;
@@ -92,13 +93,13 @@
        Gtk.Window MainWindow;
        Style bar_style;
 
-       [Glade.Widget] public Window window1;
+       [Glade.Widget] public Gtk.Window window1;
        [Glade.Widget] TreeView reference_tree;
        [Glade.Widget] TreeView bookmark_tree;
        [Glade.Widget] ScrolledWindow html_container;
        [Glade.Widget] Statusbar statusbar;
        [Glade.Widget] Button back_button, forward_button;
-       [Glade.Widget] Entry index_entry;
+       [Glade.Widget] Gtk.Entry index_entry;
        [Glade.Widget] CheckMenuItem editing1;
        [Glade.Widget] CheckMenuItem comments1;
        [Glade.Widget] MenuItem postcomment;
@@ -295,6 +296,47 @@
                }
                args.Handle.Close (HTMLStreamStatus.Ok);
        }
+
+       void PrintEngine (PrintContext gpc)
+       {
+               html.Print (gpc);
+       }
+       
+       void on_print1_activate (object sender, EventArgs e)
+       {
+               Console.WriteLine ("print1_activate");
+               
+               PrintJob pj = new PrintJob (PrintConfig.Default ());
+               html.PrintSetMaster (pj);
+
+               PrintDialog dialog = new PrintDialog (pj, "Print Mono Documentation", 
0);
+               int response = dialog.Run ();
+               Console.WriteLine ("response: " + response);
+               
+               if (response == (int) PrintButtons.Cancel) {
+                       Console.WriteLine ("Canceled");
+                       dialog.Hide ();
+                       dialog.Dispose ();
+                       return;
+               }
+
+               PrintContext ctx = pj.Context;
+               PrintEngine (ctx); 
+
+               pj.Close ();
+               
+               switch (response) {
+               case (int) PrintButtons.Print: 
+                       pj.Print (); 
+                       break;
+               case (int) PrintButtons.Preview:
+                       new PrintJobPreview (pj, "Print Mono Documentation").Show ();
+                       break;
+               }
+
+               dialog.Hide ();
+               dialog.Dispose ();      
+       }
        
        public class LinkPageVisit : PageVisit {
                Browser browser;
@@ -549,7 +591,7 @@
        }
 
        class About {
-               [Glade.Widget] Window about;
+               [Glade.Widget] Gtk.Window about;
                [Glade.Widget] Image logo_image;
 
                static About AboutBox;
@@ -769,11 +811,11 @@
        class ConfigWizard {
                static ConfigWizard config_wizard;
                
-               [Glade.Widget] Window window_config_wizard;
+               [Glade.Widget] Gtk.Window window_config_wizard;
                [Glade.Widget] Notebook notebook;
                [Glade.Widget] Button button_email_ok;
-               [Glade.Widget] Entry entry_email;
-               [Glade.Widget] Entry entry_password;
+               [Glade.Widget] Gtk.Entry entry_email;
+               [Glade.Widget] Gtk.Entry entry_password;
                
                Browser parent;
                ContributionsSoap d;
@@ -963,8 +1005,8 @@
 
 
        class NewComment {
-               [Glade.Widget] Window newcomment;
-               [Glade.Widget] Entry entry;
+               [Glade.Widget] Gtk.Window newcomment;
+               [Glade.Widget] Gtk.Entry entry;
                static NewComment NewCommentBox;
                Browser parent;
                
@@ -1012,8 +1054,8 @@
 
 
        class Lookup {
-               [Glade.Widget] Window lookup;
-               [Glade.Widget] Entry entry;
+               [Glade.Widget] Gtk.Window lookup;
+               [Glade.Widget] Gtk.Entry entry;
                static Lookup LookupBox;
                Browser parent;
                
@@ -1198,7 +1240,7 @@
        }
 
        class BookmarkEdit {
-               [Glade.Widget] Window bookmarks_edit;
+               [Glade.Widget] Gtk.Window bookmarks_edit;
                [Glade.Widget] Button bookmarks_delete;
                [Glade.Widget] TreeView bookmarks_treeview;
                TreeStore store;
--- ../mono/monodoc/browser/browser.glade       2004-03-23 16:14:55.000000000 +0000
+++ browser.glade       2004-04-09 00:00:29.000000000 +0000
@@ -2,6 +2,7 @@
 <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
 
 <glade-interface>
+<requires lib="gnome"/>
 
 <widget class="GtkWindow" id="window1">
   <property name="visible">True</property>
@@ -42,7 +43,7 @@
                      <accelerator key="L" modifiers="GDK_CONTROL_MASK" 
signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image118">
+                       <widget class="GtkImage" id="image141">
                          <property name="visible">True</property>
                          <property name="stock">gtk-jump-to</property>
                          <property name="icon_size">1</property>
@@ -66,6 +67,26 @@
                  </child>
 
                  <child>
+                   <widget class="GtkMenuItem" id="separador1">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="print1">
+                     <property name="visible">True</property>
+                     <property 
name="stock_item">GNOMEUIINFO_MENU_PRINT_ITEM</property>
+                     <signal name="activate" handler="on_print1_activate" 
last_modification_time="Wed, 07 Apr 2004 21:13:46 GMT"/>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="separador2">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
                    <widget class="GtkImageMenuItem" id="quit1">
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Quit</property>
@@ -74,7 +95,7 @@
                      <accelerator key="Q" modifiers="GDK_CONTROL_MASK" 
signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image119">
+                       <widget class="GtkImage" id="image142">
                          <property name="visible">True</property>
                          <property name="stock">gtk-quit</property>
                          <property name="icon_size">1</property>
@@ -109,7 +130,7 @@
                      <accelerator key="C" modifiers="GDK_CONTROL_MASK" 
signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image120">
+                       <widget class="GtkImage" id="image143">
                          <property name="visible">True</property>
                          <property name="stock">gtk-copy</property>
                          <property name="icon_size">1</property>
@@ -232,7 +253,7 @@
                      <signal name="activate" handler="OnAboutActivate" 
last_modification_time="Tue, 08 Jul 2003 22:54:49 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image121">
+                       <widget class="GtkImage" id="image144">
                          <property name="visible">True</property>
                          <property name="stock">gnome-stock-about</property>
                          <property name="icon_size">1</property>

Attachment: signature.asc
Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente

Reply via email to