~ubuntu-branches/ubuntu/trusty/cairo-dock/trusty

« back to all changes in this revision

Viewing changes to src/help/applet-composite.c

  • Committer: Matthieu Baerts
  • Date: 2012-11-10 22:54:10 UTC
  • mfrom: (1.1.28)
  • Revision ID: matttbe@gmail.com-20121110225410-p7sssl0aizsoolr0
Tags: 3.1.1-0ubuntu1
* New upstream release. (bug-fix version)
* Detailed Upstream Changelog:
  - Dialogues Mgr: Rewrite blocking dialogue to avoid bug with 'terminal'
    applet
  - GUI
    + Simple:
      + Used the right translation for titles of all main categories and
        description of views
      + With old versions of GTK2 (< 2.22, e.g. on Debian stable or Ubuntu
        Lucid): this config panel had tabs but without any widget inside 
    + Advanced:
      + Widget Items: Invisible modules: displayed the title (which is
        translated) 
  - Icon Mgr:
    + Fixed a crash with the icons theme when it is reloaded
    + Icon was invisible for launchers that are pinned to a given desktop
    + Icons were not correctly sorted (it impacted Shortcuts) 
  - Init: Used dbus_g_thread_init before 'gtk_init' in order to be called
    before the first use of DBus
    + It should fixed a "random" crash when clicking on logout applet. 
  - Help: always check the composite on startup, until the user choose not to
  - Theme: Panel:
    + Added Printers-Menu.conf file (needed to place this applet at the
      right position)
    + Dnd2share: used the new 'busy' animation 
  - Misc.:
    + Compilation libdir: some distro (e.g. Gentoo) use LIB_SUFFIX flag:
      used a specific case for that
    + Updated translations 
* debian/patches/bzr_translate_titles_of_categories_and_readme.patch:
  - Removed: Now in upstream
* debian/control:
  - Forced the use of the same version of libgldi3

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
                gtk_box_pack_end (GTK_BOX (pAskBox), pCheckBox, FALSE, FALSE, 0);
169
169
                gtk_box_pack_end (GTK_BOX (pAskBox), label, FALSE, FALSE, 0);
170
170
                g_signal_connect (G_OBJECT (pCheckBox), "toggled", G_CALLBACK(_toggle_remember_choice), pAskBox);
171
 
                int iClickedButton = cairo_dock_show_dialog_and_wait (D_("To remove the black rectangle around the dock, you need to activate a composite manager.\nDo you want to activate it now?"), myIcon, myContainer, 0., NULL, pAskBox);
 
171
                int iClickedButton = cairo_dock_show_dialog_and_wait (D_("To remove the black rectangle around the dock, you need to activate a composite manager.\nDo you want to activate it now?"), myIcon, myContainer, NULL, pAskBox);
172
172
 
173
173
                gboolean bRememberChoice = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pCheckBox));
174
174
                gtk_widget_destroy (pAskBox);  // le widget survit a un dialogue bloquant.
219
219
                
220
220
                cd_help_enable_composite ();
221
221
        }
222
 
        else  // composite is active => everything is ok on startup => no need to test it in the future.
 
222
        else  // composite is active, but we don't remember this parameter, since it could change if another session is used one day.
223
223
        {
224
 
                myData.bTestComposite = FALSE;
225
224
                if (myData.bFirstLaunch)
226
225
                {
227
226
                        cd_help_show_welcome_message ();
228
227
                }
229
228
        }
230
229
        
231
 
        // remember to not test it any more.
 
230
        // remember if we don't need to check the composite any more.
232
231
        if (! myData.bTestComposite)
233
232
        {
234
233
                gchar *cConfFilePath = g_strdup_printf ("%s/.help", g_cCairoDockDataDir);
235
234
                cairo_dock_update_conf_file (cConfFilePath,
236
235
                        G_TYPE_BOOLEAN, "Launch", "test composite", myData.bTestComposite,
237
 
                        G_TYPE_INT, "Last Tip", "group", myData.iLastTipGroup,
238
 
                        G_TYPE_INT, "Last Tip", "key", myData.iLastTipKey,
239
 
                        G_TYPE_INVALID);  // write the tip too, in case it creates the file.
 
236
                        G_TYPE_INVALID);
240
237
                g_free (cConfFilePath);
241
238
        }
242
239
        myData.iSidTestComposite = 0;
247
244
{
248
245
        // read our file.
249
246
        gchar *cConfFilePath = g_strdup_printf ("%s/.help", g_cCairoDockDataDir);
250
 
        if (g_file_test (cConfFilePath, G_FILE_TEST_EXISTS))  // file already exists, get the last read tip.
 
247
        if (g_file_test (cConfFilePath, G_FILE_TEST_EXISTS))  // file already exists, get the latest state.
251
248
        {
252
249
                GKeyFile *pKeyFile = cairo_dock_open_key_file (cConfFilePath);
253
250
                if (pKeyFile != NULL)
263
260
        {
264
261
                myData.bFirstLaunch = TRUE;
265
262
                myData.bTestComposite = TRUE;
 
263
                
 
264
                // create the file with all the entries
 
265
                cairo_dock_update_conf_file (cConfFilePath,
 
266
                        G_TYPE_BOOLEAN, "Launch", "test composite", myData.bTestComposite,
 
267
                        G_TYPE_INT, "Last Tip", "group", myData.iLastTipGroup,
 
268
                        G_TYPE_INT, "Last Tip", "key", myData.iLastTipKey,
 
269
                        G_TYPE_INVALID);
266
270
        }
267
271
        
268
272
        // test the composite for a few seconds (the Composite Manager may not be active yet).