Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2007-03-31 00:17:42 +0400
committerMiguel de Icaza <miguel@gnome.org>2007-03-31 00:17:42 +0400
commitf6436154c0d3a7fbc9d6dd0676a8656a42a4ba73 (patch)
tree5afb71bfadedf435991f859d7ae8438f46c233f4 /docbrowser
parent00d912f2ee9b3a2a656d3cb56b58ae7e875da86e (diff)
2007-03-17 Kevin Reay <kevintreay@gmail.com>
* browser.cs: Fixed bug where ctrl-clicking link a would cause crash due to AddTab() affecting the current CurrentTab.html.Url variable. * browser.glade: Make browser more gnome HIG compliant; added common HIG-related features. * browser.cs: Fixed paste bug that would cause selected text to not be overridden (in editing mode). svn path=/trunk/mono-tools/; revision=75235
Diffstat (limited to 'docbrowser')
-rw-r--r--docbrowser/ChangeLog9
-rw-r--r--docbrowser/browser.cs39
-rw-r--r--docbrowser/browser.glade110
3 files changed, 131 insertions, 27 deletions
diff --git a/docbrowser/ChangeLog b/docbrowser/ChangeLog
index 4a1f46dc..07c998b8 100644
--- a/docbrowser/ChangeLog
+++ b/docbrowser/ChangeLog
@@ -1,3 +1,12 @@
+2007-03-17 Kevin Reay <kevintreay@gmail.com>
+
+ * browser.cs: Fixed bug where ctrl-clicking link a would cause crash
+ due to AddTab() affecting the current CurrentTab.html.Url variable.
+ * browser.glade: Make browser more gnome HIG compliant; added
+ common HIG-related features.
+ * browser.cs: Fixed paste bug that would cause selected text to
+ not be overridden (in editing mode).
+
2007-03-15 Kevin Reay <kevintreay@gmail.com>
* browser.cs: Fix #80575. Add missing check for null CurrentTab.
diff --git a/docbrowser/browser.cs b/docbrowser/browser.cs
index 7e9998ac..2470b93d 100644
--- a/docbrowser/browser.cs
+++ b/docbrowser/browser.cs
@@ -158,6 +158,7 @@ public class Browser {
[Glade.Widget] CheckMenuItem showinheritedmembers;
[Glade.Widget] CheckMenuItem comments1;
[Glade.Widget] MenuItem postcomment;
+ [Glade.Widget] public MenuItem cut1;
[Glade.Widget] public MenuItem paste1;
[Glade.Widget] public MenuItem print;
public Notebook tabs_nb;
@@ -243,9 +244,9 @@ public class Browser {
Stream icon = GetResourceImage ("monodoc.png");
- if (icon != null){
+ if (icon != null) {
monodoc_pixbuf = new Gdk.Pixbuf (icon);
- MainWindow.Icon = monodoc_pixbuf;
+ MainWindow.Icon = monodoc_pixbuf;
}
//ellipsizing label for the title
@@ -314,6 +315,7 @@ public class Browser {
comments1.Active = SettingsHandler.Settings.ShowComments;
+ cut1.Sensitive = false;
paste1.Sensitive = false;
//
@@ -559,10 +561,12 @@ public class Browser {
public void LinkClicked (object o, EventArgs args)
{
+ string url = CurrentTab.html.Url;
+
if (HoldCtrl)
- AddTab();
+ AddTab ();
- LoadUrl (CurrentTab.html.Url);
+ LoadUrl (url);
}
private System.Xml.XmlNode edit_node;
@@ -924,6 +928,17 @@ ExtLoop:
}
//
+ // Invoked by Edit/Cut menu entry.
+ //
+ void OnCutActivate (object sender, EventArgs a)
+ {
+ if (CurrentTab.Tab_mode == Mode.Editor) {
+ Clipboard cb = Clipboard.Get (Gdk.Selection.Clipboard);
+ CurrentTab.text_editor.Buffer.CutClipboard (cb, true);
+ }
+ }
+
+ //
// Invoked by Edit/Copy menu entry.
//
void OnCopyActivate (object sender, EventArgs a)
@@ -946,9 +961,11 @@ ExtLoop:
if (!cb.WaitIsTextAvailable ())
return;
- string text = cb.WaitForText ();
+ //string text = cb.WaitForText ();
+
+ //CurrentTab.text_editor.Buffer.InsertAtCursor (text);
- CurrentTab.text_editor.Buffer.InsertAtCursor (text);
+ CurrentTab.text_editor.Buffer.PasteClipboard (cb);
}
class About {
@@ -967,7 +984,13 @@ ExtLoop:
about.TransientFor = parent.window1;
- logo_image.Pixbuf = new Gdk.Pixbuf (null, "monodoc.png");
+ Gdk.Pixbuf icon = new Gdk.Pixbuf (null, "monodoc.png");
+
+ if (icon != null) {
+ about.Icon = icon;
+ logo_image.Pixbuf = icon;
+ }
+
Assembly assembly = Assembly.GetExecutingAssembly ();
label_version.Markup = String.Format ("<b>Version:</b> {0}", assembly.GetName ().Version.ToString ());
}
@@ -2392,11 +2415,13 @@ public class Tab : Notebook {
if (m == Mode.Viewer) {
this.Page = 0;
+ browser.cut1.Sensitive = false;
browser.paste1.Sensitive = false;
browser.print.Sensitive = true;
EditImg.Visible = false;
} else {
this.Page = 1;
+ browser.cut1.Sensitive = true;
browser.paste1.Sensitive = true;
browser.print.Sensitive = false;
EditImg.Visible = true;
diff --git a/docbrowser/browser.glade b/docbrowser/browser.glade
index 390da249..a8ab4a20 100644
--- a/docbrowser/browser.glade
+++ b/docbrowser/browser.glade
@@ -63,7 +63,7 @@
<child>
<widget class="GtkImageMenuItem" id="lookup_url1">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Lookup URL</property>
+ <property name="label" translatable="yes">_Lookup URL...</property>
<property name="use_underline">True</property>
<signal name="activate" handler="OnLookupURL" last_modification_time="Tue, 08 Jul 2003 23:25:06 GMT"/>
<accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
@@ -85,9 +85,28 @@
<child>
<widget class="GtkImageMenuItem" id="print">
<property name="visible">True</property>
- <property name="label">gtk-print</property>
- <property name="use_stock">True</property>
+ <property name="label" translatable="yes">_Print...</property>
+ <property name="use_underline">True</property>
<signal name="activate" handler="on_print_activate" last_modification_time="Tue, 30 Aug 2005 05:02:29 GMT"/>
+ <accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image119">
+ <property name="visible">True</property>
+ <property name="stock">gtk-print</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="separator2">
+ <property name="visible">True</property>
</widget>
</child>
@@ -125,6 +144,27 @@
<child>
<widget class="GtkMenu" id="menuitem5_menu">
+ <child>
+ <widget class="GtkImageMenuItem" id="cut1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Cut</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="OnCutActivate" last_modification_time="Tue, 08 Jul 2003 22:53:59 GMT"/>
+ <accelerator key="X" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image120">
+ <property name="visible">True</property>
+ <property name="stock">gtk-cut</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
<child>
<widget class="GtkImageMenuItem" id="copy1">
@@ -171,6 +211,12 @@
</child>
<child>
+ <widget class="GtkMenuItem" id="separator7">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
<widget class="GtkMenuItem" id="select_all1">
<property name="visible">True</property>
<property name="label" translatable="yes">Select All</property>
@@ -250,37 +296,61 @@
<child>
<widget class="GtkMenu" id="contributingMenu_menu">
<child>
- <widget class="GtkCheckMenuItem" id="editing1">
+ <widget class="GtkImageMenuItem" id="contributor_settings1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Edit Mode</property>
+ <property name="label" translatable="yes">_Upload Contributions...</property>
<property name="use_underline">True</property>
- <property name="active">False</property>
- <signal name="activate" handler="OnEditingActivate" last_modification_time="Fri, 03 Oct 2003 22:44:59 GMT"/>
+ <signal name="activate" handler="OnUpload" last_modification_time="Wed, 08 Oct 2003 02:53:43 GMT"/>
+ <accelerator key="U" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image133">
+ <property name="visible">True</property>
+ <property name="stock">gtk-network</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="separator1">
+ <widget class="GtkImageMenuItem" id="contributor_statistics1">
<property name="visible">True</property>
+ <property name="label" translatable="yes">_View Contribution Statistics...</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="OnContributionStatistics" last_modification_time="Wed, 08 Oct 2003 02:53:43 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image133">
+ <property name="visible">True</property>
+ <property name="stock">gtk-find-and-replace</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="contributor_settings1">
+ <widget class="GtkMenuItem" id="separator1">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Upload Contributions</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="OnUpload" last_modification_time="Wed, 08 Oct 2003 02:53:43 GMT"/>
- <accelerator key="U" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="contributor_statistics1">
+ <widget class="GtkCheckMenuItem" id="editing1">
<property name="visible">True</property>
- <property name="label" translatable="yes">_View Contribution Statistics</property>
+ <property name="label" translatable="yes">Edit Mode</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="OnContributionStatistics" last_modification_time="Wed, 08 Oct 2003 02:53:43 GMT"/>
+ <property name="active">False</property>
+ <signal name="activate" handler="OnEditingActivate" last_modification_time="Fri, 03 Oct 2003 22:44:59 GMT"/>
</widget>
</child>
</widget>
@@ -300,14 +370,14 @@
<child>
<widget class="GtkImageMenuItem" id="about1">
<property name="visible">True</property>
- <property name="label" translatable="yes">About</property>
+ <property name="label" translatable="yes">About...</property>
<property name="use_underline">True</property>
<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">
<property name="visible">True</property>
- <property name="stock">gnome-stock-about</property>
+ <property name="stock">gtk-about</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
@@ -985,7 +1055,7 @@
<widget class="GtkWindow" id="lookup">
<property name="visible">True</property>
- <property name="title" translatable="yes">Lookup</property>
+ <property name="title" translatable="yes">Lookup URL</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
@@ -1008,7 +1078,7 @@
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Url to lookup:</property>
+ <property name="label" translatable="yes">_URL to lookup:</property>
<property name="use_underline">True</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>