Commits

jjacky committed 27ddede

- added tweak SyncDbsInTooltip to disable nb of dbs that can be synchronized in tooltip
- tweaks SyncDbsInTooltip & SaneSortOrder both default to 1 (enabled)

  • Participants
  • Parent commits 6ba3d6f

Comments (0)

Files changed (4)

                 }
                 else if (strcmp (key, "SaneSortOrder") == 0)
                 {
-                    if (*value == '1')
-                    {
-                        config->sane_sort_order = TRUE;
-                    }
+                    config->sane_sort_order = (*value == '1');
                     debug ("config: sane sort order: %d", config->sane_sort_order);
                 }
+                else if (strcmp (key, "SyncDbsInTooltip") == 0)
+                {
+                    config->syncdbs_in_tooltip = (*value == '1');
+                    debug ("config: syncdbs in tooltip: %d", config->syncdbs_in_tooltip);
+                }
                 else
                 {
                     set_error ("unknown option: %s", key);
     char            *pacmanconf;
     check_t          checks_manual;
     check_t          checks_auto;
+    int              syncdbs_in_tooltip;
     int              interval;
     int              timeout;
     int              has_skip;
         addstr ("ago");
     }
     
-    if (kalpm_state.nb_syncdbs > 0)
+    if (config->syncdbs_in_tooltip && kalpm_state.nb_syncdbs > 0)
     {
         addstr ("\nsync possible for %d dbs", kalpm_state.nb_syncdbs);
     }
     config->pacmanconf = strdup ("/etc/pacman.conf");
     config->interval = 3600; /* 1 hour */
     config->timeout = NOTIFY_EXPIRES_DEFAULT;
+    config->syncdbs_in_tooltip = TRUE;
     config->checks_manual = CHECK_UPGRADES | CHECK_WATCHED | CHECK_AUR
                             | CHECK_WATCHED_AUR | CHECK_NEWS;
     config->checks_auto   = CHECK_UPGRADES | CHECK_WATCHED | CHECK_AUR
                             | CHECK_WATCHED_AUR | CHECK_NEWS;
     config->action = UPGRADE_ACTION_KALU;
+    config->sane_sort_order = TRUE;
     
     config->tpl_upgrades = calloc (1, sizeof (templates_t));
     config->tpl_upgrades->title = strdup ("$NB updates available (D: $DL; N: $NET)");

File preferences.c

     new_config.tpl_news         = calloc (1, sizeof (templates_t));
     new_config.aur_ignore       = NULL;
     
-    /* this is a "tweak" not featured as GUI */
+    /* those are "tweaks" not featured in GUI */
     new_config.sane_sort_order = config->sane_sort_order;
     add_to_conf ("SaneSortOrder = %d\n", new_config.sane_sort_order);
     
+    new_config.syncdbs_in_tooltip = config->syncdbs_in_tooltip;
+    add_to_conf ("SyncDbsInTooltip = %d\n", new_config.syncdbs_in_tooltip);
+    
     /* General */
     s = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filechooser));
     if (NULL == s)