- Added message dialog for short Master Password.

- Fixed dialog placement property in the casa-1.5.glade file.
- Update the all store tab icons to 32x32 pixles.
This commit is contained in:
smanojna 2005-10-20 16:10:43 +00:00
parent bdbf507efc
commit fa58164574
6 changed files with 265 additions and 40 deletions

View File

@ -51,7 +51,8 @@ public class CasaMain
dialogLoginContinue, dialogLoginContinue,
dialogConfirmRefresh, dialogConfirmRefresh,
dialogSingleInstance, dialogSingleInstance,
dialogLoginReprompt; dialogLoginReprompt,
dialogShortPassword;
[Glade.Widget] [Glade.Widget]
Gtk.Entry entryMasterPassword1, Gtk.Entry entryMasterPassword1,
@ -298,50 +299,56 @@ public class CasaMain
if( true == entryMasterPassword4.Visible ) if( true == entryMasterPassword4.Visible )
{ {
if(entryMasterPassword3.Text != "" && (entryMasterPassword3.Text == entryMasterPassword4.Text) && entryMasterPassword3.Text.Length >= 8) if( entryMasterPassword3.Text.Length < 8 )
{
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogShortPassword", null);
gxmlTemp.Autoconnect (this);
}
else if(entryMasterPassword3.Text != "" && (entryMasterPassword3.Text == entryMasterPassword4.Text) && entryMasterPassword3.Text.Length >= 8)
{ {
miCASA.SetMasterPassword(0, entryMasterPassword3.Text); miCASA.SetMasterPassword(0, entryMasterPassword3.Text);
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text); MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text);
dialogLogin.Destroy(); dialogLogin.Destroy();
InitializeGUI(); InitializeGUI();
}
else
{
entryMasterPassword3.Text="";
entryMasterPassword4.Text="";
entryMasterPassword3.HasFocus=true;
}
} }
else else
{ {
if( 0 == miCASA.SetMasterPassword(0, entryMasterPassword3.Text) ) entryMasterPassword3.Text="";
{ entryMasterPassword4.Text="";
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text); entryMasterPassword3.HasFocus=true;
}
}
else
{
if( 0 == miCASA.SetMasterPassword(0, entryMasterPassword3.Text) )
{
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text);
dialogLogin.Destroy(); dialogLogin.Destroy();
InitializeGUI(); InitializeGUI();
}
else
{
Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - MasterPassword verification failed.");
//dialogLogin.Destroy();
//LoginContinue("<b>Master Password verfication failed</b>", "The store will not be persistent");
loginPromptCount--;
dialogLogin.Hide();
if( loginPromptCount > 0 )
{
dialogLogin.Show();
entryMasterPassword3.Text="";
} }
else else
{ {
Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - MasterPassword verification failed."); Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLoginReprompt", null);
//dialogLogin.Destroy();
//LoginContinue("<b>Master Password verfication failed</b>", "The store will not be persistent");
loginPromptCount--;
dialogLogin.Hide();
if( loginPromptCount > 0 )
{
dialogLogin.Show();
entryMasterPassword3.Text="";
}
else
{
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLoginReprompt", null);
gxmlTemp.Autoconnect (this); gxmlTemp.Autoconnect (this);
} }
}
} }
}
Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - END"); Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - END");
} }
internal void on_buttonRetryRepropmt_clicked(object obj, EventArgs args) internal void on_buttonRetryRepropmt_clicked(object obj, EventArgs args)
@ -352,6 +359,14 @@ public class CasaMain
loginPromptCount = 3; loginPromptCount = 3;
} }
internal void on_buttonRetryShortPassword_clicked(object obj, EventArgs args)
{
dialogShortPassword.Destroy();
entryMasterPassword3.Text = "";
entryMasterPassword4.Text = "";
entryMasterPassword3.HasFocus = true;
}
internal void on_buttonCloseReprompt_clicked(object obj, EventArgs args) internal void on_buttonCloseReprompt_clicked(object obj, EventArgs args)
{ {
dialogLoginReprompt.Destroy(); dialogLoginReprompt.Destroy();

View File

@ -740,9 +740,9 @@
<child> <child>
<widget class="GtkLabel" id="label14"> <widget class="GtkLabel" id="label14">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">miCASA</property> <property name="label" translatable="yes">&lt;b&gt;miCASA&lt;/b&gt;</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property> <property name="wrap">False</property>
<property name="selectable">False</property> <property name="selectable">False</property>
@ -877,7 +877,7 @@
<child> <child>
<widget class="GtkLabel" id="label5"> <widget class="GtkLabel" id="label5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Firefox</property> <property name="label" translatable="yes">&lt;b&gt;Firefox&lt;/b&gt;</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">True</property> <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
@ -1015,7 +1015,7 @@
<child> <child>
<widget class="GtkLabel" id="label6"> <widget class="GtkLabel" id="label6">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Mozilla</property> <property name="label" translatable="yes">&lt;b&gt;Mozilla&lt;/b&gt;</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">True</property> <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
@ -1153,7 +1153,7 @@
<child> <child>
<widget class="GtkLabel" id="label7"> <widget class="GtkLabel" id="label7">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">KDE Wallet</property> <property name="label" translatable="yes">&lt;b&gt;KDE Wallet&lt;/b&gt;</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">True</property> <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
@ -1291,9 +1291,9 @@
<child> <child>
<widget class="GtkLabel" id="label15"> <widget class="GtkLabel" id="label15">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">GNOME Keyring</property> <property name="label" translatable="yes">&lt;b&gt;GNOME Keyring&lt;/b&gt;</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property> <property name="wrap">False</property>
<property name="selectable">False</property> <property name="selectable">False</property>
@ -4774,7 +4774,7 @@ CSL Manojna&lt;/b&gt;</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">CASA Master Password Authentication</property> <property name="title" translatable="yes">CASA Master Password Authentication</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> <property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
<property name="modal">True</property> <property name="modal">True</property>
<property name="resizable">False</property> <property name="resizable">False</property>
<property name="destroy_with_parent">True</property> <property name="destroy_with_parent">True</property>
@ -5919,8 +5919,8 @@ instance is already running.&lt;/b&gt;</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">WARNING</property> <property name="title" translatable="yes">WARNING</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property> <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="modal">False</property> <property name="modal">True</property>
<property name="resizable">False</property> <property name="resizable">False</property>
<property name="destroy_with_parent">True</property> <property name="destroy_with_parent">True</property>
<property name="icon">CASAicons.ico</property> <property name="icon">CASAicons.ico</property>
@ -6141,4 +6141,214 @@ by cilcking the Close button.</property>
</child> </child>
</widget> </widget>
<widget class="GtkDialog" id="dialogShortPassword">
<property name="visible">True</property>
<property name="title" translatable="yes">WARNING</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="modal">True</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">True</property>
<property name="icon">CASAicons.ico</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">True</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="vbox90">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="hbuttonbox11">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="button39">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-5</property>
<signal name="clicked" handler="on_buttonRetryShortPassword_clicked" last_modification_time="Thu, 20 Oct 2005 15:43:30 GMT"/>
<child>
<widget class="GtkAlignment" id="alignment31">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox60">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image2608">
<property name="visible">True</property>
<property name="stock">gtk-redo</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label153">
<property name="visible">True</property>
<property name="label" translatable="yes">_Retry</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox61">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkVBox" id="vbox91">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkImage" id="image2609">
<property name="visible">True</property>
<property name="stock">gtk-dialog-warning</property>
<property name="icon_size">6</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">4</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox92">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkLabel" id="label154">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Master Password is too short.&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">5</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label155">
<property name="visible">True</property>
<property name="label" translatable="yes">The Master Password should be atleast eight characters in length.</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">True</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">4</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface> </glade-interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB