~timo-jyrinki/bamf/ubuntu-0.2.124.1

« back to all changes in this revision

Viewing changes to lib/libbamf/bamf-factory.c

  • Committer: Timo Jyrinki
  • Date: 2012-11-14 07:15:04 UTC
  • mfrom: (235.1.49)
  • Revision ID: timo.jyrinki@canonical.com-20121114071504-s8umq349iaf7lwq6
* New upstream release.
  - Includes all previous cherry-picks
  - remerge libbamf, Makefile: don't export private symbols (factory 
    and matcher)
  - BamfMatcher: force a view as closed or not-closed on proper 
    signals. This avoids that a view that is opened is actually 
    marked as closed when really it's running. (LP: #925421)
  - Daemon, BamfApplication: Use the default icon if there is not 
    one defined in the desktop file. (LP: #886778)
  - BamfMatcher: don't reopen windows when iterating on view's 
    list, add tests.
  - Build fixes, including enabling introspection.
  - BamfMatcher: add support for libreoffice Base, and libreoffice 
    matching tests (LP: #1063862)

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
  
96
96
  g_return_if_fail (BAMF_IS_VIEW (view));
97
97
  
98
 
  path = bamf_view_get_path (view);
 
98
  path = _bamf_view_get_path (view);
99
99
  if (path)
100
100
    g_hash_table_remove (self->priv->views, path);
101
101
  
128
128
}
129
129
 
130
130
BamfApplication * 
131
 
bamf_factory_app_for_file (BamfFactory * factory,
 
131
_bamf_factory_app_for_file (BamfFactory * factory,
132
132
                           const char * path,
133
133
                           gboolean create)
134
134
{
190
190
}
191
191
 
192
192
BamfView * 
193
 
bamf_factory_view_for_path (BamfFactory * factory, const char * path)
 
193
_bamf_factory_view_for_path (BamfFactory * factory, const char * path)
194
194
{
195
 
  return bamf_factory_view_for_path_type (factory, path, BAMF_FACTORY_NONE);
 
195
  return _bamf_factory_view_for_path_type (factory, path, BAMF_FACTORY_NONE);
196
196
}
197
197
 
198
198
BamfView * 
199
 
bamf_factory_view_for_path_type_str (BamfFactory * factory, const char * path,
 
199
_bamf_factory_view_for_path_type_str (BamfFactory * factory, const char * path,
200
200
                                                            const char * type)
201
201
{
202
202
  g_return_val_if_fail (BAMF_IS_FACTORY (factory), NULL);
203
203
  BamfFactoryViewType factory_type = compute_factory_type_by_str (type);
204
204
 
205
 
  return bamf_factory_view_for_path_type (factory, path, factory_type);
 
205
  return _bamf_factory_view_for_path_type (factory, path, factory_type);
206
206
}
207
207
 
208
 
BamfView * 
209
 
bamf_factory_view_for_path_type (BamfFactory * factory, const char * path,
210
 
                                                        BamfFactoryViewType type)
 
208
BamfView *
 
209
_bamf_factory_view_for_path_type (BamfFactory * factory, const char * path,
 
210
                                                         BamfFactoryViewType type)
211
211
{
212
212
  GHashTable *views;
213
213
  BamfView *view;
228
228
  if (type == BAMF_FACTORY_NONE)
229
229
    {
230
230
      view = g_object_new (BAMF_TYPE_VIEW, NULL);
231
 
      bamf_view_set_path (view, path);
 
231
      _bamf_view_set_path (view, path);
232
232
      type = compute_factory_type_by_str (bamf_view_get_view_type (view));
233
233
      g_object_unref (view);
234
234
      view = NULL;
283
283
          if (!list_desktop_file && !matched_view)
284
284
            {
285
285
              GList *list_children, *ll;
286
 
              list_children = bamf_application_get_cached_xids (list_app);
 
286
              list_children = _bamf_application_get_cached_xids (list_app);
287
287
 
288
288
              for (ll = local_children; ll; ll = ll->next)
289
289
                {
332
332
      g_object_unref (view);
333
333
 
334
334
      view = matched_view;
335
 
      bamf_view_set_path (view, path);
 
335
      _bamf_view_set_path (view, path);
336
336
      g_object_ref_sink (view);
337
337
    }
338
338
 
351
351
}
352
352
 
353
353
BamfFactory * 
354
 
bamf_factory_get_default (void)
 
354
_bamf_factory_get_default (void)
355
355
{
356
356
  
357
357
  if (BAMF_IS_FACTORY (factory))