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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
d02b2af7
Commit
d02b2af7
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #11491: gnome: fix gtk2 build
parent
a5e13bb1
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
gnome/src/gtk2_wrappers.c
+8
-0
8 additions, 0 deletions
gnome/src/gtk2_wrappers.c
gnome/src/gtk2_wrappers.h
+2
-0
2 additions, 0 deletions
gnome/src/gtk2_wrappers.h
gnome/src/seekslider.c
+30
-29
30 additions, 29 deletions
gnome/src/seekslider.c
with
40 additions
and
29 deletions
gnome/src/gtk2_wrappers.c
+
8
−
0
View file @
d02b2af7
...
...
@@ -41,6 +41,14 @@ GtkWidget *gtk_box_new(GtkOrientation orientation, gint spacing)
return
gtk_vbox_new
(
FALSE
,
spacing
);
}
GtkWidget
*
gtk_scale_new
(
GtkOrientation
orientation
,
GtkAdjustment
*
adjustment
)
{
if
(
orientation
==
GTK_ORIENTATION_HORIZONTAL
)
return
gtk_hscale_new
(
adjustment
);
else
return
gtk_vscale_new
(
adjustment
);
}
GtkWidget
*
gtk_button_box_new
(
GtkOrientation
orientation
)
{
if
(
orientation
==
GTK_ORIENTATION_HORIZONTAL
)
...
...
This diff is collapsed.
Click to expand it.
gnome/src/gtk2_wrappers.h
+
2
−
0
View file @
d02b2af7
...
...
@@ -51,6 +51,8 @@ GtkWidget *
gtk_scale_new_with_range
(
GtkOrientation
orientation
,
gdouble
min
,
gdouble
max
,
gdouble
step
);
GtkWidget
*
gtk_scale_new
(
GtkOrientation
orientation
,
GtkAdjustment
*
adjustment
);
#endif
#endif // BOX_H_
This diff is collapsed.
Click to expand it.
gnome/src/seekslider.c
+
30
−
29
View file @
d02b2af7
...
...
@@ -26,14 +26,17 @@
*
*/
// #include <config.h>
#include
<gtk/gtk.h>
#ifdef HAVE_CONFIG_H
#include
"config.h"
#endif
#include
<gtk/gtk.h>
#include
"gtk2_wrappers.h"
#include
"seekslider.h"
#include
"dbus.h"
#include
"logger.h"
#include
"config.h"
/**
* SECTION:sfl-seekslider
...
...
@@ -106,15 +109,13 @@ sfl_seekslider_init (SFLSeekSlider *seekslider)
gdouble
pageincrement
=
SEEKSLIDER_PAGEINCREMENT
;
gdouble
pagesize
=
SEEKSLIDER_PAGESIZE
;
GtkAdjustment
*
adjustment
=
gtk_adjustment_new
(
init_value
,
min_value
,
max_value
,
stepincrement
,
pageincrement
,
pagesize
);
if
(
adjustment
==
NULL
)
{
GtkAdjustment
*
adjustment
=
GTK_ADJUSTMENT
(
gtk_adjustment_new
(
init_value
,
min_value
,
max_value
,
stepincrement
,
pageincrement
,
pagesize
)
)
;
if
(
adjustment
==
NULL
)
WARN
(
"Invalid adjustment value for horizontal scale"
);
}
seekslider
->
priv
->
hscale
=
gtk_scale_new
(
GTK_ORIENTATION_HORIZONTAL
,
adjustment
);
if
(
seekslider
->
priv
->
hscale
==
NULL
)
{
if
(
seekslider
->
priv
->
hscale
==
NULL
)
WARN
(
"Could not create new horizontal scale"
);
}
g_signal_connect
(
G_OBJECT
(
seekslider
->
priv
->
hscale
),
"change-value"
,
G_CALLBACK
(
on_playback_scale_value_changed_cb
),
seekslider
);
...
...
@@ -250,6 +251,6 @@ void sfl_seekslider_update_scale(SFLSeekSlider *seekslider, guint current, guint
gdouble
val
=
((
gdouble
)
current
/
(
gdouble
)
size
)
*
100
.
0
;
if
(
seekslider
->
priv
->
can_update_scale
==
TRUE
)
{
gtk_range_set_value
(
GTK_RANGE
(
seekslider
->
priv
->
hscale
),
val
);
}
if
(
seekslider
->
priv
->
can_update_scale
)
gtk_range_set_value
(
GTK_RANGE
(
seekslider
->
priv
->
hscale
),
val
);
}
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