~ubuntu-branches/ubuntu/oneiric/gnome-panel/oneiric

« back to all changes in this revision

Viewing changes to applets/wncklet/window-list.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-08-26 11:28:21 UTC
  • mfrom: (1.7.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090826112821-iarty9ls1ushw425
Tags: 1:2.27.91-0ubuntu1
* New upstream release (LP: #418975)
  Panel
  - Drop dead code (Vincent)
  - Don't show icons icons for actions and categories (William Jon
    McCann, Matthias Clasen, Vincent)
  - Remove use of GnomeEntry in run dialog (Diego Escalante Urrelo,
    Vincent)
  - Port to GtkBuilder (Vincent)
  - Make the run button icon respect the desktop-wide setting (Vincent)
  - Add gnome-panel-add script to allow easy addition of applets
    (Vincent)
  - Use g_timeout_add_seconds to reduce wakeups (Javier Jardón)
  - Ignore overlapping monitors and just use the largest one (Federico
    Mena Quintero)
  - Put LVDS as first monitor (Federico Mena Quintero)
  - Correctly set struts when two panels are right-oriented (Alexey
    Rusakov)
  - Use /desktop/gnome/lockdown/disable_lock_screen (Vincent)
  - Use a different define for the size of the Applications menu icon
    (Vincent)
  - Clarify warning message at forced quit (Gabor Kelemen)
  - Make sure to preload /apps/panel/general early enough (Behdad
    Esfahbod)
  - Remove empty labels from translation (Andre Klapper)
  - Do not use non-existing monitors for toplevels (Vincent)
  - Do not save monitor changes that are caused by constraints (Vincent)
  - Use randr 1.3 features to detect the first monitor when possible
    (Vincent)
  - Use XRRGetScreenResourcesCurrent() when possible (Vincent)
  - Improve check for LVDS-named output (Vincent)
  - Remove deprecated Encoding key from desktop file (Frédéric Péters)
  libpanel-applet
  - Port to GtkBuilder (Diego Escalante Urrelo, Vincent)
  All Applets
  - Port to GtkBuilder (Vincent)
  Clock Applet
  - Change "Clock Options" label to "Clock Format" (Vincent)
  - Launch the configured calendar/tasks application instead of evolution
    (Alex Converse, Vincent)
  - Port to PolicyKit 1 (Matthias Clasen)
  - Make default PolicyKit configuration stricter (Vincent)
  - Do not crash when setting time/timezone without PolicyKit (Matt Keenan)
  - Do not use obsolete and unneeded daylight variable (Alexis Ballier)
  - Fix confusion between GTime and time_t (Matthias Drochner)
  - Add missing mnemonics and window title (Gabor Kelemen)
  - Use g_timeout_add_seconds to reduce wakeups (Javier Jardón)
  - Do not place on the map locations with lat = 0 and lon = 0 (Vincent)
  - Make it possible to change the name of a location (Vincent)
  - Add/improve translator comments (Vincent)
  - Code cleanups (Vincent)
  Notification Area Applet
  - Allow more flexibility for NaTrayChild compositing (Owen Taylor)
  - Use g_timeout_add_seconds to reduce wakeups (Javier Jardón)
  Misc
  - Add ACLOCAL_AMFLAGS (Sébastien Bacher)
  - Use silent-rules instead of shave for quiet build (Vincent)
  - Remove workaround for scrollkeeper (Vincent)
  - Remove libglade dependency (Vincent)
  - Require libgweather 2.27.90 (Vincent)
* debian/control.in:
  - Drop build-depends on libglade2-dev
  - Bump build-depends on libgweather-dev
* debian/patches/02_polkit1.patch:
* debian/patches/06_clock_permissions.patch:
* debian/patches/31_correct_aclocal_command.patch:
  - Applied upstream
* debian/patches/01_layout.patch:
* debian/patches/08_clock_applet_event.patch:
* debian/patches/09_default_icons.patch:
* debian/patches/16_compiz_workspace_switcher.patch:
* debian/patches/17_about-ubuntu-translation.patch:
* debian/patches/30_disable-initial-animation.patch:
* debian/patches/70_relibtoolize.patch:
* debian/patches/85_disable_shutdown_on_ltsp.patch:
* debian/patches/99_ltmain_as-needed.patch:
  - Updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <glib/gi18n.h>
23
23
#include <gtk/gtk.h>
24
 
#include <glade/glade-xml.h>
25
24
#include <libwnck/libwnck.h>
26
25
#include <gconf/gconf-client.h>
27
26
 
649
648
                                     NULL);
