~ubuntu-branches/ubuntu/natty/xfce4-panel/natty

« back to all changes in this revision

Viewing changes to common/panel-utils.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:
11
11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12
12
 * more details.
13
13
 *
14
 
 * You should have received a copy of the GNU Library General Public License
15
 
 * along with this library; if not, write to the Free Software Foundation,
16
 
 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this library; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 */
18
18
 
19
19
#ifdef HAVE_CONFIG_H
225
225
 
226
226
  return grab_succeed;
227
227
}
 
228
 
 
229
 
 
230
 
 
231
void
 
232
panel_utils_set_atk_info (GtkWidget   *widget,
 
233
                          const gchar *name,
 
234
                          const gchar *description)
 
235
{
 
236
  static gboolean  initialized = FALSE;
 
237
  static gboolean  atk_enabled = TRUE;
 
238
  AtkObject       *object;
 
239
 
 
240
  panel_return_if_fail (GTK_IS_WIDGET (widget));
 
241
 
 
242
  if (atk_enabled)
 
243
    {
 
244
      object = gtk_widget_get_accessible (widget);
 
245
 
 
246
      if (!initialized)
 
247
        {
 
248
          initialized = TRUE;
 
249
          atk_enabled = GTK_IS_ACCESSIBLE (object);
 
250
 
 
251
          if (!atk_enabled)
 
252
            return;
 
253
        }
 
254
 
 
255
      if (name != NULL)
 
256
        atk_object_set_name (object, name);
 
257
 
 
258
      if (description != NULL)
 
259
        atk_object_set_description (object, description);
 
260
    }
 
261
}