~ubuntu-branches/ubuntu/quantal/gtkpod-aac/quantal

« back to all changes in this revision

Viewing changes to src/display.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-07-17 18:25:25 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070717182525-rhl5w4pk8lbk6pna
Tags: 0.99.10-2ubuntu1
* Resynchronise with gtkpod 0.9.10-2.
* Hack in dpatch support, since it was removed.
* Rename debian/patches/03-configure.dpatch to
  debian/patches/aac-configure.dpatch.
* Update debian/gtkpod-aac.diff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Time-stamp: <2006-09-21 23:12:28 jcs>
2
 
|
3
 
|  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 
1
/*
 
2
|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
4
3
|  Part of the gtkpod project.
5
4
6
5
|  URL: http://www.gtkpod.org/
24
23
25
24
|  This product is not supported/written/published by Apple!
26
25
|
27
 
|  $Id: display.h,v 1.116 2006/09/21 15:03:13 jcsjcs Exp $
 
26
|  $Id: display.h 1570 2007-06-21 15:27:11Z jcsjcs $
28
27
*/
29
28
 
30
29
#ifndef __DISPLAY_H__
38
37
#include <glade/glade.h>
39
38
#include "itdb.h"
40
39
#include "display_itdb.h"
 
40
#include "display_coverart.h"
41
41
 
42
42
/* Main XML glade file */
43
43
GladeXML *main_window_xml;
87
87
/* max. number of stars */
88
88
#define RATING_MAX 5
89
89
 
90
 
/* time between display refreshs in ms */
91
 
#define REFRESH_MS 200
92
 
/* initial count number between display refreshs -- will be
93
 
   re-calculated to match the time interval specified above */
94
 
#define REFRESH_INIT_COUNT 5
95
 
 
96
90
/* struct for each entry in sort tab */
97
91
typedef struct {
98
92
  gchar *name;
105
99
typedef struct {
106
100
    gchar *int_str;   /* copy of string specified in the sort tab */
107
101
    gboolean valid;   /* is current string valid? */
108
 
    guint32 lower;    /* MAC timestamp for lower limit */
109
 
    guint32 upper;    /* MAC timestamp for upper limit ("-1": no limit) */
 
102
    time_t lower;     /* timestamp for lower limit */
 
103
    time_t upper;     /* timestamp for upper limit ("-1": no limit) */
110
104
    GtkWidget *entry; /* pointer to GtkEntry in sort tab */
111
105
    GtkWidget *active;/* pointer to toggle button */
112
106
} TimeInfo;
144
138
} ST_item;
145
139
 
146
140
/* Column numbers in track model */
147
 
/* Note: the toggle buttons for tag_autoset and display_col
148
 
 * in the prefs_window are
149
 
 * named after the numbers (Title: tag_autoset0, Artist: tag_autoset1
150
 
 * etc.). Since the labels to the buttons are set in prefs_window.c
151
 
 * when creating the window, you only need to name the buttons in the
152
 
 * intended order using glade-2. There is no need to label them. */
153
141
/* Note: add corresponding entries to T_item and TM_to_T() as well 
154
142
 * (below and in misc_conversion.c). 
155
143
 * IMPORTANT: Do not change the order -- always add new entries at the
190
178
  TM_COLUMN_SUBTITLE,
191
179
  TM_COLUMN_TIME_RELEASED,
192
180
  TM_COLUMN_THUMB_PATH,
 
181
  TM_COLUMN_MEDIA_TYPE,       /* 35 */
 
182
  TM_COLUMN_TV_SHOW,
 
183
  TM_COLUMN_TV_EPISODE,
 
184
  TM_COLUMN_TV_NETWORK,
 
185
  TM_COLUMN_SEASON_NR,
 
186
  TM_COLUMN_EPISODE_NR,       /* 40 */
 
187
  TM_COLUMN_ALBUMARTIST,
 
188
  TM_COLUMN_SORT_ARTIST,
 
189
  TM_COLUMN_SORT_TITLE,
 
190
  TM_COLUMN_SORT_ALBUM,
 
191
  TM_COLUMN_SORT_ALBUMARTIST, /* 45 */
 
192
  TM_COLUMN_SORT_COMPOSER,
 
193
  TM_COLUMN_SORT_TVSHOW,
193
194
  TM_NUM_COLUMNS
194
195
} TM_item;
195
196
 
242
243
    T_REMEMBER_PLAYBACK_POSITION,
243
244
    T_SKIP_WHEN_SHUFFLING,
244
245
    T_THUMB_PATH,   /* 40 */
 
246
    T_MEDIA_TYPE,
 
247
    T_TV_SHOW,
 
248
    T_TV_EPISODE,
 
249
    T_TV_NETWORK,
 
250
    T_SEASON_NR,    /* 45 */
 
251
    T_EPISODE_NR,
 
252
    T_ALBUMARTIST,
 
253
    T_SORT_ARTIST,
 
254
    T_SORT_TITLE,
 
255
    T_SORT_ALBUM,   /* 50 */
 
256
    T_SORT_ALBUMARTIST,
 
257
    T_SORT_COMPOSER,
 
258
    T_SORT_TVSHOW,
245
259
    T_ITEM_NUM,
246
260
} T_item;
247
261
 
251
265
 
252
266
/* "Column numbers" in playlist model */
253
267
enum  {
254
 
  PM_COLUMN_PLAYLIST = 0,
 
268
  PM_COLUMN_ITDB = 0,
 
269
  PM_COLUMN_PLAYLIST,
255
270
  PM_NUM_COLUMNS
256
271
};
257
272
 
276
291
void display_reset (gint inst);
277
292
GList *display_get_selection (guint32 inst);
278
293
GList *display_get_selected_members (gint inst);
279
 
void display_enable_disable_view_sort (gboolean enable);
280
294
void display_remove_autoscroll_row_timeout (GtkWidget *widget);
281
295
void display_install_autoscroll_row_timeout (GtkWidget *widget);
282
296
 
283
 
Playlist* pm_get_selected_playlist(void);
284
 
GtkTreePath *pm_get_path (Playlist *pl);
 
297
Playlist* pm_get_selected_playlist (void);
 
298
gint pm_get_position_for_itdb (iTunesDB *itdb);
285
299
void pm_remove_playlist (Playlist *playlist, gboolean select);
286
300
void pm_add_playlist (Playlist *playlist, gint position);
287
301
void pm_add_itdb (iTunesDB *itdb, gint pos);
289
303
void pm_unselect_playlist (Playlist *playlist);
290
304
void pm_remove_track (Playlist *playlist, Track *track);
291
305
void pm_add_track (Playlist *playlist, Track *track, gboolean display);
292
 
void pm_name_changed (Playlist *playlist);
 
306
void pm_itdb_name_changed (iTunesDB *itdb);
293
307
void pm_track_changed (Track *track);
294
308
void pm_sort (GtkSortType order);
295
309
void pm_stop_editing (gboolean cancel);
299
313
                           Playlist *playlist);
300
314
 
301
315
void st_stop_editing (gint inst, gboolean cancel);
302
 
void st_page_selected (GtkNotebook *notebook, guint page);
 
316
gboolean st_set_selection (Itdb_Track *track);
303
317
void st_redisplay (guint32 inst);
304
318
void st_sort (GtkSortType order);
305
319
void st_remove_entry (TabEntry *entry, guint32 inst);
313
327
void sp_go (guint32 inst);
314
328
void sp_conditions_changed (guint32 inst);
315
329
 
316
 
TimeInfo *sp_update_date_interval_from_string (guint32 inst,
317
 
                                               T_item item,
318
 
                                               gboolean force_update);
319
330
void tm_add_track_to_track_model (Track *track, GtkTreeIter *into_iter);
320
 
guint tm_get_nr_of_tracks(void);
 
331
gint tm_get_nr_of_tracks(void);
321
332
void tm_rows_reordered(void);
322
333
gboolean tm_add_filelist (gchar *data, GtkTreePath *path,
323
334
                          GtkTreeViewDropPosition pos);
337
348
void display_set_default_sizes (void);
338
349
void display_show_hide_tooltips (void);
339
350
void display_set_info_window_menu (void);
340
 
void display_stop_update (gint inst);
341
351
 
342
352
void spl_edit (Playlist *spl);
343
353
void spl_edit_new (iTunesDB *itdb, gchar *name, gint32 pos);