Commit 2dc05c8e authored by Victor Ananjevsky's avatar Victor Ananjevsky

add debug mode

parent 9de50740
......@@ -36,13 +36,17 @@
<default>'blue'</default>
<_summary>Default color for URI in text-info dialog</_summary>
</key>
<key name="max-tab" type="i">
<default>100</default>
<_summary>Maximum number of tabs in notebook dialog</_summary>
</key>
<key name="ignore-unknown-options" type="b">
<default>true</default>
<_summary>Ignore unknown command-line options</_summary>
</key>
<key name="max-tab" type="i">
<default>100</default>
<_summary>Maximum number of tabs in notebook dialog</_summary>
<key name="debug" type="b">
<default>false</default>
<_summary>Enable debug mode with information about deprecated features</_summary>
</key>
</schema>
</schemalist>
......
......@@ -1202,6 +1202,12 @@ list_create_widget (GtkWidget *dlg)
fore_col = back_col = font_col = -1;
if (options.debug)
{
if (options.list_data.checkbox || options.list_data.radiobox)
g_printerr ("YAD: WARNING: You are use --checklist or --radiolist option. Those options obsoleted and will be removed in the future");
}
n_cols = g_slist_length (options.list_data.columns);
if (n_cols == 0)
{
......
......@@ -1433,6 +1433,12 @@ yad_options_init (void)
options.xid_file = NULL;
#endif
#ifndef STANDALONE
options.debug = g_settings_get_boolean (settings, "debug");
#else
options.debug = FALSE;
#endif
options.hscroll_policy = GTK_POLICY_AUTOMATIC;
options.vscroll_policy = GTK_POLICY_AUTOMATIC;
......@@ -1881,7 +1887,10 @@ yad_create_context (void)
g_option_context_set_help_enabled (tmp_ctx, TRUE);
#ifndef STANDALONE
g_option_context_set_ignore_unknown_options (tmp_ctx, g_settings_get_boolean (settings, "ignore-unknown-options"));
if (!options.debug)
g_option_context_set_ignore_unknown_options (tmp_ctx, g_settings_get_boolean (settings, "ignore-unknown-options"));
else
g_option_context_set_ignore_unknown_options (tmp_ctx, FALSE);
#else
g_option_context_set_ignore_unknown_options (tmp_ctx, TRUE);
#endif
......
......@@ -240,6 +240,9 @@ progress_create_widget (GtkWidget *dlg)
{
YadProgressBar *bar = g_new0 (YadProgressBar, 1);
if (options.debug)
g_printerr ("YAD: WARNING: You are usinge old-style progress dialog. This features is obsolete now, please use --bar style instead");
if (options.progress_data.pulsate)
bar->type = YAD_PROGRESS_PULSE;
else if (options.progress_data.rtl)
......
......@@ -525,6 +525,8 @@ typedef struct {
key_t plug;
guint tabnum;
gboolean debug;
#ifndef G_OS_WIN32
guint kill_parent;
gboolean print_xid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment