Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
9bd98be4
"README.rst" did not exist on "9556441e4b9c98b26f5625a8f1b5baa3857aaa5a"
Commit
9bd98be4
authored
18 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
print out message about refresh interval
parent
acd80571
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sview/sview.c
+25
-3
25 additions, 3 deletions
src/sview/sview.c
with
25 additions
and
3 deletions
src/sview/sview.c
+
25
−
3
View file @
9bd98be4
...
@@ -99,6 +99,16 @@ void *_page_thr(void *arg)
...
@@ -99,6 +99,16 @@ void *_page_thr(void *arg)
return
NULL
;
return
NULL
;
}
}
void
*
_refresh_thr
(
void
*
arg
)
{
sleep
(
5
);
gdk_threads_enter
();
gtk_statusbar_pop
(
GTK_STATUSBAR
(
main_statusbar
),
1
);
gdk_flush
();
gdk_threads_leave
();
return
NULL
;
}
static
void
_page_switched
(
GtkNotebook
*
notebook
,
static
void
_page_switched
(
GtkNotebook
*
notebook
,
GtkNotebookPage
*
page
,
GtkNotebookPage
*
page
,
guint
page_num
,
guint
page_num
,
...
@@ -153,7 +163,7 @@ static void _page_switched(GtkNotebook *notebook,
...
@@ -153,7 +163,7 @@ static void _page_switched(GtkNotebook *notebook,
if
(
!
g_thread_create
(
_page_thr
,
page_thr
,
FALSE
,
&
error
))
if
(
!
g_thread_create
(
_page_thr
,
page_thr
,
FALSE
,
&
error
))
{
{
g_printerr
(
"Failed to create
YES
thread: %s
\n
"
,
g_printerr
(
"Failed to create
page
thread: %s
\n
"
,
error
->
message
);
error
->
message
);
return
;
return
;
}
}
...
@@ -191,8 +201,10 @@ static void _change_refresh(GtkToggleAction *action, gpointer user_data)
...
@@ -191,8 +201,10 @@ static void _change_refresh(GtkToggleAction *action, gpointer user_data)
GTK_RESPONSE_OK
,
GTK_RESPONSE_OK
,
GTK_STOCK_CANCEL
,
GTK_STOCK_CANCEL
,
GTK_RESPONSE_CANCEL
,
GTK_RESPONSE_CANCEL
,
NULL
);
//gtk_dialog_new();
NULL
);
GError
*
error
=
NULL
;
int
response
=
0
;
int
response
=
0
;
char
*
temp
=
NULL
;
gtk_container_set_border_width
(
GTK_CONTAINER
(
table
),
10
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
table
),
10
);
...
@@ -209,10 +221,20 @@ static void _change_refresh(GtkToggleAction *action, gpointer user_data)
...
@@ -209,10 +221,20 @@ static void _change_refresh(GtkToggleAction *action, gpointer user_data)
{
{
global_sleep_time
=
global_sleep_time
=
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
spin_button
));
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
spin_button
));
g_print
(
"new time is %d
\n
"
,
global_sleep_time
);
temp
=
g_strdup_printf
(
"Refresh Interval set to %d seconds."
,
global_sleep_time
);
gtk_statusbar_push
(
GTK_STATUSBAR
(
main_statusbar
),
1
,
temp
);
g_free
(
temp
);
if
(
!
g_thread_create
(
_refresh_thr
,
NULL
,
FALSE
,
&
error
))
{
g_printerr
(
"Failed to create refresh thread: %s
\n
"
,
error
->
message
);
}
}
}
gtk_widget_destroy
(
popup
);
gtk_widget_destroy
(
popup
);
return
;
return
;
}
}
...
...
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