Browse Source

Add the show desktop plugin.

Also a bunch of glade file cleanups and use xdg icons names.
upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
6a44a87dbf
  1. 1
      configure.in.in
  2. 44
      panel/panel-preferences-dialog.glade
  3. 1
      plugins/Makefile.am
  4. 54
      plugins/clock/clock-dialog.glade
  5. 2
      plugins/clock/clock.desktop.in.in
  6. 44
      plugins/launcher/launcher-dialog.glade
  7. 2
      plugins/launcher/launcher.desktop.in.in
  8. 47
      plugins/separator/separator-dialog.glade
  9. 67
      plugins/showdesktop/Makefile.am
  10. 205
      plugins/showdesktop/showdesktop.c
  11. 9
      plugins/showdesktop/showdesktop.desktop.in.in
  12. 41
      plugins/showdesktop/showdesktop.h
  13. 40
      plugins/systray/systray-dialog.glade
  14. 9
      plugins/systray/xfce-tray-dialogs.c
  15. 30
      plugins/tasklist/tasklist-dialog.glade
  16. 2
      plugins/tasklist/tasklist.desktop.in.in

1
configure.in.in

@ -242,6 +242,7 @@ wrapper/Makefile
plugins/Makefile
plugins/clock/Makefile
plugins/launcher/Makefile
plugins/showdesktop/Makefile
plugins/systray/Makefile
plugins/tasklist/Makefile
po/Makefile.in

44
panel/panel-preferences-dialog.glade

@ -5,9 +5,9 @@
<!-- interface-naming-policy toplevel-contextual -->
<object class="XfceTitledDialog" id="dialog">
<property name="title" translatable="yes">Xfce Panel Preferences</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="window_position">center-on-parent</property>
<property name="icon_name">gtk-preferences</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
@ -84,7 +84,7 @@
<object class="GtkFrame" id="frame5">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
@ -104,7 +104,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">_Orientation:</property>
<property name="use_underline">True</property>
<property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property>
<property name="wrap_mode">word-char</property>
<property name="mnemonic_widget">horizontal</property>
</object>
<packing>
@ -131,9 +131,10 @@
<object class="GtkCheckButton" id="locked">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Lock panel</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">_Lock panel</property>
</object>
<packing>
<property name="position">1</property>
@ -143,9 +144,10 @@
<object class="GtkCheckButton" id="autohide">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Automatically show and hi_de the panel</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Automatically show and hi_de the panel</property>
</object>
<packing>
<property name="position">2</property>
@ -172,7 +174,7 @@
<object class="GtkFrame" id="frame6">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
@ -215,10 +217,10 @@
<object class="GtkHScale" id="length-scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
<property name="update_policy">discontinuous</property>
<property name="adjustment">length</property>
<property name="digits">0</property>
<property name="value_pos">GTK_POS_RIGHT</property>
<property name="value_pos">right</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -231,10 +233,10 @@
<object class="GtkHScale" id="size-scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
<property name="update_policy">discontinuous</property>
<property name="adjustment">size</property>
<property name="digits">0</property>
<property name="value_pos">GTK_POS_RIGHT</property>
<property name="value_pos">right</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -279,7 +281,7 @@
<object class="GtkFrame" id="frame7">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
@ -308,7 +310,7 @@
<property name="can_focus">True</property>
<property name="adjustment">background-alpha</property>
<property name="digits">0</property>
<property name="value_pos">GTK_POS_RIGHT</property>
<property name="value_pos">right</property>
</object>
<packing>
<property name="position">1</property>
@ -335,7 +337,7 @@
<object class="GtkFrame" id="frame8">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
@ -381,7 +383,7 @@
<property name="can_focus">True</property>
<property name="adjustment">enter-opacity</property>
<property name="digits">0</property>
<property name="value_pos">GTK_POS_RIGHT</property>
<property name="value_pos">right</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -394,7 +396,7 @@
<property name="can_focus">True</property>
<property name="adjustment">leave-opacity</property>
<property name="digits">0</property>
<property name="value_pos">GTK_POS_RIGHT</property>
<property name="value_pos">right</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -468,14 +470,15 @@
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="close-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-close</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<property name="label" translatable="yes">gtk-close</property>
</object>
<packing>
<property name="position">0</property>
@ -486,8 +489,9 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-help</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<property name="label" translatable="yes">gtk-help</property>
</object>
<packing>
<property name="position">1</property>
@ -497,7 +501,7 @@
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>

