Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
f3d5e97b
Commit
f3d5e97b
authored
Aug 06, 2002
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sam I hate you ;-)
parent
f66d8124
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
24 deletions
+138
-24
modules/gui/familiar/callbacks.c
modules/gui/familiar/callbacks.c
+93
-4
modules/gui/familiar/callbacks.h
modules/gui/familiar/callbacks.h
+10
-1
modules/gui/familiar/familiar.glade
modules/gui/familiar/familiar.glade
+13
-3
modules/gui/familiar/interface.c
modules/gui/familiar/interface.c
+22
-16
No files found.
modules/gui/familiar/callbacks.c
View file @
f3d5e97b
...
...
@@ -2,7 +2,7 @@
* callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: callbacks.c,v 1.
1 2002/08/04 17:23:43 sam
Exp $
* $Id: callbacks.c,v 1.
2 2002/08/06 19:31:18 jpsaman
Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -47,6 +47,9 @@
//#include "netutils.h"
static
void
MediaURLOpenChanged
(
GtkEditable
*
editable
,
gpointer
user_data
);
static
void
PreferencesURLOpenChanged
(
GtkEditable
*
editable
,
gpointer
user_data
);
/*****************************************************************************
* Useful function to retrieve p_intf
****************************************************************************/
...
...
@@ -81,6 +84,50 @@ void * __GtkGetIntf( GtkWidget * widget )
return
p_data
;
}
/*****************************************************************************
* Helper functions for URL changes in Media and Preferences notebook pages.
****************************************************************************/
static
void
MediaURLOpenChanged
(
GtkEditable
*
editable
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
editable
);
playlist_t
*
p_playlist
;
gchar
*
psz_url
;
psz_url
=
gtk_entry_get_text
(
GTK_ENTRY
(
editable
));
g_print
(
"%s
\n
"
,
psz_url
);
// p_url = gtk_editable_get_chars(editable,0,-1);
// Add p_url to playlist .... but how ?
if
(
p_intf
)
{
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
playlist_Add
(
p_playlist
,
(
char
*
)
psz_url
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
vlc_object_release
(
p_playlist
);
}
}
}
static
void
PreferencesURLOpenChanged
(
GtkEditable
*
editable
,
gpointer
user_data
)
{
gchar
*
p_url
;
// GtkWidget * item;
p_url
=
gtk_entry_get_text
(
GTK_ENTRY
(
editable
)
);
g_print
(
"%s
\n
"
,
p_url
);
// p_url = gtk_editable_get_chars(editable,0,-1);
// item = gtk_list_item_new();
// gtk_widget_show (item);
// gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (item), p_url);
// /* Now we simply add the item to the combo's list. */
// gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), item);
}
/*
* Main interface callbacks
*/
...
...
@@ -113,7 +160,10 @@ on_toolbar_open_clicked (GtkButton *button,
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
if
(
p_intf
)
{
gtk_widget_show
(
GTK_WIDGET
(
p_intf
->
p_sys
->
p_notebook
)
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_window
->
window
);
}
}
...
...
@@ -122,8 +172,10 @@ on_toolbar_preferences_clicked (GtkButton *button,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
if
(
p_intf
)
if
(
p_intf
)
{
gtk_widget_show
(
GTK_WIDGET
(
p_intf
->
p_sys
->
p_notebook
)
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_window
->
window
);
}
}
...
...
@@ -168,6 +220,11 @@ on_toolbar_play_clicked (GtkButton *button,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
if
(
p_intf
)
{
gtk_widget_show
(
GTK_WIDGET
(
p_intf
->
p_sys
->
p_notebook
)
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_window
->
window
);
}
// Display open page
}
...
...
@@ -178,6 +235,7 @@ on_toolbar_play_clicked (GtkButton *button,
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
playlist_Play
(
p_playlist
);
vlc_object_release
(
p_playlist
);
gdk_window_lower
(
p_intf
->
p_sys
->
p_window
->
window
);
}
else
{
...
...
@@ -195,10 +253,11 @@ on_toolbar_stop_clicked (GtkButton *button,
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
if
(
p_playlist
)
{
playlist_Stop
(
p_playlist
);
vlc_object_release
(
p_playlist
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_window
->
window
);
}
}
...
...
@@ -225,11 +284,41 @@ on_toolbar_about_clicked (GtkButton *button,
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
if
(
p_intf
)
{
// Toggle notebook
{
// Toggle notebook
if
(
p_intf
->
p_sys
->
p_notebook
)
{
// if ( gtk_get_data( GTK_WIDGET(p_intf->p_sys->p_notebook), "visible" ) )
// gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_notebook) );
// else
gtk_widget_show
(
GTK_WIDGET
(
p_intf
->
p_sys
->
p_notebook
)
);
}
gdk_window_raise
(
p_intf
->
p_sys
->
p_window
->
window
);
}
}
void
on_comboURL_entry_changed
(
GtkEditable
*
editable
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
editable
);
if
(
p_intf
)
{
MediaURLOpenChanged
(
editable
,
NULL
);
}
}
void
on_comboPrefs_entry_changed
(
GtkEditable
*
editable
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
editable
);
if
(
p_intf
)
{
PreferencesURLOpenChanged
(
editable
,
NULL
);
}
}
modules/gui/familiar/callbacks.h
View file @
f3d5e97b
...
...
@@ -2,7 +2,7 @@
* callbacks.h : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: callbacks.h,v 1.
1 2002/08/04 17:23:43 sam
Exp $
* $Id: callbacks.h,v 1.
2 2002/08/06 19:31:18 jpsaman
Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -61,3 +61,12 @@ on_toolbar_forward_clicked (GtkButton *button,
void
on_toolbar_about_clicked
(
GtkButton
*
button
,
gpointer
user_data
);
void
on_comboURL_entry_changed
(
GtkEditable
*
editable
,
gpointer
user_data
);
void
on_comboPrefs_entry_changed
(
GtkEditable
*
editable
,
gpointer
user_data
);
modules/gui/familiar/familiar.glade
View file @
f3d5e97b
...
...
@@ -275,8 +275,13 @@ udp://localhost:1234/
<widget>
<class>
GtkEntry
</class>
<child_name>
GtkCombo:entry
</child_name>
<name>
combo
-entry1
</name>
<name>
combo
URL-entry
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
changed
</name>
<handler>
on_comboURL-entry_changed
</handler>
<last_modification_time>
Thu, 01 Aug 2002 19:37:06 GMT
</last_modification_time>
</signal>
<editable>
True
</editable>
<text_visible>
True
</text_visible>
<text_max_length>
0
</text_max_length>
...
...
@@ -357,7 +362,7 @@ udp://localhost:1234/
<class>
GtkCombo
</class>
<name>
comboDefaultURL
</name>
<x>
8
</x>
<y>
4
</y>
<y>
8
</y>
<width>
200
</width>
<height>
24
</height>
<value_in_list>
False
</value_in_list>
...
...
@@ -374,8 +379,13 @@ udp://localhost:1234/
<widget>
<class>
GtkEntry
</class>
<child_name>
GtkCombo:entry
</child_name>
<name>
combo
-entry2
</name>
<name>
combo
Prefs-entry
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
changed
</name>
<handler>
on_comboPrefs-entry_changed
</handler>
<last_modification_time>
Thu, 01 Aug 2002 20:11:46 GMT
</last_modification_time>
</signal>
<editable>
True
</editable>
<text_visible>
True
</text_visible>
<text_max_length>
0
</text_max_length>
...
...
modules/gui/familiar/interface.c
View file @
f3d5e97b
...
...
@@ -40,7 +40,7 @@ create_familiar (void)
GtkWidget
*
listMedia
;
GtkWidget
*
comboURL
;
GList
*
comboURL_items
=
NULL
;
GtkWidget
*
combo
_entry1
;
GtkWidget
*
combo
URL_entry
;
GtkWidget
*
media
;
GtkWidget
*
fixedPreferences
;
GtkWidget
*
buttonSave
;
...
...
@@ -50,7 +50,7 @@ create_familiar (void)
GtkWidget
*
fixed3
;
GtkWidget
*
comboDefaultURL
;
GList
*
comboDefaultURL_items
=
NULL
;
GtkWidget
*
combo
_entry2
;
GtkWidget
*
combo
Prefs_entry
;
GtkWidget
*
frameIP
;
GtkWidget
*
fixed2
;
GSList
*
fixed2_group
=
NULL
;
...
...
@@ -263,13 +263,13 @@ create_familiar (void)
gtk_combo_set_popdown_strings
(
GTK_COMBO
(
comboURL
),
comboURL_items
);
g_list_free
(
comboURL_items
);
combo
_entry1
=
GTK_COMBO
(
comboURL
)
->
entry
;
gtk_widget_set_name
(
combo
_entry1
,
"combo_entry1
"
);
gtk_widget_ref
(
combo
_entry1
);
gtk_object_set_data_full
(
GTK_OBJECT
(
familiar
),
"combo
_entry1"
,
combo_entry1
,
combo
URL_entry
=
GTK_COMBO
(
comboURL
)
->
entry
;
gtk_widget_set_name
(
combo
URL_entry
,
"comboURL_entry
"
);
gtk_widget_ref
(
combo
URL_entry
);
gtk_object_set_data_full
(
GTK_OBJECT
(
familiar
),
"combo
URL_entry"
,
comboURL_entry
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
combo
_entry1
);
gtk_entry_set_text
(
GTK_ENTRY
(
combo
_entry1
),
_
(
"file://"
));
gtk_widget_show
(
combo
URL_entry
);
gtk_entry_set_text
(
GTK_ENTRY
(
combo
URL_entry
),
_
(
"file://"
));
media
=
gtk_label_new
(
_
(
"Media"
));
gtk_widget_set_name
(
media
,
"media"
);
...
...
@@ -341,8 +341,8 @@ create_familiar (void)
gtk_object_set_data_full
(
GTK_OBJECT
(
familiar
),
"comboDefaultURL"
,
comboDefaultURL
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
comboDefaultURL
);
gtk_fixed_put
(
GTK_FIXED
(
fixed3
),
comboDefaultURL
,
8
,
4
);
gtk_widget_set_uposition
(
comboDefaultURL
,
8
,
4
);
gtk_fixed_put
(
GTK_FIXED
(
fixed3
),
comboDefaultURL
,
8
,
8
);
gtk_widget_set_uposition
(
comboDefaultURL
,
8
,
8
);
gtk_widget_set_usize
(
comboDefaultURL
,
200
,
24
);
comboDefaultURL_items
=
g_list_append
(
comboDefaultURL_items
,
(
gpointer
)
_
(
"file://"
));
comboDefaultURL_items
=
g_list_append
(
comboDefaultURL_items
,
(
gpointer
)
_
(
"ftp://localhost"
));
...
...
@@ -351,13 +351,13 @@ create_familiar (void)
gtk_combo_set_popdown_strings
(
GTK_COMBO
(
comboDefaultURL
),
comboDefaultURL_items
);
g_list_free
(
comboDefaultURL_items
);
combo
_entry2
=
GTK_COMBO
(
comboDefaultURL
)
->
entry
;
gtk_widget_set_name
(
combo
_entry2
,
"combo_entry2
"
);
gtk_widget_ref
(
combo
_entry2
);
gtk_object_set_data_full
(
GTK_OBJECT
(
familiar
),
"combo
_entry2"
,
combo_entry2
,
combo
Prefs_entry
=
GTK_COMBO
(
comboDefaultURL
)
->
entry
;
gtk_widget_set_name
(
combo
Prefs_entry
,
"comboPrefs_entry
"
);
gtk_widget_ref
(
combo
Prefs_entry
);
gtk_object_set_data_full
(
GTK_OBJECT
(
familiar
),
"combo
Prefs_entry"
,
comboPrefs_entry
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
combo
_entry2
);
gtk_entry_set_text
(
GTK_ENTRY
(
combo
_entry2
),
_
(
"file://"
));
gtk_widget_show
(
combo
Prefs_entry
);
gtk_entry_set_text
(
GTK_ENTRY
(
combo
Prefs_entry
),
_
(
"file://"
));
frameIP
=
gtk_frame_new
(
_
(
"IP version:"
));
gtk_widget_set_name
(
frameIP
,
"frameIP"
);
...
...
@@ -508,6 +508,12 @@ create_familiar (void)
gtk_signal_connect
(
GTK_OBJECT
(
toolbar_about
),
"clicked"
,
GTK_SIGNAL_FUNC
(
on_toolbar_about_clicked
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
comboURL_entry
),
"changed"
,
GTK_SIGNAL_FUNC
(
on_comboURL_entry_changed
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
comboPrefs_entry
),
"changed"
,
GTK_SIGNAL_FUNC
(
on_comboPrefs_entry_changed
),
NULL
);
gtk_object_set_data
(
GTK_OBJECT
(
familiar
),
"tooltips"
,
tooltips
);
...
...
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