Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
yad
Commits
4068fee8
Commit
4068fee8
authored
Aug 05, 2019
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix options parsing
parent
757e4745
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
11 deletions
+9
-11
entry.c
src/entry.c
+1
-1
option.c
src/option.c
+5
-6
progress.c
src/progress.c
+2
-2
yad.h
src/yad.h
+1
-2
No files found.
src/entry.c
View file @
4068fee8
...
@@ -243,7 +243,7 @@ entry_create_widget (GtkWidget * dlg)
...
@@ -243,7 +243,7 @@ entry_create_widget (GtkWidget * dlg)
if
(
options
.
entry_data
.
entry_text
)
if
(
options
.
entry_data
.
entry_text
)
gtk_entry_set_text
(
GTK_ENTRY
(
entry
),
options
.
entry_data
.
entry_text
);
gtk_entry_set_text
(
GTK_ENTRY
(
entry
),
options
.
entry_data
.
entry_text
);
if
(
options
.
entry
_data
.
hide_text
)
if
(
options
.
common
_data
.
hide_text
)
g_object_set
(
G_OBJECT
(
entry
),
"visibility"
,
FALSE
,
NULL
);
g_object_set
(
G_OBJECT
(
entry
),
"visibility"
,
FALSE
,
NULL
);
if
(
options
.
entry_data
.
completion
)
if
(
options
.
entry_data
.
completion
)
...
...
src/option.c
View file @
4068fee8
...
@@ -295,8 +295,8 @@ static GOptionEntry entry_options[] = {
...
@@ -295,8 +295,8 @@ static GOptionEntry entry_options[] = {
N_
(
"Set the entry label"
),
N_
(
"TEXT"
)
},
N_
(
"Set the entry label"
),
N_
(
"TEXT"
)
},
{
"entry-text"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
options
.
entry_data
.
entry_text
,
{
"entry-text"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
options
.
entry_data
.
entry_text
,
N_
(
"Set the entry text"
),
N_
(
"TEXT"
)
},
N_
(
"Set the entry text"
),
N_
(
"TEXT"
)
},
{
"hide-text"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
entry
_data
.
hide_text
,
{
"hide-text"
,
0
,
G_OPTION_FLAG_NOALIAS
,
G_OPTION_ARG_NONE
,
&
options
.
common
_data
.
hide_text
,
N_
(
"Hide the entry text"
),
N
_
(
"TEXT"
)
},
N_
(
"Hide the entry text"
),
N
ULL
},
{
"completion"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
entry_data
.
completion
,
{
"completion"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
entry_data
.
completion
,
N_
(
"Use completion instead of combo-box"
),
NULL
},
N_
(
"Use completion instead of combo-box"
),
NULL
},
{
"numeric"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
entry_data
.
numeric
,
{
"numeric"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
entry_data
.
numeric
,
...
@@ -540,8 +540,8 @@ static GOptionEntry progress_options[] = {
...
@@ -540,8 +540,8 @@ static GOptionEntry progress_options[] = {
N_
(
"Set alignment of bar labels (left, center or right)"
),
N_
(
"TYPE"
)
},
N_
(
"Set alignment of bar labels (left, center or right)"
),
N_
(
"TYPE"
)
},
{
"progress-text"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
options
.
progress_data
.
progress_text
,
{
"progress-text"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
options
.
progress_data
.
progress_text
,
N_
(
"Set progress text"
),
N_
(
"TEXT"
)
},
N_
(
"Set progress text"
),
N_
(
"TEXT"
)
},
{
"hide-text"
,
0
,
G_OPTION_FLAG_
REVERSE
,
G_OPTION_ARG_NONE
,
&
options
.
progress_data
.
show
_text
,
{
"hide-text"
,
0
,
G_OPTION_FLAG_
NOALIAS
,
G_OPTION_ARG_NONE
,
&
options
.
common_data
.
hide
_text
,
N_
(
"
Show
text on progress bar"
),
NULL
},
N_
(
"
Hide
text on progress bar"
),
NULL
},
{
"pulsate"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
progress_data
.
pulsate
,
{
"pulsate"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
progress_data
.
pulsate
,
N_
(
"Pulsate progress bar"
),
NULL
},
N_
(
"Pulsate progress bar"
),
NULL
},
{
"auto-close"
,
0
,
G_OPTION_FLAG_NOALIAS
,
G_OPTION_ARG_NONE
,
&
options
.
progress_data
.
autoclose
,
{
"auto-close"
,
0
,
G_OPTION_FLAG_NOALIAS
,
G_OPTION_ARG_NONE
,
&
options
.
progress_data
.
autoclose
,
...
@@ -1499,6 +1499,7 @@ yad_options_init (void)
...
@@ -1499,6 +1499,7 @@ yad_options_init (void)
options
.
common_data
.
show_hidden
=
FALSE
;
options
.
common_data
.
show_hidden
=
FALSE
;
options
.
common_data
.
quoted_output
=
FALSE
;
options
.
common_data
.
quoted_output
=
FALSE
;
options
.
common_data
.
num_output
=
FALSE
;
options
.
common_data
.
num_output
=
FALSE
;
options
.
common_data
.
hide_text
=
FALSE
;
options
.
common_data
.
filters
=
NULL
;
options
.
common_data
.
filters
=
NULL
;
options
.
common_data
.
key
=
-
1
;
options
.
common_data
.
key
=
-
1
;
options
.
common_data
.
bool_fmt
=
YAD_BOOL_FMT_UT
;
options
.
common_data
.
bool_fmt
=
YAD_BOOL_FMT_UT
;
...
@@ -1541,7 +1542,6 @@ yad_options_init (void)
...
@@ -1541,7 +1542,6 @@ yad_options_init (void)
/* Initialize entry data */
/* Initialize entry data */
options
.
entry_data
.
entry_text
=
NULL
;
options
.
entry_data
.
entry_text
=
NULL
;
options
.
entry_data
.
entry_label
=
NULL
;
options
.
entry_data
.
entry_label
=
NULL
;
options
.
entry_data
.
hide_text
=
FALSE
;
options
.
entry_data
.
completion
=
FALSE
;
options
.
entry_data
.
completion
=
FALSE
;
options
.
entry_data
.
numeric
=
FALSE
;
options
.
entry_data
.
numeric
=
FALSE
;
options
.
entry_data
.
licon
=
NULL
;
options
.
entry_data
.
licon
=
NULL
;
...
@@ -1653,7 +1653,6 @@ yad_options_init (void)
...
@@ -1653,7 +1653,6 @@ yad_options_init (void)
options
.
progress_data
.
bars
=
NULL
;
options
.
progress_data
.
bars
=
NULL
;
options
.
progress_data
.
watch_bar
=
0
;
options
.
progress_data
.
watch_bar
=
0
;
options
.
progress_data
.
progress_text
=
NULL
;
options
.
progress_data
.
progress_text
=
NULL
;
options
.
progress_data
.
show_text
=
TRUE
;
options
.
progress_data
.
pulsate
=
FALSE
;
options
.
progress_data
.
pulsate
=
FALSE
;
options
.
progress_data
.
autoclose
=
FALSE
;
options
.
progress_data
.
autoclose
=
FALSE
;
#ifndef G_OS_WIN32
#ifndef G_OS_WIN32
...
...
src/progress.c
View file @
4068fee8
...
@@ -127,7 +127,7 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data)
...
@@ -127,7 +127,7 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data)
}
}
else
else
{
{
if
(
options
.
progress_data
.
show
_text
)
if
(
!
options
.
common_data
.
hide
_text
)
gtk_progress_bar_set_text
(
pb
,
match
);
gtk_progress_bar_set_text
(
pb
,
match
);
}
}
g_free
(
match
);
g_free
(
match
);
...
@@ -280,7 +280,7 @@ progress_create_widget (GtkWidget *dlg)
...
@@ -280,7 +280,7 @@ progress_create_widget (GtkWidget *dlg)
/* add progress bar */
/* add progress bar */
w
=
gtk_progress_bar_new
();
w
=
gtk_progress_bar_new
();
gtk_widget_set_name
(
w
,
"yad-progress-widget"
);
gtk_widget_set_name
(
w
,
"yad-progress-widget"
);
gtk_progress_bar_set_show_text
(
GTK_PROGRESS_BAR
(
w
),
options
.
progress_data
.
show
_text
);
gtk_progress_bar_set_show_text
(
GTK_PROGRESS_BAR
(
w
),
!
options
.
common_data
.
hide
_text
);
if
(
p
->
type
!=
YAD_PROGRESS_PULSE
)
if
(
p
->
type
!=
YAD_PROGRESS_PULSE
)
{
{
...
...
src/yad.h
View file @
4068fee8
...
@@ -277,7 +277,6 @@ typedef struct {
...
@@ -277,7 +277,6 @@ typedef struct {
typedef
struct
{
typedef
struct
{
gchar
*
entry_text
;
gchar
*
entry_text
;
gchar
*
entry_label
;
gchar
*
entry_label
;
gboolean
hide_text
;
gboolean
completion
;
gboolean
completion
;
gboolean
numeric
;
gboolean
numeric
;
gchar
*
licon
;
gchar
*
licon
;
...
@@ -407,7 +406,6 @@ typedef struct {
...
@@ -407,7 +406,6 @@ typedef struct {
gboolean
autokill
;
gboolean
autokill
;
#endif
#endif
gboolean
rtl
;
gboolean
rtl
;
gboolean
show_text
;
gchar
*
log
;
gchar
*
log
;
gboolean
log_expanded
;
gboolean
log_expanded
;
gboolean
log_on_top
;
gboolean
log_on_top
;
...
@@ -463,6 +461,7 @@ typedef struct {
...
@@ -463,6 +461,7 @@ typedef struct {
gboolean
show_hidden
;
gboolean
show_hidden
;
gboolean
quoted_output
;
gboolean
quoted_output
;
gboolean
num_output
;
gboolean
num_output
;
gboolean
hide_text
;
gint
icon_size
;
gint
icon_size
;
#if GLIB_CHECK_VERSION(2,30,0)
#if GLIB_CHECK_VERSION(2,30,0)
GFormatSizeFlags
size_fmt
;
GFormatSizeFlags
size_fmt
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment