Add 'Do not show again' on 2 dialogs. (Refresh and delete dialogs)
This commit is contained in:
parent
03ca6a4a03
commit
466357aa0e
@ -103,7 +103,8 @@ namespace Novell.CASA.GUI
|
|||||||
checkbuttonKdeWallet,
|
checkbuttonKdeWallet,
|
||||||
checkbuttonCloseMessage,
|
checkbuttonCloseMessage,
|
||||||
checkbuttonRunInTray,
|
checkbuttonRunInTray,
|
||||||
checkbuttonSaveSecrets;
|
checkbuttonSaveSecrets,
|
||||||
|
checkbuttonShowRefreshDialog;
|
||||||
|
|
||||||
|
|
||||||
[Glade.Widget]
|
[Glade.Widget]
|
||||||
@ -1075,16 +1076,29 @@ namespace Novell.CASA.GUI
|
|||||||
/// ********************************************************************
|
/// ********************************************************************
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void RefreshAllStores(object obj, EventArgs args)
|
public void RefreshAllStores(object obj, EventArgs args)
|
||||||
|
{
|
||||||
|
if (config.GetConfigSetting(Common.CONFIG_SHOW_REFRESH_DIALOG, true))
|
||||||
{
|
{
|
||||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmRefresh", null);
|
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmRefresh", null);
|
||||||
gxmlTemp.Autoconnect (this);
|
gxmlTemp.Autoconnect (this);
|
||||||
dialogConfirmRefresh.TransientFor = windowMain;
|
dialogConfirmRefresh.TransientFor = windowMain;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RefreshStores();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void on_buttonRefreshYes_clicked(object abj, EventArgs args)
|
public void on_buttonRefreshYes_clicked(object abj, EventArgs args)
|
||||||
{
|
{
|
||||||
Logger.DbgLog("GUI:CasaMain.on_buttonRefreshYes_clicked() - BEGIN");
|
Logger.DbgLog("GUI:CasaMain.on_buttonRefreshYes_clicked() - BEGIN");
|
||||||
|
|
||||||
|
if ((checkbuttonShowRefreshDialog != null) && (checkbuttonShowRefreshDialog.Active))
|
||||||
|
{
|
||||||
|
config.SetConfigSetting(Common.CONFIG_SHOW_REFRESH_DIALOG, false);
|
||||||
|
config.WriteConfig();
|
||||||
|
}
|
||||||
|
|
||||||
RefreshStores();
|
RefreshStores();
|
||||||
dialogConfirmRefresh.Destroy();
|
dialogConfirmRefresh.Destroy();
|
||||||
|
|
||||||
|
@ -144,6 +144,8 @@ public class Common
|
|||||||
public static string CONFIG_DISPLAY_CASA_MANAGER = "DisplayCasaManagerOnClick";
|
public static string CONFIG_DISPLAY_CASA_MANAGER = "DisplayCasaManagerOnClick";
|
||||||
public static string CONFIG_PERSISTENT_DIRECTORY = "PersistentDirectory";
|
public static string CONFIG_PERSISTENT_DIRECTORY = "PersistentDirectory";
|
||||||
public static string CONFIG_PERSIST_SECRETS = "PersistSecrets";
|
public static string CONFIG_PERSIST_SECRETS = "PersistSecrets";
|
||||||
|
public static string CONFIG_SHOW_REFRESH_DIALOG = "ShowRefreshDialog";
|
||||||
|
public static string CONFIG_SHOW_DELETE_DIALOG = "ShowDeleteDialog";
|
||||||
|
|
||||||
|
|
||||||
///#############################################################
|
///#############################################################
|
||||||
|
@ -90,7 +90,8 @@ public class MiCasa : Store
|
|||||||
entryMasterPassword4;
|
entryMasterPassword4;
|
||||||
|
|
||||||
[Glade.Widget]
|
[Glade.Widget]
|
||||||
Gtk.CheckButton cbuttonShowPassword;
|
Gtk.CheckButton cbuttonShowPassword,
|
||||||
|
checkbuttonShowDeleteDialog;
|
||||||
|
|
||||||
[Glade.Widget]
|
[Glade.Widget]
|
||||||
Gtk.MenuItem cmiNewKey,
|
Gtk.MenuItem cmiNewKey,
|
||||||
@ -977,10 +978,6 @@ public class MiCasa : Store
|
|||||||
|
|
||||||
if( 0 != tvSecretIDMiCasa.Selection.CountSelectedRows() )
|
if( 0 != tvSecretIDMiCasa.Selection.CountSelectedRows() )
|
||||||
{
|
{
|
||||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmDelete", null);
|
|
||||||
gxmlTemp.Autoconnect (this);
|
|
||||||
dialogConfirmDelete.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
|
||||||
dialogConfirmDelete.Title = "miCASA - Delete Secret";
|
|
||||||
|
|
||||||
TreeModel model;
|
TreeModel model;
|
||||||
TreeIter iter;
|
TreeIter iter;
|
||||||
@ -988,8 +985,32 @@ public class MiCasa : Store
|
|||||||
if( tvSecretIDMiCasa.Selection.GetSelected (out model, out iter) )
|
if( tvSecretIDMiCasa.Selection.GetSelected (out model, out iter) )
|
||||||
{
|
{
|
||||||
selected = (string) model.GetValue (iter, 0);
|
selected = (string) model.GetValue (iter, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_config.GetConfigSetting(Common.CONFIG_SHOW_DELETE_DIALOG, true))
|
||||||
|
{
|
||||||
|
|
||||||
|
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmDelete", null);
|
||||||
|
gxmlTemp.Autoconnect (this);
|
||||||
|
dialogConfirmDelete.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||||
|
dialogConfirmDelete.Title = "miCASA - Delete Secret";
|
||||||
|
checkbuttonShowDeleteDialog.Visible = true;
|
||||||
|
|
||||||
if( (null != selected) && (selected.Length > 0) )
|
if( (null != selected) && (selected.Length > 0) )
|
||||||
entryDeleteSecretID.Text = selected;
|
entryDeleteSecretID.Text = selected;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( (null != selected) && (selected.Length > 0) )
|
||||||
|
{
|
||||||
|
if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(Common.STORE_MICASA, Common.OPERATION_DELETE_SECRET, "", "", ref model, ref iter) )
|
||||||
|
{
|
||||||
|
tsSecretIDMiCasa.Remove(ref iter);
|
||||||
|
tvSecretIDMiCasa.ColumnsAutosize();
|
||||||
|
tsNativeInfoMiCasa.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1025,6 +1046,12 @@ public class MiCasa : Store
|
|||||||
Logger.DbgLog("GUI:MiCasa.on_buttonYes_clicked() - EXCEPTION:" + exp.ToString());
|
Logger.DbgLog("GUI:MiCasa.on_buttonYes_clicked() - EXCEPTION:" + exp.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((checkbuttonShowDeleteDialog != null) && (checkbuttonShowDeleteDialog.Active))
|
||||||
|
{
|
||||||
|
m_config.SetConfigSetting(Common.CONFIG_SHOW_DELETE_DIALOG, false);
|
||||||
|
m_config.WriteConfig();
|
||||||
|
}
|
||||||
|
|
||||||
Logger.DbgLog("GUI:MiCasa.on_buttonYes_clicked() - END");
|
Logger.DbgLog("GUI:MiCasa.on_buttonYes_clicked() - END");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1784,6 +1784,25 @@ their backend stores.</property>
|
|||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckButton" id="checkbuttonShowRefreshDialog">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Do not show this in the future</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<property name="active">False</property>
|
||||||
|
<property name="inconsistent">False</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
@ -3787,6 +3806,24 @@ their backend stores.</property>
|
|||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckButton" id="checkbuttonShowDeleteDialog">
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Do not show this in the future</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<property name="active">False</property>
|
||||||
|
<property name="inconsistent">False</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
3
CASA/micasad/cache/SecretStore.cs
vendored
3
CASA/micasad/cache/SecretStore.cs
vendored
@ -797,6 +797,8 @@ namespace sscs.cache
|
|||||||
// the user might have set a different one
|
// the user might have set a different one
|
||||||
// load the policy file and check.
|
// load the policy file and check.
|
||||||
UIPol uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL, GetUserHomeDirectory());
|
UIPol uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL, GetUserHomeDirectory());
|
||||||
|
if (uiPolicy != null)
|
||||||
|
{
|
||||||
string sDir = uiPolicy.GetConfigSetting(ConstStrings.CONFIG_PERSISTENT_DIRECTORY);
|
string sDir = uiPolicy.GetConfigSetting(ConstStrings.CONFIG_PERSISTENT_DIRECTORY);
|
||||||
if ((sDir != null) && (sDir.Length > 0))
|
if ((sDir != null) && (sDir.Length > 0))
|
||||||
{
|
{
|
||||||
@ -804,6 +806,7 @@ namespace sscs.cache
|
|||||||
return m_persistenceDirectory;
|
return m_persistenceDirectory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return GetUserHomeDirectory();
|
return GetUserHomeDirectory();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user