Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
9dc1da13
Commit
9dc1da13
authored
17 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
Quiting progress bar improvments
parent
1ae7471a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sflphone-gtk/src/actions.c
+1
-1
1 addition, 1 deletion
sflphone-gtk/src/actions.c
sflphone-gtk/src/quit.c
+18
-20
18 additions, 20 deletions
sflphone-gtk/src/quit.c
sflphone-gtk/src/quit.h
+1
-3
1 addition, 3 deletions
sflphone-gtk/src/quit.h
with
20 additions
and
24 deletions
sflphone-gtk/src/actions.c
+
1
−
1
View file @
9dc1da13
...
...
@@ -69,7 +69,7 @@ sflphone_quit ()
dbus_clean
();
//call_list_clean(); TODO
//account_list_clean()
create
_progress_bar
();
display
_progress_bar
();
gtk_main_quit
();
}
return
quit
;
...
...
This diff is collapsed.
Click to expand it.
sflphone-gtk/src/quit.c
+
18
−
20
View file @
9dc1da13
...
...
@@ -19,39 +19,45 @@
#include
"quit.h"
#define ITERATIONS 1700
void
update_progress_bar
(
GtkWidget
*
bar
)
{
gdouble
fraction
;
gint
i
;
gint
total
=
2000
;
//gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR (bar) , 0.0);
gtk_grab_add
(
bar
);
//gtk_grab_add( bar );
for
(
i
=
0
;
i
<
total
;
i
++
)
for
(
i
=
0
;
i
<
ITERATIONS
;
i
++
)
{
fraction
=
(
gdouble
)
i
/
(
gdouble
)
total
;
usleep
(
5000
);
if
(
i
>
1000
)
if
(
i
>
700
&&
i
<
1000
)
gtk_progress_bar_set_text
(
(
GtkProgressBar
*
)
bar
,
"Saving configuration...."
);
//gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR (bar) , fraction);
if
(
i
>
1000
&&
i
<
1300
)
gtk_progress_bar_set_text
(
(
GtkProgressBar
*
)
bar
,
"Unload DTMF key"
);
if
(
i
>
1300
&&
i
<
1500
)
gtk_progress_bar_set_text
(
(
GtkProgressBar
*
)
bar
,
"Unload audio driver"
);
if
(
i
>
1500
)
gtk_progress_bar_set_text
(
(
GtkProgressBar
*
)
bar
,
"Unload audio codecs"
);
gtk_progress_bar_set_pulse_step
(
(
GtkProgressBar
*
)
bar
,
0
.
01
);
gtk_progress_bar_pulse
(
(
GtkProgressBar
*
)
bar
);
gtk_main_iteration
();
}
gtk_grab_remove
(
bar
);
//
gtk_grab_remove( bar );
}
GtkWidget
*
create
_progress_bar
(
void
)
display
_progress_bar
(
void
)
{
g_print
(
"Progress Bar
\n
"
);
GtkWidget
*
top
;
GtkWidget
*
progressBar
;
GtkWidget
*
vbox
;
top
=
gtk_window_new
(
GTK_WINDOW_TOPLEVEL
);
gtk_window_set_default_size
(
GTK_WINDOW
(
top
),
240
,
20
);
//gtk_window_set_default_size( GTK_WINDOW( top ), 260, 20);
gtk_widget_set_size_request
(
top
,
250
,
20
);
gtk_window_set_policy
(
GTK_WINDOW
(
top
),
FALSE
,
FALSE
,
FALSE
);
gtk_window_set_position
(
GTK_WINDOW
(
top
)
,
GTK_WIN_POS_CENTER_ALWAYS
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
top
),
0
);
vbox
=
gtk_vbox_new
(
TRUE
,
0
);
...
...
@@ -66,11 +72,3 @@ create_progress_bar( void )
}
void
destroy_progress_bar
()
{
//gtk_widget_destroy( progressBar );
}
This diff is collapsed.
Click to expand it.
sflphone-gtk/src/quit.h
+
1
−
3
View file @
9dc1da13
...
...
@@ -24,9 +24,7 @@
/** @file quit.h
* @brief Display a progress bar when quiting.
*/
GtkWidget
*
create_progress_bar
();
//GtkWidget* progressBar;
GtkWidget
*
display_progress_bar
();
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment