~ubuntu-branches/ubuntu/lucid/brasero/lucid-updates

« back to all changes in this revision

Viewing changes to src/brasero-search-tracker.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-06-24 11:22:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100624112246-s5ubbf8tafqkir0m
Tags: 2.30.2-0ubuntu1
* New upstream release
  - Lot's of memleak fixes
  - Fixed a runtime warning related to cancelling tracker searches
  - Crash in brasero_data_project_node_removed at
    brasero-data-project.c:1163
  - brasero crashed with SIGSEGV in brasero_data_project_remove_node()
    (LP: #561319)
  - Fix a few runtime warnings with the Cover Editor
  - Text in cover editor does not show up automatically (LP: #469459)
  - Removed use of deprecated flags
  - Use accessor functions instead direct access (use GSEAL GnomeGoal)
  - Fix a bug in the layout on first start (side pane was hidden and
    remained so until the user moved it)
  - Save printer settings for cover printing
  - Write the contents of the GtkTextBuffer displayed line by displayed
    line which should improve the layout
  - "Write to Disc" button sensitivity regression
  - Fix flaw in mask that led libburn plugin not to work (not to be picked
    up actually) in some circumstances
  - Fails to burn ANY audio project
  - Move columns doesn't work (LP: #581759)
  - Brasero does not correctly handle double clicking on column separators
    (LP: #581885)
  - Bad info when burning, high CPU usage and slow burn
  - Change the priority for cdrdao and raised the one of cdda2wav plugin
  - brasero crashed with SIGSEGV in
    brasero_mmc3_get_performa nce_wrt_spd_desc() (LP: #564766)
  - brasero crashed with SIGSEGV in brasero_scsi_command_issue_sync()
    (LP: #444832)
  - Do not check for symlinks on cdda2wav so the plugin can use icedax.
  - Brasero's failure with some file names (LP: #380643)
  - Pressing create audio cd does nothing
  - Empty project not available
  - can't actually save error logs
  - doesn't handle incorrect temp dirs properly
  - Fix multi DND in GtkFileChooser
  - Displays "starting to record" during whole burn process
  - Fix wrong report of speed with both cdrecord and wodim
  - Disk project doesn't save the disk title (LP: #587924)
  - Brasero reports outdated cdrtools on cdrtools-3.00 (LP: #592075)
  - misc bug fixes
  - Updated Translations
* Removed upstream patches:
  - debian/patches/90_git_audio_project_creation.patch,
    debian/patches/91_git_audio_project_creation.patch,
    debian/patches/92_git_audio_cd_recording.patch,
    debian/patches/93_git_new_caps_function_definition.patch
* debian/patches/99_autoconf.patch:
  - refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
        gchar **mimes;
36
36
        gchar *keywords;
 
37
 
 
38
        guint current_call_id;
37
39
};
38
40
 
39
41
#define BRASERO_SEARCH_TRACKER_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), BRASERO_TYPE_SEARCH_TRACKER, BraseroSearchTrackerPrivate))
82
84
        if (!tracker_hit)
83
85
                return NULL;
84
86
 
85
 
        if (g_strv_length (tracker_hit) >= 1)
86
 
                return tracker_hit [0];
 
87
        if (g_strv_length (tracker_hit) >= 2)
 
88
                return tracker_hit [1];
87
89
 
88
90
        return NULL;
89
91
}
99
101
        if (!tracker_hit)
100
102
                return NULL;
101
103
 
102
 
        if (g_strv_length (tracker_hit) >= 2)
103
 
                return tracker_hit [1];
 
104
        if (g_strv_length (tracker_hit) >= 3)
 
105
                return tracker_hit [2];
104
106
 
105
107
        return NULL;
106
108
}
116
118
        if (!tracker_hit)
117
119
                return 0;
118
120
 
119
 
        if (g_strv_length (tracker_hit) >= 3)
120
 
                return (int) strtof (tracker_hit [2], NULL);
 
121
        if (g_strv_length (tracker_hit) >= 4)
 
122
                return (int) strtof (tracker_hit [3], NULL);
121
123
 
122
124
        return 0;
123
125
}
160
162
 
161
163
        priv = BRASERO_SEARCH_TRACKER_PRIVATE (search);
162
164
 
163
 
        query = g_string_new ("SELECT ?file ?mime fts:rank(?file) "             /* Which variables should be returned */
 
165
        query = g_string_new ("SELECT ?file ?url ?mime fts:rank(?file) "        /* Which variables should be returned */
164
166
                              "WHERE {"                                         /* Start defining the search and its scope */
165
167
                              "  ?file a nfo:FileDataObject . "                 /* File must be a file (not a stream, ...) */
166
 
                              "  ?file nie:mimeType ?mime . ");                 /* Get its mime */
 
168
                              "  ?file nie:url ?url . "                         /* Get the url of the file */
 
169
                              "  ?file nie:mimeType ?mime . ");                 /* Get its mime */
167
170
 
168
171
        if (priv->mimes) {
169
172
                int i;
172
175
                for (i = 0; priv->mimes [i]; i ++) {                            /* Filter files according to their mime type */
173
176
                        if (i > 0)
174
177
                                g_string_append (query, " || ");
 
178
 
175
179
                        g_string_append_printf (query,
176
180
                                                "?mime = \"%s\"",
177
181
                                                priv->mimes [i]);
228
232
                         "OFFSET 0 "
229
233
                         "LIMIT 10000");
230
234
 
231
 
        res = tracker_resources_sparql_query_async (priv->client,
232
 
                                                    query->str,
233
 
                                                    brasero_search_tracker_reply,
234
 
                                                    search);
 
235
        priv->current_call_id = tracker_resources_sparql_query_async (priv->client,
 
236
                                                                      query->str,
 
237
                                                                      brasero_search_tracker_reply,
 
238
                                                                      search);
235
239
        g_string_free (query, TRUE);
236
240
 
237
241
        return res;
305
309
 
306
310
        priv = BRASERO_SEARCH_TRACKER_PRIVATE (search);
307
311
 
308
 
        tracker_cancel_last_call (priv->client);
 
312
        if (priv->current_call_id)
 
313
                tracker_cancel_call (priv->client, priv->current_call_id);
309
314
 
310
315
        if (priv->results) {
311
316
                g_ptr_array_foreach (priv->results, (GFunc) g_strfreev, NULL);