Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
36cb61ac
Commit
36cb61ac
authored
Dec 11, 2007
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the modification to the wxwidget interface and make the buildbot happy
parent
09b9702d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
109 deletions
+23
-109
modules/gui/wxwidgets/dialogs/updatevlc.cpp
modules/gui/wxwidgets/dialogs/updatevlc.cpp
+22
-108
modules/gui/wxwidgets/dialogs/updatevlc.hpp
modules/gui/wxwidgets/dialogs/updatevlc.hpp
+1
-1
No files found.
modules/gui/wxwidgets/dialogs/updatevlc.cpp
View file @
36cb61ac
...
@@ -50,9 +50,6 @@ BEGIN_EVENT_TABLE(UpdateVLC, wxFrame)
...
@@ -50,9 +50,6 @@ BEGIN_EVENT_TABLE(UpdateVLC, wxFrame)
EVT_BUTTON
(
wxID_OK
,
UpdateVLC
::
OnButtonClose
)
EVT_BUTTON
(
wxID_OK
,
UpdateVLC
::
OnButtonClose
)
EVT_BUTTON
(
CheckForUpdate_Event
,
UpdateVLC
::
OnCheckForUpdate
)
EVT_BUTTON
(
CheckForUpdate_Event
,
UpdateVLC
::
OnCheckForUpdate
)
/* CtrlList events */
EVT_LIST_ITEM_ACTIVATED
(
ChooseItem_Event
,
UpdateVLC
::
OnChooseItem
)
/* Hide the window when the user closes the window */
/* Hide the window when the user closes the window */
EVT_CLOSE
(
UpdateVLC
::
OnClose
)
EVT_CLOSE
(
UpdateVLC
::
OnClose
)
...
@@ -79,13 +76,13 @@ UpdateVLC::UpdateVLC( intf_thread_t *_p_intf, wxWindow *p_parent ):
...
@@ -79,13 +76,13 @@ UpdateVLC::UpdateVLC( intf_thread_t *_p_intf, wxWindow *p_parent ):
main_sizer
->
Add
(
update_button
);
main_sizer
->
Add
(
update_button
);
SetSizerAndFit
(
main_sizer
);
SetSizerAndFit
(
main_sizer
);
p_u
=
update_New
(
p_intf
);
p_u
pdate
=
update_New
(
p_intf
);
}
}
UpdateVLC
::~
UpdateVLC
()
UpdateVLC
::~
UpdateVLC
()
{
{
update_Delete
(
p_u
);
update_Delete
(
p_u
pdate
);
}
}
void
UpdateVLC
::
OnButtonClose
(
wxCommandEvent
&
event
)
void
UpdateVLC
::
OnButtonClose
(
wxCommandEvent
&
event
)
...
@@ -101,108 +98,25 @@ void UpdateVLC::OnClose( wxCloseEvent& WXUNUSED(event) )
...
@@ -101,108 +98,25 @@ void UpdateVLC::OnClose( wxCloseEvent& WXUNUSED(event) )
void
UpdateVLC
::
OnCheckForUpdate
(
wxCommandEvent
&
event
)
void
UpdateVLC
::
OnCheckForUpdate
(
wxCommandEvent
&
event
)
{
{
update_Check
(
p_u
,
VLC_FALSE
);
update_Check
(
p_update
);
update_iterator_t
*
p_uit
=
update_iterator_New
(
p_u
);
wxBoxSizer
*
main_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
if
(
p_uit
)
{
wxBoxSizer
*
main_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
p_uit
->
i_rs
=
UPDATE_RELEASE_STATUS_NEWER
;
p_uit
->
i_t
=
UPDATE_FILE_TYPE_ALL
;
update_iterator_Action
(
p_uit
,
UPDATE_MIRROR
);
DestroyChildren
();
wxListCtrl
*
list
=
new
wxListCtrl
(
this
,
ChooseItem_Event
,
wxDefaultPosition
,
wxSize
(
400
,
300
),
wxLC_SINGLE_SEL
|
wxLC_LIST
);
wxImageList
*
images
=
new
wxImageList
(
32
,
32
,
TRUE
);
images
->
Add
(
wxIcon
(
update_ascii_xpm
)
);
images
->
Add
(
wxIcon
(
update_info_xpm
)
);
images
->
Add
(
wxIcon
(
update_source_xpm
)
);
images
->
Add
(
wxIcon
(
update_binary_xpm
)
);
images
->
Add
(
wxIcon
(
update_document_xpm
)
);
list
->
AssignImageList
(
images
,
wxIMAGE_LIST_SMALL
);
while
(
update_iterator_Action
(
p_uit
,
UPDATE_FILE
)
!=
UPDATE_FAIL
)
{
int
i_image
;
switch
(
p_uit
->
file
.
i_type
)
{
case
UPDATE_FILE_TYPE_INFO
:
i_image
=
1
;
break
;
case
UPDATE_FILE_TYPE_SOURCE
:
i_image
=
2
;
break
;
case
UPDATE_FILE_TYPE_BINARY
:
i_image
=
3
;
break
;
case
UPDATE_FILE_TYPE_PLUGIN
:
i_image
=
4
;
break
;
default:
i_image
=
0
;
}
char
*
psz_tmp
=
NULL
;
if
(
p_uit
->
file
.
l_size
)
{
if
(
p_uit
->
file
.
l_size
>
1024
*
1024
*
1024
)
asprintf
(
&
psz_tmp
,
"(%ld GB)"
,
p_uit
->
file
.
l_size
/
(
1024
*
1024
*
1024
)
);
if
(
p_uit
->
file
.
l_size
>
1024
*
1024
)
asprintf
(
&
psz_tmp
,
"(%ld MB)"
,
p_uit
->
file
.
l_size
/
(
1024
*
1024
)
);
else
if
(
p_uit
->
file
.
l_size
>
1024
)
asprintf
(
&
psz_tmp
,
"(%ld kB)"
,
p_uit
->
file
.
l_size
/
1024
);
else
asprintf
(
&
psz_tmp
,
"(%ld B)"
,
p_uit
->
file
.
l_size
);
}
list
->
InsertItem
(
list
->
GetItemCount
(),
wxU
(
p_uit
->
file
.
psz_description
)
+
wxU
(
"
\n
"
)
+
wxU
(
p_uit
->
release
.
psz_version
)
+
wxU
(
" "
)
+
wxU
(
psz_tmp
),
i_image
);
if
(
psz_tmp
)
free
(
psz_tmp
);
}
main_sizer
->
Add
(
new
wxStaticText
(
this
,
-
1
,
wxU
(
_
(
"
\n
Available "
"updates and related downloads.
\n
"
"(Double click on a file to download it)
\n
"
)
)
)
);
main_sizer
->
Add
(
list
);
SetSizerAndFit
(
main_sizer
);
Layout
();
update_iterator_Delete
(
p_uit
);
}
}
void
UpdateVLC
::
OnChooseItem
(
wxListEvent
&
event
)
DestroyChildren
();
{
update_iterator_t
*
p_uit
=
update_iterator_New
(
p_u
);
/*list->InsertItem( list->GetItemCount(),
if
(
p_uit
)
wxU(p_uit->file.psz_description)+wxU("\n")
{
+ wxU(p_uit->release.psz_version)+wxU(" ")
p_uit
->
i_rs
=
UPDATE_RELEASE_STATUS_NEWER
;
+ wxU(psz_tmp),
p_uit
->
i_t
=
UPDATE_FILE_TYPE_ALL
;
i_image );*/
update_iterator_Action
(
p_uit
,
UPDATE_MIRROR
);
if
(
update_CompareReleaseToCurrent
(
p_update
)
==
UpdateReleaseStatusNewer
)
int
i_count
=
0
;
main_sizer
->
Add
(
new
wxStaticText
(
this
,
-
1
,
wxU
(
p_update
->
release
.
psz_desc
)
while
(
update_iterator_Action
(
p_uit
,
UPDATE_FILE
)
!=
UPDATE_FAIL
)
+
wxU
(
"
\n
You can download the latest version of VLC at the adress :
\n
"
)
{
+
wxU
(
p_update
->
release
.
psz_url
)
)
);
if
(
i_count
==
event
.
GetIndex
()
)
else
break
;
main_sizer
->
Add
(
new
wxStaticText
(
this
,
-
1
,
i_count
++
;
wxU
(
_
(
"
\n
You have the latest version of VLC
\n
"
)
)
)
);
}
wxString
url
=
wxU
(
p_uit
->
file
.
psz_url
);
SetSizerAndFit
(
main_sizer
);
wxFileDialog
*
filedialog
=
Layout
();
new
wxFileDialog
(
this
,
wxU
(
_
(
"Save file..."
)),
wxT
(
""
),
url
.
AfterLast
(
'/'
),
wxT
(
"*.*"
),
wxSAVE
|
wxOVERWRITE_PROMPT
);
if
(
filedialog
->
ShowModal
()
==
wxID_OK
)
{
update_download
(
p_uit
,
filedialog
->
GetPath
().
mb_str
(
wxConvUTF8
)
);
}
update_iterator_Delete
(
p_uit
);
delete
filedialog
;
}
}
}
modules/gui/wxwidgets/dialogs/updatevlc.hpp
View file @
36cb61ac
...
@@ -49,7 +49,7 @@ namespace wxvlc
...
@@ -49,7 +49,7 @@ namespace wxvlc
DECLARE_EVENT_TABLE
();
DECLARE_EVENT_TABLE
();
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
update_t
*
p_u
;
update_t
*
p_u
pdate
;
};
};
};
};
...
...
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