"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/xitk/viewlog.c" between
xine-ui-0.99.13.tar.bz2 and xine-ui-0.99.14.tar.bz2

About: xine is a free video player which plays mpeg-2 and mpeg-1 video, DVDs (unlocked/unencrypted only), video CDs, SVCDs, and AVI files (using Win32 codecs) with synchronized audio and video, and optionally fullscreen using the Xv extensions in Xfree86 4.x (user interface).

viewlog.c  (xine-ui-0.99.13.tar.bz2):viewlog.c  (xine-ui-0.99.14.tar.bz2)
/* /*
* Copyright (C) 2000-2021 the xine project * Copyright (C) 2000-2022 the xine project
* *
* This file is part of xine, a unix video player. * This file is part of xine, a unix video player.
* *
* xine is free software; you can redistribute it and/or modify * xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* xine is distributed in the hope that it will be useful, * xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 131 skipping to change at line 131
* *
*/ */
static void viewlog_paint_widgets (xui_viewlog_t *vl) { static void viewlog_paint_widgets (xui_viewlog_t *vl) {
/* Repaint widgets now */ /* Repaint widgets now */
xitk_paint_widget_list (vl->widget_list); xitk_paint_widget_list (vl->widget_list);
} }
/* /*
* *
*/ */
static void viewlog_clear_tab (xui_viewlog_t *vl) {
xitk_image_t *im;
int width = WINDOW_WIDTH - 30;
int height = MAX_DISP_ENTRIES * 20 + 10;
im = xitk_image_new (vl->gui->xitk, NULL, 0, width, height);
xitk_image_draw_outter (im, width, height);
xitk_image_draw_image (vl->widget_list, im, 0, 0, width, height, 15, (24 + vl-
>tabs_height), 0);
xitk_image_free_image (&im);
}
/*
*
*/
static void viewlog_change_section (xitk_widget_t *wx, void *data, int section) { static void viewlog_change_section (xitk_widget_t *wx, void *data, int section) {
xui_viewlog_t *vl = data; xui_viewlog_t *vl = data;
int i, j, k; int i, j, k;
const char *const *log = (const char * const *)xine_get_log(vl->gui->xine, sec tion); const char *const *log = (const char * const *)xine_get_log(vl->gui->xine, sec tion);
char buf[2048]; char buf[2048];
const char *p; const char *p;
(void)wx; (void)wx;
/* Freeing entries */ /* Freeing entries */
for(i = 0; i < vl->log_entries; i++) for(i = 0; i < vl->log_entries; i++)
skipping to change at line 249 skipping to change at line 234
while (vl->log[i]) { while (vl->log[i]) {
if ((strlen (vl->log[i]) > 1) || (vl->log[i][0] != ' ')) if ((strlen (vl->log[i]) > 1) || (vl->log[i][0] != ' '))
printf(" '%s'\n", vl->log[i]); printf(" '%s'\n", vl->log[i]);
i++; i++;
} }
printf("-----------------------------------\n\n"); printf("-----------------------------------\n\n");
} }
xitk_browser_update_list (vl->browser_widget, vl->log, NULL, vl->real_num_entr ies, 0); xitk_browser_update_list (vl->browser_widget, vl->log, NULL, vl->real_num_entr ies, 0);
viewlog_clear_tab (vl);
viewlog_paint_widgets (vl); viewlog_paint_widgets (vl);
} }
/* /*
* Refresh current displayed log. * Refresh current displayed log.
*/ */
static void viewlog_refresh (xitk_widget_t *w, void *data, int state) { static void viewlog_refresh (xitk_widget_t *w, void *data, int state) {
xui_viewlog_t *vl = data; xui_viewlog_t *vl = data;
int section = xitk_tabs_get_current_selected (vl->tabs); int section = xitk_tabs_get_current_selected (vl->tabs);
(void)w; (void)w;
skipping to change at line 278 skipping to change at line 262
*/ */
static void viewlog_create_tabs (xui_viewlog_t *vl) { static void viewlog_create_tabs (xui_viewlog_t *vl) {
xitk_image_t *bg; xitk_image_t *bg;
xitk_tabs_widget_t tab; xitk_tabs_widget_t tab;
const char *const *log_sections = xine_get_log_names(vl->gui->xine); const char *const *log_sections = xine_get_log_names(vl->gui->xine);
unsigned int log_section_count = xine_get_log_section_count(vl->gui->x ine); unsigned int log_section_count = xine_get_log_section_count(vl->gui->x ine);
/* /*
* create log sections * create log sections
*/ */
XITK_WIDGET_INIT (&tab); tab.nw.wl = vl->widget_list;
tab.nw.skin_element_name = NULL;
tab.skin_element_name = NULL; tab.nw.userdata = vl;
tab.num_entries = log_section_count; tab.num_entries = log_section_count;
tab.entries = log_sections; tab.entries = log_sections;
tab.callback = viewlog_change_section; tab.callback = viewlog_change_section;
tab.userdata = vl; vl->tabs = xitk_noskin_tabs_create (&tab, 15, 24, WINDOW_WIDTH - 30, tabsfontn
vl->tabs = xitk_noskin_tabs_create (vl->widget_list, &tab, 15, 24, WINDOW_WIDT ame);
H - 30, tabsfontname);
if (vl->tabs) { if (vl->tabs) {
xitk_add_widget (vl->widget_list, vl->tabs, XITK_WIDGET_STATE_ENABLE | XITK_ WIDGET_STATE_VISIBLE); xitk_add_widget (vl->widget_list, vl->tabs, XITK_WIDGET_STATE_ENABLE | XITK_ WIDGET_STATE_VISIBLE);
vl->tabs_height = xitk_get_widget_height (vl->tabs) - 1; vl->tabs_height = xitk_get_widget_height (vl->tabs) - 1;
bg = xitk_window_get_background_image (vl->xwin); bg = xitk_window_get_background_image (vl->xwin);
xitk_image_draw_rectangular_box (bg, 15, 24 + vl->tabs_height, xitk_image_draw_rectangular_box (bg, 15, 24 + vl->tabs_height,
WINDOW_WIDTH - 30, MAX_DISP_ENTRIES * 20 + 10, DRAW_OUTTER); WINDOW_WIDTH - 30, MAX_DISP_ENTRIES * 20 + 10, DRAW_OUTTER);
xitk_window_set_background_image (vl->xwin, bg); xitk_window_set_background_image (vl->xwin, bg);
} }
viewlog_change_section (NULL, vl, 0); viewlog_change_section (NULL, vl, 0);
skipping to change at line 356 skipping to change at line 339
free (vl); free (vl);
return; return;
} }
set_window_states_start (vl->gui, vl->xwin); set_window_states_start (vl->gui, vl->xwin);
vl->widget_list = xitk_window_widget_list (vl->xwin); vl->widget_list = xitk_window_widget_list (vl->xwin);
viewlog_create_tabs (vl); viewlog_create_tabs (vl);
{ {
xitk_browser_widget_t br; xitk_browser_widget_t br;
XITK_WIDGET_INIT (&br);
br.nw.wl = vl->widget_list;
br.nw.skin_element_name = NULL;
br.nw.userdata = NULL;
br.arrow_up.skin_element_name = NULL; br.arrow_up.skin_element_name = NULL;
br.slider.skin_element_name = NULL; br.slider.skin_element_name = NULL;
br.arrow_dn.skin_element_name = NULL; br.arrow_dn.skin_element_name = NULL;
br.browser.skin_element_name = NULL; br.browser.skin_element_name = NULL;
br.browser.max_displayed_entries = MAX_DISP_ENTRIES; br.browser.max_displayed_entries = MAX_DISP_ENTRIES;
br.browser.num_entries = vl->log_entries; br.browser.num_entries = vl->log_entries;
br.browser.entries = vl->log; br.browser.entries = vl->log;
br.callback = NULL; br.callback = NULL;
br.dbl_click_callback = NULL; br.dbl_click_callback = NULL;
br.userdata = NULL; vl->browser_widget = xitk_noskin_browser_create (&br,
vl->browser_widget = xitk_noskin_browser_create (vl->widget_list, &br,
15 + 5, (24 + vl->tabs_height) + 5, WINDOW_WIDTH - (30 + 10), 20, -16, br_ fontname); 15 + 5, (24 + vl->tabs_height) + 5, WINDOW_WIDTH - (30 + 10), 20, -16, br_ fontname);
if (vl->browser_widget) { if (vl->browser_widget) {
xitk_add_widget (vl->widget_list, vl->browser_widget, XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE); xitk_add_widget (vl->widget_list, vl->browser_widget, XITK_WIDGET_STATE_EN ABLE | XITK_WIDGET_STATE_VISIBLE);
xitk_browser_set_alignment (vl->browser_widget, ALIGN_LEFT); xitk_browser_set_alignment (vl->browser_widget, ALIGN_LEFT);
xitk_browser_update_list (vl->browser_widget, vl->log, NULL, vl->real_num_ entries, 0); xitk_browser_update_list (vl->browser_widget, vl->log, NULL, vl->real_num_ entries, 0);
} }
} }
viewlog_paint_widgets (vl); viewlog_paint_widgets (vl);
{ {
xitk_widget_t *w; xitk_widget_t *w;
xitk_labelbutton_widget_t lb; xitk_labelbutton_widget_t lb;
XITK_WIDGET_INIT (&lb);
y = WINDOW_HEIGHT - (23 + 15); y = WINDOW_HEIGHT - (23 + 15);
x = 15; x = 15;
lb.button_type = CLICK_BUTTON; lb.nw.wl = vl->widget_list;
lb.nw.skin_element_name = NULL;
lb.nw.userdata = vl;
lb.button_type = CLICK_BUTTON;
lb.align = ALIGN_CENTER;
lb.state_callback = NULL;
lb.label = _("Refresh"); lb.label = _("Refresh");
lb.align = ALIGN_CENTER;
lb.callback = viewlog_refresh; lb.callback = viewlog_refresh;
lb.state_callback = NULL; w = xitk_noskin_labelbutton_create (&lb,
lb.userdata = vl;
lb.skin_element_name = NULL;
w = xitk_noskin_labelbutton_create (vl->widget_list, &lb,
x, y, 100, 23, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_T EXT_INV, tabsfontname); x, y, 100, 23, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_T EXT_INV, tabsfontname);
xitk_add_widget (vl->widget_list, w, XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_ STATE_VISIBLE); xitk_add_widget (vl->widget_list, w, XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_ STATE_VISIBLE);
x = WINDOW_WIDTH - (100 + 15); x = WINDOW_WIDTH - (100 + 15);
lb.button_type = CLICK_BUTTON;
lb.label = _("Close"); lb.label = _("Close");
lb.align = ALIGN_CENTER;
lb.callback = viewlog_exit; lb.callback = viewlog_exit;
lb.state_callback = NULL; w = xitk_noskin_labelbutton_create (&lb,
lb.userdata = vl;
lb.skin_element_name = NULL;
w = xitk_noskin_labelbutton_create (vl->widget_list, &lb,
x, y, 100, 23, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_T EXT_INV, tabsfontname); x, y, 100, 23, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_TEXT_NORM, XITK_NOSKIN_T EXT_INV, tabsfontname);
xitk_add_widget (vl->widget_list, w, XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_ STATE_VISIBLE); xitk_add_widget (vl->widget_list, w, XITK_WIDGET_STATE_ENABLE | XITK_WIDGET_ STATE_VISIBLE);
} }
vl->kreg = xitk_be_register_event_handler ("viewlog", vl->xwin, viewlog_event, vl, NULL, NULL); vl->kreg = xitk_be_register_event_handler ("viewlog", vl->xwin, viewlog_event, vl, NULL, NULL);
vl->visible = 1; vl->visible = 1;
viewlog_raise_window (vl); viewlog_raise_window (vl);
xitk_window_set_input_focus (vl->xwin); xitk_window_set_input_focus (vl->xwin);
 End of changes. 14 change blocks. 
43 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)