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
5525a154
Commit
5525a154
authored
Mar 08, 2001
by
Pierre Baillet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.Added crop and invert selection.
.Fixed a potential segfault.
parent
585b6ad7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
4 deletions
+116
-4
plugins/gtk/gtk_callbacks.c
plugins/gtk/gtk_callbacks.c
+1
-1
plugins/gtk/gtk_callbacks.h
plugins/gtk/gtk_callbacks.h
+8
-0
plugins/gtk/gtk_interface.c
plugins/gtk/gtk_interface.c
+31
-1
plugins/gtk/gtk_playlist.c
plugins/gtk/gtk_playlist.c
+47
-0
plugins/gtk/intf_gtk.c
plugins/gtk/intf_gtk.c
+4
-1
plugins/gtk/intf_gtk.glade
plugins/gtk/intf_gtk.glade
+25
-1
No files found.
plugins/gtk/gtk_callbacks.c
View file @
5525a154
...
...
@@ -478,6 +478,7 @@ on_intf_window_drag_data_received (GtkWidget *widget,
{
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
widget
),
"intf_window"
);
on_generic_drop_data_received
(
p_intf
,
data
,
info
,
0
);
if
(
p_intf
->
p_input
!=
NULL
)
{
/* FIXME: temporary hack */
...
...
@@ -744,7 +745,6 @@ on_intf_window_destroy (GtkWidget *widget,
gtk_widget_hide
(
widget
);
}
else
{
p_intf
->
b_die
=
1
;
gtk_widget_destroy
(
widget
);
}
return
TRUE
;
}
...
...
plugins/gtk/gtk_callbacks.h
View file @
5525a154
...
...
@@ -268,3 +268,11 @@ on_main_window_toggle (GtkMenuItem *menuitem,
void
on_delete_clicked
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
);
void
on_crop_activate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
);
void
on_invertselection_clicked
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
);
plugins/gtk/gtk_interface.c
View file @
5525a154
...
...
@@ -1174,6 +1174,8 @@ create_intf_playlist (void)
GtkWidget
*
delete1_menu
;
GtkAccelGroup
*
delete1_menu_accels
;
guint
tmp_key
;
GtkWidget
*
crop1
;
GtkWidget
*
invert1
;
GtkWidget
*
selection
;
GtkWidget
*
selection1
;
GtkWidget
*
scrolledwindow1
;
...
...
@@ -1181,7 +1183,7 @@ create_intf_playlist (void)
GtkWidget
*
label22
;
GtkWidget
*
label23
;
intf_playlist
=
gtk_window_new
(
GTK_WINDOW_
DIALOG
);
intf_playlist
=
gtk_window_new
(
GTK_WINDOW_
TOPLEVEL
);
gtk_object_set_data
(
GTK_OBJECT
(
intf_playlist
),
"intf_playlist"
,
intf_playlist
);
gtk_window_set_title
(
GTK_WINDOW
(
intf_playlist
),
_
(
"Playlist"
));
gtk_window_set_default_size
(
GTK_WINDOW
(
intf_playlist
),
386
,
200
);
...
...
@@ -1221,6 +1223,28 @@ create_intf_playlist (void)
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
delete1
),
delete1_menu
);
delete1_menu_accels
=
gtk_menu_ensure_uline_accel_group
(
GTK_MENU
(
delete1_menu
));
crop1
=
gtk_menu_item_new_with_label
(
""
);
tmp_key
=
gtk_label_parse_uline
(
GTK_LABEL
(
GTK_BIN
(
crop1
)
->
child
),
_
(
"_crop"
));
gtk_widget_add_accelerator
(
crop1
,
"activate_item"
,
delete1_menu_accels
,
tmp_key
,
0
,
0
);
gtk_widget_ref
(
crop1
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_playlist
),
"crop1"
,
crop1
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
crop1
);
gtk_container_add
(
GTK_CONTAINER
(
delete1_menu
),
crop1
);
invert1
=
gtk_menu_item_new_with_label
(
""
);
tmp_key
=
gtk_label_parse_uline
(
GTK_LABEL
(
GTK_BIN
(
invert1
)
->
child
),
_
(
"_invert"
));
gtk_widget_add_accelerator
(
invert1
,
"activate_item"
,
delete1_menu_accels
,
tmp_key
,
0
,
0
);
gtk_widget_ref
(
invert1
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_playlist
),
"invert1"
,
invert1
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
invert1
);
gtk_container_add
(
GTK_CONTAINER
(
delete1_menu
),
invert1
);
selection
=
gtk_menu_item_new_with_label
(
""
);
tmp_key
=
gtk_label_parse_uline
(
GTK_LABEL
(
GTK_BIN
(
selection
)
->
child
),
_
(
"_selection"
));
...
...
@@ -1275,6 +1299,12 @@ create_intf_playlist (void)
gtk_signal_connect
(
GTK_OBJECT
(
intf_playlist
),
"delete_event"
,
GTK_SIGNAL_FUNC
(
on_intf_playlist_destroy_event
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
crop1
),
"activate"
,
GTK_SIGNAL_FUNC
(
on_crop_activate
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
invert1
),
"activate"
,
GTK_SIGNAL_FUNC
(
on_invertselection_clicked
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
selection
),
"activate"
,
GTK_SIGNAL_FUNC
(
on_delete_clicked
),
NULL
);
...
...
plugins/gtk/gtk_playlist.c
View file @
5525a154
...
...
@@ -126,8 +126,11 @@ on_toolbar_playlist_clicked (GtkButton *button,
if
(
GTK_WIDGET_VISIBLE
(
p_intf
->
p_sys
->
p_playlist
)
)
{
gtk_widget_hide
(
p_intf
->
p_sys
->
p_playlist
);
}
else
{
GtkCList
*
clist
;
gtk_widget_show
(
p_intf
->
p_sys
->
p_playlist
);
clist
=
GTK_CLIST
(
lookup_widget
(
p_intf
->
p_sys
->
p_playlist
,
"clist1"
));
gdk_window_raise
(
p_intf
->
p_sys
->
p_playlist
->
window
);
rebuildCList
(
clist
,
p_main
->
p_playlist
);
}
}
...
...
@@ -194,6 +197,50 @@ rebuildCList(GtkCList * clist, playlist_t * playlist_p)
gtk_clist_thaw
(
clist
);
}
void
on_invertselection_clicked
(
GtkMenuItem
*
item
,
gpointer
user_data
)
{
int
*
selected
,
sel_l
;
GtkCList
*
clist
;
playlist_t
*
playlist_p
;
int
dummy
;
/* catch the thread back */
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
item
),
"intf_playlist"
);
playlist_p
=
p_main
->
p_playlist
;
/* lock the struct */
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
change_lock
);
clist
=
GTK_CLIST
(
lookup_widget
(
p_intf
->
p_sys
->
p_playlist
,
"clist1"
)
);
selected
=
malloc
(
sizeof
(
int
)
*
g_list_length
(
clist
->
selection
));
sel_l
=
g_list_length
(
clist
->
selection
);
for
(
dummy
=
0
;
dummy
<
sel_l
;
dummy
++
)
{
selected
[
dummy
]
=
(
int
)
g_list_nth_data
(
clist
->
selection
,
dummy
);
}
gtk_clist_freeze
(
clist
);
gtk_clist_select_all
(
clist
);
for
(
dummy
=
0
;
dummy
<
sel_l
;
dummy
++
)
{
gtk_clist_unselect_row
(
clist
,
selected
[
dummy
],
0
);
gtk_clist_unselect_row
(
clist
,
selected
[
dummy
],
1
);
}
free
(
selected
);
gtk_clist_thaw
(
clist
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
change_lock
);
}
void
on_crop_activate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
{
on_invertselection_clicked
(
menuitem
,
user_data
);
on_delete_clicked
(
menuitem
,
user_data
);
}
void
on_delete_clicked
(
GtkMenuItem
*
item
,
gpointer
user_data
)
...
...
plugins/gtk/intf_gtk.c
View file @
5525a154
...
...
@@ -2,7 +2,7 @@
* intf_gtk.c: Gtk+ interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gtk.c,v 1.
6 2001/03/08 13:32:55
octplane Exp $
* $Id: intf_gtk.c,v 1.
7 2001/03/08 15:48:14
octplane Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -204,6 +204,7 @@ static void intf_Run( intf_thread_t *p_intf )
p_intf
->
p_sys
->
p_popup
=
create_intf_popup
(
);
p_intf
->
p_sys
->
p_playlist
=
create_intf_playlist
(
);
/* Set the title of the main window */
gtk_window_set_title
(
GTK_WINDOW
(
p_intf
->
p_sys
->
p_window
),
VOUT_TITLE
" (Gtk+ interface)"
);
...
...
@@ -215,6 +216,8 @@ static void intf_Run( intf_thread_t *p_intf )
/* Accept file drops on the playlist window */
temp
=
lookup_widget
(
p_intf
->
p_sys
->
p_playlist
,
"clist1"
);
gtk_drag_dest_set
(
GTK_WIDGET
(
temp
),
GTK_DEST_DEFAULT_ALL
,
target_table
,
1
,
GDK_ACTION_COPY
);
...
...
plugins/gtk/intf_gtk.glade
View file @
5525a154
...
...
@@ -1283,7 +1283,7 @@ Henri Fallon <henri@via.ecp.fr></label>
<last_modification_time>
Thu, 08 Mar 2001 10:16:44 GMT
</last_modification_time>
</signal>
<title>
Playlist
</title>
<type>
GTK_WINDOW_
DIALOG
</type>
<type>
GTK_WINDOW_
TOPLEVEL
</type>
<position>
GTK_WIN_POS_NONE
</position>
<modal>
False
</modal>
<default_width>
386
</default_width>
...
...
@@ -1325,6 +1325,30 @@ Henri Fallon <henri@via.ecp.fr></label>
<class>
GtkMenu
</class>
<name>
delete1_menu
</name>
<widget>
<class>
GtkMenuItem
</class>
<name>
crop1
</name>
<signal>
<name>
activate
</name>
<handler>
on_crop_activate
</handler>
<last_modification_time>
Thu, 08 Mar 2001 15:12:17 GMT
</last_modification_time>
</signal>
<label>
_crop
</label>
<right_justify>
False
</right_justify>
</widget>
<widget>
<class>
GtkMenuItem
</class>
<name>
invert1
</name>
<signal>
<name>
activate
</name>
<handler>
on_invertselection_clicked
</handler>
<last_modification_time>
Thu, 08 Mar 2001 15:12:17 GMT
</last_modification_time>
</signal>
<label>
_invert
</label>
<right_justify>
False
</right_justify>
</widget>
<widget>
<class>
GtkMenuItem
</class>
<name>
selection
</name>
...
...
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