Show
Ignore:
Timestamp:
01/08/09 22:42:50 (3 years ago)
Author:
ath
Message:

Some initial improvements to FmGui's Marlin widget.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/fm_gui/src/marlin-window.c

    r272 r279  
    4040#include <libgnomevfs/gnome-vfs-mime.h> 
    4141 
    42 //#include <gconf/gconf-client.h> 
    43  
    44 #ifdef HAVE_MEDIA_PROFILES 
    45 #include <profiles/gnome-media-profiles.h> 
    46 #endif 
    47  
    4842#include <marlin/marlin-sample.h> 
    4943#include <marlin/marlin-sample-selection.h> 
     
    5347 
    5448#include <marlin/marlin-load-pipeline.h> 
    55 //#include <marlin/marlin-save-pipeline.h> 
    56 //#include <marlin/marlin-jack-play.h> 
    5749 
    5850#include <marlin/marlin-file-utils.h> 
     
    6557#include <marlin/marlin-a11y-helper.h> 
    6658#include <marlin/marlin-x-utils.h> 
    67 //#include <marlin/marlin-cross-fader.h> 
    6859#include <marlin/marlin-undo-manager.h> 
    6960#include <marlin/marlin-level-ruler.h> 
    70 //#include <marlin/marlin-plugin.h> 
    7161#include <marlin/marlin-base-window.h> 
    7262#include <marlin/marlin-progress-dialog.h> 
    7363#include <marlin/marlin-gst-extras.h> 
    74 //#include <marlin/marlin-file-chooser.h> 
    75  
    76 /*#include <dialogs/marlin-information-dialog.h> 
    77 #include <dialogs/marlin-adjust-channel-dialogs.h> 
    78 #include <dialogs/marlin-mp3-dialog.h> 
    79 #include <dialogs/marlin-vorbis-dialog.h> 
    80  
    81 #include <dialogs/marlin-crossfade-dialog.h> 
    82 #include <dialogs/marlin-select-region-dialog.h> 
    83 #include <dialogs/marlin-undo-history-dialog.h> 
    84 #include <dialogs/marlin-edit-marker-dialog.h> 
    85 #include <dialogs/marlin-add-marker-dialog.h> 
    86 #include <dialogs/marlin-move-cursor-dialog.h>*/ 
     64 
    8765 
    8866#include <marlin/marlin-beatsection-model.h> 
    8967 
    9068//#include <other/gtkvumeter.h> 
    91  
    92 //#include <marlin-toolbar.h> 
    93  
    94 //#include "main.h" 
    9569 
    9670#include "global.h" 
     
    10680        PROP_0, 
    10781        PROP_SAMPLE, 
     82        PROP_CDJ 
    10883}; 
    10984 
     
    168143        GtkActionGroup *ui_action, *popup_action; 
    169144        GObject *ui_merge; 
    170  
    171 //      MarlinJackPlay *jack; 
    172145         
    173146        MarlinState state; 
     
    184157        guint clip_id; /* Signal handler for listening to the clipboard */ 
    185158 
    186         /* Dialogs */ 
    187         GtkWidget *select_region_dialog; 
    188         GtkWidget *move_cursor_dialog; 
    189         GtkWidget *properties_dialog; 
    190         GtkWidget *xfade_dialog; 
    191         GtkWidget *adjust_channels_dialog; 
    192         GtkWidget *undo_history_dialog; 
    193         GtkWidget *edit_marker_dialog; 
    194         GtkWidget *add_marker_dialog; 
    195          
    196         time_t last_save; /* Time of the last save, in seconds */ 
    197  
    198159        GtkWidget *meters_event; /* Event box that holds the meters */ 
    199160        GtkWidget *left_vu, *right_vu; 
     
    202163        gboolean mv_in_marker; 
    203164        MarlinMarker *current_marker; 
     165 
     166//      FmCDJData *cdj; 
    204167}; 
    205168 
     
    250213        } 
    251214 
    252 /*      if (priv->select_region_dialog != NULL) { 
    253                 gtk_widget_destroy (priv->select_region_dialog); 
    254         }*/ 
    255  
    256 /*      if (priv->move_cursor_dialog != NULL) { 
    257                 gtk_widget_destroy (priv->move_cursor_dialog); 
    258         }*/ 
    259  
    260 /*      if (priv->properties_dialog != NULL) { 
    261                 gtk_widget_destroy (priv->properties_dialog); 
    262         }*/ 
    263          
    264 /*      if (priv->undo_history_dialog != NULL) { 
    265                 gtk_widget_destroy (priv->undo_history_dialog); 
    266         }*/ 
    267  
    268 /*      if (priv->xfade_dialog != NULL) { 
    269                 gtk_widget_destroy (priv->xfade_dialog); 
    270         }*/ 
    271          
    272 /*      if (priv->adjust_channels_dialog != NULL) { 
    273                 gtk_widget_destroy (priv->adjust_channels_dialog); 
    274         }*/ 
    275  
    276215        g_free (priv); 
    277216        window->priv = NULL; 
     
    328267        } 
    329268#endif 
    330 /*      if (priv->jack != NULL) { 
    331                 g_object_unref (priv->jack); 
    332                 priv->jack = NULL; 
    333         }*/ 
    334269 
    335270        if (priv->undo != NULL) { 
     
    792727        MarlinWindowPrivate *priv; 
    793728        GtkUIManager *merge; 
    794 //      GConfClient *client; 
    795 //      GList *plugins; 
    796729        char *xml; 
    797730         
     
    816749                            FALSE, TRUE, 0); 
    817750         
    818 /*      client = gconf_client_get_default (); 
    819         priv->position_display = gconf_client_get_int (client,  
    820                                                        "/apps/marlin/system-state/position-display", 
    821                                                        NULL); 
    822         priv->show_vu = gconf_client_get_bool (client,  
    823                                                "/apps/marlin/show-equalizers", 
    824                                                NULL); 
    825         g_object_unref (G_OBJECT (client));*/ 
    826  
    827751        priv->close_on_op_complete = FALSE; 
    828752        priv->state = MARLIN_STATE_STOPPED; 
     
    856780        g_free (xml); 
    857781 
    858         /* Merge all the plugins */ 
    859         /*for (plugins = marlin_plugin_get_list (); plugins; plugins = plugins->next) { 
    860                 MarlinPluginInfo *info = plugins->data; 
    861                 MarlinPluginFuncs *funcs = info->funcs; 
    862  
    863                 if (funcs->merge_ui) { 
    864                         funcs->merge_ui (merge, MARLIN_BASE_WINDOW (window)); 
    865                 } 
    866         }*/ 
    867  
    868782        priv->accel_group = gtk_ui_manager_get_accel_group (merge); 
    869783        gtk_window_add_accel_group (GTK_WINDOW (window), priv->accel_group); 
     
    872786        g_object_unref (priv->accel_group); 
    873787         
    874 /*      priv->toolbar = toolbar_new (window); 
    875         gtk_widget_show (GTK_WIDGET (priv->toolbar)); 
    876         gtk_box_pack_end (GTK_BOX (priv->menu_dock), GTK_WIDGET (priv->toolbar), 
    877                           FALSE, FALSE, 0);*/ 
    878          
    879         priv->last_save = time (NULL); 
    880788} 
    881789 
     
    15091417} 
    15101418 
    1511 /*static void 
    1512 display_no_jack_window (GtkWidget *window) 
    1513 { 
    1514         GtkWidget *dialog; 
    1515  
    1516         dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (window), 
    1517                                                      GTK_DIALOG_MODAL | 
    1518                                                      GTK_DIALOG_DESTROY_WITH_PARENT, 
    1519                                                      GTK_MESSAGE_WARNING, 
    1520                                                      GTK_BUTTONS_OK, 
    1521                                                      _("<b>Unable to start JACK</b>")); 
    1522         gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), 
    1523                                                   _("Marlin requires JACK for its audio output, but JACK failed to start.\n\n" 
    1524                                                     "Marlin will continue to run, but playback and recording features will be disabled")); 
    1525         gtk_dialog_run (GTK_DIALOG (dialog)); 
    1526  
    1527         gtk_widget_destroy (dialog); 
    1528 }*/ 
    15291419 
    15301420MarlinWindow * 
    1531 marlin_window_new (void) 
     1421marlin_window_new () 
    15321422{ 
    15331423        MarlinProgram *program = marlin_program_get_default ();