1
plugins/Makefile.am

@ -3,6 +3,7 @@
SUBDIRS = \
clock \
launcher \
showdesktop \
systray \
tasklist

54
plugins/clock/clock-dialog.glade

@ -1,14 +1,15 @@
<?xml version="1.0"?>
<interface>
<!--interface-requires gtk+ 2.12-->
<object class="GtkDialog" id="xfce-clock-dialog">
<property name="title" translatable="yes">Clock Preferences</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="icon_name">gtk-preferences</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-requires xfce4 0.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="XfceTitledDialog" id="dialog">
<property name="title" translatable="yes">Clock Properties</property>
<property name="icon_name">gtk-properties</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
@ -20,7 +21,7 @@
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
@ -84,10 +85,10 @@
<object class="GtkCheckButton" id="checkbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show _frame</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Show _frame</property>
</object>
<packing>
<property name="right_attach">2</property>
@ -115,7 +116,7 @@
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
@ -131,9 +132,10 @@
<object class="GtkCheckButton" id="checkbutton3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Display _seconds</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Display _seconds</property>
</object>
<packing>
<property name="position">0</property>
@ -159,9 +161,10 @@
<object class="GtkCheckButton" id="checkbutton2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Display _seconds</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Display _seconds</property>
</object>
<packing>
<property name="position">0</property>
@ -171,9 +174,10 @@
<object class="GtkCheckButton" id="checkbutton4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">True _binary clock</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">True _binary clock</property>
</object>
<packing>
<property name="position">1</property>
@ -235,9 +239,10 @@
<object class="GtkCheckButton" id="checkbutton5">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Display _seconds</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Display _seconds</property>
</object>
<packing>
<property name="position">0</property>
@ -247,9 +252,10 @@
<object class="GtkCheckButton" id="checkbutton6">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">24-_hour clock</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">24-_hour clock</property>
</object>
<packing>
<property name="position">1</property>
@ -259,9 +265,10 @@
<object class="GtkCheckButton" id="checkbutton7">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Fl_ash time seperators</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Fl_ash time seperators</property>
</object>
<packing>
<property name="position">2</property>
@ -271,9 +278,10 @@
<object class="GtkCheckButton" id="checkbutton8">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Sho_w AM/PM</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Sho_w AM/PM</property>
</object>
<packing>
<property name="position">3</property>
@ -306,17 +314,17 @@
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<object class="GtkButton" id="close-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-close</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<property name="label" translatable="yes">gtk-close</property>
</object>
<packing>
<property name="position">0</property>
@ -325,7 +333,7 @@
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>

2
plugins/clock/clock.desktop.in.in

@ -3,7 +3,7 @@ Type=X-XFCE-PanelPlugin
Encoding=UTF-8
_Name=Clock
_Comment=What time is it?
Icon=x-office-calendar
Icon=office-calendar
X-XFCE-Module=clock
X-XFCE-Module-Path=@libdir@/xfce4/panel-plugins
X-XFCE-External=TRUE

44
plugins/launcher/launcher-dialog.glade

@ -1,13 +1,13 @@
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.14"/>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-requires xfce4 0.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="XfceTitledDialog" id="dialog">
<property name="title" translatable="yes">Launcher Properties</property>
<property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="window_position">center</property>
<property name="icon_name">gtk-properties</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
@ -31,9 +31,9 @@
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="entry-treeview">
<property name="visible">True</property>
@ -124,7 +124,7 @@
<child>
<object class="GtkArrow" id="arrow1">
<property name="visible">True</property>
<property name="arrow_type">GTK_ARROW_DOWN</property>
<property name="arrow_type">down</property>
</object>
<packing>
<property name="position">1</property>
@ -292,7 +292,7 @@
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
<property name="icon-size">1</property>
</object>
</child>
</object>
@ -308,7 +308,7 @@
<child>
<object class="GtkFileChooserButton" id="entry-working-directory">
<property name="visible">True</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="action">select-folder</property>
<property name="title" translatable="yes">Select A Working Directory</property>
</object>
<packing>
@ -323,9 +323,10 @@
<object class="GtkCheckButton" id="entry-terminal">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Run in _terminal</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Run in _terminal</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -339,9 +340,10 @@
<object class="GtkCheckButton" id="entry-startup-notify">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Use _statup notification</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Use _statup notification</property>
</object>
<packing>
<property name="left_attach">1</property>
@ -365,7 +367,7 @@
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="stock">gtk-execute</property>
<property name="icon_size">5</property>
<property name="icon-size">5</property>
</object>
</child>
</object>
@ -407,9 +409,10 @@
<object class="GtkCheckButton" id="disable-tooltips">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Disable t_ooltips</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Disable t_ooltips</property>
</object>
<packing>
<property name="expand">False</property>
@ -420,9 +423,10 @@
<object class="GtkCheckButton" id="show-labels">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show _labels instead of icons</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Show _labels instead of icons</property>
</object>
<packing>
<property name="expand">False</property>
@ -433,9 +437,10 @@
<object class="GtkCheckButton" id="move-first">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show last _used entry in panel</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Show last _used entry in panel</property>
</object>
<packing>
<property name="expand">False</property>
@ -462,7 +467,7 @@
<object class="GtkComboBox" id="arrow-position">
<property name="visible">True</property>
<property name="model">arrow-position-store</property>
<property name="button_sensitivity">GTK_SENSITIVITY_ON</property>
<property name="button_sensitivity">on</property>
</object>
<packing>
<property name="expand">False</property>
@ -498,14 +503,15 @@
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="close-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-close</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<property name="label" translatable="yes">gtk-close</property>
</object>
<packing>
<property name="position">0</property>
@ -514,7 +520,7 @@
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>

2
plugins/launcher/launcher.desktop.in.in

@ -3,7 +3,7 @@ Type=X-XFCE-PanelPlugin
Encoding=UTF-8
_Name=Launcher
_Comment=Program launcher with optional menu
Icon=gnome-fs-executable
Icon=application-x-executable
X-XFCE-Module=launcher
X-XFCE-Module-Path=@libdir@/xfce4/panel-plugins
X-XFCE-External=FALSE

47
plugins/separator/separator-dialog.glade

@ -1,21 +1,23 @@
<?xml version="1.0"?>
<interface>
<!--interface-requires gtk+ 2.12-->
<object class="GtkDialog" id="xfce-separator-dialog">
<property name="title" translatable="yes">Separator Preferences</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="icon_name">gtk-preferences</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-requires xfce4 0.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="XfceTitledDialog" id="dialog">
<property name="title" translatable="yes">Seperator Properties</property>
<property name="icon_name">gtk-properties</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
@ -29,10 +31,11 @@
<object class="GtkRadioButton" id="style-empty">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Empty space</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">_Empty space</property>
</object>
<packing>
<property name="position">0</property>
@ -42,11 +45,11 @@
<object class="GtkRadioButton" id="style-empty-expand">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">E_xpanding empty space</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">style-empty</property>
<property name="label" translatable="yes">E_xpanding empty space</property>
</object>
<packing>
<property name="position">1</property>
@ -56,11 +59,11 @@
<object class="GtkRadioButton" id="style-line">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Line</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">style-empty</property>
<property name="label" translatable="yes">_Line</property>
</object>
<packing>
<property name="position">2</property>
@ -70,11 +73,11 @@
<object class="GtkRadioButton" id="style-handle">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Handle</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">style-empty</property>
<property name="label" translatable="yes">_Handle</property>
</object>
<packing>
<property name="position">3</property>
@ -84,11 +87,11 @@
<object class="GtkRadioButton" id="style-dots">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Dots</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">style-empty</property>
<property name="label" translatable="yes">_Dots</property>
</object>
<packing>
<property name="position">4</property>
@ -112,17 +115,17 @@
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<object class="GtkButton" id="close-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-close</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<property name="label" translatable="yes">gtk-close</property>
</object>
<packing>
<property name="position">0</property>
@ -131,7 +134,7 @@
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>

67
plugins/showdesktop/Makefile.am

@ -0,0 +1,67 @@
# $Id$
INCLUDES = \
-I$(top_srcdir) \
-DBINDIR=\"$(bindir)\" \
-DG_LOG_DOMAIN=\"libshowdesktop\" \
-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
-DLOCALEDIR=\"$(localedir)\" \
$(PLATFORM_CPPFLAGS)
plugindir = \
$(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libshowdesktop.la
libshowdesktop_la_SOURCES = \
showdesktop.c \
showdesktop.h
libshowdesktop_la_CFLAGS = \
$(GTK_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
$(LIBWNCK_CFLAGS) \
$(PLATFORM_CFLAGS)
libshowdesktop_la_LDFLAGS = \
-avoid-version \
-module \
-no-undefined \
$(PLATFORM_LDFLAGS)
libshowdesktop_la_LIBADD = \
$(top_builddir)/libxfce4panel/libxfce4panel.la \
$(GTK_LIBS) \
$(LIBXFCE4UTIL_LIBS) \
$(LIBWNCK_LIBS)
libshowdesktop_la_DEPENDENCIES = \
$(top_builddir)/libxfce4panel/libxfce4panel.la
#
# .desktop file
#
desktopdir = \
$(datadir)/xfce4/panel-plugins
desktop_in_in_files = \
showdesktop.desktop.in.in
desktop_in_files = \
$(desktop_in_in_files:.desktop.in.in=.desktop.in)
%.desktop.in: %.desktop.in.in
sed -e "s,\@libdir\@,$(libdir),g" < $< > $@
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
EXTRA_DIST = \
$(desktop_in_in_files)
DISTCLEANFILES = \
$(desktop_DATA) \
$(desktop_in_files)
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:

205
plugins/showdesktop/showdesktop.c

@ -0,0 +1,205 @@
/* $Id$ */
/*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <libxfce4util/libxfce4util.h>
#include "showdesktop.h"
static void show_desktop_plugin_class_init (ShowDesktopPluginClass *klass);
static void show_desktop_plugin_init (ShowDesktopPlugin *plugin);
static void show_desktop_plugin_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen);
static void show_desktop_plugin_free_data (XfcePanelPlugin *panel_plugin);
static gboolean show_desktop_plugin_size_changed (XfcePanelPlugin *panel_plugin,
gint size);
static void show_desktop_plugin_toggled (GtkToggleButton *button,
ShowDesktopPlugin *plugin);
static void show_desktop_plugin_showing_desktop_changed (WnckScreen *wnck_screen,
ShowDesktopPlugin *plugin);
struct _ShowDesktopPluginClass
{
XfcePanelPluginClass __parent__;
};
struct _ShowDesktopPlugin
{
XfcePanelPlugin __parent__;
/* the toggle button */
GtkWidget *button;
/* the wnck screen */
WnckScreen *wnck_screen;
/* wnck signal */
gulong showing_desktop_changed_id;
};
G_DEFINE_TYPE (ShowDesktopPlugin, show_desktop_plugin, XFCE_TYPE_PANEL_PLUGIN);
/* register the panel plugin */
XFCE_PANEL_PLUGIN_REGISTER_OBJECT (XFCE_TYPE_SHOW_DESKTOP_PLUGIN);
static void
show_desktop_plugin_class_init (ShowDesktopPluginClass *klass)
{
GtkWidgetClass *gtkwidget_class;
XfcePanelPluginClass *plugin_class;
gtkwidget_class = GTK_WIDGET_CLASS (klass);
gtkwidget_class->screen_changed = show_desktop_plugin_screen_changed;
plugin_class = XFCE_PANEL_PLUGIN_CLASS (klass);
plugin_class->free_data = show_desktop_plugin_free_data;
plugin_class->size_changed = show_desktop_plugin_size_changed;
}
static void
show_desktop_plugin_init (ShowDesktopPlugin *plugin)
{
GtkWidget *button, *image;
/* init */
plugin->wnck_screen = NULL;
plugin->showing_desktop_changed_id = 0;
/* create the toggle button */
button = plugin->button = xfce_create_panel_toggle_button ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_container_add (GTK_CONTAINER (plugin), button);
g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (show_desktop_plugin_toggled), plugin);
xfce_panel_plugin_add_action_widget (XFCE_PANEL_PLUGIN (plugin), button);
gtk_widget_show (button);
/* add an icon */
image = xfce_scaled_image_new_from_icon_name ("user-desktop");
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_show (image);
}
static void
show_desktop_plugin_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen)
{
ShowDesktopPlugin *plugin = XFCE_SHOW_DESKTOP_PLUGIN (widget);
panel_return_if_fail (XFCE_IS_SHOW_DESKTOP_PLUGIN (widget));
/* disconnect signals from an existing wnck screen */
if (plugin->showing_desktop_changed_id != 0)
{
g_signal_handler_disconnect (plugin->wnck_screen, plugin->showing_desktop_changed_id);
plugin->showing_desktop_changed_id = 0;
}
/* set the new wnck screen */
plugin->wnck_screen = wnck_screen_get (gdk_screen_get_number (gtk_widget_get_screen (widget)));
plugin->showing_desktop_changed_id = g_signal_connect (G_OBJECT (plugin->wnck_screen),
"showing-desktop-changed",
G_CALLBACK (show_desktop_plugin_showing_desktop_changed),
plugin);
/* toggle the button to the current state or update the tooltip */
if (G_UNLIKELY (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (plugin->button)) !=
wnck_screen_get_showing_desktop (plugin->wnck_screen)))
show_desktop_plugin_showing_desktop_changed (plugin->wnck_screen, plugin);
else
show_desktop_plugin_toggled (GTK_TOGGLE_BUTTON (plugin->button), plugin);
}
static void
show_desktop_plugin_free_data (XfcePanelPlugin *panel_plugin)
{
ShowDesktopPlugin *plugin = XFCE_SHOW_DESKTOP_PLUGIN (panel_plugin);
/* disconnect handle */
if (plugin->showing_desktop_changed_id != 0)
g_signal_handler_disconnect (plugin->wnck_screen, plugin->showing_desktop_changed_id);
}
static gboolean
show_desktop_plugin_size_changed (XfcePanelPlugin *panel_plugin,
gint size)
{
panel_return_val_if_fail (XFCE_IS_SHOW_DESKTOP_PLUGIN (panel_plugin), FALSE);
/* keep the button squared */
gtk_widget_set_size_request (GTK_WIDGET (panel_plugin), size, size);
return TRUE;
}
static void
show_desktop_plugin_toggled (GtkToggleButton *button,
ShowDesktopPlugin *plugin)
{
gboolean active;
panel_return_if_fail (XFCE_IS_SHOW_DESKTOP_PLUGIN (plugin));
panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (button));
panel_return_if_fail (WNCK_IS_SCREEN (plugin->wnck_screen));
/* get the button state */
active = gtk_toggle_button_get_active (button);
/* toggle the desktop */
if (active != wnck_screen_get_showing_desktop (plugin->wnck_screen))
wnck_screen_toggle_showing_desktop (plugin->wnck_screen, active);
/* update the tooltip */
gtk_widget_set_tooltip_text (GTK_WIDGET (button),
active ? _("Restore hidden windows") :
_("Hide windows and show desktop"));
}
static void
show_desktop_plugin_showing_desktop_changed (WnckScreen *wnck_screen,
ShowDesktopPlugin *plugin)
{
panel_return_if_fail (XFCE_IS_SHOW_DESKTOP_PLUGIN (plugin));
panel_return_if_fail (WNCK_IS_SCREEN (wnck_screen));
panel_return_if_fail (plugin->wnck_screen == wnck_screen);
/* toggle the button */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin->button),
wnck_screen_get_showing_desktop (wnck_screen));
}

9
plugins/showdesktop/showdesktop.desktop.in.in

@ -0,0 +1,9 @@
[Xfce Panel]
Type=X-XFCE-PanelPlugin
Encoding=UTF-8
_Name=Show Desktop
_Comment=Toggle button that hides all windows and shows the desktop
Icon=user-desktop
X-XFCE-Module=showdesktop
X-XFCE-Module-Path=@libdir@/xfce4/panel-plugins
X-XFCE-External=FALSE

41
plugins/showdesktop/showdesktop.h

@ -0,0 +1,41 @@
/* $Id$ */
/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __XFCE_SHOW_DESKTOP_PLUGIN_H__
#define __XFCE_SHOW_DESKTOP_PLUGIN_H__
#include <gtk/gtk.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libwnck/libwnck.h>
G_BEGIN_DECLS
typedef struct _ShowDesktopPluginClass ShowDesktopPluginClass;
typedef struct _ShowDesktopPlugin ShowDesktopPlugin;
#define XFCE_TYPE_SHOW_DESKTOP_PLUGIN (show_desktop_plugin_get_type ())
#define XFCE_SHOW_DESKTOP_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHOW_DESKTOP_PLUGIN, ShowDesktopPlugin))
#define XFCE_SHOW_DESKTOP_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHOW_DESKTOP_PLUGIN, ShowDesktopPluginClass))
#define XFCE_IS_SHOW_DESKTOP_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHOW_DESKTOP_PLUGIN))
#define XFCE_IS_SHOW_DESKTOP_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHOW_DESKTOP_PLUGIN))
#define XFCE_SHOW_DESKTOP_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHOW_DESKTOP_PLUGIN, ShowDesktopPluginClass))
GType show_desktop_plugin_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* !__XFCE_SHOW_DESKTOP_PLUGIN_H__ */

40
plugins/systray/systray-dialog.glade

@ -1,14 +1,15 @@
<?xml version="1.0"?>
<interface>
<!--interface-requires gtk+ 2.12-->
<object class="GtkDialog" id="xfce-systray-dialog">
<property name="title" translatable="yes">Notification Area Preferences</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="icon_name">gtk-preferences</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<requires lib="gtk+" version="2.14"/>
<!-- interface-requires xfce4 0.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="XfceTitledDialog" id="dialog">
<property name="title" translatable="yes">Notification Area Properties</property>
<property name="icon_name">gtk-properties</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
@ -20,7 +21,7 @@
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
@ -68,9 +69,10 @@
<object class="GtkCheckButton" id="style-show-frame">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show _frame</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Show _frame</property>
</object>
<packing>
<property name="position">1</property>
@ -97,19 +99,19 @@
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">6</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="applications-treeview">
<property name="visible">True</property>
@ -138,17 +140,17 @@
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<object class="GtkButton" id="close-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-close</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<property name="label" translatable="yes">gtk-close</property>
</object>
<packing>
<property name="position">0</property>
@ -157,7 +159,7 @@
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>

9
plugins/systray/xfce-tray-dialogs.c

@ -116,10 +116,11 @@ xfce_tray_dialogs_icon (GtkIconTheme *icon_theme,
const gchar *p;
const gchar *fallback[][2] =
{
/* application name , fallback icon name or path */
{ "xfce-mcs-manager", "input-mouse" },
{ "bluetooth-applet", "stock_bluetooth" },
{ "gdl_box", "/opt/google/desktop/resource/gdl_small.png" }
/* application name , fallback icon name or path */
{ "xfce-mcs-manager", "input-mouse" },
{ "bluetooth-applet", "stock_bluetooth" },
{ "gdl_box", "/opt/google/desktop/resource/gdl_small.png" },
{ "networkmanager applet", "network-workgroup" },
};
/* return null on no name */

30
plugins/tasklist/tasklist-dialog.glade

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.14"/>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-requires xfce4 0.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkListStore" id="style-model">
@ -20,7 +20,7 @@
<object class="XfceTitledDialog" id="dialog">
<property name="title" translatable="yes">Tasklist Properties</property>
<property name="icon_name">gtk-properties</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
@ -35,7 +35,7 @@
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
@ -82,9 +82,10 @@
<object class="GtkCheckButton" id="flat-buttons">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show _flat buttons</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Show _flat buttons</property>
</object>
<packing>
<property name="position">1</property>
@ -94,9 +95,10 @@
<object class="GtkCheckButton" id="show-handle">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show _handle</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Show _handle</property>
</object>
<packing>
<property name="position">2</property>
@ -123,7 +125,7 @@
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
@ -167,9 +169,10 @@
<object class="GtkCheckButton" id="include-all-workspaces">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show windows from _all workspaces</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Show windows from _all workspaces</property>
</object>
<packing>
<property name="position">1</property>
@ -179,9 +182,10 @@
<object class="GtkCheckButton" id="show-only-minimized">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show only _minimized windows</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Show only _minimized windows</property>
</object>
<packing>
<property name="position">2</property>
@ -191,9 +195,10 @@
<object class="GtkCheckButton" id="switch-workspace-on-unminimize">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Restore minimized windows to current _workspace</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">Restore minimized windows to current _workspace</property>
</object>
<packing>
<property name="position">3</property>
@ -225,14 +230,15 @@
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="close-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="yes">gtk-close</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<property name="label" translatable="yes">gtk-close</property>
</object>
<packing>
<property name="position">0</property>
@ -241,7 +247,7 @@
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>

2
plugins/tasklist/tasklist.desktop.in.in

@ -3,7 +3,7 @@ Type=X-XFCE-PanelPlugin
Encoding=UTF-8
_Name=Task List
_Comment=Show all running applications
Icon=xfwm4
Icon=preferences-system-windows
X-XFCE-Module=tasklist
X-XFCE-Module-Path=@libdir@/xfce4/panel-plugins
X-XFCE-External=FALSE

Loading…
Cancel
Save