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

github.com/mono/mono-addins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez Gual <lluis@novell.com>2011-02-16 15:57:52 +0300
committerLluis Sanchez Gual <lluis@novell.com>2011-02-16 15:57:52 +0300
commite31b73c435d18ea9c3c2a0cbd2e0c7936096040a (patch)
tree8930351b0b6c3843905365d074c3602f4ebcd914 /Mono.Addins.Gui
parent3464cc173c8338aad177a8906ce9abf426120e0c (diff)
Properly resize the install dialog when there is too much text.
Diffstat (limited to 'Mono.Addins.Gui')
-rw-r--r--Mono.Addins.Gui/Mono.Addins.Gui/InstallDialog.cs12
-rw-r--r--Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.InstallDialog.cs66
-rw-r--r--Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.NewSiteDialog.cs1
-rw-r--r--Mono.Addins.Gui/gtk-gui/gui.stetic19
4 files changed, 65 insertions, 33 deletions
diff --git a/Mono.Addins.Gui/Mono.Addins.Gui/InstallDialog.cs b/Mono.Addins.Gui/Mono.Addins.Gui/InstallDialog.cs
index 3db1287..9138399 100644
--- a/Mono.Addins.Gui/Mono.Addins.Gui/InstallDialog.cs
+++ b/Mono.Addins.Gui/Mono.Addins.Gui/InstallDialog.cs
@@ -42,6 +42,7 @@ namespace Mono.Addins.Gui
string uninstallId;
InstallMonitor installMonitor;
bool installing;
+ const int MaxHeight = 350;
public InstallDialog (Gtk.Window parent, SetupService service)
{
@@ -50,6 +51,7 @@ namespace Mono.Addins.Gui
TransientFor = parent;
WindowPosition = Gtk.WindowPosition.CenterOnParent;
boxProgress.Visible = false;
+ Resizable = false;
}
public void InitForInstall (AddinRepositoryEntry[] addinsToInstall)
@@ -152,9 +154,14 @@ namespace Mono.Addins.Gui
void ShowMessage (string txt)
{
- labelInfo.Markup = txt;
- if (labelInfo.SizeRequest ().Height > 400)
+ labelInfo.Markup = txt.TrimEnd ('\n','\t',' ');
+ if (labelInfo.SizeRequest ().Height > MaxHeight) {
scrolledwindow1.VscrollbarPolicy = Gtk.PolicyType.Automatic;
+ scrolledwindow1.HeightRequest = MaxHeight;
+ }
+ else {
+ scrolledwindow1.HeightRequest = labelInfo.SizeRequest ().Height;
+ }
}
protected virtual void OnButtonOkClicked (object sender, System.EventArgs e)
@@ -177,6 +184,7 @@ namespace Mono.Addins.Gui
void Install ()
{
+ insSeparator.Visible = true;
boxProgress.Visible = true;
buttonOk.Sensitive = false;
diff --git a/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.InstallDialog.cs b/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.InstallDialog.cs
index 6194728..b6b8273 100644
--- a/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.InstallDialog.cs
+++ b/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.InstallDialog.cs
@@ -8,6 +8,7 @@ namespace Mono.Addins.Gui
private global::Gtk.ScrolledWindow scrolledwindow1;
private global::Gtk.VBox vbox4;
private global::Gtk.Label labelInfo;
+ private global::Gtk.HSeparator insSeparator;
private global::Gtk.VBox boxProgress;
private global::Gtk.Label globalProgressLabel;
private global::Gtk.ProgressBar mainProgressBar;
@@ -27,7 +28,7 @@ namespace Mono.Addins.Gui
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.vbox3 = new global::Gtk.VBox ();
this.vbox3.Name = "vbox3";
- this.vbox3.Spacing = 6;
+ this.vbox3.Spacing = 9;
this.vbox3.BorderWidth = ((uint)(9));
// Container child vbox3.Gtk.Box+BoxChild
this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
@@ -61,6 +62,14 @@ namespace Mono.Addins.Gui
global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.scrolledwindow1]));
w6.Position = 0;
// Container child vbox3.Gtk.Box+BoxChild
+ this.insSeparator = new global::Gtk.HSeparator ();
+ this.insSeparator.Name = "insSeparator";
+ this.vbox3.Add (this.insSeparator);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.insSeparator]));
+ w7.Position = 1;
+ w7.Expand = false;
+ w7.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
this.boxProgress = new global::Gtk.VBox ();
this.boxProgress.Name = "boxProgress";
this.boxProgress.Spacing = 6;
@@ -70,32 +79,32 @@ namespace Mono.Addins.Gui
this.globalProgressLabel.Xalign = 0F;
this.globalProgressLabel.Ellipsize = ((global::Pango.EllipsizeMode)(3));
this.boxProgress.Add (this.globalProgressLabel);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.boxProgress [this.globalProgressLabel]));
- w7.Position = 0;
- w7.Expand = false;
- w7.Fill = false;
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.boxProgress [this.globalProgressLabel]));
+ w8.Position = 0;
+ w8.Expand = false;
+ w8.Fill = false;
// Container child boxProgress.Gtk.Box+BoxChild
this.mainProgressBar = new global::Gtk.ProgressBar ();
this.mainProgressBar.Name = "mainProgressBar";
this.boxProgress.Add (this.mainProgressBar);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.boxProgress [this.mainProgressBar]));
- w8.Position = 1;
- w8.Expand = false;
- w8.Fill = false;
- this.vbox3.Add (this.boxProgress);
- global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.boxProgress]));
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.boxProgress [this.mainProgressBar]));
w9.Position = 1;
w9.Expand = false;
w9.Fill = false;
+ this.vbox3.Add (this.boxProgress);
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.boxProgress]));
+ w10.Position = 2;
+ w10.Expand = false;
+ w10.Fill = false;
w1.Add (this.vbox3);
- global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox3]));
- w10.Position = 0;
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox3]));
+ w11.Position = 0;
// Internal child Mono.Addins.Gui.InstallDialog.ActionArea
- global::Gtk.HButtonBox w11 = this.ActionArea;
- w11.Name = "dialog1_ActionArea";
- w11.Spacing = 10;
- w11.BorderWidth = ((uint)(5));
- w11.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ global::Gtk.HButtonBox w12 = this.ActionArea;
+ w12.Name = "dialog1_ActionArea";
+ w12.Spacing = 10;
+ w12.BorderWidth = ((uint)(5));
+ w12.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonCancel = new global::Gtk.Button ();
this.buttonCancel.CanDefault = true;
@@ -104,10 +113,10 @@ namespace Mono.Addins.Gui
this.buttonCancel.UseStock = true;
this.buttonCancel.UseUnderline = true;
this.buttonCancel.Label = "gtk-cancel";
- w11.Add (this.buttonCancel);
- global::Gtk.ButtonBox.ButtonBoxChild w12 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w11 [this.buttonCancel]));
- w12.Expand = false;
- w12.Fill = false;
+ w12.Add (this.buttonCancel);
+ global::Gtk.ButtonBox.ButtonBoxChild w13 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w12 [this.buttonCancel]));
+ w13.Expand = false;
+ w13.Fill = false;
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonOk = new global::Gtk.Button ();
this.buttonOk.CanDefault = true;
@@ -115,16 +124,17 @@ namespace Mono.Addins.Gui
this.buttonOk.Name = "buttonOk";
this.buttonOk.UseUnderline = true;
this.buttonOk.Label = global::Mono.Unix.Catalog.GetString ("Install");
- w11.Add (this.buttonOk);
- global::Gtk.ButtonBox.ButtonBoxChild w13 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w11 [this.buttonOk]));
- w13.Position = 1;
- w13.Expand = false;
- w13.Fill = false;
+ w12.Add (this.buttonOk);
+ global::Gtk.ButtonBox.ButtonBoxChild w14 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w12 [this.buttonOk]));
+ w14.Position = 1;
+ w14.Expand = false;
+ w14.Fill = false;
if ((this.Child != null)) {
this.Child.ShowAll ();
}
this.DefaultWidth = 494;
- this.DefaultHeight = 217;
+ this.DefaultHeight = 239;
+ this.insSeparator.Hide ();
this.Show ();
this.buttonCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelClicked);
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
diff --git a/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.NewSiteDialog.cs b/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.NewSiteDialog.cs
index 19d8ed1..b901588 100644
--- a/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.NewSiteDialog.cs
+++ b/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.NewSiteDialog.cs
@@ -54,6 +54,7 @@ namespace Mono.Addins.Gui
this.btnOnlineRep = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("Register an on-line repository"));
this.btnOnlineRep.CanFocus = true;
this.btnOnlineRep.Name = "btnOnlineRep";
+ this.btnOnlineRep.Active = true;
this.btnOnlineRep.DrawIndicator = true;
this.btnOnlineRep.UseUnderline = true;
this.btnOnlineRep.Group = new global::GLib.SList (global::System.IntPtr.Zero);
diff --git a/Mono.Addins.Gui/gtk-gui/gui.stetic b/Mono.Addins.Gui/gtk-gui/gui.stetic
index 3872204..a8a18e0 100644
--- a/Mono.Addins.Gui/gtk-gui/gui.stetic
+++ b/Mono.Addins.Gui/gtk-gui/gui.stetic
@@ -727,6 +727,7 @@
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Register an on-line repository</property>
+ <property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
@@ -1178,7 +1179,7 @@
</widget>
</child>
</widget>
- <widget class="Gtk.Dialog" id="Mono.Addins.Gui.InstallDialog" design-size="494 217">
+ <widget class="Gtk.Dialog" id="Mono.Addins.Gui.InstallDialog" design-size="494 239">
<property name="MemberName" />
<property name="GeneratePublic">False</property>
<property name="WindowPosition">CenterOnParent</property>
@@ -1191,7 +1192,7 @@
<child>
<widget class="Gtk.VBox" id="vbox3">
<property name="MemberName" />
- <property name="Spacing">6</property>
+ <property name="Spacing">9</property>
<property name="BorderWidth">9</property>
<child>
<widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
@@ -1234,6 +1235,18 @@
</packing>
</child>
<child>
+ <widget class="Gtk.HSeparator" id="insSeparator">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
<widget class="Gtk.VBox" id="boxProgress">
<property name="MemberName" />
<property name="Spacing">6</property>
@@ -1263,7 +1276,7 @@
</child>
</widget>
<packing>
- <property name="Position">1</property>
+ <property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>