~ubuntu-branches/ubuntu/vivid/xfce4-panel/vivid

« back to all changes in this revision

Viewing changes to plugins/showdesktop/showdesktop.c

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez
  • Date: 2011-02-27 00:55:05 UTC
  • mfrom: (4.1.4 experimental)
  • Revision ID: james.westby@ubuntu.com-20110227005505-i405gx4j4d1s0tjg
Tags: 4.8.2-1
New upstream bugfix release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13
13
 * more details.
14
14
 *
15
 
 * You should have received a copy of the GNU Library General Public License
16
 
 * along with this library; if not, write to the Free Software Foundation,
17
 
 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
15
 * You should have received a copy of the GNU Lesser General Public
 
16
 * License along with this library; if not, write to the Free Software
 
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 */
19
19
 
20
20
#ifdef HAVE_CONFIG_H
23
23
 
24
24
#include <libxfce4util/libxfce4util.h>
25
25
#include <common/panel-private.h>
 
26
#include <common/panel-utils.h>
26
27
 
27
28
#include "showdesktop.h"
28
29
 
177
178
show_desktop_plugin_toggled (GtkToggleButton   *button,
178
179
                             ShowDesktopPlugin *plugin)
179
180
{
180
 
  gboolean active;
 
181
  gboolean     active;
 
182
  const gchar *text;
181
183
 
182
184
  panel_return_if_fail (XFCE_IS_SHOW_DESKTOP_PLUGIN (plugin));
183
185
  panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (button));
188
190
  if (active != wnck_screen_get_showing_desktop (plugin->wnck_screen))
189
191
    wnck_screen_toggle_showing_desktop (plugin->wnck_screen, active);
190
192
 
191
 
  /* update the tooltip */
192
 
  gtk_widget_set_tooltip_text (GTK_WIDGET (button),
193
 
      active ? _("Restore the minimized windows") :
194
 
      _("Minimize all open windows and show the desktop"));
 
193
  if (active)
 
194
    text = _("Restore the minimized windows");
 
195
  else
 
196
    text = _("Minimize all open windows and show the desktop");
 
197
 
 
198
  gtk_widget_set_tooltip_text (GTK_WIDGET (button), text);
 
199
  panel_utils_set_atk_info (GTK_WIDGET (button), _("Show Desktop"), text);
195
200
}
196
201
 
197
202