650
649
}
651
650
 
 
651
#define WID(s) GTK_WIDGET (gtk_builder_get_object (builder, s))
 
652
 
652
653
static void
653
654
setup_sensitivity (TasklistData *tasklist,
654
655
                   GConfClient *client,
655
 
                   GladeXML *xml,
 
656
                   GtkBuilder *builder,
656
657
                   const char *wid1,
657
658
                   const char *wid2,
658
659
                   const char *wid3,
670
671
        }
671
672
        g_free (fullkey);
672
673
 
673
 
        w = glade_xml_get_widget (xml, wid1);
 
674
        w = WID (wid1);
674
675
        g_assert (w != NULL);
675
676
        gtk_widget_set_sensitive (w, FALSE);
676
677
 
677
678
        if (wid2 != NULL) {
678
 
                w = glade_xml_get_widget (xml, wid2);
 
679
                w = WID (wid2);
679
680
                g_assert (w != NULL);
680
681
                gtk_widget_set_sensitive (w, FALSE);
681
682
        }
682
683
        if (wid3 != NULL) {
683
 
                w = glade_xml_get_widget (xml, wid3);
 
684
                w = WID (wid3);
684
685
                g_assert (w != NULL);
685
686
                gtk_widget_set_sensitive (w, FALSE);
686
687
        }
687
688
 
688
689
}
689
690
 
690
 
#define WID(s) glade_xml_get_widget (xml, s)
691
 
 
692
691
static void
693
 
setup_dialog (GladeXML     *xml,
 
692
setup_dialog (GtkBuilder   *builder,
694
693
              TasklistData *tasklist)
695
694
{
696
695
        GConfClient *client;
701
700
        tasklist->show_current_radio = WID ("show_current_radio");
702
701
        tasklist->show_all_radio = WID ("show_all_radio");
703
702
 
704
 
        setup_sensitivity (tasklist, client, xml,
 
703
        setup_sensitivity (tasklist, client, builder,
705
704
                           "show_current_radio",
706
705
                           "show_all_radio",
707
706
                           NULL,
711
710
        tasklist->auto_group_radio = WID ("auto_group_radio");
712
711
        tasklist->always_group_radio = WID ("always_group_radio");
713
712
 
714
 
        setup_sensitivity (tasklist, client, xml,
 
713
        setup_sensitivity (tasklist, client, builder,
715
714
                           "never_group_radio",
716
715
                           "auto_group_radio",
717
716
                           "always_group_radio",
721
720
        tasklist->move_minimized_radio = WID ("move_minimized_radio");
722
721
        tasklist->change_workspace_radio = WID ("change_workspace_radio");
723
722
 
724
 
        setup_sensitivity (tasklist, client, xml,
 
723
        setup_sensitivity (tasklist, client, builder,
725
724
                           "move_minimized_radio",
726
725
                           "change_workspace_radio",
727
726
                           NULL,
772
771
                           const gchar       *verbname)
773
772
{
774
773
        if (tasklist->properties_dialog == NULL) {
775
 
                GladeXML  *xml;
776
 
 
777
 
                xml = glade_xml_new (TASKLIST_GLADEDIR "/window-list.glade", NULL, NULL);
778
 
                tasklist->properties_dialog = glade_xml_get_widget (xml, "tasklist_properties_dialog");
 
774
                GtkBuilder *builder;
 
775
                GError     *error;
 
776
 
 
777
                builder = gtk_builder_new ();
 
778
                gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
 
779
 
 
780
                error = NULL;
 
781
                gtk_builder_add_from_file (builder, TASKLIST_BUILDERDIR "/window-list.ui", &error);
 
782
                if (error) {
 
783
                        g_warning ("Error loading preferences: %s", error->message);
 
784
                        g_error_free (error);
 
785
                        return;
 
786
                }
 
787
 
 
788
                tasklist->properties_dialog = WID ("tasklist_properties_dialog");
779
789
 
780
790
                g_object_add_weak_pointer (G_OBJECT (tasklist->properties_dialog),
781
791
                                           (void**) &tasklist->properties_dialog);
782
792
 
783
 
                setup_dialog (xml, tasklist);
 
793
                setup_dialog (builder, tasklist);
784
794
                
785
 
                g_object_unref (G_OBJECT (xml));
 
795
                g_object_unref (builder);
786
796
        }
787
797
 
788
798
        gtk_window_set_icon_name (GTK_WINDOW (tasklist->properties_dialog),