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

add debug mode

parent 9de50740
...@@ -36,13 +36,17 @@ ...@@ -36,13 +36,17 @@
<default>'blue'</default> <default>'blue'</default>
<_summary>Default color for URI in text-info dialog</_summary> <_summary>Default color for URI in text-info dialog</_summary>
</key> </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"> <key name="ignore-unknown-options" type="b">
<default>true</default> <default>true</default>
<_summary>Ignore unknown command-line options</_summary> <_summary>Ignore unknown command-line options</_summary>
</key> </key>
<key name="max-tab" type="i"> <key name="debug" type="b">
<default>100</default> <default>false</default>
<_summary>Maximum number of tabs in notebook dialog</_summary> <_summary>Enable debug mode with information about deprecated features</_summary>
</key> </key>
</schema> </schema>
</schemalist> </schemalist>
......
...@@ -1202,6 +1202,12 @@ list_create_widget (GtkWidget *dlg) ...@@ -1202,6 +1202,12 @@ list_create_widget (GtkWidget *dlg)
fore_col = back_col = font_col = -1; 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); n_cols = g_slist_length (options.list_data.columns);
if (n_cols == 0) if (n_cols == 0)
{ {
......
...@@ -1433,6 +1433,12 @@ yad_options_init (void) ...@@ -1433,6 +1433,12 @@ yad_options_init (void)
options.xid_file = NULL; options.xid_file = NULL;
#endif #endif
#ifndef STANDALONE
options.debug = g_settings_get_boolean (settings, "debug");
#else
options.debug = FALSE;
#endif
options.hscroll_policy = GTK_POLICY_AUTOMATIC; options.hscroll_policy = GTK_POLICY_AUTOMATIC;
options.vscroll_policy = GTK_POLICY_AUTOMATIC; options.vscroll_policy = GTK_POLICY_AUTOMATIC;
...@@ -1881,7 +1887,10 @@ yad_create_context (void) ...@@ -1881,7 +1887,10 @@ yad_create_context (void)
g_option_context_set_help_enabled (tmp_ctx, TRUE); g_option_context_set_help_enabled (tmp_ctx, TRUE);
#ifndef STANDALONE #ifndef STANDALONE
if (!options.debug)
g_option_context_set_ignore_unknown_options (tmp_ctx, g_settings_get_boolean (settings, "ignore-unknown-options")); 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 #else
g_option_context_set_ignore_unknown_options (tmp_ctx, TRUE); g_option_context_set_ignore_unknown_options (tmp_ctx, TRUE);
#endif #endif
......
...@@ -240,6 +240,9 @@ progress_create_widget (GtkWidget *dlg) ...@@ -240,6 +240,9 @@ progress_create_widget (GtkWidget *dlg)
{ {
YadProgressBar *bar = g_new0 (YadProgressBar, 1); 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) if (options.progress_data.pulsate)
bar->type = YAD_PROGRESS_PULSE; bar->type = YAD_PROGRESS_PULSE;
else if (options.progress_data.rtl) else if (options.progress_data.rtl)
......
...@@ -525,6 +525,8 @@ typedef struct { ...@@ -525,6 +525,8 @@ typedef struct {
key_t plug; key_t plug;
guint tabnum; guint tabnum;
gboolean debug;
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
guint kill_parent; guint kill_parent;
gboolean print_xid; 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