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
77520da9
Commit
77520da9
authored
Aug 05, 2019
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some updates in progress dialog. add --hide-text option
parent
9f11bb0a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
option.c
src/option.c
+3
-3
progress.c
src/progress.c
+9
-3
yad.h
src/yad.h
+1
-1
No files found.
src/option.c
View file @
77520da9
...
...
@@ -540,8 +540,8 @@ static GOptionEntry progress_options[] = {
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
,
N_
(
"Set progress text"
),
N_
(
"TEXT"
)
},
{
"
percentage"
,
0
,
0
,
G_OPTION_ARG_INT
,
&
options
.
progress_data
.
percentage
,
N_
(
"S
et initial percentage"
),
N_
(
"PERCENTAGE"
)
},
{
"
hide-text"
,
0
,
G_OPTION_FLAG_REVERSE
,
G_OPTION_ARG_NONE
,
&
options
.
progress_data
.
show_text
,
N_
(
"S
how text on progress bar"
),
NULL
},
{
"pulsate"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
progress_data
.
pulsate
,
N_
(
"Pulsate progress bar"
),
NULL
},
{
"auto-close"
,
0
,
G_OPTION_FLAG_NOALIAS
,
G_OPTION_ARG_NONE
,
&
options
.
progress_data
.
autoclose
,
...
...
@@ -1653,7 +1653,7 @@ yad_options_init (void)
options
.
progress_data
.
bars
=
NULL
;
options
.
progress_data
.
watch_bar
=
0
;
options
.
progress_data
.
progress_text
=
NULL
;
options
.
progress_data
.
percentage
=
0
;
options
.
progress_data
.
show_text
=
TRUE
;
options
.
progress_data
.
pulsate
=
FALSE
;
options
.
progress_data
.
autoclose
=
FALSE
;
#ifndef G_OS_WIN32
...
...
src/progress.c
View file @
77520da9
...
...
@@ -126,7 +126,10 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data)
gtk_text_view_scroll_to_iter
(
GTK_TEXT_VIEW
(
progress_log
),
&
end
,
0
,
FALSE
,
0
,
0
);
}
else
gtk_progress_bar_set_text
(
pb
,
match
);
{
if
(
options
.
progress_data
.
show_text
)
gtk_progress_bar_set_text
(
pb
,
match
);
}
g_free
(
match
);
}
else
...
...
@@ -241,9 +244,12 @@ progress_create_widget (GtkWidget *dlg)
else
bar
->
type
=
YAD_PROGRESS_NORMAL
;
if
(
options
.
progress_data
.
progress_text
)
bar
->
name
=
options
.
progress_data
.
progress_text
;
options
.
progress_data
.
bars
=
g_slist_append
(
options
.
progress_data
.
bars
,
bar
);
nbars
=
1
;
options
.
progress_data
.
watch_bar
=
1
;
single_mode
=
TRUE
;
...
...
@@ -274,7 +280,7 @@ progress_create_widget (GtkWidget *dlg)
/* add progress bar */
w
=
gtk_progress_bar_new
();
gtk_widget_set_name
(
w
,
"yad-progress-widget"
);
gtk_progress_bar_set_show_text
(
GTK_PROGRESS_BAR
(
w
),
TRUE
);
gtk_progress_bar_set_show_text
(
GTK_PROGRESS_BAR
(
w
),
options
.
progress_data
.
show_text
);
if
(
p
->
type
!=
YAD_PROGRESS_PULSE
)
{
...
...
src/yad.h
View file @
77520da9
...
...
@@ -406,8 +406,8 @@ typedef struct {
#ifndef G_OS_WIN32
gboolean
autokill
;
#endif
guint
percentage
;
gboolean
rtl
;
gboolean
show_text
;
gchar
*
log
;
gboolean
log_expanded
;
gboolean
log_on_top
;
...
...
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