gkrellm-radio-2.0.4/0040755000175000017500000000000007733031667013624 5ustar sjoerdsjoerdgkrellm-radio-2.0.4/lirc.example0100644000175000017500000000107407733031667016131 0ustar sjoerdsjoerd# To use LIRC (Linux Infrared Remote Control http://www.lirc.org/) # with the gkrellm-radio plugin you may put the following into your # ~/.lircrc file. begin prog = gkrellm_radio button = RADIO config = power end begin prog = gkrellm_radio button = CH+ config = next_station end begin prog = gkrellm_radio button = CH- config = prev_station end begin prog = gkrellm_radio button = Up config = finetune_up end begin prog = gkrellm_radio button = Down config = finetune_down end begin prog = gkrellm_radio button = MUTE config = mute end gkrellm-radio-2.0.4/CHANGES0100644000175000017500000000260507733031667014617 0ustar sjoerdsjoerdVersion 2.0.4: * Retune when re-opening the radio * Only reopen the radio when first creating the plugin Version 2.0.3: * i18n patch by Grigory Batalov Version 2.0.2: * Be sure the radio isn't muted after opening * Don't set onoff_state to on if opening the radio failed Version 2.0.1: * Put info text in the right widget * Popup a message if ones request the channels menu without having setup some channels Version 2.0: * port to gkrellm2 and gtk2 Version 0.3.3: * The tuner was a factor 10 wrong for VIDEO_TUNER_LOW cards Version 0.3.2: * Made turning off the radio on gkrellm exit an option (default on) Version 0.3.1: * Fixed right mouse button/scrollwheel does nothing bug * Respect the frequency range of the tuner * Added LIRC support (patch by Claudio Bley ) Version 0.3: * Took over Upstream Development (sjoerd@luon.net) * Lots of thanks to Lars Christensen, the first upstream maintainer * Turn off the radio when the plugin is disables or gkrellm exit's * Right mouse button pops up a channel menu * Other small bugfixes and enhancments 2001/01/29 - Version 0.2 - Mutes a short while when changing channel to avoid noise. Timer is configurable. - Cleaner configuration interface - Reopen on startup option (to reopen a radio device previously left on) 2001/01/29 - Version 0.1 - Initial Release gkrellm-radio-2.0.4/README0100644000175000017500000000466707733031667014516 0ustar sjoerdsjoerd GKrellM Radio Plugin - to tune your radio card on Linux. Copyright (C) 2000 Lars Christensen Copyright (C) 2001-2002 Sjoerd Simons This plugin allows your to turn your radio card on/off and tune to channels. LICENSE INFORMATION This program is free software which I release under the GNU General Public License. You may redistribute and/or modify this program under the terms of that license as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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. To get a copy of the GNU General Puplic License, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. INSTALLATION 1. Building Build the radio plugin by typing make If you have gkrellm installed in a nonstandard location, you need to change the GKRELLMDIR variable in the Makefile. If you want to use LIRC (http://www.lirc.org/) with the radio plugin, you just need to define the WITH_LIRC variable to a non-empty value. For example in bash you could do: WITH_LIRC=1 make If you want to use i18n support compile with enable_nls=1 make And install with enable_nls=1 make install 2. Installing Copy the file radio.so to your GKrellM plugin directory. This could be /usr/lib/gkrellm2/plugins. If you don't have write access, you can put the file in ~/.gkrellm2/plugins/ instead. USAGE The radio plugin consists of a text field to the left and a button to the right. The button on the right will turn the radio on or off. Clicking the text field will tune to the next channel. You can configure channels in the GKrellM configuration dialogs, under "Plugins/Radio Plugin". Clicking the right mouse bottun somewhere on the plugin, will open a menu with preset channels. If you have a wheel on your mouse, your can use it to tune to any frequence. Simply place it over the plugin and scroll! CREDITS Lars Christensen: upstream author untill version 0.2.1 Sjoerd Simons: Version 0.3 and higher THANKS TO Gerd Knorr - I borrowed some of the radio interface code from his Xawtv radio application. gkrellm-radio-2.0.4/gkrellm_radio.c0100644000175000017500000005605707733031667016615 0ustar sjoerdsjoerd#include #include #include #include "radio.h" #include "gkrellm_radio.h" #ifdef HAVE_LIRC #include "gkrellm_radio_lirc.h" #endif #define CONFIG_NAME "Radio Plugin" /* Name in the configuration window */ #define CONFIG_KEY "radio" /* Name in the configuration window */ #define STYLE_NAME "radio" /* Theme subdirectory name and gkrellmrc */ /* style name. */ #define LOCATION MON_APM /* The location of the plugin, choose between : * |* MON_CLOCK, MON_CPU, MON_PROC, MON_DISK, * |* MON_INET, MON_NET, MON_FS, MON_MAIL, * |* MON_APM, or MON_UPTIME * */ static gchar *info_text[] = { N_("GKrellM Radio Plugin\n\n"), N_("This plugin allow you to control the radio card of your Linux box," \ "if you have one installed.\n"), N_("\nUser Interface:\n"), N_("\n\t* Clicking the right button will turn the radio on and off.\n"), N_("\t* Clicking the left text will tune to the next channel configured" \ " under configuration.\n"), N_("\t* Using your mousewheel will tune up or down.\n"), N_("\t*Right mouse button will pop up a channel menu\n"), N_("\nThanks to:\n"), N_("\n\tLars Christensen - Upstream author untill version 0.2.1\n" \ "\tGerd Knorr - borrowed some of the radio interface code from his Xawtv" \ " radio application.\n"), N_("\nHomepage:\n"), "\n\thttp://gkrellm.luon.net/gkrellm-radio.phtml\n" }; static GkrellmPanel *panel; static GkrellmMonitor *plugin_monitor; static GkrellmDecal *station_text, *decal_onoff_pix; GkrellmDecalbutton *onoff_button; static gint style_id; static gint button_state; /* For station_text button */ gint onoff_state; /* for onoff button */ static gfloat mutetime = 0.15; static gboolean attempt_reopen = TRUE; static gboolean close_atexit = TRUE; typedef struct station { char *station_name; float freq; } station; GtkWidget *menu = NULL; static station *stations = NULL; gint nstations = 0; gint currentstation = -1; static void set_text_freq(float freq); void free_stations() { int i; for (i=0; i 0.001) { if (mute_timeout_tag != -1) gtk_timeout_remove(mute_timeout_tag); mute_timeout_tag = gtk_timeout_add(mutetime * 1000, (GtkFunction)mutetimeout, NULL); radio_mute(); } } void do_switch_station(int nr) { gchar *text_utf8 = NULL, *text_locale = NULL; nr %= nstations; currentstation = nr; start_mute_timer(); radio_tune(stations[nr].freq); gkrellm_locale_dup_string(&text_utf8, stations[nr].station_name, &text_locale); gkrellm_draw_decal_text(panel, station_text, text_locale, -1); gkrellm_draw_panel_layers(panel); } static void exit_func(void) { if (close_atexit) close_radio(); } gint freq_menu_activated(GtkWidget *widget, int freqnr) { do_switch_station(freqnr); return FALSE; } void create_freq_menu(void) { GtkWidget *menuitem; int i; if (menu != NULL) { gtk_widget_destroy(menu); } if (!nstations) { menu = NULL; return; } menu = gtk_menu_new(); gtk_menu_set_title(GTK_MENU(menu),"frequency menu"); menuitem = gtk_tearoff_menu_item_new(); gtk_menu_append(GTK_MENU(menu),menuitem); gtk_widget_show(menuitem); for (i=0; i < nstations; i++) { menuitem = gtk_menu_item_new_with_label(stations[i].station_name); gtk_menu_append(GTK_MENU(menu),menuitem); gtk_signal_connect(GTK_OBJECT(menuitem),"activate", GTK_SIGNAL_FUNC(freq_menu_activated),GINT_TO_POINTER(i)); } gtk_widget_show_all(menu); } void switch_station(void) { if (currentstation == -1) { if (nstations > 0) do_switch_station(0); } else do_switch_station(currentstation + 1); } void set_onoff_button(int on) { int imgid; if (on) imgid = D_MISC_BUTTON_ON; else imgid = D_MISC_BUTTON_OUT; gkrellm_set_decal_button_index(onoff_button, imgid); gkrellm_draw_panel_layers(panel); } void reopen_radio() { if (!attempt_reopen) return; if (open_radio() != -1) { start_mute_timer(); radio_tune(current_freq()); set_text_freq(current_freq()); onoff_state = 1; /* on */ } set_onoff_button(onoff_state); } void gkrellm_radio_turn_onoff(void) { if (!onoff_state) { if (open_radio() == -1) { gkrellm_message_window("GKrellM radio plugin", _("Couldn't open /dev/radio"), NULL); } else { /* radio was opened */ onoff_state = 1; /* on */ start_mute_timer(); radio_tune(current_freq()); set_text_freq(current_freq()); set_onoff_button(onoff_state); } } else { onoff_state = 0; /* off */ set_onoff_button(onoff_state); close_radio(); } } void cb_button(GkrellmDecalbutton *button) { if (GPOINTER_TO_INT(button->data) == 1) { switch_station(); } if (GPOINTER_TO_INT(button->data) == 2) { gkrellm_radio_turn_onoff(); } } static void set_text_freq(float freq) { gchar *text_utf8 = NULL, *text_locale = NULL; gkrellm_locale_dup_string(&text_utf8, station_name(freq), &text_locale); gkrellm_draw_decal_text(panel, station_text, text_locale, -1); gkrellm_draw_panel_layers(panel); } static gint panel_expose_event(GtkWidget *widget, GdkEventExpose *ev) { gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], panel->pixmap, ev->area.x, ev->area.y, ev->area.x, ev->area.y, ev->area.width, ev->area.height); return FALSE; } void gkrellm_radio_finetune_delta (float amount) { radio_freq_delta(amount); set_text_freq(current_freq()); gkrellm_config_modified(); } static gint button_release_event(GtkWidget *widget, GdkEventButton *ev, void *N) { if (ev->button == 3) { if (menu == NULL) gkrellm_message_window("GKrellM radio plugin", _("Please setup some channels in the configuration"),NULL); else gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, ev->state, ev->time); } return TRUE; } static gint scroll_event(GtkWidget *widget,GdkEventScroll *ev,gpointer data) { float delta = ev->direction == GDK_SCROLL_UP ? 0.05 : -0.05; gkrellm_radio_finetune_delta(delta); return TRUE; } static void create_plugin(GtkWidget *vbox, gint first_create) { GkrellmStyle *style; GkrellmTextstyle *ts, *ts_alt; GkrellmMargin *margin; GdkPixmap *pixmap; GdkBitmap *mask; gint y; gint x; gchar *text_utf8 = NULL, *text_locale = NULL; if (first_create) { panel = gkrellm_panel_new0(); gkrellm_disable_plugin_connect(plugin_monitor,close_radio); /* create the frequency menu */ create_freq_menu(); } else gkrellm_destroy_decal_list(panel); style = gkrellm_meter_style(style_id); /* Each GkrellmStyle has two text styles. The theme designer has picked the | colors and font sizes, presumably based on knowledge of what you draw | on your panel. You just do the drawing. You probably could assume | the ts font is larger than the ts_alt font, but again you can be | overridden by the theme designer. */ ts = gkrellm_meter_textstyle(style_id); ts_alt = gkrellm_meter_alt_textstyle(style_id); panel->textstyle = ts; /* would be used for a panel label */ y = 2; /* some border */ station_text = gkrellm_create_decal_text(panel, _("Hello World"), ts_alt, style, 2, y, 40); /* Create a pixmap decal and place it to the right of station_text. Use | decals from the builtin decal_misc.xpm. */ pixmap = gkrellm_decal_misc_pixmap(); mask = gkrellm_decal_misc_mask(); x = station_text->x + station_text->w + 4; decal_onoff_pix = gkrellm_create_decal_pixmap(panel, pixmap, mask, N_MISC_DECALS, NULL, x, y); /* Configure the panel to hold the above created decals, add in a little | bottom margin for looks, and create the panel. */ gkrellm_panel_configure(panel, NULL, style); gkrellm_panel_create(vbox, plugin_monitor,panel); /* After the panel is created, the decals can be converted into buttons. | First draw the initial text into the text decal button and then | put the text decal into a meter button. But for the decal_onoff_pix, | we can directly convert it into a decal button since it is a pixmap | decal. Just pass the frame we want to be the out image and the | frame for the in or pressed image. */ gkrellm_locale_dup_string(&text_utf8, station_name(current_freq()), &text_locale); gkrellm_draw_decal_text(panel, station_text, text_locale, button_state); margin = gkrellm_get_style_margins(style); gkrellm_put_decal_in_meter_button(panel, station_text, cb_button, GINT_TO_POINTER(1),margin); onoff_button = gkrellm_make_decal_button(panel, decal_onoff_pix, cb_button, GINT_TO_POINTER(2), onoff_state ? D_MISC_BUTTON_ON : D_MISC_BUTTON_OUT, D_MISC_BUTTON_IN); /* Note: all of the above gkrellm_draw_decal_XXX() calls will not | appear on the panel until a gkrellm_draw_layers(panel); call is | made. This will be done in update_plugin(), otherwise we would | make the call here and anytime the decals are changed. */ if (first_create) { g_signal_connect(GTK_OBJECT (panel->drawing_area), "expose_event", (GtkSignalFunc) panel_expose_event, NULL); g_signal_connect(GTK_OBJECT (panel->drawing_area), "button_release_event", GTK_SIGNAL_FUNC(button_release_event), NULL); g_signal_connect(GTK_OBJECT (panel->drawing_area), "scroll_event", GTK_SIGNAL_FUNC(scroll_event), NULL); reopen_radio(); } gkrellm_draw_panel_layers(panel); } static GtkWidget *gui_station_list = NULL; static GtkWidget *gui_station_dialog = NULL; static GtkWidget *gui_station_name_input, *gui_freq_input; static GtkWidget *gui_mutetime_entry = NULL; static GtkWidget *gui_reopen_toggle = NULL; static GtkWidget *gui_close_toggle = NULL; static gint gui_station_selected = -1; static gint gui_station_count = 0; void close_station_editor() { if (gui_station_dialog != NULL) gtk_widget_destroy(gui_station_dialog); gui_station_dialog = NULL; } void close_and_add_station_editor(gpointer *userdata) { gint new_entry = (gint)userdata; gchar *f[3]; gfloat freq; gchar fstr[32]; f[0] = (gchar *) gtk_entry_get_text(GTK_ENTRY(gui_station_name_input)); freq = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(gui_freq_input)); sprintf(fstr, "%.2f", freq); f[1] = fstr; f[2] = ""; if (new_entry) { gtk_clist_append(GTK_CLIST(gui_station_list), f); gui_station_count++; } else { assert(gui_station_selected != -1); gtk_clist_set_text(GTK_CLIST(gui_station_list), gui_station_selected, 0, f[0]); gtk_clist_set_text(GTK_CLIST(gui_station_list), gui_station_selected, 1, f[1]); } close_station_editor(); } void create_station_editor(gint new_entry) { GtkWidget *label, *button, *table; GtkContainer *action_area, *dialog_area; GtkObject *adj; close_station_editor(); gui_station_dialog = gtk_dialog_new(); gtk_window_set_modal(GTK_WINDOW(gui_station_dialog), TRUE); action_area = GTK_CONTAINER (GTK_DIALOG(gui_station_dialog)->action_area); dialog_area = GTK_CONTAINER(GTK_DIALOG(gui_station_dialog)->vbox); table = gtk_table_new(2, 2, 0); label = gtk_label_new(_("Station Name:")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_EXPAND, GTK_FILL, 4, 4); gui_station_name_input = gtk_entry_new(); gtk_table_attach(GTK_TABLE(table), gui_station_name_input, 1, 2, 0, 1, GTK_EXPAND, GTK_FILL, 4, 4); label = gtk_label_new(_("Frequency:")); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_EXPAND, GTK_FILL, 4, 4); adj = gtk_adjustment_new(current_freq(), 0.05, 999.99, 0.05, 1, 1); gui_freq_input = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0.05, 2); gtk_table_attach(GTK_TABLE(table), gui_freq_input, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 4, 4); gtk_container_add(dialog_area, table); /* OK button */ button = gtk_button_new_with_label("Ok"); gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(close_and_add_station_editor), (gpointer)new_entry); gtk_container_add(action_area, button); /* Cancel button */ button = gtk_button_new_with_label(_("Cancel")); gtk_signal_connect_object (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(close_station_editor), NULL); gtk_container_add(action_area, button); } void gui_new_station(GtkButton *button, gpointer *userdata) { close_station_editor(); create_station_editor(TRUE); gtk_widget_show_all(gui_station_dialog); } void gui_edit_station(GtkButton *button, gpointer *userdata) { gchar *field = NULL; gfloat freq; close_station_editor(); create_station_editor(FALSE); if (!gtk_clist_get_text(GTK_CLIST(gui_station_list), gui_station_selected, 0, &field)) return; gtk_entry_set_text(GTK_ENTRY(gui_station_name_input), field); gtk_clist_get_text(GTK_CLIST(gui_station_list), gui_station_selected, 1, &field); freq = atof(field); gtk_spin_button_set_value(GTK_SPIN_BUTTON(gui_freq_input), freq); gtk_widget_show_all(gui_station_dialog); } void gui_delete_station(GtkButton *button, gpointer *userdata) { close_station_editor(); if (gui_station_selected >= 0 && gui_station_selected < gui_station_count) { gtk_clist_remove(GTK_CLIST(gui_station_list), gui_station_selected); gui_station_selected = -1; gui_station_count--; } } void gui_moveup_station(GtkButton *button, gpointer *userdata) { close_station_editor(); if (gui_station_selected > 0 && gui_station_selected < gui_station_count) { gtk_clist_swap_rows(GTK_CLIST(gui_station_list), gui_station_selected, gui_station_selected-1); gui_station_selected--; } } void gui_movedown_station(GtkButton *button, gpointer *userdata) { close_station_editor(); if (gui_station_selected >= 0 && gui_station_selected < gui_station_count-1) { gtk_clist_swap_rows(GTK_CLIST(gui_station_list), gui_station_selected, gui_station_selected+1); gui_station_selected++; } } void gui_select_row(GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer user_data) { gui_station_selected = row; } static void create_config(GtkWidget *tab) { GtkWidget *tabs; GtkWidget *text, *label, *panel, *button, *hbox, *scrolled, *frame, *vbox; GtkObject *adj; gchar *plugin_about_text; gchar *station_tab_titles[3] = { _("Station"), _("Frequency"), "" }; char *f[3]; int i; tabs = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(tabs),GTK_POS_TOP); gtk_box_pack_start(GTK_BOX(tab),tabs,TRUE,TRUE,0); /* STATION TAB */ panel = gtk_vbox_new(0, 0); gui_station_list = gtk_clist_new_with_titles(3, station_tab_titles); gtk_clist_set_column_auto_resize(GTK_CLIST(gui_station_list), 0, TRUE); gtk_clist_set_column_auto_resize(GTK_CLIST(gui_station_list), 0, TRUE); gtk_clist_set_reorderable(GTK_CLIST(gui_station_list), TRUE); gtk_clist_set_column_justification(GTK_CLIST(gui_station_list), 1, GTK_JUSTIFY_RIGHT); /* fill data in clist */ f[1] = malloc(32); f[2] = ""; for (i = 0; i< nstations; i++) { f[0] = stations[i].station_name; snprintf(f[1],32, "%.2f", stations[i].freq); gtk_clist_append(GTK_CLIST(gui_station_list), f); } gui_station_count = nstations; free(f[1]); gtk_signal_connect(GTK_OBJECT(gui_station_list), "select-row", (GtkSignalFunc)gui_select_row, NULL); scrolled = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(scrolled),gui_station_list); gtk_container_add(GTK_CONTAINER(panel), scrolled); hbox = gtk_hbox_new(0, 0); button = gtk_button_new_with_label(_("New")); gtk_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc)gui_new_station, NULL); gtk_box_pack_start(GTK_BOX(hbox), button, 0, 0, 2); button = gtk_button_new_with_label(_("Edit")); gtk_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc)gui_edit_station, NULL); gtk_box_pack_start(GTK_BOX(hbox), button, 0, 0, 2); button = gtk_button_new_with_label(_("Delete")); gtk_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc)gui_delete_station, NULL); gtk_box_pack_start(GTK_BOX(hbox), button, 0, 0, 2); button = gtk_button_new_with_label(_("Up")); gtk_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc)gui_moveup_station, NULL); gtk_box_pack_start(GTK_BOX(hbox), button, 0, 0, 2); button = gtk_button_new_with_label(_("Down")); gtk_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc)gui_movedown_station, NULL); gtk_box_pack_start(GTK_BOX(hbox), button, 0, 0, 2); label = gtk_label_new(_("Stations")); gtk_box_pack_start(GTK_BOX(panel), hbox, FALSE, FALSE, 4); gtk_notebook_append_page(GTK_NOTEBOOK(tabs), panel, label); /* OPTIONS TAB */ vbox = gtk_vbox_new(0,0); /* mutetime */ { hbox = gtk_hbox_new(0, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, 0, 0, 2); label = gtk_label_new(_("Time to mute on channel jump (seconds):")); gtk_box_pack_start(GTK_BOX(hbox), label, 0, 0, 2); adj = gtk_adjustment_new(mutetime, 0.0, 9.99, 0.01, 0.1, 1); gui_mutetime_entry = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0.01, 2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(gui_mutetime_entry), mutetime); gtk_box_pack_start(GTK_BOX(hbox), gui_mutetime_entry, 0, 0, 2); } /* reopenoption */ { gui_reopen_toggle = gtk_check_button_new_with_label(_("Attempt to reopen radio on startup")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gui_reopen_toggle), attempt_reopen); gtk_box_pack_start(GTK_BOX(vbox), gui_reopen_toggle, 0, 0, 2); /* close radio on exit toggle */ gui_close_toggle = gtk_check_button_new_with_label(_("Turn radio off when exiting gkrellm")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gui_close_toggle), close_atexit); gtk_box_pack_start(GTK_BOX(vbox), gui_close_toggle, 0, 0, 2); } label = gtk_label_new(_("Options")); gtk_notebook_append_page(GTK_NOTEBOOK(tabs), vbox, label); /* INFO TAB */ frame = gtk_frame_new(NULL); scrolled = gkrellm_gtk_notebook_page(tabs,_("Info")); text = gkrellm_gtk_scrolled_text_view(scrolled,NULL, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); for (i=0; i < sizeof(info_text)/sizeof(gchar *); ++i) gkrellm_gtk_text_view_append(text, _(info_text[i])); /* ABOUT TAB */ plugin_about_text = g_strdup_printf( _("Radio Plugin %s\n" \ "GKrellM radio Plugin\n\n" \ "Copyright (C) 2001-2002 Sjoerd Simons\n" \ "sjoerd@luon.net\n" \ "http://gkrellm.luon.net/gkrellm-radio.phtml\n\n" \ "Released under the GNU General Public Licence"), VERSION); text = gtk_label_new(plugin_about_text); label = gtk_label_new(_("About")); gtk_notebook_append_page(GTK_NOTEBOOK(tabs),text,label); g_free(plugin_about_text); } static void apply_config(void) { int i; char *field = NULL; free_stations(); nstations = gui_station_count; stations = malloc(sizeof(struct station) * nstations); for (i = 0; i < nstations; i++) { gtk_clist_get_text(GTK_CLIST(gui_station_list), i, 0, &field); stations[i].station_name = strdup(field); gtk_clist_get_text(GTK_CLIST(gui_station_list), i, 1, &field); stations[i].freq = atof(field); } mutetime = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(gui_mutetime_entry)); set_text_freq(current_freq()); /* reset the frequency display */ attempt_reopen = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui_reopen_toggle)); close_atexit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gui_close_toggle)); /* recreate the frequency menu */ create_freq_menu(); } void save_config(FILE *f) { int i; fprintf(f, "%s freq %.2f\n", CONFIG_KEY, current_freq()); fprintf(f, "%s nstations %d\n", CONFIG_KEY, nstations); for (i = 0; i= 0 && stnum < nstations) { stations[stnum].station_name = strdup(value); } } else if (strncmp(key, "stationfreq", 11) == 0) { int stnum; stnum = atoi(key+11); if (stnum >= 0 && stnum < nstations) { stations[stnum].freq = atof(value); } } else if (strcmp(key, "mutetime") == 0) { mutetime = atof(value); } else if (strcmp(key, "attemptreopen") == 0) { attempt_reopen = atoi(value); } else if (strcmp(key, "close_atexit") == 0) { close_atexit = atoi(value); } } /* The monitor structure tells GKrellM how to call the plugin routines. */ static GkrellmMonitor plugin_mon = { CONFIG_NAME, /* Name, for config tab. */ 0, /* Id, 0 if a plugin */ create_plugin, /* The create function */ NULL, /* The update function */ create_config, /* The config tab create function */ apply_config, /* Apply the config function */ save_config, /* Save user config */ load_config, /* Load user config */ CONFIG_KEY, /* config keyword */ NULL, /* Undefined 2 */ NULL, /* Undefined 1 */ NULL, /* private */ LOCATION, /* Insert plugin here */ NULL, /* Handle if a plugin, filled in by GKrellM */ NULL /* path if a plugin, filled in by GKrellM */ }; /* All GKrellM plugins must have one global routine named init_plugin() | which returns a pointer to a filled in monitor structure. */ GkrellmMonitor * gkrellm_init_plugin() { #ifdef ENABLE_NLS bind_textdomain_codeset(PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ style_id = gkrellm_add_meter_style(&plugin_mon, STYLE_NAME); plugin_monitor = &plugin_mon; #ifdef HAVE_LIRC gkrellm_radio_lirc_init(); g_atexit(gkrellm_radio_lirc_exit); #endif g_atexit(exit_func); return &plugin_mon; } gkrellm-radio-2.0.4/gkrellm_radio.h0100644000175000017500000000046007733031667016605 0ustar sjoerdsjoerd #ifndef GKRELLM_RADIO_H #define GKRELLM_RADIO_H #include extern gint nstations; extern gint currentstation; void switch_station (void); void do_switch_station (int); void gkrellm_radio_turn_onoff(); void gkrellm_radio_finetune_delta (float amount); #endif /* GKRELLM_RADIO_H */ gkrellm-radio-2.0.4/gkrellm_radio_lirc.c0100644000175000017500000000430407733031667017612 0ustar sjoerdsjoerd #include "radio.h" #include "gkrellm_radio.h" #include "gkrellm_radio_lirc.h" #include static gint gkrellm_radio_lirc_tag; struct lirc_command { char *name; void (*function) (); }; #define LIRC_COMMAND(NAME) { #NAME, gkrellm_radio_lirc_ ## NAME } struct lirc_command lirc_commands[] = { LIRC_COMMAND (mute), LIRC_COMMAND (prev_station), LIRC_COMMAND (next_station), LIRC_COMMAND (finetune_up), LIRC_COMMAND (finetune_down), LIRC_COMMAND (power), {NULL, NULL} }; void inline gkrellm_radio_lirc_next_station (void) { switch_station (); } void gkrellm_radio_lirc_prev_station (void) { if (currentstation == -1) { if (nstations > 0) do_switch_station (0); } else do_switch_station (currentstation + nstations - 1); } void gkrellm_radio_lirc_mute (void) { if (radio_ismute ()) radio_unmute (); else radio_mute (); } void gkrellm_radio_lirc_power (void) { gkrellm_radio_turn_onoff(); } void gkrellm_radio_lirc_finetune_up(void) { gkrellm_radio_finetune_delta(+0.05); } void gkrellm_radio_lirc_finetune_down(void) { gkrellm_radio_finetune_delta(-0.05); } void gkrellm_radio_lirc_cb (struct lirc_config *config, gint source, GdkInputCondition cond) { char *code; char *c; char *command; int ret; int i; if (lirc_nextcode (&code) == 0 && code != NULL) { while ((ret = lirc_code2char (config, code, &c)) == 0 && c != NULL) { i = 0; while ((command = lirc_commands[i++].name) != NULL) { if (g_strcasecmp (command, c) == 0) { lirc_commands[i - 1].function (); break; } } } free (code); if (ret == -1) gkrellm_radio_lirc_exit (); } } int gkrellm_radio_lirc_init (void) { struct lirc_config *config; int socket; if ((socket = lirc_init (LIRC_PROG, 0)) == -1) return EXIT_FAILURE; if (lirc_readconfig (NULL, &config, NULL) == 0) { gkrellm_radio_lirc_tag = gdk_input_add_full (socket, GDK_INPUT_READ, GTK_SIGNAL_FUNC(gkrellm_radio_lirc_cb), config, (GdkDestroyNotify) lirc_freeconfig); } return 0; } void gkrellm_radio_lirc_exit (void) { gdk_input_remove (gkrellm_radio_lirc_tag); lirc_deinit (); } gkrellm-radio-2.0.4/gkrellm_radio_lirc.h0100644000175000017500000000100007733031667017605 0ustar sjoerdsjoerd #ifndef GKRELLM_RADIO_LIRC_H #define GKRELLM_RADIO_LIRC_H #define LIRC_PROG "gkrellm_radio" void gkrellm_radio_lirc_prev_station (void); void gkrellm_radio_lirc_next_station (void); void gkrellm_radio_lirc_mute (void); void gkrellm_radio_lirc_power (void); void gkrellm_radio_lirc_finetune_up (void); void gkrellm_radio_lirc_finetune_down (void); int gkrellm_radio_lirc_init (void); void gkrellm_radio_lirc_exit (void); void inline gkrellm_radio_lirc_next_station (void); #endif /* GKRELLM_RADIO_LIRC_H */ gkrellm-radio-2.0.4/radio.c0100644000175000017500000000516007733031667015065 0ustar sjoerdsjoerd/* based on * radio.c - (c) 1998 Gerd Knorr * test tool for bttv + WinTV/Radio */ #include #include #include #include #include #include #include #include #include /* XXX glibc */ #include "videodev.h" #define DEVICE "/dev/radio" /* major=81, minor=64 */ static int radio_fd = -1; static float freq = 101.3; static int fact = 0; static float rangelow,rangehigh; /* * Determine and return the appropriate frequency multiplier for the first tuner on the open video device with handle FD. * Determing the freq ranges the tuner handles */ static void radio_get_tunerinfo() { struct video_tuner tuner; tuner.tuner = 0; if (ioctl (radio_fd, VIDIOCGTUNER, &tuner) < 0) return; fact = (tuner.flags & VIDEO_TUNER_LOW) == 0 ? 16 : 16000; rangelow = ((float) tuner.rangelow)/fact; rangehigh = ((float) tuner.rangehigh)/fact; }; float radio_setfreq(int fd, float nfreq) { unsigned long ifreq ; if (fd == -1) return nfreq; if (nfreq < rangelow) nfreq = rangelow; if (nfreq > rangehigh) nfreq = rangehigh; /* provide good rounding */ ifreq = (nfreq + 1.0/32) * fact; ioctl(fd, VIDIOCSFREQ, &ifreq); return nfreq; } void radio_unmute(void) { struct video_audio vid_aud; if (radio_fd == -1) return; if (ioctl(radio_fd, VIDIOCGAUDIO, &vid_aud)) perror("VIDIOCGAUDIO"); if (vid_aud.volume == 0) vid_aud.volume = 65535; vid_aud.flags &= ~VIDEO_AUDIO_MUTE; if (ioctl(radio_fd, VIDIOCSAUDIO, &vid_aud)) perror("VIDIOCSAUDIO"); } void radio_mute(void) { struct video_audio vid_aud; if (radio_fd == -1) return; if (ioctl(radio_fd, VIDIOCGAUDIO, &vid_aud)) perror("VIDIOCGAUDIO"); vid_aud.flags |= VIDEO_AUDIO_MUTE; if (ioctl(radio_fd, VIDIOCSAUDIO, &vid_aud)) perror("VIDIOCSAUDIO"); } int radio_ismute() { struct video_audio vid_aud; if (radio_fd == -1) return 1; if (ioctl(radio_fd, VIDIOCGAUDIO, &vid_aud)) perror("VIDIOCGAUDIO"); return vid_aud.flags & VIDEO_AUDIO_MUTE; } int open_radio() { if (radio_fd != -1) return 0; if (-1 == (radio_fd = open(DEVICE, O_RDONLY))) return -1; radio_get_tunerinfo(); if (radio_ismute()) { radio_unmute(); } return 0; } void close_radio() { if (radio_fd == -1) return; radio_mute(); close(radio_fd); radio_fd = -1; } float current_freq() { return freq; } void radio_tune(float newfreq) { freq = radio_setfreq(radio_fd, newfreq); } void radio_freq_delta(float delta) { radio_tune(freq + delta); } gkrellm-radio-2.0.4/radio.h0100644000175000017500000000037707733031667015077 0ustar sjoerdsjoerd#ifndef __radio_h__ #define __radio_h__ int open_radio(); void close_radio(); float current_freq(); void radio_tune(float newfreq); void radio_freq_delta(float delta); void radio_mute(); void radio_unmute(); int radio_ismute(); #endif /* __radio_h__ */ gkrellm-radio-2.0.4/videodev.h0100644000175000017500000002075407733031667015607 0ustar sjoerdsjoerd#ifndef __LINUX_VIDEODEV_H #define __LINUX_VIDEODEV_H #include #ifdef __KERNEL__ #if LINUX_VERSION_CODE >= 0x020100 #include #endif struct video_device { char name[32]; int type; int hardware; int (*open)(struct video_device *, int mode); void (*close)(struct video_device *); long (*read)(struct video_device *, char *, unsigned long, int noblock); /* Do we need a write method ? */ long (*write)(struct video_device *, const char *, unsigned long, int noblock); #if LINUX_VERSION_CODE >= 0x020100 unsigned int (*poll)(struct video_device *, struct file *, poll_table *); #endif int (*ioctl)(struct video_device *, unsigned int , void *); int (*mmap)(struct video_device *, const char *, unsigned long); int (*initialize)(struct video_device *); void *priv; /* Used to be 'private' but that upsets C++ */ int busy; int minor; }; extern int videodev_init(void); #define VIDEO_MAJOR 81 extern int video_register_device(struct video_device *, int type); #define VFL_TYPE_GRABBER 0 #define VFL_TYPE_VBI 1 #define VFL_TYPE_RADIO 2 #define VFL_TYPE_VTX 3 extern void video_unregister_device(struct video_device *); #endif #define VID_TYPE_CAPTURE 1 /* Can capture */ #define VID_TYPE_TUNER 2 /* Can tune */ #define VID_TYPE_TELETEXT 4 /* Does teletext */ #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ #define VID_TYPE_CLIPPING 32 /* Can clip */ #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ #define VID_TYPE_SCALES 128 /* Scalable */ #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ struct video_capability { char name[32]; int type; int channels; /* Num channels */ int audios; /* Num audio devices */ int maxwidth; /* Supported width */ int maxheight; /* And height */ int minwidth; /* Supported width */ int minheight; /* And height */ }; struct video_channel { int channel; char name[32]; int tuners; __u32 flags; #define VIDEO_VC_TUNER 1 /* Channel has a tuner */ #define VIDEO_VC_AUDIO 2 /* Channel has audio */ __u16 type; #define VIDEO_TYPE_TV 1 #define VIDEO_TYPE_CAMERA 2 __u16 norm; /* Norm set by channel */ }; struct video_tuner { int tuner; char name[32]; ulong rangelow, rangehigh; /* Tuner range */ __u32 flags; #define VIDEO_TUNER_PAL 1 #define VIDEO_TUNER_NTSC 2 #define VIDEO_TUNER_SECAM 4 #define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */ #define VIDEO_TUNER_NORM 16 /* Tuner can set norm */ #define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */ __u16 mode; /* PAL/NTSC/SECAM/OTHER */ #define VIDEO_MODE_PAL 0 #define VIDEO_MODE_NTSC 1 #define VIDEO_MODE_SECAM 2 #define VIDEO_MODE_AUTO 3 __u16 signal; /* Signal strength 16bit scale */ }; struct video_picture { __u16 brightness; __u16 hue; __u16 colour; __u16 contrast; __u16 whiteness; /* Black and white only */ __u16 depth; /* Capture depth */ __u16 palette; /* Palette in use */ #define VIDEO_PALETTE_GREY 1 /* Linear greyscale */ #define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */ #define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */ #define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */ #define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */ #define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */ #define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */ #define VIDEO_PALETTE_YUYV 8 #define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */ #define VIDEO_PALETTE_YUV420 10 #define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */ #define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */ #define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */ #define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */ #define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */ #define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */ #define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */ #define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */ }; struct video_audio { int audio; /* Audio channel */ __u16 volume; /* If settable */ __u16 bass, treble; __u32 flags; #define VIDEO_AUDIO_MUTE 1 #define VIDEO_AUDIO_MUTABLE 2 #define VIDEO_AUDIO_VOLUME 4 #define VIDEO_AUDIO_BASS 8 #define VIDEO_AUDIO_TREBLE 16 char name[16]; #define VIDEO_SOUND_MONO 1 #define VIDEO_SOUND_STEREO 2 #define VIDEO_SOUND_LANG1 4 #define VIDEO_SOUND_LANG2 8 __u16 mode; /* detected audio carriers or one to set */ __u16 balance; /* Stereo balance */ __u16 step; /* Step actual volume uses */ }; struct video_clip { __s32 x,y; __s32 width, height; struct video_clip *next; /* For user use/driver use only */ }; struct video_window { __u32 x,y; /* Position of window */ __u32 width,height; /* Its size */ __u32 chromakey; __u32 flags; struct video_clip *clips; /* Set only */ int clipcount; #define VIDEO_WINDOW_INTERLACE 1 #define VIDEO_CLIP_BITMAP -1 /* bitmap is 1024x625, a '1' bit represents a clipped pixel */ #define VIDEO_CLIPMAP_SIZE (128 * 625) }; struct video_capture { __u32 x,y; /* Offsets into image */ __u32 width, height; /* Area to capture */ __u16 decimation; /* Decimation divder */ __u16 flags; /* Flags for capture */ #define VIDEO_CAPTURE_ODD 0 /* Temporal */ #define VIDEO_CAPTURE_EVEN 1 }; struct video_buffer { void *base; int height,width; int depth; int bytesperline; }; struct video_mmap { unsigned int frame; /* Frame (0 - n) for double buffer */ int height,width; unsigned int format; /* should be VIDEO_PALETTE_* */ }; struct video_key { __u8 key[8]; __u32 flags; }; #define VIDEO_MAX_FRAME 32 struct video_mbuf { int size; /* Total memory to map */ int frames; /* Frames */ int offsets[VIDEO_MAX_FRAME]; }; #define VIDEO_NO_UNIT (-1) struct video_unit { int video; /* Video minor */ int vbi; /* VBI minor */ int radio; /* Radio minor */ int audio; /* Audio minor */ int teletext; /* Teletext minor */ }; #define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */ #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */ #define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */ #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */ #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */ #define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */ #define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */ #define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */ #define VIDIOCGWIN _IOR('v',9, struct video_window) /* Set the video overlay window */ #define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */ #define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */ #define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */ #define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */ #define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */ #define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */ #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */ #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */ #define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */ #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */ #define VIDIOCGMBUF _IOR('v', 20, struct video_mbuf) /* Memory map buffer info */ #define VIDIOCGUNIT _IOR('v', 21, struct video_unit) /* Get attached units */ #define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get frame buffer */ #define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set frame buffer - root only */ #define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */ #define VID_HARDWARE_BT848 1 #define VID_HARDWARE_QCAM_BW 2 #define VID_HARDWARE_PMS 3 #define VID_HARDWARE_QCAM_C 4 #define VID_HARDWARE_PSEUDO 5 #define VID_HARDWARE_SAA5249 6 #define VID_HARDWARE_AZTECH 7 #define VID_HARDWARE_SF16MI 8 #define VID_HARDWARE_RTRACK 9 #define VID_HARDWARE_ZOLTRIX 10 #define VID_HARDWARE_SAA7146 11 #define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */ #define VID_HARDWARE_RTRACK2 13 #define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */ #define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */ /* * Initialiser list */ struct video_init { char *name; int (*init)(struct video_init *); }; #endif gkrellm-radio-2.0.4/Makefile0100644000175000017500000000257207733031667015267 0ustar sjoerdsjoerdGKRELLMDIR= PACKAGE=gkrellm-radio VERSIONMAJOR=2 VERSIONMINOR=0 VERSIONREV=4 VERSION=$(VERSIONMAJOR).$(VERSIONMINOR).$(VERSIONREV) DISTFILES=gkrellm_radio.c radio.c radio.h videodev.h README Makefile CHANGES CC=gcc LDFLAGS= OBJS=gkrellm_radio.o radio.o PLUGIN_DIR ?= /usr/local/lib/gkrellm2/plugins INSTALL = install -c INSTALL_PROGRAM = $(INSTALL) -s GTK_CONFIG = pkg-config gtk+-2.0 CFLAGS := ${CFLAGS} -fPIC -I$(GKRELLMDIR)/include `$(GTK_CONFIG) --cflags` -DVERSION=\"$(VERSION)\" -Wall ifdef WITH_LIRC CFLAGS := ${CFLAGS} -DHAVE_LIRC LDFLAGS:= ${LDFLAGS} -llirc_client OBJS := ${OBJS} gkrellm_radio_lirc.o DISTFILES := ${DISTFILES} gkrellm_radio_lirc.c endif LOCALEDIR ?= /usr/share/locale ifeq ($(enable_nls),1) CFLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\" export enable_nls endif PACKAGE ?= gkrellm-radio CFLAGS += -DPACKAGE="\"$(PACKAGE)\"" export PACKAGE LOCALEDIR radio.so: $(OBJS) $(CC) -shared -Wl -o radio.so $(OBJS) $(LDFLAGS) (cd po && ${MAKE} all ) %.o: %.c $(CC) $(CFLAGS) -c $*.c install: radio.so (cd po && ${MAKE} install) $(INSTALL_PROGRAM) -m 755 radio.so $(PLUGIN_DIR) clean: rm -f radio.so $(OBJS) gkrellm_radio_lirc.o *~ (cd po && ${MAKE} clean) dist: rm -rf $(PACKAGE)-$(VERSION) mkdir $(PACKAGE)-$(VERSION) cp -a $(DISTFILES) $(PACKAGE)-$(VERSION)/ tar cfz $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)/ rm -rf $(PACKAGE)-$(VERSION) gkrellm-radio-2.0.4/po/0040755000175000017500000000000007733031667014242 5ustar sjoerdsjoerdgkrellm-radio-2.0.4/po/Makefile0100644000175000017500000000077707733031667015712 0ustar sjoerdsjoerdMSGFMT = msgfmt SUB_DIRS = FILES_PO:=$(wildcard *.po) FILES_MO:=$(FILES_PO:.po=.mo) LOCALEDIR ?= /usr/share/locale PACKAGE ?= gkrellm-radio ifeq ($(enable_nls),1) all: mo-files mo-files: $(FILES_MO) install: $(MAKE) all for f in *.mo ; do mkdir -p \ $(INSTALL_PREFIX)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES ; \ cp $$f $(INSTALL_PREFIX)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo ; done %.mo: %.po $(MSGFMT) -f -v -o $@ $< else all: install: endif clean: $(RM) $(FILES_MO) gkrellm-radio-2.0.4/po/ru.po0100644000175000017500000000763507733031667015240 0ustar sjoerdsjoerd# Russian Translation of GKrellM Radio plugin. # Grigory Batalov , 2002. msgid "" msgstr "" "Project-Id-Version: gkrellm-radio 2.0.1\n" "POT-Creation-Date: 2002-12-10 17:00+0300\n" "PO-Revision-Date: 2002-12-10 20:13+0300\n" "Last-Translator: Grigory Batalov \n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=KOI8-R\n" "Content-Transfer-Encoding: 8bit\n" #: gkrellm_radio.c:25 msgid "" "GKrellM Radio Plugin\n" "\n" msgstr "" #: gkrellm_radio.c:26 msgid "" "This plugin allow you to control the radio card of your Linux box,if you " "have one installed.\n" msgstr "" "Этот плагин позволяет вам управлять установленной картой-радиоприёмником.\n" #: gkrellm_radio.c:28 msgid "" "\n" "User Interface:\n" msgstr "" "\n" "Пользовательский интерфейс:\n" #: gkrellm_radio.c:29 msgid "" "\n" "\t* Clicking the right button will turn the radio on and off.\n" msgstr "" "\n" "\t* Нажатие на кнопку справа включает или выключает радио.\n" #: gkrellm_radio.c:30 msgid "" "\t* Clicking the left text will tune to the next channel configured under " "configuration.\n" msgstr "" "\t* Щелчком по тексту слева можно переключаться на следующую из\n" "\t настроенных станций.\n" #: gkrellm_radio.c:32 msgid "\t* Using your mousewheel will tune up or down.\n" msgstr "\t* Колесо мыши подстраивает частоту вперёд/назад.\n" #: gkrellm_radio.c:33 msgid "\t*Right mouse button will pop up a channel menu\n" msgstr "\t* Правая кнопка мыши вызывает меню каналов\n" #: gkrellm_radio.c:34 msgid "" "\n" "Thanks to:\n" msgstr "" "\n" "Благодарности:\n" #: gkrellm_radio.c:35 msgid "" "\n" "\tLars Christensen - Upstream author untill version 0.2.1\n" "\tGerd Knorr - borrowed some of the radio interface code from his Xawtv " "radio application.\n" msgstr "" "\n" "\tLars Christensen - Основной разработчик до версии 0.2.1\n" "\tGerd Knorr - автор Xawtv, код которого был частично позаимствован\n" "\tдля доступа к интерфейсу радио.\n" #: gkrellm_radio.c:38 msgid "" "\n" "Homepage:\n" msgstr "" "\n" "Домашняя страница:\n" #: gkrellm_radio.c:203 msgid "Couldn't open /dev/radio" msgstr "Не могу открыть /dev/radio" #: gkrellm_radio.c:251 msgid "Please setup some channels in the configuration" msgstr "Сконфигурируйте больше каналов в настройках" #: gkrellm_radio.c:296 msgid "Hello World" msgstr "Здравствуй, мир" #: gkrellm_radio.c:410 msgid "Station Name:" msgstr "Название станции:" #: gkrellm_radio.c:416 msgid "Frequency:" msgstr "Частота:" #: gkrellm_radio.c:433 msgid "Cancel" msgstr "Отмена" #: gkrellm_radio.c:504 msgid "Station" msgstr "Станция" #: gkrellm_radio.c:504 msgid "Frequency" msgstr "Частота" #: gkrellm_radio.c:549 msgid "New" msgstr "Добавить" #: gkrellm_radio.c:553 msgid "Edit" msgstr "Изменить" #: gkrellm_radio.c:557 msgid "Delete" msgstr "Удалить" #: gkrellm_radio.c:561 msgid "Up" msgstr "Вверх" #: gkrellm_radio.c:566 msgid "Down" msgstr "Вниз" #: gkrellm_radio.c:570 msgid "Stations" msgstr "Станции" #: gkrellm_radio.c:587 msgid "Time to mute on channel jump (seconds):" msgstr "Пауза при переключении канала (секунд):" #: gkrellm_radio.c:599 msgid "Attempt to reopen radio on startup" msgstr "Включать радио при запуске" #: gkrellm_radio.c:604 msgid "Turn radio off when exiting gkrellm" msgstr "Выключать радио при выходе из gkrellm" #: gkrellm_radio.c:611 msgid "Options" msgstr "Опции" #: gkrellm_radio.c:617 msgid "Info" msgstr "Инфо" #: gkrellm_radio.c:626 msgid "" "Radio Plugin %s\n" "GKrellM radio Plugin\n" "\n" "Copyright (C) 2001-2002 Sjoerd Simons\n" "sjoerd@luon.net\n" "http://gkrellm.luon.net/gkrellm-radio.phtml\n" "\n" "Released under the GNU General Public Licence" msgstr "" "Radio Plugin %s\n" "GKrellM radio Plugin\n" "\n" "Copyright (C) 2001-2002 Sjoerd Simons\n" "sjoerd@luon.net\n" "http://gkrellm.luon.net/gkrellm-radio.phtml\n" "\n" "Распространяется под GNU General Public Licence" #: gkrellm_radio.c:634 msgid "About" msgstr "О программе"