From: <enl...@li...> - 2005-07-01 14:26:26
|
Enlightenment CVS committal Author : moom16 Project : e17 Module : apps/eclair Dir : e17/apps/eclair/src Modified Files: eclair.c eclair_database.c eclair_database.h eclair_dialogs.c eclair_dialogs.h eclair_private.h Log Message: * eclair_wsz2edj converts the equalizer window * eclair supports equalizer windows (but they have still no effect) * add a search window but search isn't possible yet =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- eclair.c 18 Jun 2005 16:00:34 -0000 1.21 +++ eclair.c 1 Jul 2005 14:25:39 -0000 1.22 @@ -25,6 +25,7 @@ static void *_eclair_create_video_object_thread(void *param); static Evas_Bool _eclair_create_gui_window(Eclair *eclair); static Evas_Bool _eclair_create_playlist_window(Eclair *eclair); +static Evas_Bool _eclair_create_equalizer_window(Eclair *eclair); static Evas_Bool _eclair_create_cover_window(Eclair *eclair); static Evas_Bool _eclair_create_playlist_container_object(Eclair *eclair, Eclair_Window *window); static Evas_Bool _eclair_create_cover_object(Eclair *eclair, Eclair_Window *window); @@ -42,7 +43,7 @@ if (!eclair) return 0; - ecore_init(); + ecore_init(); ecore_file_init(); ecore_evas_init(); edje_init(); @@ -56,6 +57,7 @@ eclair->gui_window = NULL; eclair->cover = NULL; eclair->previous_cover = NULL; + eclair->equalizer_window = NULL; eclair->playlist_window = NULL; eclair->playlist_container = NULL; eclair->playlist_container_owner = NULL; @@ -85,6 +87,7 @@ return 0; } _eclair_create_playlist_window(eclair); + _eclair_create_equalizer_window(eclair); _eclair_create_cover_window(eclair); _eclair_create_video_window(eclair); _eclair_add_inter_windows_callbacks(eclair); @@ -108,9 +111,9 @@ eclair_playlist_add_uri(&eclair->playlist, eclair->config.default_playlist_path, 1, 0); ecore_event_handler_add(ECORE_X_EVENT_XDND_POSITION, eclair_dnd_position_cb, eclair); - ecore_event_handler_add(ECORE_X_EVENT_XDND_DROP, eclair_dnd_drop_cb, eclair); - ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, eclair_dnd_selection_cb, eclair); - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, eclair_mouse_up_cb, eclair); + ecore_event_handler_add(ECORE_X_EVENT_XDND_DROP, eclair_dnd_drop_cb, eclair); + ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, eclair_dnd_selection_cb, eclair); + ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, eclair_mouse_up_cb, eclair); edje_object_part_drag_value_set(eclair->gui_window->edje_object, "volume_bar_drag", 1.0, 0.0); return 1; @@ -123,6 +126,7 @@ { eclair_window_del(eclair->gui_window); eclair_window_del(eclair->playlist_window); + eclair_window_del(eclair->equalizer_window); eclair_window_del(eclair->cover_window); fprintf(stderr, "Eclair: Debug: Destroying create video object thread\n"); @@ -536,6 +540,13 @@ emotion_object_position_set(eclair->video_object, eclair->seek_to_pos); } +static void testff(void *data, Evas_Object *obj, const char *part) +{ + Evas_Coord x, y, w, h; + edje_object_part_geometry_get(obj, part, &x, &y, &w, &h); + printf("%s %p %s -> %d %d %d %d\n", part, obj, edje_object_part_text_get(obj, part), x, y, w, h); +} + //Create the gui window and load the edje theme static Evas_Bool _eclair_create_gui_window(Eclair *eclair) { @@ -547,6 +558,8 @@ _eclair_create_playlist_container_object(eclair, eclair->gui_window); _eclair_create_cover_object(eclair, eclair->gui_window); eclair_window_add_default_callbacks(eclair->gui_window, eclair); + edje_object_text_change_cb_set(eclair->gui_window->edje_object, testff, NULL); + printf("%p\n", eclair->gui_window->edje_object); return 1; } @@ -572,6 +585,23 @@ return 0; } +//Create the equalizer window and load the edje theme for the equalizer +static Evas_Bool _eclair_create_equalizer_window(Eclair *eclair) +{ + if (!eclair) + return 0; + + if ((eclair->equalizer_window = eclair_window_create(eclair->gui_theme_file, "equalizer", "eclair: equalizer", eclair->gui_engine, eclair, 0))) + { + _eclair_create_playlist_container_object(eclair, eclair->equalizer_window); + _eclair_create_cover_object(eclair, eclair->equalizer_window); + eclair_window_add_default_callbacks(eclair->equalizer_window, eclair); + return 1; + } + + return 0; +} + //Create the cover window static Evas_Bool _eclair_create_cover_window(Eclair *eclair) { @@ -729,51 +759,66 @@ if (eclair->gui_window) { edje_object_signal_callback_add(eclair->gui_window->edje_object, "eclair_playlist_open", "*", eclair_window_open_cb, eclair->playlist_window); - edje_object_signal_callback_add(eclair->gui_window->edje_object, "eclair_cover_open", "*", eclair_window_open_cb, eclair->cover_window); edje_object_signal_callback_add(eclair->gui_window->edje_object, "eclair_playlist_close", "*", eclair_window_close_cb, eclair->playlist_window); + edje_object_signal_callback_add(eclair->gui_window->edje_object, "eclair_equalizer_open", "*", eclair_window_open_cb, eclair->equalizer_window); + edje_object_signal_callback_add(eclair->gui_window->edje_object, "eclair_equalizer_close", "*", eclair_window_close_cb, eclair->equalizer_window); + edje_object_signal_callback_add(eclair->gui_window->edje_object, "eclair_cover_open", "*", eclair_window_open_cb, eclair->cover_window); edje_object_signal_callback_add(eclair->gui_window->edje_object, "eclair_cover_close", "*", eclair_window_close_cb, eclair->cover_window); } if (eclair->playlist_window) { edje_object_signal_callback_add(eclair->playlist_window->edje_object, "eclair_main_open", "*", eclair_window_open_cb, eclair->gui_window); - edje_object_signal_callback_add(eclair->playlist_window->edje_object, "eclair_cover_open", "*", eclair_window_open_cb, eclair->cover_window); edje_object_signal_callback_add(eclair->playlist_window->edje_object, "eclair_main_close", "*", eclair_window_close_cb, eclair->gui_window); + edje_object_signal_callback_add(eclair->playlist_window->edje_object, "eclair_equalizer_open", "*", eclair_window_open_cb, eclair->equalizer_window); + edje_object_signal_callback_add(eclair->playlist_window->edje_object, "eclair_equalizer_close", "*", eclair_window_close_cb, eclair->equalizer_window); + edje_object_signal_callback_add(eclair->playlist_window->edje_object, "eclair_cover_open", "*", eclair_window_open_cb, eclair->cover_window); edje_object_signal_callback_add(eclair->playlist_window->edje_object, "eclair_cover_close", "*", eclair_window_close_cb, eclair->cover_window); } + if (eclair->equalizer_window) + { + edje_object_signal_callback_add(eclair->equalizer_window->edje_object, "eclair_main_open", "*", eclair_window_open_cb, eclair->gui_window); + edje_object_signal_callback_add(eclair->equalizer_window->edje_object, "eclair_main_close", "*", eclair_window_close_cb, eclair->gui_window); + edje_object_signal_callback_add(eclair->equalizer_window->edje_object, "eclair_playlist_open", "*", eclair_window_open_cb, eclair->playlist_window); + edje_object_signal_callback_add(eclair->equalizer_window->edje_object, "eclair_playlist_close", "*", eclair_window_close_cb, eclair->playlist_window); + edje_object_signal_callback_add(eclair->equalizer_window->edje_object, "eclair_cover_open", "*", eclair_window_open_cb, eclair->cover_window); + edje_object_signal_callback_add(eclair->equalizer_window->edje_object, "eclair_cover_close", "*", eclair_window_close_cb, eclair->cover_window); + } if (eclair->cover_window) { - edje_object_signal_callback_add(eclair->cover_window->edje_object, "eclair_playlist_open", "*", eclair_window_open_cb, eclair->playlist_window); edje_object_signal_callback_add(eclair->cover_window->edje_object, "eclair_main_open", "*", eclair_window_open_cb, eclair->gui_window); - edje_object_signal_callback_add(eclair->cover_window->edje_object, "eclair_playlist_close", "*", eclair_window_close_cb, eclair->playlist_window); edje_object_signal_callback_add(eclair->cover_window->edje_object, "eclair_main_close", "*", eclair_window_close_cb, eclair->gui_window); + edje_object_signal_callback_add(eclair->cover_window->edje_object, "eclair_playlist_open", "*", eclair_window_open_cb, eclair->playlist_window); + edje_object_signal_callback_add(eclair->cover_window->edje_object, "eclair_playlist_close", "*", eclair_window_close_cb, eclair->playlist_window); + edje_object_signal_callback_add(eclair->cover_window->edje_object, "eclair_equalizer_open", "*", eclair_window_open_cb, eclair->equalizer_window); + edje_object_signal_callback_add(eclair->cover_window->edje_object, "eclair_equalizer_close", "*", eclair_window_close_cb, eclair->equalizer_window); } } //Handle segvs static void _eclair_sig_pregest() { - struct sigaction sa; + struct sigaction sa; - sa.sa_handler = _eclair_on_segv; - sigaction(SIGSEGV, &sa, (struct sigaction *)0); + sa.sa_handler = _eclair_on_segv; + sigaction(SIGSEGV, &sa, (struct sigaction *)0); } //Display a message on segvs static void _eclair_on_segv(int num) { - fprintf(stderr, "\n\n"); - fprintf(stderr, "Oops, eclair has crashed (SIG: %d) :(\n", num); - fprintf(stderr, "\n"); - fprintf(stderr, "Have you compiled the latest version of eclair, emotion, evas, and all eclair dependencies ?\n"); - fprintf(stderr, "If it failed again, please report bugs to Mo0m (sim...@fr...)\n"); - fprintf(stderr, "Describe how bugs happened, gdb traces, and so on ;)\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "With that, devs will be able to correct bugs faster and easier\n"); - fprintf(stderr, "If you correct the bug, or see in which code part it can provide, include it too\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "Thanks :)\n"); + fprintf(stderr, "\n\n"); + fprintf(stderr, "Oops, eclair has crashed (SIG: %d) :(\n", num); + fprintf(stderr, "\n"); + fprintf(stderr, "Have you compiled the latest version of eclair, emotion, evas, and all eclair dependencies ?\n"); + fprintf(stderr, "If it failed again, please report bugs to Mo0m (sim...@fr...)\n"); + fprintf(stderr, "Describe how bugs happened, gdb traces, and so on ;)\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "With that, devs will be able to correct bugs faster and easier\n"); + fprintf(stderr, "If you correct the bug, or see in which code part it can provide, include it too\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "Thanks :)\n"); - exit(128 + num); + exit(128 + num); } int main(int argc, char *argv[]) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair_database.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- eclair_database.c 18 Jun 2005 16:00:34 -0000 1.1 +++ eclair_database.c 1 Jul 2005 14:25:39 -0000 1.2 @@ -137,6 +137,43 @@ return 1; } +//Search a file from its path (media_file->path should not be NULL) +Evas_Bool eclair_database_search2(Eclair_Database *database, const char *keyword) +{ + int result; + char *error_msg; + char *query; + char **table_result; + int nrows, ncols, i, j; + + if (!database || !keyword) + return 0; + + query = sqlite3_mprintf("SELECT * FROM media_files WHERE artist LIKE '%q%%'", keyword); + printf("%s\n", query); + result = sqlite3_get_table(database->db, query, &table_result, &nrows, &ncols, &error_msg); + if (result != SQLITE_OK) + { + fprintf(stderr, "Database: Unable to select data from \"media_files\" table: %s\n", error_msg); + sqlite3_free(error_msg); + sqlite3_free(query); + return 0; + } + sqlite3_free(query); + + for (i = 0; i <= nrows; i++) + { + for (j = 0; j < ncols; j++) + printf("%s | ", table_result[ncols * i + j]); + printf("\n"); + } + printf("\n"); + + sqlite3_free_table(table_result); + + return 1; +} + //Close the database void eclair_database_shutdown(Eclair_Database *database) { =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair_database.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- eclair_database.h 18 Jun 2005 16:00:34 -0000 1.1 +++ eclair_database.h 1 Jul 2005 14:25:39 -0000 1.2 @@ -7,5 +7,6 @@ void eclair_database_shutdown(Eclair_Database *database); Evas_Bool eclair_database_insert_media_file(Eclair_Database *database, Eclair_Media_File *media_file); Evas_Bool eclair_database_search(Eclair_Database *database, Eclair_Media_File *media_file, Evas_Bool *need_to_update); +Evas_Bool eclair_database_search2(Eclair_Database *database, const char *keyword); #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair_dialogs.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- eclair_dialogs.c 10 Jun 2005 21:04:00 -0000 1.11 +++ eclair_dialogs.c 1 Jul 2005 14:25:39 -0000 1.12 @@ -17,6 +17,8 @@ static gboolean _eclair_dialogs_file_chooser_on_save_playlist(GtkWidget *widget, gpointer data); static gboolean _eclair_dialogs_file_chooser_on_delete(GtkWidget *widget, GdkEvent *event, gpointer data); +static void _eclair_dialogs_search_window_open(Eclair_Dialogs_Manager *dialogs_manager); + static void _eclair_dialogs_menu_on_add_files(GtkWidget *widget, gpointer data); static void _eclair_dialogs_menu_on_load_playlist(GtkWidget *widget, gpointer data); static void _eclair_dialogs_menu_on_save_playlist(GtkWidget *widget, gpointer data); @@ -27,6 +29,7 @@ static void _eclair_dialogs_menu_on_remove_unselected(GtkWidget *widget, gpointer data); static void _eclair_dialogs_menu_on_remove_all(GtkWidget *widget, gpointer data); static void _eclair_dialogs_menu_on_shuffle_mode(GtkWidget *widget, gpointer data); +static void _eclair_dialogs_menu_on_search_window(GtkWidget *widget, gpointer data); //Initialize dialogs manager void eclair_dialogs_init(Eclair_Dialogs_Manager *dialogs_manager, Eclair *eclair) @@ -51,8 +54,11 @@ dialogs_manager->menu_xml = NULL; dialogs_manager->menu_widget = NULL; + dialogs_manager->search_window_xml = NULL; + dialogs_manager->should_quit = FALSE; dialogs_manager->should_popup_menu = FALSE; + dialogs_manager->should_open_search_window = FALSE; dialogs_manager->should_open_file_chooser = ECLAIR_FC_NONE; pthread_create(&dialogs_manager->dialogs_thread, NULL, _eclair_dialogs_thread, eclair); @@ -81,37 +87,36 @@ //Will open the file chooser dialog to add files void eclair_dialogs_add_files_file_chooser(Eclair_Dialogs_Manager *dialogs_manager) { - if (!dialogs_manager) - return; - - dialogs_manager->should_open_file_chooser = ECLAIR_FC_ADD_FILES; + if (dialogs_manager) + dialogs_manager->should_open_file_chooser = ECLAIR_FC_ADD_FILES; } //Will open the file chooser dialog to load playlist void eclair_dialogs_load_playlist_file_chooser(Eclair_Dialogs_Manager *dialogs_manager) { - if (!dialogs_manager) - return; - - dialogs_manager->should_open_file_chooser = ECLAIR_FC_LOAD_PLAYLIST; + if (dialogs_manager) + dialogs_manager->should_open_file_chooser = ECLAIR_FC_LOAD_PLAYLIST; } //Will open the file chooser dialog to save the playlist void eclair_dialogs_save_playlist_file_chooser(Eclair_Dialogs_Manager *dialogs_manager) { - if (!dialogs_manager) - return; - - dialogs_manager->should_open_file_chooser = ECLAIR_FC_SAVE_PLAYLIST; + if (dialogs_manager) + dialogs_manager->should_open_file_chooser = ECLAIR_FC_SAVE_PLAYLIST; } //Will popup the eclair menu void eclair_popup_menu(Eclair_Dialogs_Manager *dialogs_manager) { - if (!dialogs_manager) - return; + if (dialogs_manager) + dialogs_manager->should_popup_menu = TRUE; +} - dialogs_manager->should_popup_menu = TRUE; +//Will open the playlist search window +void eclair_search_window(Eclair_Dialogs_Manager *dialogs_manager) +{ + if (dialogs_manager) + dialogs_manager->should_open_search_window = TRUE; } //Called each 50ms and check if we must do something (popup menu, open file selection dialog...) @@ -138,6 +143,11 @@ _eclair_dialogs_file_chooser_open(dialogs_manager, dialogs_manager->should_open_file_chooser); dialogs_manager->should_open_file_chooser = ECLAIR_FC_NONE; } + if (dialogs_manager->should_open_search_window) + { + _eclair_dialogs_search_window_open(dialogs_manager); + dialogs_manager->should_open_search_window = FALSE; + } return 1; } @@ -166,6 +176,7 @@ glade_xml_signal_connect_data(dialogs_manager->menu_xml, "remove_unselected_handler", G_CALLBACK(_eclair_dialogs_menu_on_remove_unselected), eclair); glade_xml_signal_connect_data(dialogs_manager->menu_xml, "remove_all_handler", G_CALLBACK(_eclair_dialogs_menu_on_remove_all), eclair); glade_xml_signal_connect_data(dialogs_manager->menu_xml, "shuffle_mode_handler", G_CALLBACK(_eclair_dialogs_menu_on_shuffle_mode), eclair); + glade_xml_signal_connect_data(dialogs_manager->menu_xml, "search_window_handler", G_CALLBACK(_eclair_dialogs_menu_on_search_window), eclair); g_timeout_add(50, _eclair_dialogs_update, dialogs_manager); @@ -332,6 +343,82 @@ } //------------------------------ +// Search window functions +//------------------------------ + +//Open the search window +static void _eclair_dialogs_search_window_open(Eclair_Dialogs_Manager *dialogs_manager) +{ + Eclair *eclair; + + if (!dialogs_manager || !(eclair = dialogs_manager->eclair)) + return; + + if (!dialogs_manager->search_window_xml || !dialogs_manager->search_window_window) + { + dialogs_manager->search_window_xml = glade_xml_new(PACKAGE_DATA_DIR "/glade/eclair.glade", "search_window", NULL); + dialogs_manager->search_window_window = glade_xml_get_widget(dialogs_manager->search_window_xml, "search_window"); + + /*dialogs_manager->file_chooser_all_button = glade_xml_get_widget(dialogs_manager->file_chooser_xml, "select_all_button"); + dialogs_manager->file_chooser_none_button = glade_xml_get_widget(dialogs_manager->file_chooser_xml, "select_none_button"); + dialogs_manager->file_chooser_save_playlist_button = glade_xml_get_widget(dialogs_manager->file_chooser_xml, "save_playlist_button"); + dialogs_manager->file_chooser_load_playlist_button = glade_xml_get_widget(dialogs_manager->file_chooser_xml, "load_playlist_button"); + dialogs_manager->file_chooser_add_files_button = glade_xml_get_widget(dialogs_manager->file_chooser_xml, "add_files_button"); + dialogs_manager->file_chooser_cancel_button = glade_xml_get_widget(dialogs_manager->file_chooser_xml, "cancel_button"); +*/ + /*g_signal_connect_swapped(dialogs_manager->file_chooser_all_button, "clicked", G_CALLBACK(gtk_file_chooser_select_all), dialogs_manager->file_chooser_widget); + g_signal_connect_swapped(dialogs_manager->file_chooser_none_button, "clicked", G_CALLBACK(gtk_file_chooser_unselect_all), dialogs_manager->file_chooser_widget); + g_signal_connect(dialogs_manager->file_chooser_save_playlist_button, "clicked", G_CALLBACK(_eclair_dialogs_file_chooser_on_save_playlist), eclair); + g_signal_connect(dialogs_manager->file_chooser_load_playlist_button, "clicked", G_CALLBACK(_eclair_dialogs_file_chooser_on_add_files), eclair); + g_signal_connect(dialogs_manager->file_chooser_add_files_button, "clicked", G_CALLBACK(_eclair_dialogs_file_chooser_on_add_files), eclair); + g_signal_connect_swapped(dialogs_manager->file_chooser_cancel_button, "clicked", G_CALLBACK(gtk_widget_hide), dialogs_manager->file_chooser_dialog); + g_signal_connect(dialogs_manager->file_chooser_dialog, "delete_event", G_CALLBACK(_eclair_dialogs_file_chooser_on_delete), eclair); + */} + + /*if (fc_type == ECLAIR_FC_ADD_FILES) + { + gtk_file_chooser_set_action(GTK_FILE_CHOOSER(dialogs_manager->file_chooser_widget), GTK_FILE_CHOOSER_ACTION_OPEN); + gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialogs_manager->file_chooser_widget), TRUE); + gtk_window_set_title(GTK_WINDOW(dialogs_manager->file_chooser_dialog), "Add Files"); + gtk_widget_show(dialogs_manager->file_chooser_all_button); + gtk_widget_show(dialogs_manager->file_chooser_none_button); + gtk_widget_hide(dialogs_manager->file_chooser_save_playlist_button); + gtk_widget_hide(dialogs_manager->file_chooser_load_playlist_button); + gtk_widget_show(dialogs_manager->file_chooser_add_files_button); + gtk_widget_show(dialogs_manager->file_chooser_cancel_button); + } + else if (fc_type == ECLAIR_FC_LOAD_PLAYLIST) + { + gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialogs_manager->file_chooser_widget), FALSE); + gtk_file_chooser_set_action(GTK_FILE_CHOOSER(dialogs_manager->file_chooser_widget), GTK_FILE_CHOOSER_ACTION_OPEN); + gtk_window_set_title(GTK_WINDOW(dialogs_manager->file_chooser_dialog), "Load Playlist"); + gtk_widget_hide(dialogs_manager->file_chooser_all_button); + gtk_widget_hide(dialogs_manager->file_chooser_none_button); + gtk_widget_hide(dialogs_manager->file_chooser_save_playlist_button); + gtk_widget_show(dialogs_manager->file_chooser_load_playlist_button); + gtk_widget_hide(dialogs_manager->file_chooser_add_files_button); + gtk_widget_show(dialogs_manager->file_chooser_cancel_button); + } + else if (fc_type == ECLAIR_FC_SAVE_PLAYLIST) + { + gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialogs_manager->file_chooser_widget), FALSE); + gtk_file_chooser_set_action(GTK_FILE_CHOOSER(dialogs_manager->file_chooser_widget), GTK_FILE_CHOOSER_ACTION_SAVE); + gtk_window_set_title(GTK_WINDOW(dialogs_manager->file_chooser_dialog), "Save Playlist"); + gtk_widget_hide(dialogs_manager->file_chooser_all_button); + gtk_widget_hide(dialogs_manager->file_chooser_none_button); + gtk_widget_show(dialogs_manager->file_chooser_save_playlist_button); + gtk_widget_hide(dialogs_manager->file_chooser_load_playlist_button); + gtk_widget_hide(dialogs_manager->file_chooser_add_files_button); + gtk_widget_show(dialogs_manager->file_chooser_cancel_button); + } + else + return;*/ + + //gtk_window_resize(GTK_WINDOW(dialogs_manager->file_chooser_dialog), 600, 400); + gtk_window_present(GTK_WINDOW(dialogs_manager->search_window_window)); +} + +//------------------------------ // Menu functions //------------------------------ @@ -414,3 +501,11 @@ if ((eclair = data)) eclair_playlist_set_shuffle(&eclair->playlist, gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))); } + +static void _eclair_dialogs_menu_on_search_window(GtkWidget *widget, gpointer data) +{ + Eclair *eclair; + + if ((eclair = data)) + eclair_search_window(&eclair->dialogs_manager); +} =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair_dialogs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- eclair_dialogs.h 20 May 2005 17:03:23 -0000 1.3 +++ eclair_dialogs.h 1 Jul 2005 14:25:40 -0000 1.4 @@ -9,5 +9,6 @@ void eclair_dialogs_load_playlist_file_chooser(Eclair_Dialogs_Manager *dialogs_manager); void eclair_dialogs_save_playlist_file_chooser(Eclair_Dialogs_Manager *dialogs_manager); void eclair_popup_menu(Eclair_Dialogs_Manager *dialogs_manager); +void eclair_search_window(Eclair_Dialogs_Manager *dialogs_manager); #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair_private.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- eclair_private.h 18 Jun 2005 16:00:35 -0000 1.20 +++ eclair_private.h 1 Jul 2005 14:25:40 -0000 1.21 @@ -119,8 +119,13 @@ GladeXML *menu_xml; GtkWidget *menu_widget; + //Search window vars + GladeXML *search_window_xml; + GtkWidget *search_window_window; + gboolean should_popup_menu; Eclair_Dialog_File_Chooser_Type should_open_file_chooser; + gboolean should_open_search_window; gboolean should_quit; pthread_t dialogs_thread; @@ -268,6 +273,7 @@ //Gui related vars Eclair_Window *gui_window; Eclair_Window *playlist_window; + Eclair_Window *equalizer_window; Eclair_Window *cover_window; Evas_Object *playlist_container; Eclair_Window *playlist_container_owner; |