~ubuntu-branches/ubuntu/trusty/xfce4-panel/trusty

« back to all changes in this revision

Viewing changes to plugins/directorymenu/directorymenu.c

  • Committer: Package Import Robot
  • Author(s): Lionel Le Folgoc
  • Date: 2012-02-11 20:36:36 UTC
  • mfrom: (4.2.12 sid)
  • Revision ID: package-import@ubuntu.com-20120211203636-c3g9sml0h5ov5bgg
Tags: 4.8.6-2ubuntu1
* Resync with Debian unstable for the fixed French translation, remaining
  Ubuntu changes:
  - debian/patches:
    + xubuntu_support-multiple-vendor-default-configs.patch: search for
      the default.xml default config in XDG_CONFIG_DIRS as well, and do
      not display the chooser dialog in this case. lp #747137
    + series: refreshed.

* debian/patches:
  - xubuntu_directorymenu-fix-open-in-terminal.patch: added, cherry-pick
    some fixes from git master for the directorymenu panel plugin. lp: #877811

Show diffs side-by-side

added added

removed removed

Lines of Context:
620
620
static void
621
621
directory_menu_plugin_menu_open (GtkWidget   *mi,
622
622
                                 GFile       *dir,
623
 
                                 const gchar *category)
 
623
                                 const gchar *category,
 
624
                                 gboolean     path_as_arg)
624
625
{
625
626
  GError       *error = NULL;
626
627
  gchar        *working_dir;
631
632
  guint         i;
632
633
  gboolean      result = FALSE;
633
634
  gchar        *argv[3];
 
635
  gboolean      startup_notify = FALSE;
634
636
 
635
637
  /* try to work around the exo code and get the direct command */
636
638
  rc = xfce_rc_config_open (XFCE_RESOURCE_CONFIG, "xfce4/helpers.rc", TRUE);
645
647
 
646
648
          if (G_LIKELY (helperrc != NULL))
647
649
            {
648
 
              /* only try our custom stuff if startup notify is supported */
649
 
              if (xfce_rc_read_bool_entry (helperrc, "StartupNotify", FALSE))
650
 
                {
651
 
                  value = xfce_rc_read_entry_untranslated (helperrc, "X-XFCE-Binaries", NULL);
652
 
                  if (value != NULL)
653
 
                    binaries = g_strsplit (value, ";", -1);
654
 
                }
 
650
              startup_notify = xfce_rc_read_bool_entry (helperrc, "StartupNotify", FALSE);
 
651
              value = xfce_rc_read_entry_untranslated (helperrc, "X-XFCE-Binaries", NULL);
 
652
              if (value != NULL)
 
653
                binaries = g_strsplit (value, ";", -1);
655
654
 
656
655
              xfce_rc_close (helperrc);
657
656
            }
673
672
            continue;
674
673
 
675
674
          argv[0] = filename;
676
 
          argv[1] = working_dir;
 
675
          argv[1] = path_as_arg ? working_dir : NULL;
677
676
          argv[2] = NULL;
678
677
 
679
678
          /* try to spawn the program, if this fails we try exo for
680
679
           * a decent error message */
681
680
          result = xfce_spawn_on_screen (gtk_widget_get_screen (mi),
682
 
                                         working_dir, argv, NULL, 0, TRUE,
 
681
                                         working_dir, argv, NULL, 0,
 
682
                                         startup_notify,
683
683
                                         gtk_get_current_event_time (),
684
684
                                         NULL, NULL);
685
685
          g_free (filename);
710
710
  panel_return_if_fail (GTK_IS_WIDGET (mi));
711
711
  panel_return_if_fail (G_IS_FILE (dir));
712
712
 
713
 
  directory_menu_plugin_menu_open (mi, dir, "TerminalEmulator");
 
713
  directory_menu_plugin_menu_open (mi, dir, "TerminalEmulator", FALSE);
714
714
}
715
715
 
716
716
 
722
722
  panel_return_if_fail (GTK_IS_WIDGET (mi));
723
723
  panel_return_if_fail (G_IS_FILE (dir));
724
724
 
725
 
  directory_menu_plugin_menu_open (mi, dir, "FileManager");
 
725
  directory_menu_plugin_menu_open (mi, dir, "FileManager", TRUE);
726
726
}
727
727
 
728
728