~ubuntu-branches/ubuntu/raring/hplip/raring

« back to all changes in this revision

Viewing changes to io/hpmud/hp-mkuri.c

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-10-06 15:03:44 UTC
  • mfrom: (1.6.1) (20.1.16 quantal)
  • Revision ID: package-import@ubuntu.com-20121006150344-2p3xz26br0t3hu2q
Tags: 3.12.10-1
* New upstream release
  - Fixes "Network scanning fails (Closes: #683033)
* quilt refresh hplip-syslog-fix-debug-messages-to-error.dpatch
* Fix "error in clean build env" updated debian/rules (Closes: #687129)

Show diffs side-by-side

added added

removed removed

Lines of Context:
265
265
 
266
266
    /* Bypass glib build dependencies by loading libnotify manually. */  
267
267
 
268
 
    if ((handle = dlopen("libnotify.so.1", RTLD_LAZY)) == NULL)
 
268
    if ((handle = dlopen("libnotify.so.4", RTLD_LAZY)) == NULL)
269
269
    {
270
270
       BUG("failed to open libnotify: %m\n");
271
271
       goto bugout;
355
355
   if (hpmud_get_key_value(datfile, model, "fax-type", value, sizeof(value)) != HPMUD_R_OK)
356
356
      goto bugout;
357
357
   fax = strtol(value, NULL, 10);
 
358
   if (hpmud_get_key_value(datfile, model, "model1", m, sizeof(m)) != HPMUD_R_OK)
 
359
      goto bugout;
358
360
 
359
361
   /* See if device is supported by hplip. */
360
362
   if (support == HPMUD_SUPPORT_TYPE_NONE)
372
374
      switch (plugin)
373
375
      {
374
376
         case HPMUD_PLUGIN_TYPE_REQUIRED:
375
 
            BUG("%s requires a proprietary plugin\n", pm);
376
 
            notify(pm, "requires a proprietary plugin, run hp-setup", 30000);
 
377
            BUG("%s requires a proprietary plugin\n", m);
 
378
            notify(m, "requires a proprietary plugin, downloading and installing the plugin ...", 30000);
377
379
            break;
378
380
         case HPMUD_PLUGIN_TYPE_OPTIONAL:
379
 
            BUG("%s has a optional proprietary plugin\n", pm);
380
 
            notify(pm, "has a optional proprietary plugin, run hp-setup", 30000);
 
381
            BUG("%s has an optional proprietary plugin\n", m);
 
382
            notify(m, "has an optional proprietary plugin, run hp-plugin-ubuntu", 30000);
381
383
            break;
382
384
         default:
383
385
            break;
385
387
   }
386
388
 
387
389
   ret = 0;
388
 
   if (plugin == HPMUD_PLUGIN_TYPE_REQUIRED)
389
 
      ret = 2;
390
 
   else if (plugin == HPMUD_PLUGIN_TYPE_OPTIONAL)
391
 
      ret = 3;
 
390
   if (!plugin_installed)
 
391
   {
 
392
      if (plugin == HPMUD_PLUGIN_TYPE_REQUIRED)
 
393
         ret = 2;
 
394
      else if (plugin == HPMUD_PLUGIN_TYPE_OPTIONAL)
 
395
         ret = 3;
 
396
   }
392
397
   if (fax > 0)
393
398
   {
394
399
      ret = 4;
395
 
      if (plugin == HPMUD_PLUGIN_TYPE_REQUIRED)
396
 
         ret = 5;
397
 
      else if (plugin == HPMUD_PLUGIN_TYPE_OPTIONAL)
398
 
         ret = 6;
 
400
      if (!plugin_installed)
 
401
      {
 
402
         if (plugin == HPMUD_PLUGIN_TYPE_REQUIRED)
 
403
            ret = 5;
 
404
         else if (plugin == HPMUD_PLUGIN_TYPE_OPTIONAL)
 
405
            ret = 6;
 
406
      }
399
407
   }
400
408
 
401
409
bugout: