From e2014cbac41e35b3c61c998b1eeea9932b9a9c8c Mon Sep 17 00:00:00 2001 From: "eric.beuque" Date: Tue, 20 Sep 2011 20:36:13 +0000 Subject: [PATCH] [FreetuxTV] Window channels properties inherit from gtkdialog. --- data/ui/Makefile.am | 3 +- data/ui/channelproperties.glade | 250 ++ data/ui/freetuxtv.glade | 3255 +++++++++++---------- src/freetuxtv-channels-list.c | 14 +- src/freetuxtv-gladexml.h | 1 + src/freetuxtv-window-add-channels-group.c | 13 +- src/freetuxtv-window-add-recording.c | 12 +- src/freetuxtv-window-channel-properties.c | 156 +- src/freetuxtv-window-channel-properties.h | 17 +- src/freetuxtv-window-main.c | 1 - 10 files changed, 1998 insertions(+), 1724 deletions(-) create mode 100644 data/ui/channelproperties.glade diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am index 5002aa4..10145ff 100644 --- a/data/ui/Makefile.am +++ b/data/ui/Makefile.am @@ -3,6 +3,7 @@ freetuxtvui_DATA = \ addchannelsgroups.glade \ addrecording.glade \ + channelproperties.glade \ freetuxtv.glade freetuxtvuidir = $(pkgdatadir)/ui @@ -11,4 +12,4 @@ EXTRA_DIST = \ # Remove ui directory on uninstall uninstall-local: - -rm -r $(freetuxtvuidir) \ No newline at end of file + -rm -r $(freetuxtvuidir) diff --git a/data/ui/channelproperties.glade b/data/ui/channelproperties.glade new file mode 100644 index 0000000..fa32726 --- /dev/null +++ b/data/ui/channelproperties.glade @@ -0,0 +1,250 @@ + + + + + + False + 5 + Channel properties + True + center-on-parent + 480 + 320 + freetuxtv + normal + + + True + False + 2 + + + True + False + end + + + + + + + + + False + True + end + 0 + + + + + True + True + + + True + False + + + True + False + 3 + 2 + 2 + 3 + 3 + + + True + False + 0 + Channel's name: + + + GTK_FILL + + + + + True + False + 0 + Channel's URI: + + + 1 + 2 + GTK_FILL + + + + + True + True + + False + False + True + True + + + 1 + 2 + + + + + True + True + + False + False + True + True + + + 1 + 2 + 1 + 2 + + + + + False + False + 0 + + + + + True + False + 3 + 0 + none + + + True + False + 12 + + + True + False + 3 + + + True + True + + + True + True + 0 + + + + + + + + + True + False + <b>Channel VLC options:</b> + True + + + + + True + True + 1 + + + + + + + True + False + General + + + False + + + + + True + False + + + True + False + 3 + 2 + 3 + 3 + + + True + False + 0 + Deinterlacement: + + + GTK_FILL + + + + + True + False + 0 + none + + + 1 + 2 + + + + + False + True + 0 + + + + + + + + 1 + + + + + True + False + Options + + + 1 + False + + + + + True + True + 1 + + + + + + + diff --git a/data/ui/freetuxtv.glade b/data/ui/freetuxtv.glade index a4fd979..3495750 100644 --- a/data/ui/freetuxtv.glade +++ b/data/ui/freetuxtv.glade @@ -2,2068 +2,2153 @@ - - - - - - - + + False + 5 + True + center + freetuxtv + normal + windowmain + FreetuxTV + GNU General Public License v3 + Web TV channels player + http://code.google.com/p/freetuxtv/ + Project's Web Site + FreetuxTV is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +FreetuxTV is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. + Eric Beuque <eric.beuque@gmail.com> + translator-credits + Yannick Le Ny <yleny@laposte.net> +Sébastien Morge <contact@smorge.com> + freetuxtv + True + + + True + False + 2 + + + True + False + end + + + False + True + end + 0 + + + + + + + - - - - - - - - - - - - Video - Theora + Vorbis (OGG) - vcodec=theo,vb=800,scale=1,acodec=vorb,ab=128,channels=2 - ogg - - - Video - H.264 + MPGA (MP4) - vcodec=h264,vb=768,width=368,height=208,fps=29.97,acodec=mpga,ab=64,channels=2 - mp4 - - - Video - MPEG-2 + MPGA (TS) - vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2 - ts - - + + + 1 + 0.050000000000000003 + 0.10000000000000001 - - - - - - - - HTTP - - - SOCKS - - + + 1 + 0.75 + 0.050000000000000003 + 0.10000000000000001 - - FreetuxTV - center - 1024 - 600 + + False + 5 + Group properties + True + center-on-parent + 480 + 320 freetuxtv - - + normal + windowmain + + True + False 2 - - + + True + False + end + + + False + True + end 0 - + True True - + True + False - + True - True - left - True + False + 3 + 2 + 2 + 3 + 3 - + True - 4 - 4 - 4 - 4 + False + 0 + Group's name: + + + GTK_FILL + + + + + True + False + 0 + Playlist's URI: + + + 1 + 2 + GTK_FILL + + + + + True + True + Name of the group which will be added + False + False + True + True + + + 1 + 2 + + + + + True + True + Playlist's URI of the group which will be added + False + False + True + True + + + 1 + 2 + 1 + 2 + + + + + False + False + 0 + + + + + True + False + 3 + 0 + none + + + True + False + 12 - + True - 5 + False - + True - 2 + False + 3 + 2 + 2 + 3 + 3 - + True - Search: + False + 0 + Delete this text before the name: - False - 0 + GTK_FILL - + True - True - Channels' search text area + False + 0 + Delete this text behind the name: - 1 + 1 + 2 + GTK_FILL - + True True - True - Delete the search text area - - - True - gtk-clear - 1 - - + Text or regexp which must be deleted at the end of the channel's name + False + False + True + True - False - False - 2 + 1 + 2 - - - False - 0 - - - - - True - True - automatic - automatic - in - + True True + Text or regexp which must be deleted at the beginning of the channel's name + False + False + True + True + + 1 + 2 + 1 + 2 + - 1 + True + True + 0 - + True - - - Jump to current channel - True - True - True - Go to the current channel playing - image - - - 0 - - + False + You can easily use regular expressions to delete some text in the channel's name of the groupe. For example, if in your playlist, you have a name like "11 - NT1" or "12 - NRJ 12", FreetuxTV is able to remove the channel's number before the name, by using the regular expression "[0-9]* - ". + True - False - 2 + True + True + 1 - - + + True - Channels - 90 + False + <b>Processing of channels' name</b> + True - - False - + + + False + False + 1 + + + + + + + + + + True + False + General + + + False + + + + + True + False + + + True + False + 3 + 2 + 3 + 3 - + True - 4 - 4 - 4 - 4 - - - True - True - - - True - True - automatic - automatic - - - True - True - False - - - - - - - True - In progress - - - False - - - - - True - True - automatic - automatic - in - - - True - True - liststore_recordings - False - 0 - - - - - 1 - - - - - True - Terminated - - - 1 - False - - - - + False + 0 + Number of channels: - 1 + GTK_FILL - - + + True - Recordings - 90 + False + 0 + 0 - 1 - False + 1 + 2 + False + True 0 + + + - False - True + 1 + + + + + True + False + Details + + + 1 + False - + + True + True + + + 2 + + + + + True + False + View file + + + 2 + False + + + + + True + True + 1 + + + + + + + False + 5 + Preferences + True + center-on-parent + freetuxtv + dialog + windowmain + + + True + False + 2 + + + True + False + end + + + + + + + + + False + True + end + 0 + + + + + True + True + + True + False - + True + False + 0 + none - - - - - 0 - - - - - True - 3 - - + True + False + 12 - - True - 00:00:00 - - - False - False - 0 - - - - + + Play last channel on startup True True - adjustment_time - False - - - 1 - - - - - True - 00:00:00 + False + False + True - - False - False - 2 - - - False - 0 - + + + True + False + <b>Startup</b> + True + + + + + False + True + 0 + + + + + True + False + 0 + none - + True - 7 - - - True - True - True - Previous channel - - - True - gtk-media-previous - - - - - False - False - 0 - - - - - True - True - True - Play the current channel - - - True - gtk-media-play - - - - - False - False - 1 - - - - - True - True - True - Stop playing the current channel - - - True - gtk-media-stop - - - - - False - False - 2 - - + False + 12 - + + Enable desktop notifications True True - True - Record the current channel - - - True - gtk-media-record - - + False + False + True - - False - False - 3 - + + + + + True + False + <b>Notifications</b> + True + + + + + False + True + 1 + + + + + True + False + 0 + none + + + True + False + 12 - + + Ignore diacritics True True - True - Next channel - - - True - gtk-media-next - - + False + False + True - - False - False - 4 - + + + + + True + False + <b>Search of channels</b> + True + + + + + False + True + 2 + + + + + + + True + False + 0.43999999761581421 + General + + + False + + + + + True + False + + + True + False + 0 + none + + + True + False + 12 - + True - 2 + False - + + None True - Vol: + True + False + False + True + True + True + True 0 - + + Use a custom configuration file True - - + True + False + False + True + dialogpreferences_radioconfigfilenone + + True + True 1 - - 200 + + Use the VLC configuration file True True - adjustment_volume - False - right + False + False + True + dialogpreferences_radioconfigfilenone + True + True 2 - + True - + + False + <i>Restart the application after changing this option.</i> + True + True + True 3 - - False - False - 5 - - - - - True - True - True - Fullscreen mode - - - True - gtk-fullscreen - - - - - False - False - 6 - - - - - True - True - True - Small mode - - - True - gtk-zoom-fit - - - - - False - False - 7 - - - False - False - 1 - + + + + True + False + <b>Configuration file (vlcrc)</b> + True + False - 1 + True + 0 - True - True + 1 + + + + + True + False + LibVLC + + + 1 + False - - - 1 - - - - - True - + True + False - + True + False + 0 + none + + + True + False + 12 + + + True + False + + + True + False + 0 + Directory Record: + + + True + True + 0 + + + + + True + False + select-folder + Select a directory + + + True + True + 1 + + + + + + + + + True + False + <b>Destination</b> + True + + False + True 0 - + True + False + 0 + none - + True - 0 + False + 12 + + + True + False + + + No transcoding + True + True + False + False + True + True + + + True + True + 0 + + + + + Predefined transcoding formats + True + True + False + False + True + True + dialogpreferences_radiotranscodingno + + + True + True + 1 + + + + + True + False + + + True + False + 0 + Format: + + + True + True + 0 + + + + + True + False + liststore_transcodeformat + + + + 0 + + + + + True + True + 1 + + + + + True + True + 2 + + + + + True + True + automatic + automatic + + + True + True + char + textbuffer_previewtranscoding + + + + + True + True + 5 + 3 + + + + - - 0 - - - + + True - channels + False + <b>Transcoding options</b> + True - - 1 - + False + True 1 - False - False - 1 + 2 - - - False - False - 2 - - - - - - - FreetuxTV - center - 320 - 240 - freetuxtv - windowmain - - - True - - - True - - - - - - 0 - - - - - True - - - True - 2 - - - True - Vol: - - - False - False - 0 - - - - - True - - - - - False - False - 1 - - - - - 200 - True - True - adjustment_volume - False - right - - - 2 - - - - - True - + - - - False - False - 3 - - - - - 0 - - - - - True - True - False - Go back to the normal mode - - - True - gtk-zoom-fit - 1 - - - - - False - False - 1 - - - - + + True - True - False - Activate/Deactivate the window always on top - - - True - gtk-index - 1 - - + False + 0.49000000953674316 + Recordings - False - False 2 + False - - - False - False - 1 - - - - - - - 5 - Preferences - True - center-on-parent - freetuxtv - dialog - windowmain - - - True - 2 - - - True - True - + True + False - + True + False 0 none - + True + False 12 - - Play last channel on startup + True - True - False - True + False + 2 + + + True + False + 0 + Download timeout (seconds) : + + + + + True + True + + 3 + False + False + True + True + + + 1 + 2 + + - + True - <b>Startup</b> + False + <b>Connection</b> True - False + True + True 0 - - True - 0 - none - - - True - 12 - - - Enable desktop notifications - True - True - False - True - - - - - - - True - <b>Notifications</b> - True - - - - - False - 1 - - - - - True - 0 - none - - - True - 12 - - - Ignore diacritics - True - True - False - True - - - - - - - True - <b>Search of channels</b> - True - - - - - False - 2 - - - - - - - True - 0.43999999761581421 - General - - - False - - - - - True - - + True + False 0 none - + True + False 12 - + True + False - - None + + No proxy True True False + False True True + True + True 0 - - Use a custom configuration file + + Manual proxy configuration True True False + False True - dialogpreferences_radioconfigfilenone - + dialogpreferences_radioproxyno + + True + True 1 - - Use the VLC configuration file + True - True - False - True - dialogpreferences_radioconfigfilenone + False + + + True + False + 3 + 2 + + + True + False + 0 + Proxy server: + + + + + True + False + 0 + Proxy port: + + + 1 + 2 + + + + + True + False + 0 + Proxy type: + + + 2 + 3 + + + + + True + True + False + False + True + True + + + 1 + 2 + + + + + True + True + False + False + True + True + + + 1 + 2 + 1 + 2 + + + + + True + False + liststore_proxytype + + + + + 0 + + + + + 1 + 2 + 2 + 3 + + + + + True + True + 0 + + + + + Use authentification + True + True + False + False + True + + + + True + True + 1 + + + + + True + False + 2 + 2 + + + True + False + 0 + Username: + + + + + True + False + 0 + Password: + + + 1 + 2 + + + + + True + True + False + False + True + True + + + 1 + 2 + + + + + True + True + False + False + True + True + + + 1 + 2 + 1 + 2 + + + + + True + True + 2 + + + True + True 2 - - - True - <i>Restart the application after changing this option.</i> - True - - - 3 - - - + True - <b>Configuration file (vlcrc)</b> + False + <b>Proxy</b> True False - 0 + True + 1 - 1 + 3 - + True - LibVLC + False + Network - 1 + 3 False + + + True + True + 1 + + + + + + + True + False + gtk-jump-to + + + + + + + + + HTTP + + + SOCKS + + + + + + + + + + + + + + + + + + + + + + + Video - Theora + Vorbis (OGG) + vcodec=theo,vb=800,scale=1,acodec=vorb,ab=128,channels=2 + ogg + + + Video - H.264 + MPGA (MP4) + vcodec=h264,vb=768,width=368,height=208,fps=29.97,acodec=mpga,ab=64,channels=2 + mp4 + + + Video - MPEG-2 + MPGA (TS) + vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2 + ts + + + + + True + False + True + center-always + 440 + 250 + splashscreen + windowmain + + + True + False + + + True + False - + + True + False + 50 + + + True + True + 0 + + + + + True + False + 2 + False + + + False + True + 1 + + + + + + + + + + False + FreetuxTV + center + 1024 + 600 + freetuxtv + + + True + False + 2 + + + True + False + + + + + + False + True + 0 + + + + + True + True + + True + False - + True - 0 - none + True + left + True - + True - 12 + False + 4 + 4 + 4 + 4 - + True + False + 5 - + True - 0 - Directory Record: + False + 2 + + + True + False + Search: + + + False + True + 0 + + + + + True + True + Channels' search text area + False + False + True + True + + + True + True + 1 + + + + + True + True + True + Delete the search text area + False + + + True + False + gtk-clear + 1 + + + + + False + False + 2 + + + False + True 0 - + True - select-folder - Select a directory + True + automatic + automatic + in + + + True + True + + + True + True 1 + + + True + False + + + Jump to current channel + True + True + True + Go to the current channel playing + False + image + + + True + True + 0 + + + + + False + True + 2 + + - - + + True - <b>Destination</b> - True + False + Channels + 90 + + False + - - - False - 0 - - - - - True - 0 - none - + True - 12 + False + 4 + 4 + 4 + 4 - + True + True - - No transcoding - True - True - False - True - True - - - 0 - - - - - Predefined transcoding formats + True True - False - True - True - dialogpreferences_radiotranscodingno - - - 1 - - - - - True - - - True - 0 - Format: - - - 0 - - + automatic + automatic - + True - liststore_transcodeformat - - - - 0 - - + True + False - - 1 - + + + + True + False + In progress + - 2 + False - + True True automatic automatic + in - + True True - char - textbuffer_previewtranscoding + liststore_recordings + False + 0 - 5 - 3 + 1 + + + + + True + False + Terminated + + + 1 + False + + 1 + - - + + True - <b>Transcoding options</b> - True + False + Recordings + 90 + + 1 + False + - False - 1 + True + True + 0 - 2 - - - - - True - 0.49000000953674316 - Recordings - - - 2 - False + False + True - + True + False - + True - 0 - none + False - + + + + + True + True + 0 + + + + + True + False + 3 + + True - 12 + False - + True - 2 + False + 00:00:00 + + + False + False + 0 + + + + + True + True + adjustment_time + False + + + True + True + 1 + + + + + True + False + 00:00:00 + + + False + False + 2 + + + + + False + True + 0 + + + + + True + False + 7 + + + True + True + True + Previous channel + False - + True - 0 - Download timeout (seconds) : + False + gtk-media-previous + + + + + False + False + 0 + + + + + True + True + True + Play the current channel + False + + + True + False + gtk-media-play + + + False + False + 1 + + + + + True + True + True + Stop playing the current channel + False - + True - True - - 3 + False + gtk-media-stop - - 1 - 2 - + + False + False + 2 + - - - - - True - <b>Connection</b> - True - - - - - 0 - - - - - True - 0 - none - - - True - 12 - + True + True + True + Record the current channel + False - - No proxy + True - True - False - True - True + False + gtk-media-record + + + + + False + False + 3 + + + + + True + True + True + Next channel + False + + + True + False + gtk-media-next + + + + + False + False + 4 + + + + + True + False + 2 + + + True + False + Vol: + True + True 0 - - Manual proxy configuration + True - True - False - True - dialogpreferences_radioproxyno - + False + - + True + True 1 - + + 200 True - - - True - 3 - 2 - - - True - 0 - Proxy server: - - - - - True - 0 - Proxy port: - - - 1 - 2 - - - - - True - 0 - Proxy type: - - - 2 - 3 - - - - - True - True - - - 1 - 2 - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - True - liststore_proxytype - - - - - 0 - - - - - 1 - 2 - 2 - 3 - - - - - 0 - - - - - Use authentification - True - True - False - True - - - - 1 - - - - - True - 2 - 2 - - - True - 0 - Username: - - - - - True - 0 - Password: - - - 1 - 2 - - - - - True - True - - - 1 - 2 - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - 2 - - - - - 2 - - - - - - - - - True - <b>Proxy</b> - True - - - - - False - 1 - - - - - 3 - - - - - True - Network - - - 3 - False - - - - - 1 - - - - - True - end - - - - - - - - - False - end - 0 - - - - - - - 0.75 - 1 - 0.050000000000000003 - 0.10000000000000001 - - - - 5 - True - center - freetuxtv - normal - windowmain - FreetuxTV - GNU General Public License v3 - Web TV channels player - http://code.google.com/p/freetuxtv/ - Project's Web Site - FreetuxTV is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -FreetuxTV is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. - Eric Beuque <eric.beuque@gmail.com> - translator-credits - Yannick Le Ny <yleny@laposte.net> -Sébastien Morge <contact@smorge.com> - freetuxtv - True - - - True - 2 - - - - - - True - end - - - False - end - 0 - - - - - - - - 1 - 0.050000000000000003 - 0.10000000000000001 - - - True - True - center-always - 440 - 250 - splashscreen - windowmain - - - True - - - True - - - True - 50 - - - 0 - - - - - True - 2 - False - - - False - 1 - - - - - - - - - 5 - Group properties - True - center-on-parent - 480 - 320 - freetuxtv - normal - windowmain - - - True - 2 - - - True - True - - - True - - - True - 3 - 2 - 2 - 3 - 3 - - - True - 0 - Group's name: - - - GTK_FILL - - - - - True - 0 - Playlist's URI: - - - 1 - 2 - GTK_FILL - - - - - True - True - Name of the group which will be added - - - 1 - 2 - - - - - True - True - Playlist's URI of the group which will be added - - - 1 - 2 - 1 - 2 - - - - - False - False - 0 - - - - - True - 3 - 0 - none - - - True - 12 - - - True - - - True - 3 - 2 - 2 - 3 - 3 - - - True - 0 - Delete this text before the name: - - - GTK_FILL - - - - - True - 0 - Delete this text behind the name: - - - 1 - 2 - GTK_FILL - - - - - True - True - Text or regexp which must be deleted at the end of the channel's name - - - 1 - 2 - - - - - True - True - Text or regexp which must be deleted at the beginning of the channel's name - - - 1 - 2 - 1 - 2 - - + True + adjustment_volume + False + right - 0 + True + True + 2 - + True - You can easily use regular expressions to delete some text in the channel's name of the groupe. For example, if in your playlist, you have a name like "11 - NT1" or "12 - NRJ 12", FreetuxTV is able to remove the channel's number before the name, by using the regular expression "[0-9]* - ". - True + False + + - 1 + True + True + 3 + + False + False + 5 + + + + + True + True + True + Fullscreen mode + False + + + True + False + gtk-fullscreen + + + + + False + False + 6 + + + + + True + True + True + Small mode + False + + + True + False + gtk-zoom-fit + + + + + False + False + 7 + - - - - - True - <b>Processing of channels' name</b> - True - - - - - False - False - 1 - - - - - - - - - - True - General - - - False - - - - - True - - - True - 3 - 2 - 3 - 3 - - - True - 0 - Number of channels: - - - GTK_FILL - - - - - True - 0 - 0 - 1 - 2 + False + False + 1 False - 0 + True + 1 - - - - - - 1 - - - - - True - Details - - - 1 - False - - - - - True - True - - - 2 - - - - - True - View file - 2 - False - - - - - 1 - - - - - True - end - - - - - + True + True + - False - end - 0 + True + True + 1 - - - - - 5 - Channel properties - True - center-on-parent - 480 - 320 - freetuxtv - normal - windowmain - - - True - 2 - + True - True + False - + True + False - + True - 3 - 2 - 2 - 3 - 3 - - - True - 0 - Channel's name: - - - GTK_FILL - - - - - True - 0 - Channel's URI: - - - 1 - 2 - GTK_FILL - - - - - True - True - - - - 1 - 2 - - - - - True - True - - - - 1 - 2 - 1 - 2 - - + False False - False + True 0 - + True - 3 - 0 - none + False - + True - 12 - - - True - 3 - - - True - True - textbuffer_channelvlcoptions - - - 0 - - - - + False + 0 + + True + True + 0 + - - + + True - <b>Channel VLC options:</b> - True + False + channels + + True + True + 1 + + True + True 1 - - - - True - General - - False + False + False + 1 + + + False + False + 2 + + + + + + + False + FreetuxTV + center + 320 + 240 + freetuxtv + windowmain + + + True + False + + + True + False + + + + + + True + True + 0 + + + + + True + False - + True + False + 2 - + True - 3 - 2 - 3 - 3 - - - True - 0 - Deinterlacement: - - - GTK_FILL - - - - - True - 0 - none - - - 1 - 2 - - + False + Vol: False + False 0 - + + True + False + - + + + False + False + 1 + + + + + 200 + True + True + adjustment_volume + False + right + + + True + True + 2 + + + + + True + False + + + + + False + False + 3 + - 1 + True + True + 0 - - + + True - Options + True + False + Go back to the normal mode + False + + + True + False + gtk-zoom-fit + 1 + + + False + False 1 - False - - - 1 - - - - - True - end - - - - + + True + True + False + Activate/Deactivate the window always on top + False + + + True + False + gtk-index + 1 + + + + + False + False + 2 + False - end - 0 + False + 1 - - - True - gtk-jump-to - diff --git a/src/freetuxtv-channels-list.c b/src/freetuxtv-channels-list.c index c595c9a..7c98e0b 100644 --- a/src/freetuxtv-channels-list.c +++ b/src/freetuxtv-channels-list.c @@ -2161,17 +2161,15 @@ on_popupmenu_activated_channelproperties (GtkMenuItem *menuitem, gpointer user_d // Show properties to the channel corresponding to the path pChannelInfos = channels_list_get_channel (app, real_path); - FreetuxTVWindowChannelProperties* pWindowChannelProperties; - gint res; - pWindowChannelProperties = freetuxtv_window_channel_properties_new (app); + GtkWidget* pParent; + pParent = (GtkWidget *) gtk_builder_get_object (app->gui, "windowmain"); - res = freetuxtv_window_channel_properties_run (pWindowChannelProperties, - pChannelInfos, real_path); - if(res == GTK_RESPONSE_OK){ + FreetuxTVWindowChannelProperties* pWindowChannelProperties; + pWindowChannelProperties = freetuxtv_window_channel_properties_new (GTK_WINDOW(pParent), app, pChannelInfos); - } + gtk_dialog_run (GTK_DIALOG(pWindowChannelProperties)); - g_object_unref(pWindowChannelProperties); + gtk_widget_destroy(GTK_WIDGET(pWindowChannelProperties)); pWindowChannelProperties = NULL; } } diff --git a/src/freetuxtv-gladexml.h b/src/freetuxtv-gladexml.h index ed19696..c0fc8e9 100644 --- a/src/freetuxtv-gladexml.h +++ b/src/freetuxtv-gladexml.h @@ -22,6 +22,7 @@ // List of files #define FREETUXTV_GUIFILE_ADDRECORDING "addrecording.glade" #define FREETUXTV_GUIFILE_ADDCHANNELSGROUPS "addchannelsgroups.glade" +#define FREETUXTV_GUIFILE_CHANNELPROPERTIES "channelproperties.glade" // List of windows and dialogs #define FREETUXTV_GUI_DIALOG_ADDRECORDING "dialogaddrecording" \ No newline at end of file diff --git a/src/freetuxtv-window-add-channels-group.c b/src/freetuxtv-window-add-channels-group.c index bac02b4..dfa2269 100644 --- a/src/freetuxtv-window-add-channels-group.c +++ b/src/freetuxtv-window-add-channels-group.c @@ -94,6 +94,8 @@ freetuxtv_window_add_channels_group_finalize (GObject *object) priv = FREETUXTV_WINDOW_ADD_CHANNELS_GROUP_PRIVATE(object); priv->app = NULL; + + G_OBJECT_CLASS (freetuxtv_window_add_channels_group_parent_class)->finalize (object); } #ifdef G_ENABLE_DEBUG @@ -238,6 +240,11 @@ freetuxtv_window_add_channels_group_new (GtkWindow *parent, FreetuxTVApp* app, G "toplevel-widget-name", "dialogaddgroup", NULL); + if(szUiFile){ + g_free(szUiFile); + szUiFile = NULL; + } + builder = gtk_builder_window_get_builder(GTK_BUILDER_WINDOW(pWindowAddChannelsGroups)); // Private members @@ -283,12 +290,6 @@ freetuxtv_window_add_channels_group_new (GtkWindow *parent, FreetuxTVApp* app, G pWindowAddChannelsGroups = NULL; } - - if(szUiFile){ - g_free(szUiFile); - szUiFile = NULL; - } - return pWindowAddChannelsGroups; } diff --git a/src/freetuxtv-window-add-recording.c b/src/freetuxtv-window-add-recording.c index 3570ba1..4913ec7 100644 --- a/src/freetuxtv-window-add-recording.c +++ b/src/freetuxtv-window-add-recording.c @@ -73,6 +73,8 @@ freetuxtv_window_recording_finalize (GObject *object) g_object_unref(priv->pChannelInfos); priv->pChannelInfos = NULL; } + + G_OBJECT_CLASS (freetuxtv_window_recording_parent_class)->finalize (object); } static void @@ -103,6 +105,11 @@ freetuxtv_window_recording_new (GtkWindow *parent, FreetuxTVApp* app, FreetuxTVC "toplevel-widget-name", "dialogaddrecording", NULL); + if(szUiFile){ + g_free(szUiFile); + szUiFile = NULL; + } + GtkBuilder* builder; builder = gtk_builder_dialog_get_builder(GTK_BUILDER_DIALOG(pWindowRecording)); @@ -152,11 +159,6 @@ freetuxtv_window_recording_new (GtkWindow *parent, FreetuxTVApp* app, FreetuxTVC // Update display dialog_updateinfos(pWindowRecording, beginTime); - if(szUiFile){ - g_free(szUiFile); - szUiFile = NULL; - } - return pWindowRecording; } diff --git a/src/freetuxtv-window-channel-properties.c b/src/freetuxtv-window-channel-properties.c index 607370c..14db2f6 100644 --- a/src/freetuxtv-window-channel-properties.c +++ b/src/freetuxtv-window-channel-properties.c @@ -20,49 +20,46 @@ #include "freetuxtv-window-channel-properties.h" #include "freetuxtv-i18n.h" +#include "freetuxtv-gladexml.h" typedef struct _FreetuxTVWindowChannelPropertiesPrivate FreetuxTVWindowChannelPropertiesPrivate; struct _FreetuxTVWindowChannelPropertiesPrivate { FreetuxTVApp* app; + FreetuxTVChannelInfos* pChannelInfos; }; #define FREETUXTV_WINDOW_CHANNEL_PROPERTIES_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FREETUXTV_TYPE_WINDOW_CHANNEL_PROPERTIES, FreetuxTVWindowChannelPropertiesPrivate)) -G_DEFINE_TYPE (FreetuxTVWindowChannelProperties, freetuxtv_window_channel_properties, G_TYPE_OBJECT); - -static gboolean -dialog_init (FreetuxTVWindowChannelProperties *pWindowChannelProperties); +G_DEFINE_TYPE (FreetuxTVWindowChannelProperties, freetuxtv_window_channel_properties, GTK_TYPE_BUILDER_DIALOG); static void -on_dialog_response (GtkDialog *dialog, gint response_id, gpointer user_data); +dialog_updateinfos(FreetuxTVWindowChannelProperties *pWindowChannelProperties, FreetuxTVChannelInfos* pChannelInfos); static void freetuxtv_window_channel_properties_init (FreetuxTVWindowChannelProperties *object) { + FreetuxTVWindowChannelPropertiesPrivate* priv; + priv = FREETUXTV_WINDOW_CHANNEL_PROPERTIES_PRIVATE(object); + priv->app = NULL; + priv->pChannelInfos = NULL; } static void freetuxtv_window_channel_properties_finalize (GObject *object) { - G_OBJECT_CLASS (freetuxtv_window_channel_properties_parent_class)->finalize (object); - FreetuxTVWindowChannelPropertiesPrivate* priv; - FreetuxTVWindowChannelPropertiesClass* klass; priv = FREETUXTV_WINDOW_CHANNEL_PROPERTIES_PRIVATE(object); - klass = FREETUXTV_WINDOW_CHANNEL_PROPERTIES_GET_CLASS(object); - - GtkWidget* widget; - - if(klass->on_dialog_response_hid != -1){ - widget = (GtkWidget *) gtk_builder_get_object (priv->app->gui, "dialogchannelproperties"); - g_signal_handler_disconnect (widget, klass->on_dialog_response_hid); - klass->on_dialog_response_hid = -1; - } - priv->app = NULL; + + if(priv->pChannelInfos){ + g_object_unref(priv->pChannelInfos); + priv->pChannelInfos = NULL; + } + + G_OBJECT_CLASS (freetuxtv_window_channel_properties_parent_class)->finalize (object); } static void @@ -73,48 +70,57 @@ freetuxtv_window_channel_properties_class_init (FreetuxTVWindowChannelProperties g_type_class_add_private (klass, sizeof (FreetuxTVWindowChannelPropertiesPrivate)); object_class->finalize = freetuxtv_window_channel_properties_finalize; - - klass->initialized = FALSE; - klass->on_dialog_response_hid = -1; } FreetuxTVWindowChannelProperties* -freetuxtv_window_channel_properties_new (FreetuxTVApp* app) +freetuxtv_window_channel_properties_new (GtkWindow *parent, FreetuxTVApp* app, FreetuxTVChannelInfos* pChannelInfos) { + g_return_val_if_fail(parent != NULL, NULL); + g_return_val_if_fail(GTK_IS_WINDOW(parent), NULL); + g_return_val_if_fail(app != NULL, NULL); + FreetuxTVWindowChannelProperties* pWindowChannelProperties; - FreetuxTVWindowChannelPropertiesPrivate* priv; - pWindowChannelProperties = g_object_new (FREETUXTV_TYPE_WINDOW_CHANNEL_PROPERTIES, NULL); + gchar* szUiFile = NULL; + szUiFile = g_build_filename (app->paths.szPathGladeXml, FREETUXTV_GUIFILE_CHANNELPROPERTIES, NULL); - priv = FREETUXTV_WINDOW_CHANNEL_PROPERTIES_PRIVATE(pWindowChannelProperties); + pWindowChannelProperties = g_object_new (FREETUXTV_TYPE_WINDOW_CHANNEL_PROPERTIES, + "ui-file", szUiFile, + "toplevel-widget-name", "dialogchannelproperties", + NULL); + + if(szUiFile){ + g_free(szUiFile); + szUiFile = NULL; + } + + GtkBuilder* builder; + builder = gtk_builder_dialog_get_builder(GTK_BUILDER_DIALOG(pWindowChannelProperties)); + // Private members + FreetuxTVWindowChannelPropertiesPrivate* priv; + priv = FREETUXTV_WINDOW_CHANNEL_PROPERTIES_PRIVATE(pWindowChannelProperties); priv->app = app; - dialog_init (pWindowChannelProperties); + gtk_dialog_add_buttons (GTK_DIALOG(pWindowChannelProperties), + "gtk-close", GTK_RESPONSE_CLOSE, NULL); + + // Update from channel + dialog_updateinfos (pWindowChannelProperties, pChannelInfos); return pWindowChannelProperties; } -gint -freetuxtv_window_channel_properties_run ( - FreetuxTVWindowChannelProperties* pWindowChannelProperties, - FreetuxTVChannelInfos* pChannelInfos, - GtkTreePath* pPath) -{ - g_return_val_if_fail(pWindowChannelProperties != NULL, GTK_RESPONSE_NONE); - g_return_val_if_fail(FREETUXTV_IS_WINDOW_CHANNEL_PROPERTIES(pWindowChannelProperties), GTK_RESPONSE_NONE); +static void +dialog_updateinfos(FreetuxTVWindowChannelProperties *pWindowChannelProperties, FreetuxTVChannelInfos* pChannelInfos) +{ FreetuxTVWindowChannelPropertiesPrivate* priv; priv = FREETUXTV_WINDOW_CHANNEL_PROPERTIES_PRIVATE(pWindowChannelProperties); - - GtkBuilder *builder; - builder = priv->app->gui; - - gint res; - GtkDialog *dialog; - dialog = (GtkDialog *) gtk_builder_get_object (builder, "dialogchannelproperties"); + GtkBuilder* builder; + builder = gtk_builder_dialog_get_builder(GTK_BUILDER_DIALOG(pWindowChannelProperties)); GtkWidget *widget; GObject *object; @@ -131,9 +137,9 @@ freetuxtv_window_channel_properties_run ( editable = FALSE; } */ - + // Set the value in the fields - widget = (GtkWidget *) gtk_builder_get_object (builder, "dialogchannelproperties_name"); + widget = (GtkWidget *) gtk_builder_get_object (builder, "entry_channelname"); gtk_entry_set_text(GTK_ENTRY(widget), pChannelInfos->name); if(!editable){ #if GTK_API_VERSION == 3 @@ -143,7 +149,7 @@ freetuxtv_window_channel_properties_run ( #endif } - widget = (GtkWidget *) gtk_builder_get_object (builder, "dialogchannelproperties_uri"); + widget = (GtkWidget *) gtk_builder_get_object (builder, "entry_channeluri"); gtk_entry_set_text(GTK_ENTRY(widget), pChannelInfos->url); if(!editable){ #if GTK_API_VERSION == 3 @@ -168,70 +174,10 @@ freetuxtv_window_channel_properties_run ( gtk_text_view_set_editable (GTK_TEXT_VIEW(widget), FALSE); } - widget = (GtkWidget *) gtk_builder_get_object (builder, "dialogchannelproperties_deinterlace"); + widget = (GtkWidget *) gtk_builder_get_object (builder, "label_channeldeinterlace"); if(pChannelInfos->deinterlace_mode){ gtk_label_set_text(GTK_LABEL(widget), pChannelInfos->deinterlace_mode); }else{ gtk_label_set_text(GTK_LABEL(widget), _("none")); } - - // Display the dialog - res = gtk_dialog_run(dialog); - - return res; } - -static gboolean -dialog_init (FreetuxTVWindowChannelProperties *pWindowChannelProperties) -{ - gboolean res = TRUE; - - FreetuxTVWindowChannelPropertiesPrivate* priv; - priv = FREETUXTV_WINDOW_CHANNEL_PROPERTIES_PRIVATE(pWindowChannelProperties); - - FreetuxTVWindowChannelPropertiesClass* klass; - - GtkDialog *dialog; - GtkWidget *widget; - - GtkBuilder *builder; - builder = priv->app->gui; - - klass = FREETUXTV_WINDOW_CHANNEL_PROPERTIES_GET_CLASS(pWindowChannelProperties); - - dialog = (GtkDialog *) gtk_builder_get_object (builder, - "dialogchannelproperties"); - - if(!klass->initialized){ - // Initialize signals for dialogchannelproperties - widget = (GtkWidget *)gtk_builder_get_object (builder, - "dialogchannelproperties"); - - gtk_dialog_add_buttons (GTK_DIALOG(widget), - "gtk-close", GTK_RESPONSE_CLOSE, NULL); - /* - gtk_dialog_add_buttons (GTK_DIALOG(widget), - "gtk-cancel", GTK_RESPONSE_CANCEL, - "gtk-apply", GTK_RESPONSE_APPLY, NULL); - */ - - g_signal_connect(G_OBJECT(widget), - "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), - NULL); - - klass->initialized = TRUE; - } - - klass->on_dialog_response_hid = g_signal_connect(G_OBJECT(dialog), - "response", - G_CALLBACK(on_dialog_response), - pWindowChannelProperties); - - return res; -} - -static void -on_dialog_response (GtkDialog *dialog, gint response_id, gpointer user_data) -{ - gtk_widget_hide(GTK_WIDGET(dialog)); -} \ No newline at end of file diff --git a/src/freetuxtv-window-channel-properties.h b/src/freetuxtv-window-channel-properties.h index 4a5caa8..0209657 100644 --- a/src/freetuxtv-window-channel-properties.h +++ b/src/freetuxtv-window-channel-properties.h @@ -22,6 +22,7 @@ #include +#include "gtk-builder-dialog.h" #include "freetuxtv-app.h" #include "freetuxtv-channel-infos.h" @@ -39,28 +40,18 @@ typedef struct _FreetuxTVWindowChannelProperties FreetuxTVWindowChannelPropertie struct _FreetuxTVWindowChannelPropertiesClass { - GObjectClass parent_class; - - gboolean initialized; - - gulong on_dialog_response_hid; + GtkBuilderDialogClass parent_class; }; struct _FreetuxTVWindowChannelProperties { - GObject parent_instance; + GtkBuilderDialog parent_instance; }; GType freetuxtv_window_channel_properties_get_type (void) G_GNUC_CONST; FreetuxTVWindowChannelProperties* -freetuxtv_window_channel_properties_new (FreetuxTVApp* app); - -gint -freetuxtv_window_channel_properties_run ( - FreetuxTVWindowChannelProperties* pWindowChannelProperties, - FreetuxTVChannelInfos* pChannelInfos, - GtkTreePath* pPath); +freetuxtv_window_channel_properties_new (GtkWindow *parent, FreetuxTVApp* app, FreetuxTVChannelInfos* pChannelInfos); G_END_DECLS diff --git a/src/freetuxtv-window-main.c b/src/freetuxtv-window-main.c index 363f43a..bce0e7a 100644 --- a/src/freetuxtv-window-main.c +++ b/src/freetuxtv-window-main.c @@ -1146,7 +1146,6 @@ on_windowmain_buttonrecord_clicked (GtkButton *button, FreetuxTVRecordingInfos* pRecordingInfos = NULL; gint res; - // Create the window GtkWidget* pParent; pParent = (GtkWidget *) gtk_builder_get_object (app->gui, "windowmain");